前言
中文稿目前已經完成了,現在要轉用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論文 - 知乎