LaTeX命令速查手册

合集下载

05LaTeX学习系列之---TeX的命令行操作

05LaTeX学习系列之---TeX的命令行操作

05LaTeX学习系列之---TeX的命令⾏操作⽬录⽬录本系列是有关LaTeX的学习系列,共计19篇,本章节是第5篇。

前⼀篇:后⼀篇:总⽬录:前⾔我们在学习LaTeX的时,有必要来了解⼀下,它的实现机制。

(⼀)查看版本号在命令⾏输⼊:tex -v在命令⾏输⼊:latex -v在命令⾏输⼊:xelatex -v(⼆)更⾏版本在命令⾏输⼊:tlmgr update --all⾃⼰测试,不可⽤,可能⾃⼰电脑的原因(三)⽤命令⾏来编译.tex⽂件若想编译text.tex⽂件,则可在命令⾏输⼊:latex test.tex此时会⽣成⼏个中间⽂件,其中.dvi就是TeX以前的标准输出⽂件。

现在已经发展为.pdf⽂件。

在⽣成.dvi的基础上,再使⽤如下命令,便可转化为.pdf⽂件dvipdfmx test.dvi再命令⾏输⼊如下命令:xelatex test.tex(四)⽤批处理⽂件编译.tex⽂件::使⽤latex编译.tex⽂件latex test.tex::使⽤dvipdfmx⽣成pdf⽂件dvipdfmx test.dvi::删除中间⽂件del *.aux *.dvi *.log::暂停⼀下pause在.tex同⽬录下,保存为build.bat⽂件,双击便可⾃动编译::使⽤latex编译.tex⽂件xelatex test.tex::删除中间⽂件del *.aux *.log::暂停⼀下pause在.tex同⽬录下,保存为buildx.bat⽂件,双击便可⾃动编译本系列是有关LaTeX的学习系列,共计19篇,本章节是第5篇。

前⼀篇:后⼀篇:总⽬录:。

LaTex辅谈:LaTeX命令速查手册5

LaTex辅谈:LaTeX命令速查手册5

LaT ex辅谈:LaT eX命令速查手册51。

怎样在多栏环境中使用单栏图表?答:如果你在多栏环境中使用\begin{figure} ... \end{figure},图形是不会出现的。

如果你用另外的命令\begin{figure*} ... \end{figure*},图形就会超出右边或有页的上边。

解决的方法是把下面命令放在\begin{document}前面\makeatletter\newenvironment{tablehere}{\def\@captype{table}}{}\newenvironment{figurehere}{\def\@captype{figure}}{}\makeatother然后用figurehere 和tablehere 在你平常用figure[h....] 和table[h...]的地方。

2。

怎样得到度(degree)的符号?答:在\begin{document} 前面用\newcommand{\grad}{\ensuremath{^{\circ}}} ,然后你在文中就可用45\grad等等了。

3。

怎样得到一个欧元符号?答:用\usepackage{textcomp} 和\texteuro 或\usepackage{marvosym} 和\EUR都可以。

4。

当我应用fancyhdr时,我得到了太多'Overfull \vbox' 的信息?答:这是因为缺省的标题空间太小的原因(文本的一行),不能包括fancy标题(1 line of text + 1 rule)。

在导言里面加\addtolength{\headheight}{2.5pt}即可。

5。

当我用fancyhdr时,左边和右边的题有交叉重合?答:这是因为\section 等命令中的文本太长的原因,可用类似"\section[short version]{very long version indeed}"来解决问题。

latex使用手册

latex使用手册

latex使用手册LaTeX 使用手册一、LaTeX 简介与安装LaTeX 是一款强大的排版系统,基于TeX 编程语言开发。

它广泛应用于学术论文、书籍、报告等文档的撰写与排版。

安装LaTeX 系统后,用户可以利用各种编辑器(如TeXstudio、TeXworks 等)编写文档,并通过命令行或图形界面进行编译。

二、LaTeX 基本语法与结构1.文档结构:LaTeX 文档由一系列章节组成,每个章节具有独立的标题和内容。

2.标题:使用section、subsection、subsubsection 等命令创建不同级别的标题。

3.段落与换行:使用par 和ewline 命令创建段落和换行。

4.文本格式:使用textbf、textit、textsf 等命令设置文本格式。

三、文本格式与排版1.字体:使用fontfamily 命令选择字体。

2.字号:使用fontsize 命令设置字号。

3.行距:使用linespacing 命令设置行距。

4.间距:使用marginpar 命令设置页面四周的空白。

四、数学公式与符号1.数学公式:使用equation、align 等命令编写数学公式。

