200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > win10配置Sublime Text 3作为latex的编辑器

win10配置Sublime Text 3作为latex的编辑器

时间:2019-05-01 08:48:28

相关推荐

win10配置Sublime Text 3作为latex的编辑器

TeX Live的安装参考之前的博客:win10安装TeXLive

1. 安装Sublime Text 3

① 下载Sublime Text 3
官网下载地址:Sublime Text 3 Download根据系统版本选择对应的安装包,点击即可下载。

② 安装Sublime Text 3
安装方式很傻瓜,一路next就行了,也可以根据需要选择对应的安装目录。以下内容,我进行了勾选:

③ 安装Package Control
网上好多都说的是通过console进行安装,我不知为啥没成功。解决办法: 在菜单栏,选择Tools --> Install Package Control,成功安装Package Control

验证方法:Preferences菜单下看到Package Control,代表安装成功。

③ 安装LaTeXTools 插件
使用快捷键Ctrl+Shift+P打开命令框,输入Install Package,在列表中选择Package Control: Install Package注意:也可以在 菜单栏中选择Preferences ---> Package Control

在弹出的窗口中输入LaTeXTools,选择安装。

安装成功,会有提示:

2. 安装SumatraPDF

官网下载安装包:

点击应用程序进行安装,可以点击选项自定义安装目录。

SumatraPDF的界面超级有趣,是我见过的非常cute的安装界面。

3. LatexTools 配置

在 Sublime 中依次选择Preferences > Package Settings > LatexTools > Settings - User。将会打开这样一个文件:

快捷键Ctrl + F,打开搜索窗口,并输入windows作为关键字,查找到以下内容:

对内容进行配置,本人的配置内容如下。注意:文件路径中\一定是双斜杠\\,表示转义字符。

"windows": {// Path used when invoking tex & friends; "" is fine for MiKTeX// For TeXlive (or other years) use// "texpath" : "C:\\texlive\\\\bin\\win32;$PATH","texpath" : "D:\\texlive\\\\bin\\win32",// 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": "D:\\SumatraPDF\\SumatraPDF.exe",// Command to invoke Sublime Text. Used if the keep_focus toggle is true.// If blank, "subl.exe" or "sublime_text.exe" will be used."sublime_executable": "",// how long (in seconds) to wait after the jump_to_pdf command completes// before switching focus back to Sublime Text. This may need to be// adjusted depending on your machine and configuration."keep_focus_delay": 0.5},

4. 配置SumatraPDF,实现反向搜索

① 进行反向搜索配置
SumatraPDF的路径加入到环境变量中:

打开cmd,输入以下命令,其中E:\SublimeText 3\sublime_text.exe需要替换成自己对应的位置。

sumatrapdf.exe -inverse-search "\"E:\SublimeText 3\sublime_text.exe" \"%f:%l\""

② 检验
Sublime Text 3中新建tex文件,内容如下:

\documentclass{article}\title{Title}\author{Your Name} \begin{document} \maketitle{}\section{Introduction}This is where you will write your content. \end{document}

保存后,通过快捷键Ctrl + B进行编译,编译成功后,会在SumatraPDF中展示编译好的PDF文件。

双击pdf文件的任意一处,会打开对应tex文件。(反向搜索打开的,原本Sublime Text 3已经被关闭)

参考链接:

Win10 配置 LaTeX(TeX Live + Sublime Text 3 + Sumatra PDF)Sublime Text3 如何安装、删除及更新插件LaTeX Sumatra Sublime反向搜索

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。