当前位置:网站首页>LaTeX论文排版操作
LaTeX论文排版操作
2022-04-23 08:35:00 【門門要努力】
一、LaTeX环境安装与配置
latex文件的后缀名是.tex
- 1.可以在cmd窗口中输入命令行,在记事本中编辑.tex文件
- 2.使用
latex 文件名.tex命令编译生成.dvi文件
- 3.用
dvipdfmx 文件名.dvi命令生成pdf文件
xelatex 文件名.tex: 将②③步骤合一,直接用tex文件生成pdftexdoc ctex:查看LaTeX宏集手册texdoc lshort-zh: 查看操作说明
二、TeXstudio
TeXstudio : 编写tex的集成开发环境IDE
有命令提示功能,可提高文档编写效率
- 1.新建tex文件
- 2.命名保存:将tex放在文件夹下,因为会生成一些中间文件
-
三、源文件的基本结构
.tex源文件包括导言区(引入类),正文区(写文稿)
四、中文处理
- 1.确保编码形式为utf-8
- 2.使用
\usepackage{ctex}命令引入宏包
使用
\documentclass{ctexart}指定文档类型为中文文章,可以不用导入ctex包
五、文章的篇章结构
1. \section构建小节:
\chapter生成带章节的文章
\tableofcontents%生成目录2. 分段/换行
\par 或 一个空行 可以实现正文分段落 两个反斜杠:\\ 可以分行,但不分段 3. ctexset设置篇章样式
查阅CTeX宏集手册
样式与内容分离
六、字体属性设置
LaTeX中的字体有五种属性:编码、字体族、字体系列(粗细、宽度)、字体形状(直立斜体)、字体大小
1. 编码
- 1.正文字体编码:OT1 T1 EU1
- 2.数学字体编码:OML OMS OMX
2. 字体族设置
字体族类型 \字体命令{内容} {\字体声明 内容} 罗马字体命令 \textrm{罗马字体}{rmfamily 罗马字体}无衬线字体 \textsf{无衬线字体}{sffamily 无衬线字体}打字机字体 \texttt{打字机字体}{ttfamily 打字机字体}3. 字体系列
命令 声明 \textmd{正常}{\mdseries 正常}\textbf{加粗}{\bfseries 加粗}4. 字体形状
字体形状 命令 声明 直立 \textup{直立upright shape}{\upshape 直立zhili}斜体 \textit{斜体italic shape}{\itshape 斜体}伪斜体 \textsl{伪斜体slanted shape}{\slshape 伪斜体}小型大写 \textsc{小型大写small caps shape}{\scshape 小型大写}5. 字体大小
{\tiny 小}
{\scriptsize }
{\footnotesize }
{\small 小 }
{\normalsize 正常大小}
{\large 大}
{\Large }
{\LARGE}
{\huge }
{\Huge }normal size的大小由文档参数(可选)控制
\documentclass[10pt]{article}设置正常大小为10磅
中文字体样式设置
字体类型 字体粗细 字体大小 {\songti 宋体}{\heiti 黑体}{\fangsong 仿宋}{\kaishu 楷书}\textbf{粗体}\textit{斜体}\zihao{5} 5号- 命令行输入
texdoc ctex打开ctex文档查阅细节 - 内容与样式分离
定义 字体设置命令\newcommand{\myfont}{\textit{\textbf{\textsf{fanciy text}}}}
七、特殊字符
1. 空白符号
- 1.空行分段, 多个空行等同于一个
- 2.自动缩进,不能使用空格代替
- 3.英文中多个空格等同一个,中文空格被忽略
- 4.进制使用中文全角空格
使用命令显示出空格符 命令语法 间距 显示 $a \quad b$ 1 em(当前字体中M的宽度) a b a \quad b ab $a \qquad b$ 2 em a b a \qquad b ab $a \thinspace b$ 1/6个em a b a \thinspace b ab $a \enspace b$ 0.5个em a b a \enspace b ab $a\ b$ 一个空格 a b a\ b a b $a~b$ 硬空格(不能分割的空格) a b a~b a b $a \kern 1pc b$ 1pc=12pt=4.218mm a b a \kern 1pc b ab $a \kern -1em b$ 指定宽度可以是负数 a b a \kern -1em b ab $a \hskip 1em b$ 指定宽度 a b a \hskip 1em b ab $a \hspace{35pt}b$ 指定宽度 a b a \hspace{35pt}b ab $a \hphantom{xyz}b$ 根据参数占位宽度产生空白 a x y z b a \hphantom{xyz}b axyzb $a \hfill b$ 弹性长度空格(撑满整个空间) $a \hfill b$ 2. LaTeX 控制符
- LaTeX 中
# $ % {} ~ _ ^ \ &都有特殊意义,需要\转义输出 \\表示换行,用\textbackslash输出 \
3. 排版符号
一些特殊的排版符号
\S
\P
\dag
\ddag
\copyright
\pounds

