%导言区
\documentclass[10pt]{article}
%article,book,report,letter,ctexart
%[]10pt,11pt,12pt,字体大小磅数
\usepackage{ctex}%引入中文包,确保为UTF-8格式
\newcommand\degree{^\circ}%定义degree类型
\title{\heiti 标题}%黑体
\author{\kaishu 作者 why}%楷书
\date{\today}
%正文
\begin{document}
\maketitle
1、Hello,world!
2、Let $f(x)$ be defined by the formula
$f(x)=3x^2+x-1$
$$f(x)=3x^2+x-1$$ which is a polynomial of
degree 2.
%$$内表示数学格式,双$表示公式居中
3、设直角三角形 $ABC$,其中$\angle C=90\degree$, 则有:
\begin{equation}
AB^2=BC^2+AC^2.
\end{equation}%用于产生带编号的公式
4、字体族设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}
%字体设置命令
\rmfamily Roman Family {\sffamily Sans Serif Family} {\ttfamily Typrrwriter Family}
%字体设置声明
\sffamily I LOVE YOU!\\
\ttfamily I LOVE YOU!
遇到下一个字体声明,自动转换字体
5、字体系列设置(粗细、宽度)\\
\textmd{Medium Series} \textbf{Boldface Series}
6、字体形状(直立、斜体、伪斜体、小型大写)\\
\textup{Upright Shape} \textit{Italic Shape} \textsl{Slanted Shape} \textsc{Small Caps Shape}\\%命令
{\upshape Up} {\itshape it} {\slshape sl} {\scshape Samll}%声明
7、中文字体
{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书} \\
%\quad 退一格和\qquad退两格
中文字体的\textbf{粗体}与\kaishu{斜体}
8、字体大小\\
{\tiny hello}\\
{\scriptsize hello}\\
{\footnotesize hello}\\
{\small hello}\\
{\normalsize hello}\\
{\large hello}\\
{\Large hello}\\
{\LARGE hello}\\
{\huge hello}\\
{\Huge hello}\\
9、中文字号设置命令\\
\zihao{5} 你好
\end{document}
简单的LaTeX入门——1
最新推荐文章于 2024-03-04 21:24:19 发布