Letex排版学习笔记

来源:互联网 发布:微信无法打开淘宝链接 编辑:程序博客网 时间:2024/05/22 08:29

Latex排版学习笔记

1. 入门

入门请参考《LaTeX新人教程,30分钟从完全陌生到基本入门》:http://blog.sina.com.cn/s/blog_90444ed201016iq6.html

2. Latex常用格式总结

2.1 插入图片

2.2 插入公式

  • 矩阵

1)矩阵的每个元素都要规定排列方式,例如:|c|c|c|c|c|
2)带行号和列号的矩阵:
LaTeX技巧557:如何输入带有行列编号的矩阵》:http://blog.sina.com.cn/s/blog_5e16f1770102dqp2.html
3)多个矩阵排列在同一行
\begin{center}$    V_{31} =    \left[    \begin{array}{cccc}    1 & 1 & 1 & 1 \\    1 & 1 & 1 & 1 \\    1 & 1 & 1 & 1 \\    1 & 1 & 1 & 1    \end{array}    \right]    V_{32} =    \left[    \begin{array}{ccc}    1 & \frac{1}{3} & \frac{1}{5} \\    3 & 1 & \frac{3}{5} \\    5 & \frac{5}{3} & 1    \end{array}    \right]$\end{center}
解释:将多个矩阵放在同一个数学环境中,然后居中排列。


4)将多个公式放在同一行
<pre name="code" class="plain">\begin{center}$W_{V_{31}}$ = [0.25 0.25 0.25 0.25], $W_{V_{32}}$ = [0.11 0.33 0.56].\end{center}


解释:将一行的所有公式放到一个块中,然后并列,之后居中。

5)行内公式,行间公式:
   《[Latex学习笔记]行内公式、行间公式 》: http://hubl82.blog.163.com/blog/static/1267694852013466541231/
   最简单的是,用$公式$插入行内公式;用$$公式$$插入行间公式。

6)在字母的正上方标注:\overset{-}{x}、\underset{-}{x}
http://bbs.sjtu.edu.cn/bbstcon?board=TeX_LaTeX&reid=1255588028

2.3 插入表格

1)确定表格的位置:居中
<pre name="code" class="plain">\begin{table}[!hbp]<span></span>% 规定表格在页面的位置选取顺序:当前、底部、上部\centering \caption{ Responsibility evaluation index} \label{lab:2}% \centering 规定整个表格的位置居中排列\begin{tabular}{c|c|c|c|c|c|c}\hline  $A_2$ & 0.27 & $B_3$ & 0.75 & $C_8$ & 0.25 & 0.0506 \\        - & - & - & - & $C_9$ & 0.75 & 0.1519 \\        - & - & $B_4$ & 0.25 & $C_{10}$ & 0.50 & 0.0338 \\        - & - & - & - & $C_{11}$ & 0.50 & 0.0338  \\\hline\end{tabular}\end{table}


2)表格行列合并
LaTeX技巧19:LaTeX常用表格绘制入门》:http://blog.sina.com.cn/s/blog_5e16f1770100fvf5.html
通过\usepackage{multirow} 包实现行列合并功能。
multirow{2}{*}{text}的第一个参数表示行的数目,*表示由系统自动调整文字,text表示要写入的文字
  \multicolumn{2}{|c|}{text}表示跨2行,文字采用中心对齐的方式,text是要写入的文字。    

multicolumnmultirow可以组合使用,跨多行多列,只需要将multirow作为multicolumntext即可。

最后,\cline用于画横线 \cline{i-j}表示从第i列画到第j列.


3)表格内文字换行

《Latex 表格内文字过长自动换行》:http://blog.csdn.net/virhuiai/article/details/7886265

《LaTex表格内单元格内容强制换行》:http://blog.sina.com.cn/s/blog_531bb7630101841e.html

两个结合起来看,Latex 表格内文字过长自动换行》有多种方法,但是解释不太全面,LaTex表格内单元格内容强制换行》中有完整的例子。


4) 表格列数的简单表示:\begin{tabular}{*{6}{c|}c}%{c|c|c|c|c|c|c}

5)表格线的粗细:http://blog.sina.com.cn/s/blog_5e16f1770100mvtd.html

2.4 Latex常识

1)$ 的用法
TeX提供三种有关数学公式的环境——第一种是"文中公式",,通过$进入"数学环境",通过$来结束数学环境的;第二种是"独立公式",
用$$进入"显示数学环境用$$退出,在正文中它是独占一行的,它排出的字体要稍微比文中公式要大些。
2)居中与缩进
http://blog.csdn.net/lishoubox/article/details/7295947
3) \verb的用法

\verb 命令被设计用来显示输入即输出的内容。所以上述字符也可以使用 \verb 来输出

例如:\verb|#$^&|  \verb+#$^&+
5)输入空格
LaTeX中的空格》:http://blog.renren.com/share/293943878/13684309562
6)上标、下标
$g_1$;$g^2$  
7) LaTex中的括号总结混合括号\left [ 0,1 \right ) \left \langle \psi \right |\left [ 0,1 \right ) \left \langle \psi \right |单左括号\left \{ \frac{a}{b} \right .\left \{ \frac{a}{b} \right .单右括号\left . \frac{a}{b} \right \}\left . \frac{a}{b} \right \}

来自于:《

LaTeX技巧189:LaTeX括号总结

 》:http://blog.sina.com.cn/s/blog_5e16f1770100gk51.html
<span style="line-height: 22.3999996185303px; font-family: Arial, Helvetica, sans-serif;"></span>
<span style="line-height: 22.3999996185303px; font-family: Arial, Helvetica, sans-serif;"><span style="white-space:pre"></span> <span style="white-space:pre"></span>8)用\begin{}  \end{}定义一个内容块</span>
<span style="line-height: 22.3999996185303px; font-family: Arial, Helvetica, sans-serif;"><span style="white-space:pre"></span>9)段落间距:<span style="font-family: simsun, simhei, 'ms yahei', Arial, Helvetica, sans-serif; font-size: 13px; line-height: 25px; white-space: pre;">\vspace{dist},dist可为负数</span></span>
<span style="line-height: 22.3999996185303px; font-family: Arial, Helvetica, sans-serif;"><span style="white-space:pre"></span>10)作者的单位:<a target=_blank href="http://blog.sina.com.cn/s/blog_604a4ace01016nyl.html" target="_blank" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; color: rgb(51, 51, 51); text-decoration: none; cursor: pointer; font-family: simsun, simhei, 'ms yahei', Arial, Helvetica, sans-serif; line-height: 25px; white-space: pre;">http://blog.sina.com.cn/s/blog_604a4ace01016nyl.html</a><span style="font-family: simsun, simhei, 'ms yahei', Arial, Helvetica, sans-serif; font-size: 13px; line-height: 25px; white-space: pre;"> </span></span>
</pre>
0 0
原创粉丝点击