4. TEX标志符号
TeX{}
\LaTeX{}
\LaTeXe{}5.其他符号
- 1.引号
命令语法 显示 `左单引号 ‘ '右单引号 ’ ``左双引号 “ ''右双引号 ” -
2.连字符
一个- 显示短连字符 -
两个个- 显示中连字符 –
三个- 显示长连字符 — -
3.非英文字符
\oe \OE \ae \AE \aa \AA \o \O \l \L \ss \SS !` ?` -
4.重音符号 (以o为例)
八、插入图片
latex使用graphicx实现插图,需要导入该宏包
\usepackage{graphicx} %插入图片的宏包
\graphicspath{ {figures/},{pics/}} %图片都放在当前目录的figures目录pics目录下插图语法命令 :
\includegraphics[ ]{photo.png}
修改图片尺寸实现缩放,可选参数
[scale=0.3,height=2cm,width=2cm]
九、表格 tabular
-
1.生成表格竖线
| -
2.生成表格横线
\hline -
3.指定列内容的左中右对齐
l c r -
4.由
p{1.5cm}指定的列宽度,若内容超出会自动换行%tabular环境 \begin{tabular}{|l| c |r|} % 指定列对齐方式 \hline %表格行分割线 学号 & 姓名 & 班级 \\ \hline\hline 0 & lgj & 9 \\ 1 & gorgeous & 10\\ 2 & a & 10\\ 4 & b & 10\\ \hline \end{tabular}
十、浮动体
需要使用浮动体环境管理图片和表格的排版
插图浮动 – figure环境
-
1.环境引入
\begin{figure} ... \end{figure} -
2.排版位置
[htbp]h此处,t页顶部,b页底部,p独立一页 -
3.居中显示
\centering -
4.设置标题
\caption{\TeX 插图标题} -
5.设置标签以便引用
\label{fig-photo} -
6.引用语法
\ref{fig-photo}……见图 \ref{fig-photo} %引用标签 \begin{figure}[htbp] %排版位置 \centering %居中显示 插入图片 \caption{\TeX 插图标题}\label{fig-photo} %添加插图标题 %设置标签以便引用 \end{figure}
表格浮动 – table环境
- 1.环境引入
\begin{table} ... \end{table} - 2.排版位置
[htbp]h此处,t页顶部,b页底部,p独立一页 - 3.居中显示
\centering - 4.设置标题
\caption{表格标题} - 5.设置标签以便引用
\label{tab} - 6.引用语法
\ref{tab}
十一、参考文献
LaTeX数学公式
版权声明
本文为[門門要努力]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_50670733/article/details/122903783
边栏推荐
- Word plus watermark
- IDEA导入commons-logging-1.2.jar包
- Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
- ESP32程序下载失败,提示超时
- On time atom joins hands with oneos live broadcast, and the oneos system tutorial is fully launched
- 数论求a^b(a,b为1e12级别)的因子之和
- ajax防止缓存方法
- JSP page coding
- STM32F103ZET6【标准库函数开发】----库函数介绍
- Flink SQL实现流批一体
猜你喜欢

Transformer XL: attention language modelsbbeyond a fixed length context paper summary

Qtablewidget header customization and beautification developed by pyqt5 (with source code download)

Goland 调试go使用-大白记录

K210学习笔记(二) K210与STM32进行串口通信

RCC introduction of Hal Library

idea打包 jar文件

Use of Arthas in JVM tools

正点原子携手OneOS直播 OneOS系统教程全面上线

引用传递1

On time atom joins hands with oneos live broadcast, and the oneos system tutorial is fully launched
随机推荐
Goland 调试go使用-大白记录
IDEA导入commons-logging-1.2.jar包
bashdb下载安装
Detailed description of self feeling of auricular point weight loss 0422
mycat配置
第一性原理 思维导图
匿名類型(C# 指南 基礎知識)
【路科V0】验证环境2——验证环境组件
Copy array in JS
Navicat远程连接mysql
耳穴减肥自身感受细节描述0422
[explanation] get ora-12838: cannot read / modify an object after modifying it in parallel
什么是RPC
测试你的机器学习流水线
【精品】利用动态代理实现事务统一管理 二
How to encrypt devices under the interconnection of all things
Go语言自学系列 | golang嵌套结构体
应纳税所得额
作文以记之 ~ 二叉树的前序遍历
On time atom joins hands with oneos live broadcast, and the oneos system tutorial is fully launched
