mac latex配置

下载MacTex并安装

1
http://www.tug.org/mactex/

Latex编译器TexShop的设置

安装完成后,会有TexShop编译器。

完成如下两个中文的环境设置:

  1. 设置默认的编译为Xelatex:Preferences—Typesetting—Default Command—Command Listed Below—XeLaTex;
  2. 设置语言编码为UTF-8:Preferences—Source—Encoding—Unicode(UTF-8);当然Text and Background Colors也可以设置为白字黑底;

测试中英文混搭

1
2
3
4
5
6
7
8
9
\documentclass{article}
\usepackage{fontspec}
\setmainfont{SimSun}

\begin{document}

Hello, \LaTeX3, 中文混搭效果。

\end{document}
请作者喝一杯咖啡☕️