2.符号:使用symbol 命令插入特殊符号。

五、表格与图表1.创建表格:使用begin{tabular}、end{tabular} 命令创建表格。

2.修改表格:使用hline、multicolumn 等命令修改表格样式。

3.创建图表:使用begin{figure}、end{figure} 命令创建图表。

4.修改图表:使用caption、label 等命令修改图表属性。

六、目录与参考文献1.目录:使用tableofcontents 命令生成目录。

2.参考文献:使用bibliography 命令管理参考文献。

七、跨章节引用与链接1.交叉引用:使用label 和ef 命令实现章节间的引用。

2.内部链接:使用hyperlink 命令创建内部链接。

Latex常用指令学习

Latex常用指令学习

1:\begin{}与\end{}的用法2:\textcolor{red}{\fangsong\zihao{2}汉字:}3:\newpage 新的一页4:\heiti\zihao{4}\bf{}5:\qquad 与 \hfill 加空白矩阵中数字空用 :$\公式用\,加空格6:\newline 与 \\ 断行7:\bigskip \medskip \smallskip 增加段落间距8:\noindent \indent 段落的缩进9:\small\normalsize \large \LARGE \huge \Huge 字体大小设置10:\begin{quote} 文本 \end{quote} 文本两边缩进一定长度11:空行表示分段12:格式列表设置:\begin{itemize} \item列表文本 \end{itemize} 默认黑点标签可利用\item【1.1】改变样式\begin{enumerate}\item列表文本 \end{enumerate} 数字标签13:参考文献设置\begin{thebibliography}{99} \item{关键词} 或\bibitem{关键词}\end{ thebibliography }引用:\cite{关键词}或\upcite{关键词}例\begin{thebibliography}{99}\bibitem{DF2005_Auto1}Ding F, Chen T. Hierarchical gradient-based identification ofmultivariable discrete-time systems [J]. Automatica, 2005, 41(2):315-325\cite{ DF2005_Auto1} 或\upsite{DF2005_Auto1}………………\end{thebibliography}14:列表设置:\newcounter{fig}\begin{list}\item 文本………\end{list}15:注释 %开头若有多行每行都需以%开头16:脚注和边注\footnote{{\songti\zihao{-5}{\heiti收搞日期}: 2007-10-19 \\ {\heiti基金项目}: 国家自然科学基金项目(No. 60973043).\\ {\heiti作者简介}: XXX(1984-), 女, XXX人, 控制理论与控制工程硕士研究生. xxx@xxxx.xxx. \\ 丁锋(1963-), 男, 湖北广水人, 博士生导师. 研究方向为系统建模、系统辨识、过程控制、多率系统等. fding@}}17:\iffalse18:\mu_k(t)\leqslant2\left(\sum^{t}_{i=1}[\|\hat{\bfpsi}_k(t)\|^2+\|\bfvarphi(t)\|^2]\right)^{-1}. 表示方程为:19:\[公式\] :单行公式20:矩阵公式\vect{y_1(t)}{y_2(t)}-0.85\vect{y_1(t-1)}{y_2(t-1)}=\left[\begin{array}{rr}2.00&\1.00\\1.00&\2.00\end{array}\r ight]\vect{u_1(t-1)}{u_2(t-1)}\bftheta^{\T}=\bfQ_1=\mtwor{2.00}{1.00}{1.00}{2.00}表示:21:表的设置:\begin{table}[!hbt]\centering %\tabcolsep 3mm表\ref{hhq1_tab1}: \ 参数估计及其误差($L=1000$, $\sigma_1^2=\sigma_2^2=1.00^2$)\vspace{-3mm}\caption{The parameter estimates and errors ($L=1000$, $\sigma_1^2=\sigma_2^2=1.00^2$)}\label{hhq1_tab1}\vspace{-3mm}\tabcolsep 3mm\begin{tabular}{cccccccc}\\\hline:加横线c表示列的数目表的内容(可利用$ $对其表中内容)\end{tabular}\end{table}表示:22:图的设置:\begin{figure}[!hbt]\includegraphics[width=0.8\hsize]{CARMA-like-HG1_sigma100_L1000.eps}\\ 打开图标 %The original size: width=15cm, height=8cm\vspace{-2mm}\centering图\ref{hhq1_fig1} \ 估计误差$\delta$随$k$变化曲线($L=1000$, $\sigma_1^2=\sigma_2^2=1.00^2$)\vspace{-1mm}\caption{The parameter estimation errors $\delta$ versus $k$ ($L=1000$, $\sigma_1^2=\sigma_2^2=1.00^2$)}\label{hhq1_fig1}\end{figure}表的下标注表示:23:整体框架\begin{document}文本\end{document}24方框图表示:25:公式编辑1.\begin{equation} $单个公式 $ \end{equation} 或\begin{eqnarray} $多行公式 $ \end{eqnarray}2.\{ \} 表示大括号{ }3.\left{ \right } { }会根据公式大小调整尺寸4.$ $ 公式对齐符号5.公式不显示用 \non 或 \nonumber 标签公式式用 \label{关键词} 引用 \ref{关键词}6.数学公式黑体设置 $ \mathbf{ }$1.tex提供300多条基本排版命令2.由D.E.Knuth1978年开发3.plain tex:在tex基础上新定义600多条复合命令4.AMS-TEX:美国数学会开发(amsmath宏包)排版的数学公式TEX:mport(1985)编写,适合排版普通文章和书籍TEX2e:可加载amsmath宏包,目前最流行的TEX宏包7.版本:LATEX2.09-->LATEX2e-->LATEX3(开发中)8.中文排版:T:科学院张林波10.TY(天元):华师大肖刚、陈志杰教授开发11.CJK:德国W.Lemberg开发,处理中日韩三国文字。

