Latex入门教程(1)Mac系统下,latex即MacTex安装以及atom编辑hello world

安装MacTex

安装链接

我是直接下载安装的,会出现的问题是,安装后按说会有4个app,但实际上只有两个,如下图:
在这里插入图片描述
还有两个,因为跟苹果的协议问题,没能安装成功,但是目前对我来说无影响,如果要安装可见application/tex目录下的pdf文件,该文档进行了解释,并提供了下载链接

在这里插入图片描述

安装atom插件

我用atom进行latex文档编写,用着很方便。需要在atom下安装如下三个插件: language-latex, latex, pdf-view,如下图:

在这里插入图片描述
在这里插入图片描述

hello world

新建一个test.tex文件,用atom打开,写下如下内容,并按下ctrl+option+b,进行编译,会自动生成并打开pdf文件

\documentclass[UTF8]{ctexart}
\usepackage{graphicx}
\usepackage{float}
\usepackage{amsmath}
\usepackage{geometry}
\usepackage{hyperref}
\geometry{a4paper,centering,scale=0.8}
\usepackage[format=hang,font=small,textfont=it]{caption}
\usepackage[nottoc]{tocbibind}

\begin{document}
hello world
\end{document}

效果

在这里插入图片描述

总结

本文简单讲了如何在Mac下装latex并进行文档编写,后面会latex的进阶操作进行更新。

猜你喜欢

转载自blog.csdn.net/Xurui_Luo/article/details/106625584