前言
中文稿目前已经完成了,现在要转用latex排版,但我对这方面没有接触过,这里做一个记录。
网页版Overleaf:Overleaf, 在线LaTeX编辑器。
TeXWorks:论文神器teXWorks安装与使用记录。
这里我还是决定采用Vscode作为TeX编辑器。
安装TexLive
进入镜像地址:Index of /systems/texlive/Images
选择上图中的texlive.iso,安装好后解压此文件到当前文件夹。
进入解压后的文件夹D:\software\tex\texlive中,选择install-tl-windows.bat文件右键选择管理员身份运行。
修改安装的路径与之前一样,然后点击Advanced。选择Customize,语言保留三个即可。
选择好后点击确定,点击安装即可。
安装的时间较长,出现下面的情况就说明完成了
打开cmd,测试下面的指令:
latex -vxelatex -vtex -v
只要出现一些版本信息就说明正常,如果有问题,可以从下面的参考文章中找找添加到系统环境变量中。
安装SumatraPDF
安装地址Sumatra PDF reader download page
配置Vscode
我想关于vscode的安装就不用讲了,我们点击扩展,搜索插件Latex workshop安装。
配置如下,一些相关的路径请自行修改:
{"latex-workshop.latex.autoBuild.run": "never","latex-workshop.showContextMenu": true,"latex-workshop.intellisense.package.enabled": true,"latex-workshop.message.error.show": false,"latex-workshop.message.warning.show": false,"latex-workshop.latex.tools": [{"name": "xelatex","command": "D:/software/tex/texlive/2025/bin/windows/xelatex.exe","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"]},{"name": "pdflatex","command": "D:/software/tex/texlive/2025/bin/windows/pdflatex.exe","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"]},{"name": "latexmk","command": "D:/software/tex/texlive/2025/bin/windows/latexmk.exe","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=%OUTDIR%","%DOC%"]},{"name": "bibtex","command": "bibtex","args": ["%DOCFILE%"]}],"latex-workshop.latex.recipes": [{"name": "pdflatex -> bibtex -> pdflatex*2","tools": ["pdflatex","bibtex","pdflatex","pdflatex"]},{"name": "XeLaTeX","tools": ["xelatex"]},{"name": "PDFLaTeX","tools": ["pdflatex"]},{"name": "BibTeX","tools": ["bibtex"]},{"name": "LaTeXmk","tools": ["latexmk"]},{"name": "xelatex -> bibtex -> xelatex*2","tools": ["xelatex","bibtex","xelatex","xelatex"]}],"latex-workshop.latex.clean.fileTypes": ["*.aux","*.bbl","*.blg","*.idx","*.ind","*.lof","*.lot","*.out","*.toc","*.acn","*.acr","*.alg","*.glg","*.glo","*.gls","*.ist","*.fls","*.log","*.fdb_latexmk"],"latex-workshop.latex.autoClean.run": "onFailed","latex-workshop.latex.recipe.default": "lastUsed","latex-workshop.view.pdf.internal.synctex.keybinding": "double-click","latex-workshop.view.pdf.viewer": "external","latex-workshop.view.pdf.ref.viewer": "auto","latex-workshop.view.pdf.external.viewer.command": "D:/software/tex/Sumatra/SumatraPDF/SumatraPDF.exe","latex-workshop.view.pdf.external.viewer.args": ["%PDF%"],"latex-workshop.view.pdf.external.synctex.command": "D:/software/tex/Sumatra/SumatraPDF/SumatraPDF.exe","latex-workshop.view.pdf.external.synctex.args": ["-forward-search","%TEX%","%LINE%","-reuse-instance","-inverse-search","\"D:/software/vscode/Microsoft VS Code/Code.exe\" \"D:/software/vscode/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"","%PDF%"]
}
tex文件编译
然后们从官网上下载下来的模板解压后通过vscode打开。
点击了tex文件后,左侧栏出现了TEX的标识,点击。
TGRS论文一般用这个就好,其余的不需要,bibtex是编译参考文献的,一开始没写参考文献可以只用PDFlatex编译。
完成后可选择View LaTex PDF。
使用小技巧
修改超链接颜色
\usepackage{xcolor} % 颜色支持
\usepackage{hyperref} % 超链接支持
\hypersetup{ colorlinks= true, % 激活链接颜色,去掉链接边框linkcolor = red, % 文档内部链接颜色(如图表等引用)citecolor = green, % 文献引用链接颜色filecolor = mycustompurple, % 文件链接颜色urlcolor = magenta!85!black, % 85%粉红+15%黑的深粉红色
}
然后在超链接前添加:
\url{https://blog.csdn.net/m0_62919535}
放置图片
如何让ppt保存高清图片:PPT如何保存高分辨率高清jpg图片, 三种简单方法,无需其他软件辅助
图片我统一都放置在了images文件夹下,它这里是不能用bmp这样的文件。
单栏放置图片:
\begin{figure}[t]\centering\includegraphics[width=\linewidth]{images/1.png}\caption{Your caption here.}\label{fig:example}
\end{figure}
参数 | 含义 |
---|---|
h | here,尽量放在当前位置 |
t | top,将浮动体放到页面顶部 |
b | bottom,将浮动体放到页面底部 |
p | page,将浮动体放到一个专门的浮动页 |
H | 强制放在当前位置 |
双栏显示图片:
\begin{figure*}[t]\centering\includegraphics[width=\textwidth]{images/2.png}\caption{Your caption here.}\label{fig:example-wide}
\end{figure*}
显示公式
短单词的公式可以采取下面这种方式:
\(W\)
长公式可采用图片识别成latex,像一些大模型就可以,比如讯飞星火,我这里给大家提供一些网站:
https://easytexai.com/home.html
在线LaTeX公式编辑器-编辑器
一篇论文总是够用的。
给公式添加标号:
\begin{equation}
d\left(u,v\right)=\sqrt{(u-H/2)^2+\left(\nu-W/2\right)^2}
\end{equation}
多行公式使用一个标号:
\begin{equation}
\begin{split}
\raisetag{0.65\baselineskip}
M_{L}(u,v) &= \begin{cases}
1 & \text{if } d(u,v) \leq \lambda D_{\max}, \\
0 & \text{otherwise};
\end{cases} \\
M_{H}(u,v) &= \begin{cases}
1 & \text{if } d(u,v) \geq (1-\lambda) D_{\max}, \\
0 & \text{otherwise};
\end{cases} \\
M_{M}(u, v) &= \begin{cases}
1 & \text{if } \lambda D_{\max} < d(u, v) < (1-\lambda) D_{\max}, \\
0 & \text{otherwise}.
\end{cases}
\end{split}
\end{equation}
可适当的调整一下\raisetag{0.65\baselineskip},使其位于右侧居中。
出现的问题
编译后的标题大小比其他的要小一号,这里我始终没法理解是出现了什么问题,折腾了一下午才解决掉,先去Manuscript Templates for Conference Proceedings | IEEE这个网站下载IEEEtran.cls,我将其复制到了D:\software\tex\texlive\texmf-local\tex\latex,并且我还替换了模板当中的IEEEtran.cls。
然后选择通过管理员运行cmd。
然后使用刷新命令:
texhash
验证命令:
kpsewhich IEEEtran.cls
出现上面这样就说明成功了。
参考文章
2025 TexLive+VScode排版IEEE TGRS论文_texlive vscode-CSDN博客
(94 封私信) Visual Studio Code (vscode)配置LaTeX - 知乎
论文神器teXWorks安装与使用记录-CSDN博客
(94 封私信) Overleaf排版IEEE trans.期刊论文 - 知乎
【LaTeX】新手教程:从入门到日常使用
遥感SCI期刊模板下载教程———IEEE TGRS、GRSL、JSTARS_论文阅读_海淀小天-2048 AI社区
(94 封私信) 2025 Testlive+VScode排版IEEE TGRS论文 - 知乎