当前位置:文档之家› LaTeX命令操作

LaTeX命令操作


• Type Writer
• 衬线体(无须命 令,\textrm{}) • 黑体\textbf{} • 斜体\textit{} • 另外一种斜体\textsl{} • 非衬线体\textsf{} • 小型大写体\textsc{} • 等宽字体\texttt{}
• • • • • • •
\documentclass[dvipdfm]{article} \usepackage[T1]{fontenc} \usepackage{avant} \usepackage{graphicx} \usepackage{ctex} \begin{document} \textrm{hello}
• \end{document}
说明文档
• 重点说明:命令大小写不 能写错,因为LaTeX对 大小写敏感。 • 登陆账号的密码也是对 大小写敏感的。
说明文档
• 另外一种改变颜色的方 式,使用与定义颜色 • \usepackage[x11names ]{xcolor}
• \textcolor{DeepSkyBlue 3}{hello}

这两款A3新车型装配的是5速手动变速器,最终传动比提高了大约7%。仪表板上的换挡指示器 帮助驾驶者选择合适的挡位。这项选择至关重要,因为大约30%的油耗取决于驾驶者的习惯。
• 所用宏包 color • 或者 xcolor • 建议使用xcolor因为里 面有很多与定义的颜色 • 关键命令 \textcolor[HTML]{5941 E2}{Hello}
举例
• / fileview?id=0B6uqPhpz FsxNYjUyZWY2NTAtYj JlYy00NGI5LWJjMTgt NTkwOGVhMTFhZDE 3&hl=zh_CN
• • • •
\begin{tabular}{|c|c|c|} 1&2&3\\\hline 4&5&6\\\hline \end{tabular}

\end{document}
• 如果是times new roman, 就用mathptm或 者mathptmx宏包
• 英语之中有衬线字体,非 衬线字体,黑体,斜体, 小型大写体,等宽字体概 念.
• • • • • Serief Sans serief Black font Italic SMALL CAPITAL
• 关键命令 \usepackage{xcolor} • \textcolor[rgb]{0.1,0.3,0. 6}{hello} • 外加工具千宇取色板 • /soft/40544.htm
说明文档
• \documentclass[dvipdfm]{article}\usep ackage{xcolor} • \begin{document} • \textcolor[rgb]{0.1,0.5,0.4}{hello} • \textcolor[HTML]{EA26E4}{hello}
长表格
• \usepackage{longtable}
基本形式
• \begin{longtable} • {c|c|c} • a&b&c\\\endhead • d&e&f\\ • \end{longtable}
用途
• 用于在一个文件当中有 一个表格非常长,需要 好几页显示。Longtable 就是解决tabular环境不 能断开表格的弊端。
三列两行
基本表格可以没有线
• • • • \begin{tabular}{ccc} 1&2&3\\ 4&5&6\\ \end{tabular}
基本表格可以左对齐 右对齐,居中对齐
• • • • \begin{tabular}{lcr} 1&2&3\\ 4&5&6\\ \end{tabular}
基本表格可以设定表 格宽度,不至于超越 边界线



日前,奥迪A3再推两款车型,分别为奥迪A31.6TDI和A3Sportback1.6TDI。奥迪A31.6TDI在达 到百公里3.8L杰出油耗的同时,每百公里的二氧化碳排量仅99克,突破了每百公里100克的下 限。此外,这两款全新A3车型搭载的四缸TDI发动机动力输出强劲,在4,400转/分的转速下,可 输出77千瓦(105马力)最大功率,在1,500转/分至2,500转/分的转速区间内,可向传动轴平稳 传输250牛· 米的最大扭矩。这款TDI涡轮增压柴油直喷发动机使奥迪A31.6TDI在11.4秒内即可 完成百公里加速,最高时速为190公里/小时;而A3Sportback完成百公里加速的时间为11.7秒。

• • • • • •
\textbf{hello}
\textit{hello} \textsl{hello} \textsf{Hello} \textsc{Hello} \texttt{hello}
\end{document}
问题
• • • • 想要黑色斜体怎么办? \textbf{\textit{hello}} 如何输入中文? \usepacakge{ctex}
• \end{document}
说明文档
• 介绍字体类型网站 http://www.tug.dk/Font Catalogue/ • (部分字体无法使用,必 须先安装)
• \renewcommand{\rmde fault}{ptm} • 用这个命令无需使用宏 包
• \documentclass[dvipdfm]{article} • \begin{document} • Hello
• \renewcommand{\rmdefault}{ptm}\rm • Hello
• \end{document}
• 还有一种方式,直接使 用字体宏包,使用比较 方便,但是形式呆板
• • • • • • •
\documentclass[dvipdfm]{article} \usepackage[T1]{fontenc} \usepackage{avant} \begin{document} \sf Hello \renewcommand{\rmdefault}{ptm}\rm Hello
说明文档
• 方括号里面还可以填写 svgnames, dvipsnames,
说明文档
• \documentclass[dvipdfm]{article} • \usepackage[x11names]{xcolor} • \begin{document}
• \textcolor{DeepSkyBlue3}{hello}

全新奥迪A3车型采用多项奥迪高效模块创新技术。启停系统会在停车、变速杆处于空档位置、 驾驶员的脚离开离合器踏板的情况下自动关闭发动机;而继续踩下离合器踏板,启停系统又会 重启发动机,所有过程平顺而迅速。能量回收系统智能地控制交流发电机回收由刹车产生的能 量,并临时储存在蓄电池中;在加速时,这些能量再次进入电气系统,从而减轻了交流发电机 的负荷,并节省燃料消耗。在城市驾驶环境中,准确的说是在大多数汽车用户的日常使用环境 下,能量回收系统和启停系统将它们的潜力发挥得淋漓尽致。
• \begin{tabular}{p{5cm}c r} • 1&2&3\\ • 4&5&6\\ • \end{tabular}
颜色表格
• 使用宏包 \usepackage{colortbl}
一列颜色
• \begin{tabular}{|>{\colu mncolor[HTML]{FBCC A2}}c|c|c|} • 1&2&3\\\hline • 4&5&6\\\hline • \end{tabular}
• \fontsize{40pt}{40pt}\sele ctfont
样文
• I don’t tend to be all that superstitious, but some things are hard to argue with. Take the Madden Curse, for instance. How can someone’s picture appearing on the cover of a video game really impact their season? I have no idea, but it does. This year’s cover boys were Troy Polamalu and Larry Fitzgerald. Polamalu suffered a major knee injury in the season-opener, while Fitzgerald is on his way (with some help from several others) of destroying my fantasy football season. I’m a believer. Why am I bringing this up? As you can see, Mariano Rivera is on the cover of this week’s Sports Illustrated, as Tom Verducci (one of my favorite baseball writers out there) has a story on the legendary closer in the magazine. As you may or may not know, the SI cover jinx has struck more than its share of athletes/teams over the years. Jason Campbell was on the cover this summer for SI’s training camp issue, and if you’ve followed his season and the plight of my beloved Redskins, it’s not pretty. I’m not saying Rivera’s presence on the cover of SI is a forecast for gloom and doom for the Yankees, but if they suffer a first-round knockout, please direct all your letters to SI. •
相关主题