关于latex的用法----简单介绍

1、分为导言区和正文区

%导言区
\documentclass{article}%book,report,letter
%正文区(文稿区)
\begin{document}
hello

\end{document}

2、编译文档
在这里插入图片描述

注意:一个latex文件有且只有一个document 环境
%表示注释

3、通过更改documentclass 来更改封面。
如article改为book,report等

/document{article}%book,report,letter
%导言区主要用于全局设置,比如利用title输入文章的标题
\title{my first}
\author{YQ}
\date{\today}

%正文区(文稿区)
\begin{document}
	\maketitle%对文章输入标题
hello

\end{document}

在这里插入图片描述

4、对于 符 号 里 面 的 是 数 学 内 容 , 符号里面的是数学内容, 符号外面的是文本内容,如果是双$$符号表示数学公式另起一行
5、对于不同内容换行操作,通过在不同内容之间增加一行空行来实现
在这里插入图片描述
二、中文的设置
在这里插入图片描述
2、
在这里插入图片描述
3、
在这里插入图片描述
代码如下:

%导言区
\documentclass{article}%book,report,letter
\title{Study latex}
\author{YQ}
\usepackage{ctex}
\date{\today}
%正文区(文稿区)
\begin{document}
	\maketitle
	Hello world	
	
	你好呀
	
	study latex,and day day up
\end{document}

在这里插入图片描述
4、产生带编号的公式

%正文区(文稿区)
\begin{document}
	\maketitle
	Hello world	
	
	你好呀
	
	study latex,and day day up
	\begin{equation}
		a + b = c
	\end{equation}

\end{document}

在这里插入图片描述
三、字体设置
在latex中,一个字体有五种属性
字体编码:
正文字体编码:OT1、T1、EU1等
数学字体编码: OML、OMS、OMX等
字体族:罗马字体 打字机字体,无衬线字体
字体系列;粗细,宽度
字体形状:直立斜体,伪斜体,小型大写
字体大小

%字体设置
	\textrm{Roman Family} \textsf{Sans Serif Family}
	\texttt{Typewriter Family}
	
	\rmfamily Roman Family {\sffamily Sans Serif Family } {\ttfamily Typewriter Family}

在这里插入图片描述
其中大括号表示这个字体的声明范围

%字体系列设置(粗细,宽度)
	\textmd{Medium Series}  \textbf{Boldface Series}
	
	{\mdseries Medium Series} {\bfseries Boldface Series }
	
```![在这里插入图片描述](https://img-blog.csdnimg.cn/74a25ff3a0324b8fa5f33675c6e969a2.png)

```python
%字体形状(直立、斜体、伪斜体、小型大写)
	\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}
    

在这里插入图片描述

%导言区
\documentclass[12pt]{article}%book,report,letter
\title{Study latex}
\author{YQ}
\usepackage{ctex}
\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}
	
	%字体系列设置(粗细,宽度)
	\textmd{Medium Series}  \textbf{Boldface Series}
	
	{\mdseries Medium Series} {\bfseries Boldface Series }
	
	%字体形状(直立、斜体、伪斜体、小型大写)
	\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}
    
    %中文字体
    {\songti 宋体} \quad{\heiti 黑体}
    {\quad{\fangsong 仿宋}}
    {\quad{\kaishu 楷书}}
    
    中文字体的\textbf{粗体}与\textit{斜体}
 
    %字体大小
    {\tiny  hello}\\
    {\scriptsize   hello}\\
    {\footnotesize   hello}\\
    {\small   hello}\\
    {\normalsize   hello}\\
    {\large  hello}\\
    {\LARGE   hello}\\
    {\huge  hello}\\
    {\Huge  hello}\\
    
    %中文字号设置
    \zihao{5} 吃饭
    
    Hello world	
	
	你好呀
	
	study latex,and day day up
	\begin{equation}
		a + b = c
	\end{equation}

\end{document}

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值