Skip to content

168 Comments

  1. Pen
    2013年12月29日 @ 23:39

    好奇是什么coursera课

    Reply

  2. Pen
    2013年12月30日 @ 08:19

    不不 应该是问 Coursera的什么课

    Reply

    • ern
      2013年12月30日 @ 20:04

      数学之旅

      Reply

  3. Wilson
    2013年12月30日 @ 11:16

    我也是在xelatex那篇看到教學,失敗後在網上搜尋發現你這篇,終於成功了。
    感謝分享

    Reply

  4. rrom
    2014年1月5日 @ 17:40

    LZ,用了你的方法,试了好寄晚了,老是不成功啊。。

    OSX 10.9.1 +ST3
    下面这个是st输出的信息
    There were errors in your LaTeX source

    /usr/local/texlive/2013basic/texmf-dist/tex/latex/fontspec/fontspec.sty:41: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    [Done!]
    —————–Log file————-
    This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2014.1.5) 5 JAN 2014 17:34
    entering extended mode
    restricted \write18 enabled.
    %&-line parsing enabled.
    **allinone.tex -recorder
    (./allinone.tex
    LaTeX2e
    Babel and hyphenation patterns for 21 languages loaded.
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/size10.clo
    File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
    )
    \c@part=\count79
    \c@section=\count80
    \c@subsection=\count81
    \c@subsubsection=\count82
    \c@paragraph=\count83
    \c@subparagraph=\count84
    \c@figure=\count85
    \c@table=\count86
    \abovecaptionskip=\skip41
    \belowcaptionskip=\skip42
    \bibindent=\dimen102
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/fontspec/fontspec.sty
    Package: fontspec 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX

    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/expl3.sty
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3names.sty
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty
    Package: l3bootstrap 2013/01/08 v4420 L3 Experimental bootstrap code
    )
    Package: l3names 2012/12/07 v4346 L3 Namespace for primitives
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/etex-pkg/etex.sty
    Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)
    \et@xins=\count87
    )
    Package: expl3 2013/03/14 v4469 L3 Experimental code bundle wrapper

    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3basics.sty
    Package: l3basics 2013/01/10 v4428 L3 Basic definitions
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3expan.sty
    Package: l3expan 2013/02/03 v4458 L3 Argument expansion
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3tl.sty
    Package: l3tl 2013/01/08 v4415 L3 Token lists
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3seq.sty
    Package: l3seq 2013/01/12 v4434 L3 Sequences and stacks
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3int.sty
    Package: l3int 2013/01/13 v4444 L3 Integers
    \c_max_int=\count88
    \l_tmpa_int=\count89
    \l_tmpb_int=\count90
    \g_tmpa_int=\count91
    \g_tmpb_int=\count92
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3quark.sty
    Package: l3quark 2012/11/04 v4268 L3 Quarks
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3prg.sty
    Package: l3prg 2013/02/13 v4459 L3 Control structures
    \g__prg_map_int=\count93
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3clist.sty
    Package: l3clist 2013/01/08 v4414 L3 Comma separated lists
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3token.sty
    Package: l3token 2013/01/10 v4428 L3 Experimental token manipulation
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3prop.sty
    Package: l3prop 2013/01/09 v4423 L3 Property lists
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3msg.sty
    Package: l3msg 2013/01/08 v4412 L3 Messages
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3file.sty
    Package: l3file 2013/01/14 v4446 L3 File and I/O operations
    \l_iow_line_count_int=\count94
    \l__iow_target_count_int=\count95
    \l__iow_current_line_int=\count96
    \l__iow_current_word_int=\count97
    \l__iow_current_indentation_int=\count98
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3skip.sty
    Package: l3skip 2013/01/13 v4444 L3 Dimensions and skips
    \c_zero_dim=\dimen103
    \c_max_dim=\dimen104
    \l_tmpa_dim=\dimen105
    \l_tmpb_dim=\dimen106
    \g_tmpa_dim=\dimen107
    \g_tmpb_dim=\dimen108
    \c_zero_skip=\skip43
    \c_max_skip=\skip44
    \l_tmpa_skip=\skip45
    \l_tmpb_skip=\skip46
    \g_tmpa_skip=\skip47
    \g_tmpb_skip=\skip48
    \c_zero_muskip=\muskip10
    \c_max_muskip=\muskip11
    \l_tmpa_muskip=\muskip12
    \l_tmpb_muskip=\muskip13
    \g_tmpa_muskip=\muskip14
    \g_tmpb_muskip=\muskip15
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3keys.sty
    Package: l3keys 2013/02/24 v4461 L3 Experimental key-value interfaces
    \g__keyval_level_int=\count99
    \l_keys_choice_int=\count100
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3fp.sty
    Package: l3fp 2013/01/19 v4449 L3 Floating points
    \c__fp_leading_shift_int=\count101
    \c__fp_middle_shift_int=\count102
    \c__fp_trailing_shift_int=\count103
    \c__fp_big_leading_shift_int=\count104
    \c__fp_big_middle_shift_int=\count105
    \c__fp_big_trailing_shift_int=\count106
    \c__fp_Bigg_leading_shift_int=\count107
    \c__fp_Bigg_middle_shift_int=\count108
    \c__fp_Bigg_trailing_shift_int=\count109
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3box.sty
    Package: l3box 2013/01/08 v4411 L3 Experimental boxes
    \c_empty_box=\box26
    \l_tmpa_box=\box27
    \l_tmpb_box=\box28
    \g_tmpa_box=\box29
    \g_tmpb_box=\box30
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3coffins.sty
    Package: l3coffins 2012/09/09 v4212 L3 Coffin code layer
    \l__coffin_internal_box=\box31
    \l__coffin_internal_dim=\dimen109
    \l__coffin_offset_x_dim=\dimen110
    \l__coffin_offset_y_dim=\dimen111
    \l__coffin_x_dim=\dimen112
    \l__coffin_y_dim=\dimen113
    \l__coffin_x_prime_dim=\dimen114
    \l__coffin_y_prime_dim=\dimen115
    \c_empty_coffin=\box32
    \l__coffin_aligned_coffin=\box33
    \l__coffin_aligned_internal_coffin=\box34
    \l_tmpa_coffin=\box35
    \l_tmpb_coffin=\box36
    \l__coffin_display_coffin=\box37
    \l__coffin_display_coord_coffin=\box38
    \l__coffin_display_pole_coffin=\box39
    \l__coffin_display_offset_dim=\dimen116
    \l__coffin_display_x_dim=\dimen117
    \l__coffin_display_y_dim=\dimen118
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3color.sty
    Package: l3color 2012/08/29 v4156 L3 Experimental color support
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3luatex.sty
    Package: l3luatex 2012/08/03 v4049 L3 Experimental LuaTeX-specific functions
    \g__cctab_allocate_int=\count110
    \g__cctab_stack_int=\count111
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3kernel/l3candidates.sty
    Package: l3candidates 2013/03/14 v4468 L3 Experimental additions to l3kernel
    \l__box_top_dim=\dimen119
    \l__box_bottom_dim=\dimen120
    \l__box_left_dim=\dimen121
    \l__box_right_dim=\dimen122
    \l__box_top_new_dim=\dimen123
    \l__box_bottom_new_dim=\dimen124
    \l__box_left_new_dim=\dimen125
    \l__box_right_new_dim=\dimen126
    \l__box_internal_box=\box40
    \l__coffin_bounding_shift_dim=\dimen127
    \l__coffin_left_corner_dim=\dimen128
    \l__coffin_right_corner_dim=\dimen129
    \l__coffin_bottom_corner_dim=\dimen130
    \l__coffin_top_corner_dim=\dimen131
    \l__coffin_scaled_total_height_dim=\dimen132
    \l__coffin_scaled_width_dim=\dimen133
    )
    (/usr/local/texlive/2013basic/texmf-dist/tex/generic/oberdiek/ifpdf.sty
    Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
    Package ifpdf Info: pdfTeX in PDF mode is detected.
    ))
    (/usr/local/texlive/2013basic/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
    Package: xparse 2013/03/12 v4467 L3 Experimental document command parser
    \l__xparse_current_arg_int=\count112
    \l__xparse_m_args_int=\count113
    \l__xparse_mandatory_args_int=\count114
    \l__xparse_processor_int=\count115
    \l__xparse_v_nesting_int=\count116
    )

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !
    ! Fatal fontspec error: “cannot-use-pdftex”
    !
    ! The fontspec package requires either XeTeX or LuaTeX to function.
    !
    ! You must change your typesetting engine to, e.g., “xelatex” or “lualatex”
    ! instead of plain “latex” or “pdflatex”.
    !
    ! See the fontspec documentation for further information.
    !
    ! For immediate help type H .
    !………………………………………..

    l.41 }

    |”””””””””””””””””””””””’
    | This is a fatal error: LaTeX will abort
    |………………………………………..

    ) )
    Here is how much of TeX’s memory you used:
    5463 strings out of 494536
    104098 string characters out of 6167447
    133740 words of memory out of 5000000
    8717 multiletter control sequences out of 15000+600000
    3640 words of font info for 14 fonts, out of 8000000 for 9000
    319 hyphenation exceptions out of 8191
    37i,1n,30p,269b,85s stack positions out of 5000i,500n,10000p,200000b,80000s

    No pages of output.
    PDF statistics:
    0 PDF objects out of 1000 (max. 8388607)
    0 named destinations out of 1000 (max. 500000)
    1 words of extra memory for PDF output out of 10000 (max. 10000000)

    Reply

    • ern
      2014年1月5日 @ 18:41

      你定义了什么特殊字体么?看起来是字体方面出了什么问题

      Reply

  5. xuchongbo
    2014年1月20日 @ 20:24

    @ rrom 在第6步时 我遇到同样的问题。 但实施第7步后,就正常了。

    Reply

  6. Yishuai
    2014年2月14日 @ 17:24

    搞定。谢谢!

    Reply

  7. Jinbo
    2014年3月16日 @ 07:31

    最新的LaTex更新了配置位置,参见这里提示完成第七步:https://github.com/SublimeText/LaTeXTools/issues/356

    Reply

  8. Xin D
    2014年3月17日 @ 14:01

    https://github.com/SublimeText/LaTeXTools/issues/356
    看了这个还是没解决= =
    太TM反人类了

    Reply

  9. sangoblin
    2014年3月26日 @ 12:50

    按照楼主的方法,出现了’ctexbook.cls’ not found 的错误,但是该文件其实已经安装在了/usr/local/texlive/2013/texmf-dist/tex/latex/ctex/下,请问这个问题应该如何解决?

    Reply

    • ern
      2014年3月29日 @ 22:27

      搜索看看,我没有遇到这个错误,不大有经验。

      Reply

  10. hellozeyu
    2014年4月24日 @ 08:29

    版主好啊,小弟常年混威锋的。。。
    我编译你给的例子的时候不知道为啥老是报这个错啊
    Errors:

    /usr/local/texlive/2013basic/texmf-dist/tex/latex/fontspec/fontspec.sty:41: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    Reply

    • ern
      2014年4月24日 @ 17:21

      安装过程有问题么?定义的什么字体?这个看报错是字体定义问题?

      Reply

  11. X.Wang
    2014年5月4日 @ 17:03

    楼主你好。有一个相关问题请教:我按照你的说法进行了安装,并能通过测试。现在我写自己的latex文件(需要一个*.sty文件),就编译不过去,应该是找不到这个文件(它们两在同一个目录下)。这个怎么解决?理论上应该我使用textlive一样的呀,我只要把二者放在同一个目录就可以了,但是这样不行。

    Reply

    • ern
      2014年5月4日 @ 19:29

      抱歉,我不是很熟悉latex其实,因为用到的机会太少。也不是很清楚sty文件,根据我的了解,sublime是根据后缀决定编译的方式,然后调用相应的编译器。所以,如果你的sty是类似css这样的样式等,可能需要考虑在主文件里显式调用什么的。一个思路而已。

      Reply

  12. IMAGenius
    2014年7月5日 @ 03:02

    第七步怎么打开编辑 不会啊

    Reply

    • ern
      2014年7月5日 @ 11:45

      后面是一个文件的路径,你用文本编辑器打开这个文件进行修改啊。

      Reply

  13. 【CS】 LaTeX簡易安裝教學 | Hey, It's Ike.
    2014年8月21日 @ 01:54

    […] 部署MAC上的Sublime Text+LaTex中文环境 http://www.readern.com/sublime-text-latex-chinese-under-mac.html […]

    Reply

  14. ern
    2014年12月6日 @ 21:27

    @rrom @hellozeyu 以及楼上各位出现问题的,本文已经全面更新,所有部件按照最新版本的操作做了更新,请跟着修改吧。

    Reply

  15. Allen Woods
    2014年12月13日 @ 12:17

    其实只要在tex头里面加上%!Tex Program = xelatex就可以直接编译中文了,不需要该设置

    Reply

  16. Sublime Text + SumatraPDF 配置LaTeX环境 | Azho
    2015年4月1日 @ 00:27

    […] 10.同时配置了 Mac OS X 下的 LaTeX 环境,步骤基本相同,不过用的发行版是 MacTeX (仍然是适合新手的 Full Installation),ST 3 + Skim,网上也可以找到资料,例如部署MAC上的Sublime Text+LaTex中文环境——201412全新更新 […]

    Reply

  17. Keith
    2015年4月2日 @ 16:27

    博主你好, 我按照你的设置能够编译中文了, 但是却遇到了另一个问题: 段落的第一行会超出页面范围, 把修改都还原后还是存在.
    不知是我设置有误还是修改参数后的遗留症

    Reply

    • ern
      2015年4月6日 @ 11:55

      抱歉,很晚才答复你。

      我主要是研究了一下如何结合ST和LaTex,主要的方法也是替换了一个Tex指令,并不非常熟悉LaTex的使用。
      不过从你说的情况来看,似乎是这个指令对每段第一行的格式有自己的“想法”,我建议你搜索一下修改后用到的那个Tex指令版本,看看是可以通过一些特定的格式设置来解决,还是这个指令本身有bug。

      希望能帮到你

      Reply

  18. deling
    2015年4月13日 @ 16:45

    ~/Library/Application\ Support/Sublime\ Text/Packages/Users/LaTeX.sublime-settings
    第七步打开这个路径我也不会,百度了好久都没有答案。是用哪个命令啊?第一次使用sublime

    Reply

    • ern
      2015年6月7日 @ 20:21

      用“终端”打开吧

      Reply

  19. Mapleeit
    2015年5月3日 @ 21:30

    这个弄完以后是可以检测.tex文件更改实时预览呢,还是必须要手动编译?

    Reply

    • ern
      2015年6月7日 @ 20:19

      每次手动编译,快捷键咯

      Reply

  20. Tsingfeng
    2015年6月11日 @ 11:36

    sublime text 2 没有install命令啊。。。。怎么回事

    Reply

    • ern
      2015年6月22日 @ 16:46

      什么意思?你是说装package control?

      Reply

    • ern
      2015年7月1日 @ 11:14

      sublime text 2 没有install命令啊。。。。怎么回事
      ——请问你装了Package Control么?要先安装这个包才能做其他包管理的

      Reply

  21. 在Mac OS X下搭建Latex编辑环境 – 剑客|关注科技互联网
    2015年6月11日 @ 19:06

    […] 首先当然是Google Mac Latex寻找已有的Blog教程,然后发现Mac上常用Sublime Text来编辑,因此搜索Mac sublime Latex,就找到了以下两个网页: http://www.readern.com/sublime-text-latex-chinese-under-mac.html […]

    Reply

  22. leon
    2015年6月12日 @ 15:19

    请问osx 10.10.3可以部署st2+basic版mactex吗,我找您的文章做了,在st2编译时编译出错

    Reply

    • ern
      2015年6月22日 @ 16:47

      ST2应该可以的。10.10.3下,mactex的控制面板可能打不开,但是不影响使用。

      Reply

  23. guessssss
    2015年6月30日 @ 17:16

    中文不换行飞出屏幕的解决方案:
    \XeTeXlinebreaklocale “zh”
    \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt

    Reply

  24. weizhou
    2015年7月8日 @ 19:52

    您好,请问修改了配置文件之后还是无法显示中文?

    Reply

    • ern
      2015年7月26日 @ 20:12

      注意要把修改配置文件的中文引号变成英文引号,或者有其他报错么?

      Reply

  25. Jasper
    2015年8月25日 @ 09:23

    请问sublime 3中找不到相关设置文件要怎么处理呢?

    Reply

    • ern
      2015年9月10日 @ 19:22

      都装齐了?我是7月刚更新的哦,应该没问题的

      Reply

  26. Devin
    2015年9月18日 @ 17:23

    第三步,输了Install 下面一片空白怎么选LaTeX??谢谢楼主、

    Reply

  27. tiger
    2015年9月29日 @ 15:20

    请教一下,subprocess.Popen([‘open’] + [pdffile])应该加在哪个地方,

    Reply

  28. tiger
    2015年9月29日 @ 15:38

    另外更改以后编译结束不弹出预览。。改回去以后发现skim也无法弹出

    Reply

    • ern
      2015年10月1日 @ 23:38

      @tiger 你的问题解决了么?抱歉挺晚才看到。

      Reply

      • phoe
        2016年3月14日 @ 13:12

        并没有…TUT
        其他的地方一点问题都没有,就这儿卡着了

        Reply

      • phoe
        2016年3月14日 @ 13:15

        我勒个去…原来是[‘open’] 要将单引号从中文换成英文…谢谢楼主

        Reply

        • ern
          2016年3月14日 @ 15:11

          对的,wordpress会自己做转换,挺烦的

          Reply

  29. Jack
    2015年10月4日 @ 03:34

    更新 El Capitan 後,編譯都會出現

    SimpleBuilder: pdflatex run 1;

    COULD NOT COMPILE!

    Attempted command:xelatex -interaction=nonstopmode -synctex=1 test (test是檔名)
    Build engine: Simple Builder

    請問有什麼方法可以解決??
    謝謝

    Reply

    • ern
      2015年10月5日 @ 12:46

      @Jack 我刚才测试了一下,是正常的,没有报错。请依次确认以下问题:
      1. 是否装了最新的2015版MacTEX?我装的Basic包,这个够用了。
      2. 直接打开终端程序,输入xelatex,看是报错还是正常提示版本,并进入一个交互的命令行(按Ctrl+可退出)
      3. 在终端程序里输入which xelatex,应该提示这个:

      /Library/TeX/texbin/xelatex

      其实2和3就是装了最新版MacTEX后应该有的反应。
      简单说下原理,El Capitan以后/usr目录被系统保护了(/usr/local除外),所以新版的MacTEX考虑到这点,把命令转移到资源库里了。

      Reply

  30. myname
    2015年10月7日 @ 19:06

    我的情况和 JACK的一样
    TraditionalBuilder: Engine: pdflatex -> xelatex. Invoking latexmk…

    COULD NOT COMPILE!

    Attempted command:latexmk -cd -e $pdflatex = ‘xelatex -interaction=nonstopmode -synctex=1 %S %O’ -f -pdf pic.tex
    Build engine: Traditional Builder

    还不知道是什么问题

    Reply

    • ern
      2015年10月8日 @ 15:57

      参照我的回复检查了么?我昨天自己测试是OK的哦

      Reply

  31. LFU
    2015年10月13日 @ 15:12

    @Jack, @MYNAME, 最简单的方法是运行一下 “Reconfigure and migrate settings”,在package setting的latextools里面,然后再按博主方法重新设置一下builder

    Reply

  32. zhu
    2015年10月27日 @ 15:49

    楼主,我编译你的test 文件的时候也遇到了这个问题

    [Compiling /Users/test.tex]

    SimpleBuilder: pdflatex run 1; done.

    Errors:

    /usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty:43: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    [Done!]

    Reply

    • ern
      2015年10月29日 @ 15:48

      注意看我步骤7了么?是这样设置了么

      Reply

  33. Bo
    2015年10月28日 @ 16:26

    在OS X 10.9.5, MacTex 2015, ST3 Build3083, LatexTOOLS 20151004 上出现下面报错:

    E: /usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty:43 The fontspec package requires either XeTeX or LuaTeX to function }

    请问是大概是哪里出的问题?谢谢!

    Reply

  34. Bo
    2015年10月28日 @ 16:48

    啊,问题已解决。是另一个ST package Latexing 冒出来替换了LatexTools 运行。本来意识到这个问题重新装上后又忘记了= =!

    Reply

  35. Echo
    2015年11月16日 @ 09:21

    出现这样一个错误是什么意思呀?
    Errors:
    /usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty:43: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    还有在终端运行会出现这个
    sudo: tlmgr: command not found

    Reply

    • ern
      2015年11月16日 @ 09:48

      步骤7啊,照做了么?

      Reply

    • Chandler
      2016年3月8日 @ 10:20

      有可能你没有忘记装BasicTex了,我刚刚就是这个原因:)

      Reply

    • Henry
      2016年7月29日 @ 23:58

      要进入/usr/local/texlive/目录里面执行tlmgr命令

      Reply

  36. JOEY
    2015年11月24日 @ 17:15

    大神,我报错是这样的,之前按照你第7步弄了。。。结果还是这样。。我系统是10.11 sublime text 3 MacTex 2015
    我怀疑是San Francisco 字体的问题么。。。
    [Compiling /Users/Joey/Desktop/MCM.tex]

    TraditionalBuilder: Engine: pdflatex -> pdf. Invoking latexmk… done.

    Errors:

    /usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty:43: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    [Done!]

    Reply

  37. JOEY
    2015年11月27日 @ 00:31

    加入了第7步最后两行语句就好啦!谢谢教程很受用!

    Reply

  38. codegass
    2015年12月1日 @ 00:34

    多有打扰了,之前从ST2升级到3之后,在10.11下按照blog所示安装后,总是出现如下的反馈
    COULD NOT COMPILE!

    Attempted command:latexmk -cd -e -f -xelatex -latexoption=”-interaction=nonstopmode” -latexoption=”-synctex=1″ 2.tex
    Build engine: Traditional Builder

    请问这是该如何解决呢?
    万望回复,多有打扰。

    Reply

    • ern
      2015年12月3日 @ 13:11

      @codegass 仔细按照我的文档改一遍吧,你这个应该是修改配置那里出问题了

      Reply

  39. Sylfii
    2015年12月1日 @ 19:48

    请问一下,按步骤进行完后Command+B仍然提示:
    [Compiling ~/test.tex]

    TraditionalBuilder: Invoking latexmk… done.

    Errors:

    /usr/local/texlive/2015basic/texmf-dist/tex/latex/fontspec/fontspec.sty:43: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    [Done!]

    第7步终端两条命令成功。

    设置中将两句话加在了最后,将builder改为了default.

    Reply

  40. Sylfii
    2015年12月1日 @ 19:53

    解决了,读文不细。
    还望再强调下设置中要将两句设置加在”builder-settings”中。
    读文时很容易误以为只要加入.sublime-settings(譬如蠢萌的在下就丢到末尾了…)

    Reply

  41. Sylfii
    2015年12月1日 @ 20:09

    然而事实上有另一个问题。skim是能够实现实时同步吗?
    也就是说在ST修改的时候skim中也会改吗?
    现在只能修改完后再次Command+B看效果,请问是出了什么问题吗?

    Reply

    • ern
      2015年12月3日 @ 13:12

      这个在Skim里面要打开一个设置,进偏好设置里看看吧。不过也在网上看到有人说打开后会有其他问题,我用的不多,不太清楚。

      Reply

  42. Ximo
    2015年12月4日 @ 13:59

    打扰了。升级El Capitan之后就没有开过LaTex,今天重新更新完MacTex 2015和新的latextools之后,Command+B后依然还是会显示 The command line tool “latexmk” is not available on your path. Please check your settings. 查看TexPath已经更新为”texpath”: “$PATH:/Library/TeX/texbin:/usr/texbin:/usr/local/bin:/opt/local/bin”,还有什么可以查找问题的地方吗?

    Reply

    • ern
      2015年12月5日 @ 20:29

      @Ximo 升级的话要先刷新设置然后再做。建议还是仔细根据步骤做一遍,LaTexTools升级带来了一定变化。如果有问题,请再发评论。

      Reply

  43. Ximo
    2015年12月10日 @ 12:23

    非常感谢在焦躁更新的时候能找到人问一问,12/7 LaTexTools的更新已经完美解决问题了。
    之前在github上面的提问和解答也比较混乱。读了一下开发者log,算是搞定了。

    Reply

  44. windwild
    2015年12月27日 @ 16:34

    求问
    commond + B 之后没有pdf输出 也咩有打开skim 求解

    [Compiling /Users/windwild/codebox/latex/test.tex]

    TraditionalBuilder: Your custom command does not allow the engine to be selected

    Invoking latexmk… done.

    No errors.

    [Done!]

    Reply

    • ern
      2015年12月29日 @ 09:54

      你的“TraditionalBuilder”那里设置是什么?看上去是这里的设置有问题。

      Reply

  45. HungryMilk
    2016年1月11日 @ 23:51

    楼主0.0这是我的setting:
    “builder_settings” : {

    // General settings:
    // See README or third-party documentation

    // (built-ins): true shows the log of each command in the output panel
    “display_log” : false,

    // Platform-specific settings:
    “osx” : {
    // See README or third-party documentation
    },

    “windows” : {
    // See README or third-party documentation
    },

    “linux” : {
    // See README or third-party documentation
    },
    “program” : “xelatex”,
    “command” : [“latexmk”, “-cd”, “-e”, “$pdflatex = ‘xelatex -interaction=nonstopmode -synctex=1 %S %O'”, “-f”, “-pdf”],
    },
    但是报错:
    TraditionalBuilder: Your custom command does not allow the engine to be selected

    Invoking latexmk… done.

    Errors:

    /usr/local/texlive/2015basic/texmf-dist/tex/latex/fontspec/fontspec.sty:43: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]

    [Done!]

    但是使用这个能够正常编译%!TEX program = xelatex

    请问应该怎么办呢……

    Reply

    • ern
      2016年1月12日 @ 10:55

      @HungryMilk 在你这段的前面,是否设置了

      “builder”: “default”,

      你的设置好像看起来OK,里面都是英文引号吧(blog好像会自己转换,所以我问问)。看起来是设置没正常调用xelatex,你在文档里加了强制使用的指令,当然就能正常使用了。

      Reply

  46. Siegfried
    2016年1月13日 @ 22:23

    博主你好, 安装配置基本成功,但是还是会和楼上几位一样,显示如下:

    TraditionalBuilder: Your custom command does not allow the engine to be selected

    Invoking latexmk… done.

    不过skim可以成功打开编译后的pdf

    我的builder是

    “builder”: “default”,

    ”traditional” 也尝试过不过没有变化. 请问可能是什么原因 (确认是英文引号)

    Reply

    • ern
      2016年1月13日 @ 23:22

      @Siegfried 谢谢提醒,我今天测试也发现这个问题了。似乎不影响最后结果,就是有这个提示。我再抽空研究下吧。之前报过相关的bug给作者,都还没提示修复。

      Reply

    • ern
      2016年1月13日 @ 23:43

      @Siegfried 刚才收到个答复,这应该只是因为修改了默认编译器之后的提示而已,不影响使用。so,是正常的。

      Reply

      • Siegfried
        2016年1月14日 @ 00:13

        万分感谢!! anyways, warning什么的冒出来还是让人心一颤一颤的= =

        再次谢谢博主的教程让我配置好了MacTeX+ Sublime Text 3!!

        Reply

  47. Mac LaTeX 环境之 Sublime Text 3 MacTex-IT大道
    2016年2月10日 @ 14:36

    […] 一个在线的LaTex公式编辑器:http://www.codecogs.com/latex/eqneditor.php非常好的入门教程:http://liam0205.me/2014/09/08/latex-introduction/部署MAC上的Sublime Text+LaTex中文环境:http://www.readern.com/sublime-text-latex-chinese-under-mac.html […]

    Reply

  48. maronen
    2016年4月20日 @ 17:33

    非常感谢博主的分享!一直在用Mac自带“预览”的方式,感觉很方便~但是有一个问题。。就在今天自动更新之后发现jumpToPDF.py文件中貌似不再有原来的if plat == ‘darwin’判断了orz……求问在这种情况下该怎么继续关联自带预览呢?万分感谢T^T

    Reply

    • ern
      2016年4月20日 @ 21:53

      @MARONEN 更新评论,我刚才更新到最新版,这个版本已经将对“预览”的支持内置了。只需要在你的用户选项里加一句 "viewer": "preview", 就行了。我已经修改本文。

      Reply

      • maronen
        2016年4月20日 @ 22:28

        万分感谢!博主太厉害!

        Reply

  49. Neko
    2016年5月25日 @ 21:58

    i have the same problem with codegass, and i had modified my configuration, when i type sodu tlmgr … always show tlmgr: command not found, and i type xelatex in terminal also show command not found

    Reply

    • Neko
      2016年5月25日 @ 23:10

      oh thank you very much, i’v solved this problem by installing the basicTex again.

      Reply

  50. LaTeX黑魔法笔记 | Bonjour! Je suis Vine : )
    2016年7月29日 @ 15:16

    […] 参考部署MAC上的Sublime Text+LaTex中文环境——201604更新 […]

    Reply

发表评论