Last active
May 15, 2023 05:45
-
-
Save voldikss/7977fb79fc01a2f80d4913a9f5133ee6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 1 | |
% UTF-8 encoding | |
% Compile with latex+dvipdfmx, pdflatex, xelatex or lualatex | |
% XeLaTeX is recommanded | |
\documentclass[UTF8]{ctexart} | |
\begin{document} | |
文章内容 | |
Hello world | |
\end{document} | |
% 2 | |
\documentclass{article} | |
\usepackage[UTF8]{ctex} | |
\begin{document} | |
文章内容 | |
Hello world | |
\end{document} | |
% 3 | |
% UTF-8 encoding | |
\documentclass{article} | |
\usepackage{xeCJK} | |
\setCJKmainfont{SimSun} | |
\begin{document} | |
文章内容 | |
Hello world | |
\end{document} | |
% 4 | |
\documentclass{article} | |
\usepackage{fontspec} | |
\setmainfont[Mapping=tex-text]{SimSun} | |
\begin{document} | |
文章内容 Hello world | |
\end{document} | |
% Reference: https://tex.stackexchange.com/questions/17611/how-does-one-type-chinese-in-latex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment