一直以来,LaTeX应用中文就各处不适,其中之一就是不方便调整中文字体。终于,我在网上找到一个有营养的帖子,似乎可以对这一问题迎刃而解了。
已知本地已安装CTeX,而CTeX包含MikTeX 2.9,MikTeX又包含XeTeX,所以XeTeX已经在本地安装。编译之时xetex代替tex、xelatex代替latex命令即可。下面就是一个简单的例子,将下面的代码以UTF-8编码方式保存成一个文本文件,命名为test.tex
1 2 3 4 | %如何了解本地安装的中文字体?在CMD运行如下命令: fc-list :lang=zh-cn %简体中文 fc-list :lang=zh-tw %繁体中文 fc-list :lang=ja %日文 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | \documentclass[12pt,a4paper]{article} \usepackage{fontspec} \usepackage{hyperref} \setmainfont{SimSun} \begin{document} % \tableofcontents \newpage \section{宋体} 测试简体字 \section{简体中文} \fontspec{Microsoft YaHei}中国北京 \\ \fontspec{FZYaoTi} 中国北京 \\ \fontspec{NSimSun} 中国北京 \\ \fontspec{STXinwei} 中国北京 \\ \fontspec{STHupo} 中国北京 \\ \fontspec{STXingkai} 中国北京 \\ \fontspec{STLiti} 中国北京 \\ \fontspec{STZhongsong} 中国北京 \\ \fontspec{LiSu} 中国北京 \\ \section{繁体中文} \fontspec{PMingLiU} 中國北京 \\ \fontspec{MingLiU} 中國北京 \\ \fontspec{Microsoft JhengHei} 中國北京 \\ \fontspec{HanWangWCL10} 中國北京 \section{日文} \fontspec{Meiryo UI} 北京中国 \\ \fontspec{MS Mincho} 北京中国 \\ \fontspec{IPAexMincho} 北京中国 \\ \end{document} |
对于Beamer,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | \documentclass{beamer} \usepackage{pgfpages} %\setbeameroption{show notes} %\setbeameroption{show notes on second screen=right} \mode<presentation> { \usetheme{Warsaw} % ou autre ... \setbeamercovered{transparent} % ou autre chose (il est également possible de supprimer cette ligne) } \usepackage[french]{babel} \usepackage[latin1]{inputenc} %\usepackage{times} \usepackage[T1]{fontenc} \usepackage{tikz} %\pgfdeclareimage[height=0.5cm]{le-logo}{logo-irisa} %\logo{\pgfuseimage{le-logo}} \setbeamertemplate{footline}[frame number] %%%%%%%%%%%%%%%%%%%%%%% \usepackage{multicol} \usepackage{fontspec} \setmainfont{SimSun} \AtBeginSection[] { \begin{frame}<beamer>{Table of Contents} \begin{multicols}{2} \tableofcontents[currentsection,currentsubsection, hideothersubsections, sectionstyle=show/shaded, ] \end{multicols} \end{frame} } %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%% \title[Patterns for SoS Reconfiguration] {{\fontspec{Microsoft YaHei}中国}Approach Based Patterns for System-of-Systems Reconfiguration} %\subtitle {ne compléter que si l'article possède un sous-titre} \author[Franck, Petitdemange] {F.~Petitdemange\inst{1} \and I.~Borne\inst{1} \and J.~Buisson\inst{2}} \institute[] { \inst{1}% IRISA\\ University of South Brittany\\ Vannes, France \and \inst{2}% IRISA\\ Military Academy of St-Cyr\\ Vannes, France} \date[SESOS 2015] {Software Engineering for Systems-of-Systems, 2015} \begin{document} \begin{frame} \titlepage \end{frame} \begin{frame}{Plan} %\tableofcontents \begin{multicols}{2} \tableofcontents[hideallsubsections] \end{multicols} \end{frame} \section{\fontspec{Microsoft YaHei}中国} %\frame{\tableofcontents[currentsection]} \subsection{SoS Engineering Process} \begin{frame}{SoS Engineering Process} {\fontspec{SimSun} 中国北京} \fontspec{SimSun} 中国北京 %\includegraphics[scale=0.3, angle=-90]{construction-process} % \input{figures/fig_engineering-process} \end{frame} \subsection{SoSADL} \begin{frame}{Architecture desciption language : SoSADL} \begin{description} \item[{\fontspec{SimSun} 中国北京}Constituent System (CS) :] have their own managerial and operational independance while contributing to the global mission of the SoS \item[Mediator :] controled by the SoS. They belong to the SoS. Mediateur are communicating element that specify, coordinate the interaction beetween CSs and SoS control over them. \item[Coalition :] a set of contraints about the CSs and mediator required to accomplish a emergent behavior. \end{description} \end{frame} \subsection{Context} \begin{frame}{Emergency service SoS} \begin{description} \item[Mission :] preserve human life and material \end{description} %\input{figures/fig_emergency-service-exemple} \end{frame} \section{Patterns for SoS reconfiguration} \subsection{Motivation} \begin{frame}{Need of architectural reconfiguration} Cause : \begin{itemize} \item managerial and operational independance of the constituents \end{itemize} Consequence : \begin{itemize} \item architecture evolve continuesly \end{itemize} Problems : \begin{itemize} \item determine a set of reconfiguration' operations to maintain architectural pattern in the concrete architecture? \item determine a set of reconfiguration' operations to make evolve the architectural pattern in a coherently way? \end{itemize} \end{frame} \begin{frame}{Architectural pattern} % \includegraphics[angle=-90, scale=0.5]{pattern-emergency-service} \end{frame} \begin{frame}{Maintain architectural patterns} %\includegraphics[angle=-90, scale=0.4]{cas-maintain-pattern} \end{frame} \begin{frame}{Architectural pattern evolutions} %\includegraphics[angle=-90,scale=0.4]{cas-evolution-pattern} In this slide, some important text will be \alert{highlighted} beause it's important. Please, don't abuse it. \begin{block}{Remark} Sample text \end{block} \begin{alertblock}{Important theorem} Sample text in red box \end{alertblock} \begin{examples} Sample text in green box. "Examples" is fixed as block title. \end{examples} \end{frame} \subsection{Approach} \begin{frame}{Patterns for reconfiguration} Approach : \begin{itemize} \item use pattern approach to formalize a set of best practice to assist reconfiguration \end{itemize} \begin{itemize} \item based on dedicaded language (SoSADL), describe SoS architecture pattern architectural taking into account SoS characteristics \item express a set of reconfiguration operations associate to this architectural pattern which can express for instance :when, how, for which to add a new CS. \end{itemize} \end{frame} \begin{frame}{Challenges} \begin{itemize} \item the choice of reconfiguration' operations in order to instanciate or reinstanciate the architectural pattern %\item ... \end{itemize} \end{frame} \section{Related Works} \begin{frame}{} \end{frame} \section{Conclusion} \begin{frame}{Challenge and Futur Work} Challenge : \begin{itemize} \item \end{itemize} Futur Work : \begin{itemize} \item \end{itemize} \end{frame} \section{Conclusion} \begin{frame}{Challenge and Futur Work} Challenge : \begin{itemize} \item \end{itemize} Futur Work : \begin{itemize} \item \end{itemize} \end{frame} \section{Conclusion} \begin{frame}{Challenge and Futur Work} Challenge : \begin{itemize} \item \end{itemize} Futur Work : \begin{itemize} \item \end{itemize} \end{frame} \section{Conclusion} \begin{frame}{Challenge and Futur Work} Challenge : \begin{itemize} \item \end{itemize} Futur Work : \begin{itemize} \item \end{itemize} \end{frame} \end{document} |
beamer尺寸之16:9,
1 | \documentclass[aspectratio=169]{beamer} |
References
[1] 再说在LaTeX中使用中文字体.
[3] List of beamr style.
No comments:
Post a Comment