简单的LaTeX入门——1

%导言区
\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}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值