latex_手册

latex_手册

The relsize package∗by Donald Arseneau†originally based on smaller.sty by Bernie Coselland combined with code by Matt SwiftSept21,2011It is frequently the case that something should be typeset somewhat larger or smaller than the surrounding text,whatever that size happens to be.Specifying such sizing commands explicitly makes it difficult to modify the font sizes of a document at a later time,and makes it hard to write macros that work at arbitrary sizes.Tofill this need, relsize.sty defines several commands for L A T E X to set font sizes relative to the current size. Command Function\relsize{i}Change font size by i steps.\larger[i]Increase size by(optional)i steps(default1).\smaller[i]Reduce font size by i steps(default1).\relscale{f}Change font size by scale factor f.\textlarger[i]{〈text〉}Text size enlarged by(optional)i steps.\textsmaller[i]{〈text〉}Text size reduced by(optional)i steps.\textscale{f}{〈text〉}Text size scaled by factor f.To refresh your memory,the font sizing commands in L A T E X are,in order:\tiny, \scriptsize,\footnotesize,\small,\normalsize,\large,\Large,\LARGE,\huge, \Huge(package moresize adds\ssmall and\HUGE).The main new command provided by relsize.sty is\relsize,which takes one(positive or negative)number as its argument; the number specifies how many“steps”by which to change the font size,where each step is a scaling factor of1.2,corresponding to the usual difference between the size commands.For example,if{\relsize{-2}smaller}appears in normal sized text,the word“smaller”is printed in script size type.If the same command appears in a\Large section title,then“smaller”is printed in normal size.∗This manual corresponds to relsize.sty v4.0,dated Sept21,2011.†asnd@triumf.ca,Vancouver,Canada1There are also the commands\larger and\smaller,which normally changethe font size by one step in the obvious direction;\larger is an abbreviation for\relsize{+1},and\smaller is an abbreviation for\relsize{-1}.For example, {\large...\larger{WOW!}}prints“WOW!”in\Large type.You can also specify bigger steps as an optional argument for\larger and\smaller:\larger[3]isequivalent to\relsize{3}and\smaller[2]is\relsize{-2}.(Both\larger and\smaller accept negative arguments,but please don’t make things so obscure!)If you want to change size by several steps it is much better to give an increment than to string several\larger commands together;i.e.,\relsize{3}or\larger[3],but not\larger\larger\larger.Half-steps are possible,as in\relsize{-0.5}to change from10pt\normalsize to9pt\small,but other numbers are rounded to the nearest half-integer.All of the\relsize,\larger,and\smaller commands are“switches”just like theregular sizing commands.That is,they change the size for all following text until thescope is ended by a closing brace(or tabular cell,or environment...).There are alternateversions called\textlarger and\textsmaller that take some text as an argument andapply the size change to only that text:\textlarger{big}.Using the number of“magnification steps”to indicate font size can be confusing tosome people,and limiting in certain uses.There are commands with syntax\text-scale{〈factor〉}{〈text〉}and\relscale{〈factor〉}to select the size based on a scale factor,like\relscale{0.75}.If the size requested is too small or too large,a warning is given,and the sizewill only change as far as appropriate,typically\tiny or\Huge.These limits arecontrolled by the commands\RSsmallest and\RSlargest,which get set automat-ically when relsize.sty is loaded,but you can redefine them to other length values:\renewcommand\RSlargest{50pt}(do not use\setlength).Fine point:The combination\relsize{n}\relsize{−n}is not guaranteed to restore the current font size!That is because the increment n may be enough to overflow the range of sizes, depending on\RSsmallest,\RSlargest,and\RSpercentTolerance(below).You should use grouping to undo relative size changes because it is unsafe to counteract one change with an “equal”change in the opposite direction.Or just use the commands that take the text as arguments,like\textsmaller{this}.Typically,the font-size commands do not select fonts at precise regular size ratios(andsome commands give half-intervals).\relsize and the others will select,and execute,the command for the size closest to the desired size.Then,if the relative differencefrom the target size is more than\RSpercentTolerance a further font-size selection ismade.By default,\RSpercentTolerance is an empty macro,which causes automaticselection:“30”(30%)when the current“fontshape”definition is composed of onlydiscrete sizes,and“5”when the fontshape definition covers ranges of sizes.The highersetting for discrete fonts ensures only the pre-defined sizes get used.(By default L A T E Xuses Computer Modern fonts at discrete sizes;you get full coverage of sizes by using2\usepackage{type1cm}or various other font package.)For special uses,or when the font shape definitions are not parsed properly,you can redefine the percent tolerance: \renewcommand\RSpercentTolerance{10}.Define it as“0”(zero)to ensure the scaling is exactly as specified,regardless of the document’s standard font sizes.−×××−All of the commands described above are text commands;they cannot be used in math mode.There are special\mathsmaller and\mathlarger commands provided,but these do not use the same sizes that the text versions use.Instead,they step between the usual math“styles”which you can explicitly set using the commands\displaystyle, \textstyle,\scriptstyle,and\scriptscriptstyle.However,the\mathlarger command will also increase the size beyond regular\displaystyle by selecting a larger regular font size(using\larger).(Yes,this is a kludge,and doesn’t work very well,but it can still be useful.)If you want to use this to create big integral signs,then you must also load the package exscale so that math symbols can change size.The sizes selected are:Current style\mathsmaller gives\mathlarger gives\displaystyle\textstyle(similar)\displaystyle in\larger font \textstyle\scriptstyle\displaystyle(similar)\scriptstyle\scriptscriptstyle\textstyle\scriptscriptstyle\scriptscriptstyle\scriptstyleFor example,try$\frac{\mathlarger{E}}{E}$=EE .Note that,for most symbols,\displaystyle and\textstyle give the same size,so$N,\mathlarger{N}$=NN, showing two identical N’s,but\sum and\int do get bigger in display style,and fractionsare treated differently too:$\int\frac{1}{2}dN-\mathlarger{\int\frac{1}{2}dN}$= 12dN−12dN.As you might have guessed,\mathlarger and\mathsmaller should only be used in math mode.These commands will attempt to attach any superscripts and subscripts directly to the symbol within the braces,rather than how they would attach to a math sub-formula. On the other hand,math accents and the math spacing do behave as if the symbol is enclosed in braces(which it is).Operators should be explicitly declared to use the right operator type(\mathrel,\mathbin,\mathop)to get the correct spacing,e.g., \mathrel{\mathsmaller{=}}.Due to their oddities,the math larger/smaller commands should not be trusted very far,and they will not be useful in every instance.3。

