\documentclass[UTF8]{ctexart}
\title{\heiti 这是标题}
\author{\kaishu 作者}
\date{\today}
\begin{document}
\maketitle
\clearpage
正文内容
\end{document}
\documentclass[UTF8]{ctexrep}
\usepackage{ulem}
\usepackage{color}
\definecolor{ColorName1}{rgb}{0.5,0.8,0.5}
\definecolor{ColorName2}{RGB}{230,125,230}
\begin{document}
\chapter{Font}
\section{Font Family}
\par Default
\par \textrm{Roman Family}、{\rmfamily Roman Family}
\par \textsf{Sans Serif Family}、{\sffamily Sans Serif Family}
\par \texttt{Typewriter Family}、{\ttfamily Typewriter Family}
\par {\songti 宋体}
\par {\fangsong 仿宋}
\par {\heiti 黑体}
\par {\kaishu 楷体}
\section{Font Shape}
\par Default
\par \textbf{Boldface}、{\bfseries Boldface}
\par \textit{Italic}、\emph{Italic}、{\itshape Italic}
\par \underline{Underline}
\par \uline{uline}、
\uuline{uuline}、
\uwave{uwave}、
\sout{sout}、
\xout{xout}、
\dashuline{dashuline}、
\dotuline{dotuline}
\par $H_2O$、$CaCO_3$、$E=mc^2$
\par \textmd{Medium}、{\mdseries Medium}
\par \textup{Upright}、{\upshape Upright}
\par \textsl{Slanted}、{\slshape Slanted}
\par \textsc{SmallCaps}、{\scshape SmallCaps}
\section{Font Size}
\subsection{General}
\par
{\tiny 〇}
{\scriptsize 〇}
{\footnotesize 〇}
{\small 〇}
{\normalsize 〇}
{\large 〇}
{\Large 〇}
{\LARGE 〇}
{\huge 〇}
{\Huge 〇}
\subsection{Ctex}
\par
{\zihao{-6} 〇}
{\zihao{6} 〇}
{\zihao{-5} 〇}
{\zihao{5} 〇}
{\zihao{-4} 〇}
{\zihao{4} 〇}
{\zihao{-3} 〇}
{\zihao{3} 〇}
{\zihao{-2} 〇}
{\zihao{2} 〇}
{\zihao{-1} 〇}
{\zihao{1} 〇}
{\zihao{-0} 〇}
{\zihao{0} 〇}
\section{Font Color}
\subsection{Foreground}
\par
\textcolor{black}{text}
\textcolor{white}{text}
\textcolor{red}{text}
\textcolor{green}{text}
\textcolor{blue}{text}
\textcolor{yellow}{text}
\textcolor{cyan}{text}
\textcolor{magenta}{text}
{\color{magenta} text}
\par
\textcolor[rgb]{0.7,0.6,0.3}{rgb}
\textcolor[RGB]{22,200,33}{RGB}
\par
\textcolor{ColorName1}{自定义颜色1}
\textcolor{ColorName2}{自定义颜色2}
\subsection{Background}
\par
\colorbox{yellow}{yellow}
\colorbox{ColorName1}{ColorName1}
\colorbox{ColorName2}{ColorName2}
\par
\colorbox[rgb]{0.4,0.4,0.7}{rgb}
\colorbox[RGB]{200,32,68}{RGB}
\section{Space}
\par () 无空格
\par (\thinspace) 空格1/6em
\par (\enspace) 空格1/2em
\par (\quad) 空格1em
\par (\qquad) 空格2em
\par (\ ) 空格
\par (~) 硬空格
\par ({\kern -1em}) 自定义 kern -1
\par ({\kern 1em}) 自定义 kern +1
\par ({\hskip -1em}) 自定义 hskip -1
\par ({\hskip 1em}) 自定义 hskip +1
\par (\hspace{-1em}) 自定义 hspace -1
\par (\hspace{1em}) 自定义 hspace +1
\par (\hphantom{abc}) 占位符 hphantom abc
\par (\hfill) 弹性长度(撑满整个空间)
\section{Symbol}
\subsection{控制符}
\$、\#、\
\textbackslash、
\^{}、\~{}
\subsection{排版符}
\S、\P、\dag、\ddag、\copyright、\pounds
\subsection{标志符}
\TeX{}、LaTeX{}、LaTeXe{}
\subsection{引号}
`abc'、``abc''
\subsection{连字符}
\par -
\par --
\par ---
\subsection{非英文字符}
\par \oe、\OE
\par \ae、\AE
\par \aa、\AA
\par \o、\O
\par \l、\L
\par \ss、\SS
\par !`、?`
\subsection{重音}
\par \`o
\par \'o
\par \^o
\par \~o
\par \=o
\par \.o
\par \''o
\end{document}
\documentclass[UTF8]{ctexrep}
\usepackage{geometry}
\geometry{a4paper,left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm}
\linespread{1.5}
\begin{document}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph}
\subparagraph{Subparagraph}
\clearpage
\par 段落1
\par 段落2
\newline 换行不缩进
\\ 换行不缩进
\par{段落3}
\end{document}
\documentclass[UTF8]{ctexrep}
\begin{document}
\par
左侧内容$f(x)=Ax^2+Bx+C$右侧内容
\par
左侧内容$$E=mc^2$$右侧内容
\par
左侧内容\begin{equation}
AB^2=BC^2+AC^2
\end{equation}右侧内容
\end{document}
\documentclass[UTF8]{ctexrep}
\usepackage{graphicx}
\graphicspath{{enclosure/}}
\begin{document}
\section{import}
\subsection{导入JPG}
\par
\includegraphics[scale=0.5]{file.png}
\par
\includegraphics[width=0.3\textwidth,angle=90]{file.png}
\includegraphics[height=0.3\textwidth]{file.png}
\subsection{导入PDF}
\includegraphics[scale=20]{file.pdf}
\end{document}
\documentclass[UTF8]{ctexrep}
\begin{document}
\par demo1
\begin{tabular}{l c c c r}
姓名 & 数学 & 语文 & 英语 & 备注
\\ 张三 & 45 & 58 & 66 & 请等待补考通知
\\ 李四 & 56 & 78 & 44 & 成绩一般
\\ 王五 & 99 & 98 & 95 & 成绩优异
\end{tabular}
\par demo2
\begin{tabular}{l|c c c |r}
\hline
姓名 & 数学 & 语文 & 英语 & 备注
\\ 张三 & 45 & 58 & 66 & 请等待补考通知
\\ 李四 & 56 & 78 & 44 & 成绩一般
\\ 王五 & 99 & 98 & 95 & 成绩优异
\\ \hline
\end{tabular}
\par demo3
\begin{tabular}{l||c c c||r}
\hline \hline
姓名 & 数学 & 语文 & 英语 & 备注
\\ 张三 & 45 & 58 & 66 & 请等待补考通知
\\ 李四 & 56 & 78 & 44 & 成绩一般
\\ 王五 & 99 & 98 & 95 & 成绩优异
\\ \hline \hline
\end{tabular}
\par demo4
\begin{tabular}{l|c|c|c|p{2cm}}
姓名 & 数学 & 语文 & 英语 & 备注
\\ 张三 & 45 & 58 & 66 & 请等待补考通知
\\ 李四 & 56 & 78 & 44 & 成绩一般
\\ 王五 & 99 & 98 & 95 & 成绩优异
\end{tabular}
\end{document}