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

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 

  

 

  然后就是:

  

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

  

 


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

 

 

Configure your texmaker according to above figures. 

 

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

$$ f(x)=left{
egin{aligned}
x & = & cos(t) \
y & = & sin(t) \
z & = & frac xy
end{aligned}

ight.
$$



$$ F^{HLLC}=left{
egin{array}{rcl}
F_L       &      & {0      <      S_L}\
F^*_L     &      & {S_L leq 0 < S_M}\
F^*_R     &      & {S_M leq 0 < S_R}\
F_R       &      & {S_R leq 0}
end{array} 
ight. $$


$$f(x)=
egin{cases}
0& 	ext{x=0}\
1& 	ext{x!=0}
end{cases}$$
 

效果分别为:

5. 左对齐:

 egin{flushleft}...end{flushleft}

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

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

 

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

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

 

7. 多行公式的编辑:

egin{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-1} + (1-f_t) odot hat{x_t} \
&~~~~h_t = r_t odot g(c_t) + (1-r_t) odot x_t
end{flalign}

 

 

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
ibliographystyle{plain} 
ibliography{reference} 
}
 
 
12. arg max 编辑:
egin{equation}
label{trajSelection}
hat{T_i} = mathop{argmax}_{T_i^j} sum_{j=1}^{N} S(T_0, T^j_i). 
end{equation}

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

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

生成插图目录的命令:listoffigures

可以自定义目录名: enewcommandlistfigurename{插 图 目 录}

生成表格目录的命令:listoftables

可以自定义目录名: enewcommandlisttablename{表 格 目 录}

14. 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

   

 

 

原文地址:https://www.cnblogs.com/wangxiaocvpr/p/6691208.html