LaTeX学习摘记(二):字体与段落
2013-05-20 09:48
2481 查看
增加空白的命令:
\vspace{长度}:精确增加垂直距离\addvspace{长度}:The\addvspace command normally adds a vertical space of height length. However, ifvertical space has already been added to the same point in the output by aprevious \addvspace command, then this command will not add more space thanneeded to
make the natural length of the total vertical space equal to length.
\hspace与\addvspace与此相同
段落间距
\parskip = 长度段前段后都增加
\bigskip;\medskip 或\smallskip
行结束标志
最后加上\hfill xxx强调(默认正体和斜体互换)
latex强调文本不是用\emph{}命令吗,默认是斜体,具体使用什么字体,可以用类似
\DeclareTextFontCommand{\emph}{\heiti}
来源:http://xfyxiao.ycool.com/post.2983543.html
要给文字加下划线,用 \underline{ This is an underlinetext } 就可以.
跟 \emph{} 命令不同 \emph 是会让文字变跟现在文字不同. 如正体变斜体, 或者斜体变正体.
如果想要用文字高亮显示就要用到一个叫soul 的包,
这个包一共有伍个命令:
\so{letterspacing} l e t t e r s p a c i n g
\caps{CAPITALS, Small Capitals} CAPITALS, Small Capitals
\ul{underlining} underlining
\st{overstriking} overstriking
\hl{highlighting} highlighting5
如果没有加color包,那么 hl 命令就跟下划线命令一样. 通常hl是预设黄色的
可以用以下命令改变颜色
\setulcolor{bule} 设置下划线的颜色为蓝(下划线)
\setstcolor{yellow} 设置overstriking颜色为黄(删除线)
\sethlcolor{green} 设置高亮显示为绿(高亮)
更详细的命令请查阅soul的文档
下面是一个演示文档:
\documentclass{article}
\usepackage{color, soul} %用color, 和 soul 包
\begin{document}
\setulcolor{red} set underlining color
\setstcolor{green} set overstriking color
\sethlcolor{blue} set highlighting color
\so{letterspacing} \
\caps{CAPITALS, Small Capitals}\
\ul{underlining}\
\st{overstriking} \
\hl{highlighting}
\end{document}
对齐
设置断词
\hyphenation{ab-c bbb} 表示abc可在b后断词,bbb不能断词特殊字符
双引号:\textquotedblleft
\textquotedblright
单引号:
\textquoteleft
\textquoteright
如果需要借助于内部有\@字符的命令,如\@addtoreset,就需要借助于另两个命令
\makeatletter, \makeatother。
% | \% | \ | \textbackslash or \backslash | $ | \$ |
# | \# | { | \{ | } | \} |
^ | \^{} | _ | \_ | ~ | \~{} |
& | \& | | | \textbar $|$ | > | \textgreater |
< | \textless | 连数符 | -- | 破折号 | --- |
支持中文
\usepackage[nocap,noindent]{ctex}或
\usepackage{CJK}
\begin{CJK}{GBK}{song} ç宋体
试试aa
\end{CJK}
设置字体
依次为 编码,字族,序列,形状ß 任选组合\fontencoding{} \fontfamily{} \fontseries{}\fontshape{} \fontsize{尺寸}{行距(通常要比尺寸大20%)}
\newcommand{\myfont}[1]{{\fontencoding{U}\fontfamily{fplmbb}\fontseries{m}\fontshape{n}\selectfont#1}},形状后面可加大小\fontsize{}{}
或
\newcommand{\myfont}[1]{{\usefont{U}{fplmbb}{m}{n}\selectfont#1}}
数学字体选择
公式图标 à math或TeX à CTeX tools à TeXFriend …
(OB$\mathfrak{AO}$DD)OB$\mathds{AO}$DD
条件判断
包ifthen\ifthenelse{条件判断}{肯定语句}{否定语句}
条件判断的类型
数值1 关系符(< = >) 数值2
\lengthtest{长度1 关系符 长度2}
\isodd{数值}
\equal{字符串}{字符串}
\boolean{布尔寄存器名};新定义布尔寄存器\newboolean{名称};赋值\setboolean{名称}{false/true}
\isundefined{命令}
多重条件 \and \or\not \( \)
条件循环:\whiledo{条件判断}{肯定语句}
相关文章推荐
- LaTex学习教程——文章标题、目录及段落
- LaTex学习摘记(一):winedt的使用
- javascript学习--段落字体的放大与缩小
- LaTeX学习摘记(四):表格
- LaTeX学习摘记(五):插图
- LaTeX学习摘记(六):列表
- LaTeX学习摘记(七):算法
- LaTeX学习笔记
- js代码学习17--控制字体大小
- 线程同步与异步的学习摘记
- 【latex学习笔记】LaTex中的距离(固定长度、橡皮长度、长度命令)
- [Cocos2d-x for WP8学习笔记] 获取系统字体
- 【学习摘记】马士兵bbs改良版_课时22-24_FCKEditor
- LATEX学习
- vue饿了么学习-第四篇(web字体)
- 【学习摘记】马士兵JDBC技术_课时11_JDBC处理存储过程
- LaTeX技巧016:使用第三方字体时的路径设置问题
- LaTeX排版常用字体和格式设置
- JAVA学习绘图颜色及其笔画属性设置字体显示文字
- android学习摘记——通过adb工具查看sqlite3数据库