LaTeX

Meqt

Primary Learning Material

Use

OSX

Install with Homebrew:

1
brew install mactex

which include default editor TeXShop
TeXShop
But it has poor support for autocomplete and syntax highlighting. Thus, I would recommend you config external Editor, [VS Code] for example:
VS Code LaTeX
will, it didn’t seem any better. ( ̄◇ ̄;)

Overleaf

It’s an online platform where you write and typeset. It may not be the most elegant way, but easist.

CTeX

并不原生支持中文,我们用直接编译以下文本:

1
2
3
4
\documentclass{article}
\begin{document}
你好!
\end{document}

编译无法通过,并会出现如下报错:

./Untitled.tex:3: LaTeX Error: Unicode character 好 (U+597D) not set up for use with LaTeX.

你可以使用CTeX宏包来解决以上问题

1
2
3
4
5
6
7
8
\documentclass{article}
\usepackage[UTF8]{ctex}
\begin{document}
中文文档类测试。你需要将所有源文件保存为 UTF-8 编码。
你可以使用 XeLaTeX、LuaLaTeX 或 upLaTeX 编译,也可以使用 (pdf)
LaTeX 编译。 推荐使用 XeLaTeX 或 LuaLaTeX 编译。对高级用户,我
们也推荐使用 upLaTeX 编译。
\end{document}

或者

1
2
3
4
\documentclass[UTF8]{ctexart}
\begin{document}
你好!
\end{end}

CTEX 宏集是面向中文排版的通用 LATEX 排版框架,为中文 LATEX 文档提供了汉字输出支持、 标点压缩、字体字号命令、标题文字汉化、中文版式调整、数字日期转换等支持功能,可适应论 文、报告、书籍、幻灯片等不同类型的中文文档。
CTEX 宏集支持 LATEX、pdfLATEX、XƎLATEX、LuaLATEX、upLATEX 等多种不同的编译方式,并为 它们提供了统一的界面。主要功能由宏包ctex以及中文文档类ctexart、ctexrep、ctexbook和 ctexbeamer 实现。

你可以在TeXShop -> Help -> Show Help for Package输入CTeX,阅读CTeX宏集手册

Useful Packages

  • Post title:LaTeX
  • Post author:Meqt
  • Create time:2022-12-17 02:22:12
  • Post link:https://meqtmac.github.io/2022/12/17/LaTeX/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.