LearnLatex02
Table of Contents
- 1 ulem 宏包
- 2 color 宏包
- 3 geometry 宏包
- 4 vfill,hfill,vspace*{/fill},hspace*{/fill}
- 5 //,/,
- 6 /twocolumn与multicols环境的差别及twocolumn中pagebreak
- 7 /clearpage与/pagebreak的区别
- 8 fancyhdr
- 9 time时间
- 10 /left( /left[ /left{ /left./right) /right] /right} /right.
- 11 mathrsfs宏包
- 12 itemsize enumerate description
- 13 更改标签样式
- 14 thebibliography参考文献
- 15 verbatim环境
- 16 tabular环境
- 17 table环境
- 18 multirow
- 19 multicolumn
1 ulem 宏包
/uline{} %underline /uuline{} %double underline /uwave %under wave /sout %delete line /xout %斜delete line [[http://hi.csdn.net/attachment/201104/15/6263326_1302880556ARoZ.png]]
2 color 宏包
两种:
/color{colorname}{text} for exampel: /color{red}{redtext}
{/color{colorname}text} for example: {/color{red}redtext]
3 geometry 宏包
设置页边距
/geometry{left=len1,right=len2,top=len3,bottom=len4}
4 vfill,hfill,vspace*{/fill},hspace*{/fill}
/hfill=/hspace{/fill}撑满整行. /fill左边靠左,右边靠右,中间空白 left /hfill right// left /hfill medium /hfill right// /vfill=/space{/fill}上面的靠上,下面的靠下。 文本/vfill 文本 /par 上面/vfill 中间 /vfill 下面 /hspace*{/fill}:可以解决/hfill在行首无法使用的问题 /hfill leakage.// /hspace*{/fill} leakage. /vspace*{/fill}:可以解决/vfill在页首无法使用的问题。
5 //,/,
/noindent ``'Bejing' and 'End'''// ``/,'Bejing' and 'End'/,''// ffi// f//f//i
6 /twocolumn与multicols环境的差别及twocolumn中pagebreak
前者是整页都是两列,而后者是根据环境中的文本的内容自动调节高度。 前者中pagebreak将换列(等待所在行完完整后),即把列当成页看待。 而后者则只是换页。
7 /clearpage与/pagebreak的区别
两者都可以产生新的页,不同的是前者是强制分页,不管当前行是不是完整, 而后者则是先判断/pagebreak是不是在段与段的分界处,若是则分页,若不是则先把命令所在行 补充完整再分布。
8 fancyhdr
/usepackage{fancyhdr} /pagestyle{fancy} /lhead{} /chead{} /rhead{/textbf{The performance of new graduates}} /lfoot{From: K. Grant} /cfoot{To: Dean A. Smith} /rfoot{/thepage} /renewcommand{/headrulewidth}{0.4pt} /renewcommand{/footrulewidth}{0.4pt} /fancyhead[CO]{这是奇数页页眉中间显示的内容} /fancyhead[CE]{这是偶数页页眉中间显示的内容} /fancyfoot[CO,CE]{/thepage} %在奇数页偶数页页脚中间显示页码 注意如果用到汉字的话要放在CJK环境中,也可以放在document和CJK后 /documentclass{book} /usepackage{CJK} /usepackage{fancyhdr} %...... /begin{document} /begin{CJK}{GBK}{song} /pagestyle{fancy} /fancyhead{} % clear all fields /fancyhead[RO,LE]{/CJKfamily{hei} /bfseries /LaTeX{} 排版系统} /fancyhead[LO,RE]{/CJKfamily{hei>} /bfseries /leftmark} /fancyfoot[LE,RO]{/thepage} /fancyfoot[LO,RE]{/CJKfamily{kai} 公元二零零零年七月} /renewcommand{/headrulewidth}{0.4pt} /renewcommand{/footrulewidth}{0.4pt} %...... test! /end{CJK} /end{document}
9 time时间
/today 美国习惯 月日,年 为使符合中国习惯: /the/year~年/the/month~月/the/day~日// %前面必须加上/the才可以用/year/month/day命令
10 /left( /left[ /left{ /left./right) /right] /right} /right.
可以自动调整括号的大小,其中/left. /right.表示没有括号与另一个对应
11 mathrsfs宏包
$/mathscr{F}$可以打出来花字母
12 itemsize enumerate description
/begin{itemize} /item 每一项前面有一个黑点,即所谓的/emph{bullet},做为标签。 /item 每一项中的文本可以具有任意长度,标签位于文本的第一行开头处。 /end{itemize} /begin{enumerate} /item 标签由相信的数字组成。 /item 每调用一次~enumearte~环境,标签都是从1开始编号。 /end{enumerate} /begin{description} /item[目的] 这个环境适用于定义一组单词或者表达式。 /item[例子] 关键词做为标签,每一项由分类或解释组成。 /item[其它用途] 也可以用于参考文献中的作者列表。 /end{description}
嵌套最多四层: itemsize: 依次为bullet — * 单个点 enumearte: 依次为arabic (a-z) roman (A-Z)
13 更改标签样式
itemsize环境比较简单。 /renewcommand{/labelitemi}{+} /renewcommand{/labelitemii}{@} /begin{itemize} /item 更改后应该为+ /begin{itemize} /item 更改后应该为@ /end{itemize} /end{itemize} neumerate环境由于有自动计数器,所以较之复杂。 计数器名字分别为enumi,enumii,enumiii,enumiiii.其值可以是/arabic /roman /Roman /alph /Alph. 先用renewcommand修改labelenumi(iii),将其赋值为/Alph{enumi(iii)}或者其它…… /renewcommand{/labelenumi}{/Alph{enumi}.)} /renewcommand{/labelenumii}{/alph{enumii}.)} /begin{enumerate} /item A-Z.) /begin{enumerate} /item a-z.) /end{enumerate} /end{enumerate} 也可以为labelenumi(iii)赋多个值 /renewcommand{/labelenumi}{/Alph{enumi}.)} /renewcommand{/labelenumii}{/Alph{enumi}./arabic{enumii}} /begin{enumerate} /item A /begin{enumerate} /item A.1 /item A.2 /end{enumerate} /item B /begin{enumerate} /item B.1 /item B.2 /end{enumerate} /end{enumerate}
14 thebibliography参考文献
/begin{thebibliography}{标签样本} /bibitem[标签]{关键字} 文本条目 %其中文本条目才是真正的参考文献内容,其中标签是option,是用来显示在单个参考文献最前面的那个[标签],默认是用[arabic]来编号, 而关键字是方便/cite{关键字}来引用。 /end{thebibliography}
15 verbatim环境
环境中的text原封不动地打印到文档中,不对其中的命令做任何处理。 /verb分隔符text分隔符,其中分隔符可以是除*外所有的符号。 The /verb|/ldots| command /ldots %以|做为分隔符The /ldots command . . .
/begin{verbatim} 10 PRINT "HELLO WORLD "; 20 GOTO 10 /end{verbatim}
带*号的环境将空格打出来 /begin{verbatim*} the starred version of the verbatim environment emphasizes the spaces in the text /end{verbatim*}
16 tabular环境
/begin{tabular}{table spec} tablue spec中lcr分另表左中右,p{宽度}表示产生指定宽度的包含自动断行的表格。|产生垂直线。 &表跳到下一列,//跳到下一行,/hline绘制水平线(在该行的下面),/cline{i-j}绘制从 i列到j列的水平线,@{text}用text取代竖直分隔符。
/begin{tabular}{|r|l|} /hline 7C0 & hexadecimal // 3700 & octal // /cline{2-2} 11111000000 & binary // /hline /hline 1984 & decimal // /hline /end{tabular}
/begin{tabular}{|p{4.7cm}|} /hline Welcome to Boxy's paragraph. We sincerely hope you'll n all enjoy the show.// /hline /end{tabular}
用+代替|作为列的分隔符 /begin{tabular}{@{+} l @{+}} /hline no leading space// /hline /end{tabular}
17 table环境
18 multirow
合并行
19 multicolumn
合并列
Date: 2011-04-23 23:09:48
HTML generated by org-mode 6.33x in emacs 23