-
homebrew安装
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -
mactex 安装
brew cask install mactex需要等待的时间比较长
-
vscode安装与配置
安装vscode.
在左侧的extension中安装
LaTeX Workshop以及LaTeX language support插件重启vscode
打开
setting.json在最后补充以下代码
"latex-workshop.latex.toolchain": [ { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] } ]要注意修改之后满足
json的格式。必要时需要加逗号 -
skim安装与配置
安装
skimPdf阅读器。之后command + ,打开设置
Example
新建一个latex 文件 123.tex,键入以下代码
%!TEX program = xelatex
\documentclass[UTF8]{ctexart}
\title{}
\author{大家好,这是一个例子}
\begin{document}
\maketitle
\subsection[]{放假快乐是大家按房价都}
\end{document}
按下键盘上面 option + command + B 编译 在skim 那边就能看到结果了。如果不显示需要手动打开同一个目录下面的123.pdf文件。

本文详细介绍如何在Mac上使用Homebrew安装LaTeX环境,包括安装Homebrew、Mactex、VSCode及其LaTeX插件,以及Skim PDF阅读器。通过具体步骤和示例代码,指导用户完成从安装到配置的全过程。
3万+

被折叠的 条评论
为什么被折叠?