latex查询大全

latex查询大全

latex查询⼤全⽬录说明1、数学公式及符号:介绍数学公式的排版;附各类数学符号的指令表。

2、宏包⼤全详细介绍⽬前常⽤的各类宏包3、⾃定义字体及字号对字体和字号的设置举例说明4、绘图/表格/算法流程通过举例介绍图形、表格和算法流程的控制指令。

5、参考⽂献设置(两种⽅法)讲解两种添加参考⽂献的⽅法。

⼀是直接在TEX⽂件中添加。

⼆是通过.bib⽂件添加。

6、常见命令速查列出⼀些有⽤的细节处理⽅法。

它们可能经常使⽤,却⼜不易查询。

由于内容较多,可以通过关键词搜索。

1、数学公式及符号⾏中数学公式状态命令\begin{math}〈数学公式〉\end{math}\( 〈数学公式〉\)$ 〈数学公式〉$独⽴数学公式状态命令\begin{displaymath}〈数学公式〉\end{displaymath}\[〈数学公式〉\]$$〈数学公式〉$$独⽴编号的数学⽅程控制命令\begin{equation}〈数学公式〉\end{equation}注⽅程的排版⽅式(向左、向右对齐,编号排在⽅程左侧等)可在⽂件格式命令中选择如下版式注解参量:leqno 将⽅程编号置于⽅程左侧fleqn 所有⽅程式靠左侧拉齐排版,⽅程左边距可通过\mathindent = 〈左边距〉来控制。

