Latex 常用于科研论文的编写,用类似 HTML 的方法写出规范整洁的PDF。
选用组合
Latex 2019 + TexStudio
安装与教程
快速入门
1、查看帮助文档
cmd 命令行:
texdoc lshort-zh
texdoc ctex
2、结构示例
%导言区(全局设置)
\documentclass{article}
\usepackage{ctex} %引入中文宏包
\title{\heiti 杂谈勾股定理} %设置字体
\author{\kaishu 张三}
\date{\today}
% 正文区(文稿区)
\begin{document}
\maketitle %使总标题正常显示
Hello World!
%空行实现换行
Let $f(x)$ be defined by the formula $$f(x)=3x^2+x-1$$
% $数学模式$ $$居中换行$$
设三角形$ABC$,其中$\angle C=90\degree$
\begin{euqation}
AB^2 = BC^2 + AC^2. %带编号居中公式
\end{equation}
\end{document}
- 效果
字体属性
1、示例
%导言区
\documentclass{article}
\usepackage{ctex}
%正文区
\begin{document}
% 1、字体族设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family}
\textsf{Sans Serif Family}
\texttt{Typewriter Family}
%声明后续的字体为罗马字体
\rmfamily Roman Family
{\sffamily Sans Serif Family} %{限定范围}
{\ttfamily Typerwritwer Family}
% 2、字体系列设置(粗细、宽度)
\textmd{Medium Series} \textbf{Boldface Series}
{\mdseries Medium Series} {\bfseries Boldface Series}
% 3、字体形状(直立、斜体、伪斜体、小型大写)
\textup{Upright shape} \textit{Italic Shape}
\textsl{Slanted Shape} \textsc{Small Caps Shape}
{\upshape Upright Shape} {\itshape Italic Shape}
{\slshape Slanted Shape}{\scshape Small Caps Shape}
% 4、中文字体
{\songti 宋体} \quad {\heiti 黑体}
\quad {\fangsong 仿宋} \quad {\kaishu 楷书}
\textbf{粗体} \textit{斜体} %\quad 空格
% 5、字体大小
{\tiny Hello}\\ %\\换行
{\scriptsize Hello}\\
{\footnotesize Hello}\\
{\small Hello}\\
{\normalsize Hello}\\
{\large Hello}\\
{\Large Hello}\\
{\LARGE Hello}\\
{\huge Hello}\\
{\Huge Hello}\\
%中文字号
\zihao{-1} 你好
\end{document}
- 效果