Showing posts with label LaTeX. Show all posts
Showing posts with label LaTeX. Show all posts

Sunday, February 20, 2022

TeX: TexMaker+MikTex

安装顺序

安装MikTex,下载.
安装TexMaker,下载.
配置TexMaker,分为两步.

参考文献

Friday, January 24, 2020

TeX:中文支持工具

CTeX套装

CTeX套装是科学院吴凌云研究员的个人作品。在CTeX套装刚刚问世之时,因其解决了繁琐的中文字体安装工作,所以广受欢迎。但是,一方面CTeX套装已经很久不更新,内里的宏包、工具陈旧;另一方面,随着XeLaTeX的发展,以及xeCJK等技术的成熟,上述这些繁琐的工作已经没有必要而失去意义;因此,现在不推荐使用 CTeX套装。

CTeX宏集

CTeX宏集和CTeX套装是两个不同的东西。
CTeX宏集是集成了中文支持、操作系统判定、字体选择、版式预设为一体的一组宏包和文档类的合集。我们推荐在任何情况下,优先使用CTeX宏集处理中文。

TeX Live

TeX Live是TUG (TeX User Group)维护和发布的TeX系统,可说是「官方」的TeX系统。我们推荐任何阶段的TeX用户,都尽可能使用TeX Live,以保持在跨操作系统平台、跨用户的一致性。TeX Live的官方站点是https://tug.org/texlive/。
国内下载站点请见参考文献[1]。

安装过程

Windows用户右键单击install-tl-advanced.bat,以管理员权限执行;除了安装位置,所有选项都应保留默认。
安装结束后,可以在CMD窗口键入简单命令,无返回错误即为安装成功。
Fig. 1
TeXworks editor是TeX Live自有编辑器,打开它。在里面,键入一段含有中文的完整TeX代码,如下:
\documentclass[UTF8]{ctexart}
\begin{document}
\section{文字}
测试部分!
\section{数学}
\[
  a ^2+ b^2=c^2
\]

这是数学公式!
\end{document}
运行后,得到如下图即为安装成功。
Fig. 2
TeXworks editor操作说明见参考文献[3]。

参考文献

[2] The TEX Live Guide—2019. 各种文本教程(含中文)在2.2.

Saturday, September 23, 2017

TeX: 中文多字体使用通用示范

一直以来,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

Saturday, April 9, 2016

TeX: 个人文本范式

Introduction

编辑属于自己的个人LaTeX文档及演示幻灯片。
配置Texmaker编码格式如下:
Fig. 1
1
2
3
4
5
{kai}  %楷体
{song} %宋体
{hei}  %黑体
{li}   %隶书
{fs}   %仿宋
1
2
3
4
5
6
{zhsong} %宋体
{zhhei} %黑体
{zhkai} %楷体
{zhfs} %仿宋
{zhli} %隶书
{zhyou} %幼圆

Wednesday, March 30, 2016

[Discard]TeX: CTeX+TeXMaker

CTeX是方便中文TeX用户的TeX编译环境,但是它包含的WinEdit编辑器是收费软件,不符合自由流通、使用原则,所以这里应用CTeX+TeXMaker配置方案,兼顾CTeX支持中文优点及TeXMaker优秀的编辑环境。
这两款的最新安装文件都可以在各自的官方站点下载,分别按照向导安装。这里只要注意:CTeX安装时不勾选WinEdit
各自安装完成后,CTeX不须配置,TeXMaker需要进行配置。打开Texmaker,工具栏Options->Configure Texmaker,配置如下:
Fig. 1
其中Pdf Viewer选择安装机器的Pdf浏览器即可,这里是Adobe Acrobat。
配置完成后,试用下面代码对效果进行简单测试:
有时下段代码运行不成功,提示“! Package CJK Error: Invalid character code.”错误,此时造成错误的原因在于该段代码保存的文本不是UTF8编码格式,只需将该文件另存为UTF8编码即可。
\documentclass[UTF8]{ctexart}
\begin{document}
\section{文字}
测试部分!
\section{数学}
\[
  a ^2+ b^2=c^2
\]

这是数学公式!
\end{document}

References

Wednesday, March 23, 2016

TeX: 初步学习TeXMaker

LaTeX在线资源:http://www.ctan.org。
由于TeXMaker仅是一个编辑器,所以在安装TeXMarker之前要先安装TeX Distribution(MiKTeX),其实之后安装也是可以的。

Videos

References