Latex 经常见到的问题和解决方法

2017-04-10  22:05:48

【资源下载】

1). Texlive 2019 下载地址:http://mirror.ctan.org/systems/texlive/Images/texlive2019.iso

2). AweSome LaTex: https://github.com/egeerardyn/awesome-LaTeX

3). TexMaker (Free cross-platform LaTeX editor since 2003 (Windows, MacOsX, Linux)):  https://www.xm1math.net/texmaker/

1. IEEE 模板添加 通信作者的时候,总是无法正常显示(脚注无法正常显示):

  因为 IEEE默认是屏蔽了这个功能,需要在编辑的 .tex 文件中,添加这么一句话:

  \IEEEoverridecommandlockouts 

  Latex 经常见到的问题和解决方法-LMLPHP

  然后就是:

  Latex 经常见到的问题和解决方法-LMLPHP

  生成的 pdf文件就是正常的了:

  Latex 经常见到的问题和解决方法-LMLPHP


2. 参考文献引用过程中,经常遇到 & 符号的问题,例如:

@article{Wang2016Person,
title={Person Re-Identification by Discriminative Selection in Video Ranking},
author={Wang, Taiqing and Gong, Shaogang and Zhu, Xiatian and Wang, Shengjin},
journal={IEEE Transactions on Pattern Analysis & Machine Intelligence},
volume={38},
number={12},
pages={1-1},
year={2016},
}

  这里面的 & 符号在latex 中是无法直接编译过去的,需要用转义字符 \& 或者直接将其删除。

  另一个需要注意的地方是:latex调用 .bib 参考文献的时候,需要四个步骤:

  ==>>  pdflatex, bibtex, pdflatex, pdflatex

  这样子,才可以在生成的 pdf 文件中,得到正确的参考文献显示。

3. The Textlive in linux operation, you  can install textlive 2017 and texmaker from software center.

$ sudo mount -a /path/to/your/textlive/ /home/wangxiao/textlive/
$ cd /home/wangxiao/textlive/
$ sudo ./install-tl -gui

  

## seting the environment:

sudo gedit ~/.bashrc

and add the following lines into your file.

export MANPATH=${MANPATH}:/usr/local/texlive/2016/texmf-dist/doc/man
export INFOPATH=${INFOPATH}:/usr/local/texlive/2016/texmf-dist/doc/info
export PATH=${PATH}:/usr/local/texlive/2016/bin/x86_64-linux

Latex 经常见到的问题和解决方法-LMLPHP

Latex 经常见到的问题和解决方法-LMLPHP

Configure your texmaker according to above figures.

 4. Latex 排版带有大括号 {} 公式的方法:

$$ f(x)=\left\{
\begin{aligned}
x & = & \cos(t) \\
y & = & \sin(t) \\
z & = & \frac xy
\end{aligned}
\right.
$$ $$ F^{HLLC}=\left\{
\begin{array}{rcl}
F_L & & { < S_L}\\
F^*_L & & {S_L \leq < S_M}\\
F^*_R & & {S_M \leq < S_R}\\
F_R & & {S_R \leq }
\end{array} \right. $$ $$f(x)=
\begin{cases}
& \text{x=}\\
& \text{x!=}
\end{cases}$$

效果分别为:

Latex 经常见到的问题和解决方法-LMLPHP

5. 左对齐:

 \begin{flushleft}...\end{flushleft}

6.  参考文献中 作者的名字,变为横线(参考文献 77):

Latex 经常见到的问题和解决方法-LMLPHP

这是因为:在 bib 文件中,引用了多篇同一个作者的文章,并且这些文献在 LaTeX 文件中,处于很接近的位置,就非常会可能出现上述的情况。

Latex 经常见到的问题和解决方法-LMLPHP

解决方法就是:把引用的文献位置做相应的调整。

Latex 经常见到的问题和解决方法-LMLPHP

然后再看这个参考文献,就变的正常额:

Latex 经常见到的问题和解决方法-LMLPHP

7. 多行公式的编辑:

\begin{flalign}
&~~~~\hat{x_t} = W {x_t}& \\
&~~~~f'_t = \delta (W_f x_t + b_f)& \\
&~~~~r_t = \delta (W_r x_t + b_r) \\
&~~~~c_t = f_t \odot c_{t-} + (-f_t) \odot \hat{x_t} \\
&~~~~h_t = r_t \odot g(c_t) + (-r_t) \odot x_t
\end{flalign}

Latex 经常见到的问题和解决方法-LMLPHP

8. WinEdt 10.3 下载与激活:

WinEdt 10.3 注册激活
下载安装:http://www.winedt.com/download.html

选择WinEdt 10.3 (64-bit) [Build: 20180507] (winedt103-64.exe 9.2 MB)下载,安装。

安装完成后,运行WinEdt ,依次打开Help >> Register WinEdt… 在弹出的对话框里包含Name,Code,Date。对应填入以下信息:

Name:Cracker TeCHiScy
Code:1130140925535334280
Date:不用填
点击OK保存

参考
1、http://www.52pojie.cn/thread-595351-1-1.html
2、https://blog.csdn.net/icp_09002463/article/details/80268387
---------------------
作者:Agzs
来源:CSDN
原文:https://blog.csdn.net/code_segment/article/details/82348626
版权声明:本文为博主原创文章,转载请附上博文链接!

9. CTEX 添加 eps 图像,并且正常执行的姿势是:https://blog.csdn.net/garfielder007/article/details/51628604

\usepackage{graphicx}

\usepackage{epstopdf}

如果是eps的图形, 编译过程是  latex, dvips, ps2pdf.  
为了能够让参考文献正常显示,标准操作流程是:latex, bibtex, latex, dvips, ps2pdf
如果是pdf jpg png图形, 编译过程是  pdflatex .
 
 
10. ! LaTeX Error: File `newtxmath.sty' not found.

  ! LaTeX Error: File `newtxmath.sty' not found.

  Type X to quit or <RETURN> to proceed,

  or enter new name. (Default extension: sty)

我当时貌似是重新安装了一遍 LaTeX 才搞定这个问题的。

11. 参考文献的添加和使用:

添加宏包:\usepackage{natbib}

{
\small
\bibliographystyle{plain} 
\bibliography{reference} 
}
 
 
12. arg max 编辑:
\begin{equation}
\label{trajSelection}
\hat{T_i} = \mathop{\arg\max}_{T_i^j} \sum_{j=}^{N} S(T_0, T^j_i).
\end{equation}

13. 自定义图目录,表格目录:

reference:https://blog.csdn.net/hyluglare/article/details/88742396 

生成插图目录的命令:\listoffigures

可以自定义目录名:\renewcommand\listfigurename{插\ 图\ 目\ 录}

生成表格目录的命令:\listoftables

可以自定义目录名:\renewcommand\listtablename{表\ 格\ 目\ 录}

14. 

 

  

04-19 13:11
查看更多