LaTeX 遇到各种小问题汇总

1 篇文章 0 订阅

系统,Ubuntu 18.04LTS

1. 字数统计

用tex模板写毕业论文,发现字数统计的好工具:texcount
如果安装了完整的tex发行版,在命令行输入texdoc texcount 查看相关说明
论文模板有多个文件用了\include,统计字数时找主文件:

$ texcount thesis.tex -merge

2. 去除目录页眉页脚

目录有多页时,去除每一页页眉页脚

\setcounter{page}{0}
\thispagestyle{empty}
\tableofcontents
\setcounter{page}{0}
\thispagestyle{empty}
\newpage
\setcounter{page}{1}

3. 字体设置

分别改变文本字体和数学字体,而不需要同时使用(参考pkuthss)

\usepackage[defaultsups]{newtxtext}
\usepackage[cmintegrals,varg]{newtxmath}

4. hyperref warning

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing '\xxx' on input line xxxx.

hyperref: takes the text for bookmarks from the arguments of commands like \section, which can
contain things like math, colors, or font changes, none of which will display in bookmarks as is.

\texorpdfstring{TEXstring}{PDFstring}

5. xeCJK warning

Package fontspec Warning: Font "FandolSong-Regular" does not contain requested (fontspec) Script "CJK".
虽然无伤大雅,但是还是不爽,解决方法就是不用xeCJK,还是老实ctex吧,复制windows字体到ubuntu,

\usepackage[fontset=windows]{ctex}

效果感觉不错

6. 图表标题放右侧

有些答案说floatrow和浮动环境不兼容,minipage是很好的办法

\begin{figure}[htbp]
     \begin{minipage}[b]{.65\textwidth}
         \includegraphics[width=\textwidth]{picture.eps}
     \end{minipage}\hfill
     \begin{minipage}[b]{.3\textwidth}
         \caption{图像}
     \end{minipage}
 \end{figure}
  • 8
    点赞
  • 37
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值