我半途而废的学习笔记之 LaTeX (1) - 基本设置

如果不是一些爱吃野味的大哥,我也不会大过年的在家看 LaTeX的语法.

软件我安装的很早,这是链接:WinEdt 7.0.提取码:xe1d

完整代码在最后,先上一下效果图在这里插入图片描述
%导言区

\documentclass{ctexart} %article, book, report, letter,ctexart, ctexboook, ctexrep

%使用中文, 编码方式是utf-8

\usepackage{ctex} 

%定义命令

\newcommand\degree{^\circ}%定义度数的符号
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}%记住这个myfont

%附加信息

\title{\heiti 毕业论文} %标题 黑体
\author{\kaishu 芳心纵火犯} %作者 楷书
\date{\today}

%正文区

\begin{document}
	\maketitle %显示标题
%字体族设置
%字体命令,作用于命令的参数
	\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}
%字体声明,作用于后面的文字,大括号用于限定范围

	 {\rmfamily Roman Family} {\sffamily Sans Serif Family} {\ttfamily Typewriter Family} 
	%{\songti heiti fangsong kaishu}
	%{\textbf粗体 \textit斜体}
%中文字号设置命令
	\zihao{5} 你好! %5号
 	\myfont          %上面有个myfont

	你好你好

	hello world

%数学公式:单%是行内公式,双$是行间公式
%空格是换行

let f ( x ) = 3 x 2 f(x)=3x^2 be defined by the formula f ( x ) = 3 x 2 f(x)=3x^2 which is a ploynomial of degree 2.

%产生带有编号的行间公式
    \begin{equation}
        f(x)=3x^2
    \end{equation}

\end{document}

LaTeX的代码还是得在他的编译器里看

猜你喜欢

转载自blog.csdn.net/weixin_41661059/article/details/106890042