美文网首页
sublime+latex主要参考

sublime+latex主要参考

作者: 冬风十里Y | 来源:发表于2018-12-01 12:26 被阅读10次

    解释import 那一堆干啥用的:https://blog.csdn.net/qq_32782339/article/details/79195011
    主要安装流程:https://blog.csdn.net/bleedingfight/article/details/72810606
    切换编译器:https://blog.csdn.net/u011606714/article/details/81739081
    官方文档:https://latextools.readthedocs.io/en/latest/install/#linux

    1、安装latex 和sublime
    2、安装sublime插件,latexTOOL
    3、修改LaTeXtool配置文件:

    打开Perference->Package Settings->LaTexTools->Settings-User
    在打开文件的227行”linux”中配置你的TexLive路径

    修改前:

    "linux" : {
            // Path used when invoking tex & friends; MUST include $PATH
            "texpath" : "$PATH:/usr/texbin",
            // 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": "",
            // 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
        },
    

    修改后:

    "linux" : {
            // Path used when invoking tex & friends; MUST include $PATH
            "texpath" : "$PATH:/usr/share/texlive:/user/share/texmf",
            // 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": "/usr/bin/python2.7",
            // 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
        },
    
    

    4、安装latexmk,sudo apt-get install latexmk
    5、安装XeLaTex(支持中文):sudo apt-get install texlive-xetex有500多m
    https://blog.csdn.net/kiti1013/article/details/50596448说有个
    安装texlive-xelatexsudo apt-get install texlive-xetex latex-cjk-all加上latex-cjk-all一共有接近1G。不过我没安后边的。

    4、安装dus(为了自动打开pdf)
    cd ~/下载
    tar xzvf dbus-python-1.2.4.tar.gz
    sudo apt-get install libdbus-glib-1-dev
    cd dbus-python-1.2.4
    ./configure
    make
    sudo make install

    7、TODO:没有实现反向搜索功能inverse search.
    参考:https://tex.stackexchange.com/questions/225253/how-to-set-up-the-inverse-search-for-latextools-in-sublime-text-3-on-ubuntu

    上面第三步配置文件中Python换成
    "python": "/usr/bin/python2.7",就好用了,不知道为何。
    哦,后面还换成了subl,其他什么都没做,只是安装了下dbus。就好 了。
    删除了dbus的文件夹照样好使。

    相关文章

      网友评论

          本文标题:sublime+latex主要参考

          本文链接:https://www.haomeiwen.com/subject/lcblcqtx.html