MacOS X 安装免费的 LaTex 环境

MacOS X 安装免费的 LaTex 环境最近把工作终端一步步迁移到 Mac 上来了 搭了个 Latex 的环境 跟 windows 上一样好用

大家好,欢迎来到IT知识分享网。

最近把工作终端一步步迁移到Mac上来了,搭了个 Latex的环境,跟windows上一样好用。

首先,如果是 intel 芯片的 macOS,那么可以使用组合1,

如果是 M1、M2 或 M3 芯片或者 intel 芯片的 Mac book,则应该使用组合2,

texMaker目前在Mx芯片上工作不行;

效果分别如下图,点击

选择了 Mactex 做编译,用 Texmaker 做编辑;

1. 下载与安装

1.1 Mactex 下载安装

MacOS 安装和示例 LaTex 的编译器 与 编辑器

编译器使用免费的 Mactex:

https://tug.org/mactex/mactex-download.html

MacOS X 安装免费的 LaTex 环境

如果是M1 M2 等M系列的Mac 电脑,那么不需要安装Texmaker,可以直接使用 已经安装进来的 Texshop,稍显简陋,但也能用:

分三步:

1, 打开软件

MacOS X 安装免费的 LaTex 环境

2, 输入latex代码

\documentclass[12pt]{article} \title{Dawn} \begin{document} \maketitle \[ Hello\,\, L^{A}T_{E}X\,2_{\epsilon} \] \begin{equation} f\, =\,a^{x}\,+\,b \end{equation} $\backslash$ I read that Knuth divides the\newline people working with \TeX{} into\newline \TeX{}nicians and \TeX perts.\\ Today is \today.\\ { 
  {\LaTeX}\,${2_{\epsilon}}$}\newline \textsl{ 
  {\LaTeX}\,${2_{\epsilon}}$}\newline \[ L^{A}T_{E}X\,2_{\epsilon} \] \end{document}

3, 编译显示

MacOS X 安装免费的 LaTex 环境

1.2 Texmaker 下载安装

在intel的mac电脑中安装 LaTeX 编辑器Texmaker:

https://www.xm1math.net/texmaker/download.html

MacOS X 安装免费的 LaTex 环境

MacOS X 安装免费的 LaTex 环境

2. 示例测试

2.1 可用性测试示例

新建文件保存为 hello_world.tex

\documentclass[12pt]{article} \title{Hello World!} \author{Jimmy.Runn} \date{} \begin{document} \maketitle Hello LaTex World! \end{document}

构建编辑效果:

MacOS X 安装免费的 LaTex 环境

生成pdf文件的效果:

MacOS X 安装免费的 LaTex 环境

3. VS code 结合 latex workshop

3.1 安装

关键信息都在图中可见

MacOS X 安装免费的 LaTex 环境

3.2 示例

\documentclass[12pt]{article} \title{Hello World!} \author{Jimmy.Runn} \date{} \begin{document} \maketitle Hello the Most Beautiful LaTex World!\\ Convolution formula: \begin{equation} (f\ast g) = \int_{-\infty}^{\infty} f(\tau) g(t-\tau)\, d\tau \end{equation} \[ y = \int_{-\pi}^{\pi}cos(\theta)\, d\theta \] \begin{equation} e^{ix} = cos\,x + i*sin\,x \end{equation} \begin{equation} e^{i\pi} + 1 = 0 \end{equation} \end{document}

MacOS X 安装免费的 LaTex 环境

4. 直接编译 tex文件

xelatex --interaction=batchmode hello_latex.tex 2>&1 > /dev/null;open hello_latex.pdf

每次带着open 命令,就可以及时查看结果了:

MacOS X 安装免费的 LaTex 环境

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/122161.html

(0)
上一篇 2025-10-18 20:10
下一篇 2025-10-18 20:20

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信