最近要開始寫畢設(shè)了,打算用LaTeX
我的配置是TeXLive + Sublime Text + LatexTools(Sublime插件)+ SumatraPDF
可以實(shí)現(xiàn)在 Sublime Text 中的編輯、編譯,在 SumatraPDF 反向定位。
安裝LaTeX
- TeX Live 的安裝鏡像源,下載.iso文件* https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2017.iso
- 雙擊下載好的.iso文件,進(jìn)入掛載的新建盤中,雙擊
install=tl-advanced.bat文件 - 跳出cmd黑框后,會(huì)繼續(xù)跳出安裝界面,當(dāng)cmd框中提示
Welcome to TeX Live!關(guān)閉黑框,安裝結(jié)束
安裝Sublime Text
- 官網(wǎng)下載地址 https://www.sublimetext.com
- 安裝
Package Control教程 https://packagecontrol.io/installation - 快捷鍵
Ctrl+Shift+P,輸入install
Paste_Image.png - 在搜索框輸入
LatexTools,點(diǎn)擊后自動(dòng)安裝 - 快捷鍵
Ctrl+Shift+P,輸入LatexTools確認(rèn)安裝好了 - 菜單欄,Preferences,Package Setting,LatexTools,setting - user,輸入
"windows": {
// For TeXlive 2011 (or other years) use
"texpath" : "E:\\Program Files\\texlive\\2016\\bin\\win32;$PATH",
// "texpath" : "D:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin;$PATH",
// TeX distro: "miktex" or "texlive"
"distro" : "texlive",
// Command to invoke Sumatra. If blank, "SumatraPDF.exe" is used (it has to be on your PATH)
"sumatra": "E:\\Program Files\\SumatraPDF\\SumatraPDF.exe"
},
"builder": "simple",
安裝Sumatra PDF
官網(wǎng) www.sumatrapdfreader.org
-
配置反向搜索功能 https://github.com/SublimeText/LaTeXTools
即在菜單-設(shè)置-選項(xiàng)-最后一欄填上命令"sublime_text.exe的實(shí)際路徑""%f:%l",如圖
Paste_Image.png 雙擊pdf文件某一行,會(huì)自動(dòng)打開其對(duì)應(yīng)的.tex文件,并找到對(duì)應(yīng)行
測(cè)試文件
- 編輯測(cè)試文件test.tex
\documentclass{article}
\title{Title}
\author{Your Name}
\begin{document}
\maketitle{}
\section{Introduction}
This is where you will write your content.
\end{document}
- 上面的設(shè)置中我們已經(jīng)修改成了使用pdflatex編譯器,用SumatraPDF打開生成文件。
快捷鍵Ctrl + B可以編譯.tex文件,會(huì)自動(dòng)用SumatraPDF打開生成文件,在.tex文件的所在目錄下有同名的.pdf文件。 - 在test.pdf文件中雙擊
1 Induction會(huì)自動(dòng)打開 test.tex文件,光標(biāo)在\section{Introduction}的開頭
其他Sublime的LaTex插件
參考
其他