数学公式状态字距命令表控制命令意义字距(em)\ ⾏⽂标准词间距0.33\; 数学式宽字距0.30\: 中等字距0.23\, 窄字距0.17\! 负窄字距-0.17注表中字距单位“em”是以字母“M”的宽度为基本单位。

对于标准的10点(pt)正⽂字体,宽度⼤约为3.5mm。

希腊字母控制命令表⼩写希腊字母字母控制命令字母控制命令字母控制命令α\alpha ι\iota \varrhoβ\beta κ\kappa σ\sigmaγ\gamma λ\lambda ?\varsigma δ\delta µ\mu τ\tauε\epsilon ν\nu υ\upsilonε\varepsilon ξ\xi φ\phiζ\zeta οo ?\varphiη\eta π\pi χ\chiθ\theta ?\varpi ψ\psi\vatheta ρ\rho ω\omega⼤写希腊字母字母控制命令字母控制命令字母控制命令Γ\Gamma Λ\Lambta Σ\Sigma\Delta Ξ\Xi Υ\UpsilonΘ\Theta Π\Pi Φ\PhiΨ\Psi ?\Omega动态配置界标动态开界标命令 \left 〈界标排版命令〉〈数学公式〉动态闭界标命令〈数学公式〉\right 〈界标排版命令〉多⾏数学⽅程式排版命令多⾏编号⽅程式排版命令\begin{eqnarray}〈⽅程式1左式〉& = &〈⽅程式1右式〉\\〈⽅程式2左式〉& = &〈⽅程式2右式〉\\…………〈⽅程式n左式〉& = &〈⽅程式n右式〉\end{eqnarray}注:如果某⾏不要编号,就在该⾏换⾏号“\\”之前插⼊⼀个⽆⽅程编号命令“\nonumber”。

Latex常用命令

Latex常用命令

1. 段首缩进中文习惯在段首缩进两格,在LaTeX中,\parindent表示段首缩进的长度,我们将它设置为当前字号的两个大写字母M的宽度,大约正好是两个汉字的宽度:\setlength{\parindent}{2em}LaTeX 默认每节的第一段的段首不缩进,这不符合中文排版习惯。

我们希望正文的每一段都要缩进,使用indentfirst宏包就可办到:\usepackage{indentfirst}2. 段距行距LaTeX 用\baselineskip表示当前的行距,其默认值大约是当前字号的1.2倍,如果当前字号是10pt,那么\baselineskip是12pt。

这对英文排版是合适的,对中文就显得太拥挤了,因为英文正文多为小写字母,字高与小写的x差不多(即1ex)。

如果字号为10pt,那么1ex =4.3pt。

我通常把行距设为字号的1.8倍:\setlength{\baselineskip}{1.8em}这个值随时可以改,对更改点以后的文字有效。

LaTeX 用\parskip表示段距,我一般把它设为1ex:\setlength{\parskip}{1ex}注意这些修改长度的命令最好都放在正文区(即\begin{document}之后)。

3. 页眉页脚我通常用fancyhdr宏包来设置页眉和页脚。

\documentclass[10pt, a4paper]{book}\usepackage{fancyhdr}我们在LaTeX中先把page style 设为fancy,再设置这个style 中的页眉和页脚。

但是它默认每章的第一页的page style是plain,需要单独处理。

