当前位置:网站首页>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
边栏推荐
- Enctype attribute in form
- Use of Arthas in JVM tools
- 分组背包呀
- QFileDialog select multiple files or folders
- Notes on English class (4)
- Description of the abnormity that the key frame is getting closer and closer in the operation of orb slam
- idea配置连接远程数据库MySQL,或者是Navicat连接远程数据库失败问题(已解决)
- Misunderstanding of flush () method of OutputStream class
- 四张图弄懂matplotlib的一些基本用法
- 洋桃电子STM32物联网入门30步笔记三、CubeMX图形化编程、设置开发板上的IO口
猜你喜欢
【路科V0】验证环境2——验证环境组件
Redis Desktop Manager for Mac(Redis可视化工具)
Shell script advanced
洋桃电子STM32物联网入门30步笔记一、HAL库和标准库的区别
面了一圈,整理了这套面试题。。
QT compilation qtxlsx Library
cadence的工艺角仿真、蒙特卡洛仿真、PSRR
On time atom joins hands with oneos live broadcast, and the oneos system tutorial is fully launched
CGM optimizes blood glucose monitoring and management -- Yiyu technology appears in Sichuan International Medical Exchange Promotion Association
洋桃电子STM32物联网入门30步笔记二、CubeIDE下载、安装、汉化、设置
随机推荐
DOM 学习之—添加+-按钮
JSP page coding
QT reads all files under the path or files of the specified type (including recursion, judging whether it is empty and creating the path)
经典题目刷一刷
HAL库的RCC简介
Failed to convert a NumPy array to a Tensor(Unsupported Object type int)
ESP32程序下载失败,提示超时
让地球少些“碳”息 度能在路上
QT reading and writing XML files
LeetCode-199-二叉树的右视图
洋桃电子STM32物联网入门30步笔记三、新建CubeIDE工程和设置讲解
队列(c语言/链表)
洋桃电子STM32物联网入门30步笔记三、CubeMX图形化编程、设置开发板上的IO口
DOM learning notes - traverse all element nodes of the page
RPC过程
How to generate assembly file
Trust uses Tokio's notify and timeout to achieve the effect similar to the timeout condition variable
根据字节码获取类的绝对路径
LINQ Learning Series ----- 1.4 anonymous objects
洋桃电子STM32物联网入门30步笔记二、CubeIDE下载、安装、汉化、设置