研究tex如何编辑中文的问题,百度上没有一篇文章适用的,贴出一个demo,复制粘贴即可:
系统:macos
软件:texshop
下载地址:https://www.macupdate.com/app/mac/31777/mactex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont{SimSun} %设置中文字体
\XeTeXlinebreaklocale “zh”
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt %文章内中文自动换行
\newfontfamily{\H}{SimHei}
\newfontfamily{\E}{Arial}
\title{\H 算法设计}
\author{Donald}
\date{\E\today}
\begin{document}
\maketitle
这个段落中,夹杂着一个{\E word}。
\end{document}
本文详细介绍了在macOS系统上使用TeXShop软件,通过XeLaTeX引擎编辑中文文档的方法,并展示了如何设置中文字体和实现中文自动换行。
1万+

被折叠的 条评论
为什么被折叠?