% 设置plain style 的属性\fancypagestyle{plain}{%\fancyhf{} % 清空当前设置% 设置页眉(head)\fancyhead[RE]{\leftmark} % 在偶数页的右侧显示章名\fancyhead[LO]{\rightmark} % 在奇数页的左侧显示小节名\fancyhead[LE,RO]{~\thepage~} % 在偶数页的左侧,奇数页的右侧显示页码% 设置页脚:在每页的右下脚以斜体显示书名\fancyfoot[RO,RE]{\it Typesetting with \LaTeX}\renewcommand{\headrulewidth}{0.7pt} % 页眉与正文之间的水平线粗细\renewcommand{\footrulewidth}{0pt}}\pagestyle{fancy} % 选用fancy style% 其余同plain style\fancyhf{}\fancyhead[RE]{\leftmark}\fancyhead[LO]{\rightmark}\fancyhead[LE,RO]{~\thepage~}\fancyfoot[RO,RE]{\it Typesetting with \LaTeX}\renewcommand{\headrulewidth}{0.7pt}\renewcommand{\footrulewidth}{0pt}% 设置章名和节名的显示方式\renewcommand{\chaptermark}[1]{\markboth{~第~\thechapter~章~~~#1~}{}}\renewcommand{\sectionmark}[1]{\markright{~\these ction~~#1~}{}}4. 章节标题我通常用titlesec宏包来设置正文中出现的章节标题的格式:\usepackage{titlesec}设置章名为右对齐,字号为\Huge,字型为黑体,章号用粗体,并设置间距:\titleformat{\chapter}{\flushright\Huge\hei}{{\bf \thechapter}}{0pt}{}\titlespacing{\chapter}{0pt}{-20pt}{25pt}设置节名的字号为\Large,字型为黑体,节号用粗体,并设置间距:\titleformat{\section}{\Large \hei }{{\bf \thesection\space}}{0pt}{}\titlespacing*{\section}{0pt}{1ex plus .3ex minus .2ex}{-.2ex plus .2ex}其中\hei的定义为:\newcommand{\hei}{\CJKfamily{hei}}5. 纸张大小毕业论文要求用b5纸,单面打印,我用geometry宏包来设置纸张和版心大小:\documentclass[10pt, b5paper]{report}\usepackage[body={12.6cm, 20cm}, centering, dvipdfm]{geometry}% 以上将版心宽度设为12.6cm,高度20cm,版心居中,且自动设置PDF文件的纸张大小。

LaTex辅谈:LaTeX命令速查手册5

LaTex辅谈:LaTeX命令速查手册5

LaT ex辅谈:LaT eX命令速查手册51。

怎样在多栏环境中使用单栏图表?答:如果你在多栏环境中使用\begin{figure} ... \end{figure},图形是不会出现的。

如果你用另外的命令\begin{figure*} ... \end{figure*},图形就会超出右边或有页的上边。

解决的方法是把下面命令放在\begin{document}前面\makeatletter\newenvironment{tablehere}{\def\@captype{table}}{}\newenvironment{figurehere}{\def\@captype{figure}}{}\makeatother然后用figurehere 和tablehere 在你平常用figure[h....] 和table[h...]的地方。

2。

怎样得到度(degree)的符号?答:在\begin{document} 前面用\newcommand{\grad}{\ensuremath{^{\circ}}} ,然后你在文中就可用45\grad等等了。

3。

怎样得到一个欧元符号?答:用\usepackage{textcomp} 和\texteuro 或\usepackage{marvosym} 和\EUR都可以。

4。

当我应用fancyhdr时,我得到了太多'Overfull \vbox' 的信息?答:这是因为缺省的标题空间太小的原因(文本的一行),不能包括fancy标题(1 line of text + 1 rule)。

在导言里面加\addtolength{\headheight}{2.5pt}即可。

5。

当我用fancyhdr时,左边和右边的题有交叉重合?答:这是因为\section 等命令中的文本太长的原因,可用类似"\section[short version]{very long version indeed}"来解决问题。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

LaTeX命令速查手册来源:/atomic.php?act=article&board=Linux&id=9524发表回复上篇下篇主题上篇主题下篇楼主溯源回版面原文发信人: yyz (騎馬倚斜橋/滿樓紅袖招), 信区: Linux标题: LaTeX命令速查手册1发信站: 同舟共济站 (Thu Dec 24 14:14:35 2009), 转信+---------------------------------+|TeX各版本概述及基本约定,特殊字符|+---------------------------------+tex提供300多条基本排版命令由D.E.Knuth1978年开发plain tex:在tex基础上新定义600多条复合命令AMS-TEX:美国数学会开发(amsmath宏包)排版的数学公式LATEX:mport(1985)编写,适合排版普通文章和书籍LATEX2e:可加载amsmath宏包,目前最流行的TEX宏包版本:LATEX2.09-->LATEX2e-->LATEX3(开发中)中文排版:CCT:科学院张林波TY(天元):华师大肖刚、陈志杰教授开发CJK:德国W.Lemberg开发,处理中日韩三国文字。

发行版CTEX:集成了CCT,TY,CJK的MikTEX系统。

ChinaTEX:内容涵盖MiKTeX系统及中文支持、常用外围软件、TeX\LaTeX文档和模板选萃等TeX中的长度mm毫米cm厘米in英寸=2.54cm=72.27ptpt点em大写字母M的宽度ex小写字母x的高度弹性长度:根据需要自动伸缩正常值plus伸展值minus收缩值实际长度可超过正常值和伸展值之和,但不能小于正常值和收缩值之差\documentclass[11pt]{article}%11pt字体,普通文章%导言区,全局命令\usepackage{CJK}%使用CJK宏包\begin{document}%主环境\begin{CJK}{GBK}{song}%汉字必须放入CJK环境%其它字体:song,kai,fs,hei,li,you%CJK的两种环境CJK和CJK*%GBK是采用的字符集:GB,GBK,Bg5,GbtHi,This is my first \LaTeX file祝贺你,MikTex和CJK安装成功了\end{CJK}\ent{document}CJK和CJK*环境之间的切换\CJKspace和\CJKnospace\CJKtilde 重新定义~的长度基本约定分组{......}注释符:%西文标点后要加空格各种环境的开始和结束命令最好独占一行换行:连续两个回车,一个仅为空格输入特殊字符前加\的有:#$%{}~_^&\=\textbackslash|,<,>=$|$,$<$,$>$,$*$(中间星)*=*上面星特殊符号\s \p \dag \ddag \copyrigh版权号,\pounds 磅\TeX \LaTeX \LaTeXe \AmS-\LaTeX(最后这个要amsmath宏包)单引号:`'(1键前面的)双引号:``"+------------------------------+|段落、行距、水平间距、缩进命令|+------------------------------+强制分行:\\或\\*[和下行间距离]、\newline建议分行:\linebreak[0-4,数越大建议力度越大]\linebreak增加字间距,强制换行\nolinebreak[n]建议不分行\mbox{内容}内容保持在同一行分段:\par,或两个回车分页:自动分页强制分页:\newpage建议分页:\pagebreak[n],\nopagebreak[n]增加当前页高度有时可以避免难看的分页\enlargethispage{尺寸}可增加的最大高度\enlargethispage*{尺寸}指定增加高度水平间距:\quad 插入空白相当于当前字体大小\qquad=\quad×2\ ,=\quad×3/18~=好象比\ 小\hspace{宽度大小},\hspace*{宽度大小}\hfill弹性长度:hspace{\hfill}插入空白,撑满整行\hphantom{文本内容},占据文本内容的宽度\vphantom[文本内容},\phantom{文本内容}导引线:\dotfill,\hrulefill垂直间距:\vspace{高度}和\vspace*{高度}\vfill:相当于\vspace{\fill}\smallskip:-->\vspace{\smallskipamount}\medskip:-->\vspace{\medskipamount}\bigskip:-->\vspace{\bigskipamount}段落首行缩进:\setlength{\parindent}{2em},2个M\setlength{\parindent}{0pt},首行不缩进\CJKindent:两个汉字\indent与\noindent每节的第一段首行不会自动缩进\hspane{\parindent}在导言区加入:\usepackage{indentfirst}段落间距:\lineskip+\parskip可用\setlength修改以上值行距:\baselineskip:相邻两行基线间距离\baselinestretch:伸展因子修改改变行距:\renewcommand{\baselinestretch}[1.2] 放在\begin{document}之后,字体尺寸改变时才生效+----------------------------------+|西文字体属性、及中文字体属性、命令|+----------------------------------+字体有5种属性族:\rmfamily:罗马字体\sffamily:无衬线字体\ttfamily:打字机字体形状:(shape)直立斜\upshape:直立\itshape:意大利斜体\slshape:斜体\scshape:小体大写系列:(series)宽度黑度\mdseries:中等权重(黑)\bfseries:粗体\normalfont:默认字体,中等权重直立罗马字体西文尺寸:10pt,11pt,12pt\em强调,一般为斜体以上命令称为声明(无参数)每一声明对应字体命令命令只对其参数中的文本起作用族:\testrm{},\testsf{},\testtt{}形状\textup{},\textit{},\textsl{},\textsc{}系列\textmd{},\textbf{}默认值:\textnormal{}强调:\emph{}定义了基本尺寸后,可使用下面的声明来改变字体\tiny 5pt\scriptsize 7pt\footnotesize 8pt\small 9pt\normalsize 10pt\large 12pt\Large 14.4pt\LARGE 17.28pt\huge 20.74pt\Huge 24.88pt以上尺寸是基本尺寸为10pt时的大小所有西文字体命令对中文同样起作用italic和slanted斜体对中文一样中文书籍基本字号为5号约等于11pt使用GBK编码时,可同时输入简繁体。

自定义字体大小\fontsize{字体尺寸}{行距}后面须加上\selectfont才生效可得到任意大小汉字,西文最大不能超\Huge行距通常为字体大小的1.2-1.5倍例:\fontsize{12pt}{\baselineskip}\selectfont\usepackage{type1cm}任意大小西文行距:\linespread{1.3}产生1.5倍行距,1.6产生双倍行距,效果夸张,不适合出版用下面方法:\setlength{\baselineskip}{1.5\baselineskip}{......}正文中更换字体:\CJKfamily{字体族}为方便,作以下自定义\newcommand*{\SONG}{\CJKfamily{song}}\newcommand*{\HEI}{\CJKfamily{hei}}\newcommand*{\KAI}{\CJKfamily{kai}}\newcommand*{\FS}{\CJKfamily{fs}}\newcommand*{\LI}{\CJKfamily{li}}\newcommand*{\YOU}{\CJKfamily{YOU}}引用更改为宋体:\SONG 正文文本居中文本默认为左对齐单行文本居中命令\centerline{....}多行使用\begin{center}环境居中声明:\centering(不建议使用)+------------+|参考文献环境|+------------+\begin{thebibliography}{编号样本}\bibitem[记号]{引用标志} 文献条目...\bibitem[记号]{引用标志} 文献条目\end{thebibliography}\bibitem[省略为方括号数字]{不可省由字母,数字和,号外符号组成,各个文献互不相同} 文献条目编号样本,指定记号的宽度,一般为数字引用文献时用\cite{引用标志1,引用标志2}调节各文献间距离\setlength{\itemsep}{高度}标题缺省为左对齐Reference(\Large\bfseries)由\refname值确定书籍参考文献标题由\bibname值确定文献条目包含:作者,标题,出版社,年代,版本,页码一行放不下,后面自动缩进,距离为“编号样本”宽度+----------+| 脚注 |+----------+\footnote{脚注内容}article文档,整篇同一编号book和report文档,每章统一编号+----------------+| 文档类别、章节 |+----------------+\documentclass[可选项]{article,book,report,letter,只能选一种}article 短篇文章report 长篇报告,可分章book (书)可含chapter,奇偶页采用不同处理可选项对整篇文档起作用,使用多个选项互不排斥,用逗号分隔基本字体:10pt,11pt,12pt纸张大小:letterpaper,a4paper,a5paper...排版方向:portrait(竖向),landscape(横向)标题页:titlepage,notitlepagefinal和draft指定纸张大小(只有latex2e中使用)letterpaper(11*8.5in)legalpaper(14*8.5in)executivepaper(10.5*7.25in)a4paper(29.7*21cm)a5paper(21*14.8cm)b5paper(25*17.6cm)默认值是letterpaper,美国信纸尺寸,纵向landscape 横向章节命令:\part,\chapter,\section,\subsection,\subsubsection,\paragraph,\subpar agraph\命令[短标题]{标题},用于显示在目录和页眉\命令*{标题}层次号:book中\part为-1(article中为0),\chapter为0,....book类\part,\chapter独立编号,只出现在奇数页,\part独占一页\section,\subsection 关联编号article类\part,\section独立编号\subsection,\subsubsection 关联编号星号章节不参加自动编号\part和\chapter标题占两行标题中文化\renewcommand{\partname}{}\renewcommand{\thepart}{第\,\Roman{part}}\,篇}修改编号最深层次\setcounter{secnumberdepth}{数}secnumberdepth,book类-2~5,缺省为2,-2时取消编号article类-1~5,缺省为3自动编号章节对应计数器part,chapter,section,bsection,subsubsection,paragraph,subparagraph 修改计数器值:\setcounter{计数器名}{数}TeX的版式首先是文件版式, 也就是我们接触的第一个最最最简单的TeX文档中的第一句:\documentstyle[选项1,选项2,...]{格式}其中的[]及选项是可选的, 而{格式}是必需的. LaTeX有以下几种格式: article(文章), report(报告), book(书), letter(信件).CCT对前面三种进行了汉化, 分别是carticle, creport和cbook.常用的选项有10pt/11pt/12pt: 定义基准字号, 缺省10pt.twoside: 两面印刷格式, 因奇偶页装订位置不同而异, 缺省为单页.twocolumn: 双栏排版, 缺省为单栏.titlepage: 仅在article格式使用, 它是\maketile产生一个单独的文章题目页, 同时abstract也产生单独页leqno: 使公式标号出现在左边, 缺省在右fleqn: 公式左对齐, 缺省中间对齐thesis: 专用于毕业论文排版IEEE: 专向IEEE类杂志投稿的格式IFTHEN: 排版计算机程序\columnsep 指定两栏间距\columnseprule 两栏间竖线宽度,默认为0。

相关文档
最新文档