has been writing latex documents with the sublime Text + Ctex Integrated environment, and recently discovered that the MiKTeX Package Manager embedded in the Ctex suite was too weak to turn the target into a more powerful Tex live environment.
First install the Tex Live environment, you can choose to install online or download the ISO file installation. can refer to the official website installation Tutorial http://www.tug.org/texlive/, also can refer to this post Http://exciton.eo.yzu.edu.tw/~lab/latex/install_latex_cjk_ms _windows.html.
After the installation is complete, add the executable directory in the Tex Live installation directory to the system path path, which is generally the D:\texlive\2014\bin\win32 of this form.
Install the Latextools plugin in Sublime text, then click: Preferences-->> Package Settings-->> Latextools-Reconfigure Latextools and migrate settings, the plugin generates a Latextools configuration file in the user directory. If the system is installed in the MiKTeX integration environment, the configuration file does not need to modify the direct ctrl+b can be compiled latex files. Now we want Latextools to call Tex Live to compile latex files, just modify the Platform Settings section in the configuration file.
"windows": {
// Path used when invoking tex & friends; "" is fine for MiKTeX
// For TeXlive 2011 (or other years) use
// "texpath": "C: \\ texlive \\ 2011 \\ bin \\ win32; $ PATH",
"texpath": "",
// TeX distro: "miktex" or "texlive"
"distro": "texlive"
},
Modify the "distro" attribute to "texlive", the LaTeXTools plugin can silently call Tex Live to compile the Latex file. In this case, if Build engine settings is set to "traditional", then when ctrl + b is compiled, the latexmk command in Tex Live is actually called.
// ------------------------------------------------ ------------------
// Build engine settings
// ------------------------------------------------ ------------------
// OPTION: "builder"
// Specifies a build engine
// Possible values:
//
// "default" or "" the default built-in build engine; currently
// this is the same as "traditional"
//
// "simple" invokes pdflatex 1x or 2x as needed, then
// bibtex and pdflatex again if needed;
// intended mainly as a simple example for
// peoeple writing their own build engines.
//
// "traditional" replicates the ‘old’ system based on
// latexmk (TeXLive) / texify (MiKTeX)
//
// "script" external script: just invokes the script
// specified in "builder_settings"
//
// custom name you can also use third-party build engines;
// if so, set the "builder_path" option below
//
// NOTE: custom builders CANNOT have the same name as an existing
// built-in build engine (including "default")
"builder": "traditional",
To insert a digression, the latexmk command also has a powerful function, which can call different compilation engines to compile files by reading the Tex engine setting parameters on the first line of the Latex file. The command format of its Tex engine setting is:%! TEX program = <program>. Here program can be pdflatex (default), luaoatex or xelatex. If there is no Tex engine selection command on the first line, latexmk will call the pdflatex engine by default. For example, the content of the first line of the Latex file is:%! TEX program = xelatex. Then when compiling files with the latexmk command, the xelatex compilation engine is actually called. This feature allows us to modify the compilation engine without modifying the compilation command. It only needs to add a configuration command to the first line of the Latex file to implement the choice of compilation engine, which can greatly improve the flexibility of Latex file compilation. Currently, MiKTeX's texify does not support it.