700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > latex使用过程中的一些技巧总结与问题【有缘更新】

latex使用过程中的一些技巧总结与问题【有缘更新】

时间:2020-09-16 18:25:19

相关推荐

latex使用过程中的一些技巧总结与问题【有缘更新】

零、中文输入参考模板

以下为CTeX_2.9.2.164_Full.exe完整稳定版的中文输入参考代码,为使用者提供一个舒适自由的中文输入环境,使用者只需要在document正文环境中自由编写即可。

\documentclass[hyperref]{article}\usepackage{ctex}\usepackage{times} % 使用 Times New Roman 字体\usepackage{CJK,CJKnumb,CJKulem} % 中文支持宏包\usepackage{color} % 支持彩色%超链接\usepackage[colorlinks,linkcolor=red,anchorcolor=blue,citecolor=green]{hyperref}%——————————–其他宏包——————————–\usepackage{amsmath,amsthm,amsfonts,amssymb,bm} % 数学宏包\usepackage{graphicx,psfrag}\usepackage{float} % 图形宏包\usepackage{caption}\usepackage{makeidx} % 建立索引宏包\usepackage{listings}% 源代码宏包%\usepackage{hyperref}%———————————正文———————————–\begin{document} % 开始正文\begin{CJK}{GBK}{kai}% 开始中文环境\title{标题}\date{}\author{作者}\maketitle%%%%%%%%%%%%%%%%%%%开始你% %的正文%%%%%%%%%%%%%%%%%%%\end{CJK} % 结束中文环境\end{document} % 结束正文

一、公式问题

1.公式自动编号(equation

自动编号的公式使用环境equation

\begin{equation}a^2+b^2=c^2\end{equation}

2.公式手动编号(\tag

\begin{equation}a^2+b^2=c^2\tag{6666}\end{equation}

3.公式取消自动编号(\nonumber

\begin{equation}a^2+b^2=c^2\nonumeber\end{equation}

4.公式对齐(aligned&

为(不)等号对齐,用到环境aligned

\begin{equation}\begin{aligned}a^2+b^2=c^2\\&=c*c\end{aligned}\end{equation}

5.公式超链接(label

若公式被手动标号了,那么label里面应填手动编号,否则ref将会显示1

\begin{equation}\label{eq1}\begin{aligned}a^2+b^2=c^2\end{aligned}\end{equation}\ref{eq1}

二、希腊字母

三、常见数学符号形式

四、表格问题

1.在线生成。

将excel表格内容复制到该网站中然后根据相应提示点击生成即可。

2.手动编写。

五、插入代码

①直接插入文本块。这种没有样式,就是单独的文本块。

\begin{verbatim}#此处为你的代码。\end{verbatim}

②应用listings宏包

\usepackage{listings}

六、标题问题(section)

1.全局标题居中,在导言区加上如下代码

\usepackage[center]{titlesec}\titleformat*{\section}{\centering}

2.单行标题居中

\centering{\section{标题内容}}

3.标题取消标号

在section后面加一个“*”即可。

\section*{标题内容}

4.标题自动编号偏移

如下:

\setcounter{section}{3}\setcounter{subsection}{6}

七、自定义编号问题

1.计数器

\setcounter{容器名}{偏移量}

容器可以有sectionfigure等,

偏移量为当前文章编号的位置,可以理解为这个编号已经用过了。

几个例子:

\setcounter{section}{3}\setcounter{subsection}{6}\counterwithin{figure}{section}//表示图片与按章节编号,若要取消,则counterwithin,其余容器类似。\setcounter{figure}{3}\counterwithin{equation}{section}\setcounter{equation}{55}

八、纸张大小设置

此为默认的office word 纸张大小设置。

%\documentclass[hyperref]{article}\usepackage[margin=1in]{geometry}

九.字体大小设置

加入以下标识符

\tiny\scriptsize\footnotesize\small\normalsize\large\Large\LARGE\huge\Huge

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。