Win10 configure Sublime Text 3 as latex editor

1. Install Sublime Text 3

① Download Sublime Text 3
  • Official website download address: Sublime Text 3 Download
  • Select the corresponding installation package according to the system version and click to download it.
    Insert picture description here
② Install Sublime Text 3
  • The installation method is very stupid, just next all the way, you can also choose the corresponding installation directory according to your needs.
  • I checked the following:
    Insert picture description here
③ Install Package Control
  • Many people on the Internet talk about installing through the console, but I don't know why it was unsuccessful.
  • Solution: In the menu bar, select Tools --> Install Package Controland successfully install Package Control.
    Insert picture description here
  • Verification method: If Preferences you see Package Controlit under the menu , it means the installation is successful.
③ Install LaTeXTools plug-in
  • Use shortcut keys to Ctrl+Shift+Popen the command box, type Install Package, and select from the list Package Control: Install Package. Note: It can also be selected in the menu bar Preferences ---> Package Control.
    Insert picture description here
  • Enter in the pop-up window LaTeXToolsand select install.
    Insert picture description here
  • The installation is successful, there will be a prompt:
    Insert picture description here

2. Install SumatraPDF

  • Download the installation package from the official website:
    Insert picture description here
    Insert picture description here
  • Click the application to install, you can click to 选项customize the installation directory.
    Insert picture description here
  • SumatraPDFThe interface is super interesting, it is a very cute installation interface I have seen.

3. LatexTools configuration

  • Select one by one in Sublime Preferences > Package Settings > LatexTools > Settings - User. Will open such a file:
    Insert picture description here
  • Shortcut key Ctrl + F, open the search window, and input windowsas a keyword, find the following:
    Insert picture description here
  • Configure the content, my configuration content is as follows. Note: There \must be a double slash in the file path to \\indicate an escape character.
"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" : "D:\\texlive\\2019\\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. Configure SumatraPDF to realize reverse search

① Perform reverse search configuration
  • Add SumatraPDFthe path to the environment variable:
    Insert picture description here
  • Open cmd and enter the following command, which E:\SublimeText 3\sublime_text.exeneeds to be replaced with your corresponding position.
sumatrapdf.exe -inverse-search "\"E:\SublimeText 3\sublime_text.exe" \"%f:%l\""
② Inspection
  • In Sublime Text 3the new tex file, as follows:
\documentclass{
    
    article}
\title{
    
    Title}
\author{
    
    Your Name} 
\begin{
    
    document}  
\maketitle{
    
    }
\section{
    
    Introduction}
This is where you will write your content. 
\end{
    
    document}
  • After saving, use the shortcut keys Ctrl + Bto compile. After the compilation is successful, the SumatraPDFcompiled PDF file will be displayed in.
    Insert picture description here
  • Double-click any part of the pdf file to open the corresponding tex file. (The reverse search was turned on, but it was originally Sublime Text 3turned off)
    Insert picture description here

Reference link:

  1. Win10 配置 LaTeX(TeX Live + Sublime Text 3 + Sumatra PDF)
  2. How to install, delete and update plugins for Sublime Text3
  3. LaTeX Sumatra Sublime reverse search

Guess you like

Origin blog.csdn.net/u014454538/article/details/103882679