安裝配置LaTeX, Sublime Text, Sumatra PDF

最近要開始寫畢設(shè)了,打算用LaTeX
我的配置是TeXLive + Sublime Text + LatexTools(Sublime插件)+ SumatraPDF
可以實(shí)現(xiàn)在 Sublime Text 中的編輯、編譯,在 SumatraPDF 反向定位。

安裝LaTeX

  1. TeX Live 的安裝鏡像源,下載.iso文件* https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2017.iso
  2. 雙擊下載好的.iso文件,進(jìn)入掛載的新建盤中,雙擊 install=tl-advanced.bat文件
  3. 跳出cmd黑框后,會(huì)繼續(xù)跳出安裝界面,當(dāng)cmd框中提示 Welcome to TeX Live! 關(guān)閉黑框,安裝結(jié)束

安裝Sublime Text

  1. 官網(wǎng)下載地址 https://www.sublimetext.com
  2. 安裝Package Control 教程 https://packagecontrol.io/installation
  3. 快捷鍵 Ctrl+Shift+P,輸入 install
    Paste_Image.png
  4. 在搜索框輸入 LatexTools,點(diǎn)擊后自動(dòng)安裝
  5. 快捷鍵 Ctrl+Shift+P,輸入LatexTools確認(rèn)安裝好了
  6. 菜單欄,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

  1. 官網(wǎng) www.sumatrapdfreader.org

  2. 配置反向搜索功能 https://github.com/SublimeText/LaTeXTools


    即在菜單-設(shè)置-選項(xiàng)-最后一欄填上命令"sublime_text.exe的實(shí)際路徑""%f:%l",如圖
    Paste_Image.png

  3. 雙擊pdf文件某一行,會(huì)自動(dòng)打開其對(duì)應(yīng)的.tex文件,并找到對(duì)應(yīng)行

測(cè)試文件

  1. 編輯測(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}
  1. 上面的設(shè)置中我們已經(jīng)修改成了使用pdflatex編譯器,用SumatraPDF打開生成文件。
    快捷鍵Ctrl + B可以編譯.tex文件,會(huì)自動(dòng)用SumatraPDF打開生成文件,在.tex文件的所在目錄下有同名的.pdf文件。
  2. 在test.pdf文件中雙擊 1 Induction 會(huì)自動(dòng)打開 test.tex文件,光標(biāo)在\section{Introduction}的開頭

其他Sublime的LaTex插件

  1. 表格插件 LaTeXTab
  2. 代碼提示 LaTeX-cwl
  3. 自動(dòng)編譯 LaTeXing

參考

其他

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容