软件安装7:ubuntu18.04+sublime+texliv

2019-12-15  本文已影响0人  闪电侠悟空

目的是更好的写latex文章

1. TexLive安装

sudo apt-get install texlive-full
# 下面的是编辑器 texstudio的安装
sudo add-apt-repository ppa:sunderme/texstudio
sudo apt-get update
sudo apt-get install texstudio

2. zathura安装

sudo apt-get install zathura # 好像很简单的样子

3.sublime安装

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
git clone https://github.com/lyfeyaj/sublime-text-imfix.git
cd sublime-text-imfix && ./sublime-imfix
sudo ln -s /opt/sublime-text/sublime_text /usr/local/bin/sublime 

3.1 LaTeXTools 插件

4. 配置【重点】

4.1 sublime 配置

//227行左右,设置tex,python 路径
"linux" : {
        // Path used when invoking tex & friends; MUST include $PATH
        "texpath" : "$PATH:/usr/bin",
        // Command to invoke Python. Useful if you have Python installed in a
        // non-standard location or want to use a particular version of python.
        // Both Python2 and Python3 are supported, but must have the DBus bindings
        // installed.
        "python": "~/anaconda2/envs/torch/bin",
        // The name of the ST2 or ST3 executable. On Ubuntu, both subl and sublime-text are
        // available for ST2; adjust as needed for other platforms, and for ST3
        "sublime": "sublime-text",
        // How long to wait after evince or okular has launched before sending a sync message
        // in seconds, floating point; choose 2.0 or 3.0 on a slower machine, 0.5 on a fast one
        // Note: only tweak this if sync after launching the PDF viewer does not seem to work,
        // or if the PDF viewer opens instantly and you don't want to wait.
        // Default: 1.5 (works on my MBP4,1...)
        "sync_wait": 1.5,
        // Command to invoke Sublime Text. Used if the keep_focus toggle is true.
        // If blank, "subl" or "sublime_text" will be used.
        "sublime_executable": "",
        // how long (in ms) 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
    },
     //379行左右,指定tex builder为 simples
    "builder": "simples",
//487行左右,指定pdf viewer为 zathura
    "viewer": "zathura",

4.2 zathura 反向查找配置

set synctex true
set synctex-editor-command 'sublime %{input}:%{line}'

或者,

set synctex true
set synctex-editor-command 'subl %{input}:%{line}'

4.3 重启完事

上一篇下一篇

猜你喜欢

热点阅读