MacOS下的Latex+sublime+skim配置

文章目录

    • 实际采坑安装配置步骤
      • 1. 安装MacTex
      • 2. 下载安装Sublime3
      • 3. 离线安装Package Control
      • 4. 手动修改Package Control的配置文件,安装LatexTools
      • 5.安装配置Skim
      • 6. 测试配置效果

在实际安装配置环境的过程中,参考了以下几篇文章,可以按照链接顺序阅读。其余部分主要是记录自己遇到的坑,以及解决方法。
参考链接
正常安装链接:
(1) https://blog.csdn.net/leeafay/article/details/78991904?utm_source=blogxgwz1
(2) https://blog.csdn.net/cdqn10086/article/details/53640892
package control相关的error解决链接:
https://github.com/wbond/package_control/issues?q=is%3Aopen

实际采坑安装配置步骤

1. 安装MacTex

官网下载地址:http://www.tug.org/mactex/
MacOS下的Latex+sublime+skim配置_第1张图片
下载完成后,双击安装,正常安装完毕,会出现很多应用图标
MacOS下的Latex+sublime+skim配置_第2张图片

2. 下载安装Sublime3

下载地址:https://www.sublimetext.com/3
MacOS下的Latex+sublime+skim配置_第3张图片

3. 离线安装Package Control

选择离线安装的原因 : 在sublime的控制台中使用 https://packagecontrol.io/installation 中提到的在线安装方法(复制灰色区块的代码,然后在sublime中"control + ~"打开控制面板,将复制的灰色代码粘贴到控制面板,然后回车进行安装)安装失败。
控制面板中提示:

File "./python3.3/urllib/request.py", line 1248, in do_open
File "./python3.3/http/client.py", line 1065, in request
File "./python3.3/http/client.py", line 1103, in _send_request
File "./python3.3/http/client.py", line 1061, in endheaders
File "./python3.3/http/client.py", line 906, in _send_output
File "./python3.3/http/client.py", line 844, in send
File "./python3.3/http/client.py", line 822, in connect
File "./python3.3/socket.py", line 435, in create_connection
File "./python3.3/socket.py", line 426, in create_connection
ConnectionRefusedError: [Errno 111] Connection refused

File "/home/dlyman/.config/sublime-text-3/Packages/tern_for_sublime/tern.py", line 264, in f
req = opener.open("http://" + localhost + ":" + str(port) + "/", json.dumps(doc).encode("utf-8"), 1)
File "./python3.3/urllib/request.py", line 469, in open
File "./python3.3/urllib/request.py", line 487, in _open
File "./python3.3/urllib/request.py", line 447, in _call_chain
File "./python3.3/urllib/request.py", line 1274, in http_open
File "./python3.3/urllib/request.py", line 1251, in do_open
urllib.error.URLError: 

弹窗提示:Package Control:There are no packages available for installation。
离线安装方法 : 下载Package Control手动进行安装。
下载地址:https://github.com/wbond/package_control 下载后解压,将文件夹重命名为Package Control,将整个文件夹放到 /Users/XXX/Library/Application Support/Sublime Text 3/Packages目录下。

4. 手动修改Package Control的配置文件,安装LatexTools

选择手动修改的原因 : 在上一步离线安装完Package Control 之后,使用命令托盘Command + Shift + P,在命令托盘中输入“Install Package”并回车后,再输入“LaTex Tools”安装失败。安装失败的原因是无法访问配置文件Pacakge Control.sublime-setting中的channels配置项下的url:https://packagecontrol.io/channel_v3.json.
MacOS下的Latex+sublime+skim配置_第4张图片
手动修改方法: 手动下载channel_v3.json文件,下载地址就是https://packagecontrol.io/channel_v3.json,接下来的解决方法参照slf1991的回答: https://github.com/wbond/package_control/issues/1408
即可解决.
安装成功后,sublime的控制面板中会提示:successfully
并提示:
MacOS下的Latex+sublime+skim配置_第5张图片

5.安装配置Skim

官网下载并安装,下载地址:https://skim-app.sourceforge.io
MacOS下的Latex+sublime+skim配置_第6张图片
安装成功后在菜单中点击"Skim"–>“选项”–>“同步”–>“预设”–>“Sublime Text”
MacOS下的Latex+sublime+skim配置_第7张图片

6. 测试配置效果

编写一个测试的tex文件,保存后,command + B编译运行,会出现弹窗提示,点击“好”
MacOS下的Latex+sublime+skim配置_第8张图片
然后Skim会自动生成pdf,测试完毕。

你可能感兴趣的:(MacTex,环境安装配置)