LaTeX部分宏包介绍

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

\usepackage{geometry}%利用geometry可以很方便的设置页面的大小。\usepackage{fancyhdr}%用fancyhdr来设置页眉和页脚十分方便,而且可以在配合CCT、CJK来设置中文的页眉等。\usepackage{fancyvrb}%用来得到一些加框的列举环境\usepackage{fancybox}%提供了\shadowbox,\doublebox,\ovalbox和\Ovalbox四个命令来生成不同形状的盒子。\usepackage{amsmath,amsfonts,amssymb,graphicx}%EPS图片支持\usepackage{subfigure}%使用子图形\usepackage{indentfirst}%中文段落首行缩进\usepackage{bm}%公式中的粗体字符(用命令\boldsymbol)\usepackage{multicol}%正文双栏\usepackage{picins}%图片嵌入段落宏包比如照片\usepackage{abstract}%2栏文档,一栏摘要及关键字宏包\usepackage{anysize}%对于像book等双面版式来说,这里的left和right再奇偶页会互换。\usepackage{hyperref}%文献引用的宏包\usepackage{listings}\lstloadlanguages{C,C++,matlab,mathematica}%程序清单关键字宏包\usepackage{color}%可以产生有颜色的符号\usepackage{units}%用于美化单位及分式\usepackage{tabularx}%用于灵活地控制表格的生成\usepackage{mathrsfs}%用于产生一种数学用的花体字%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%关于各个宏包的说明。%CJK宏包中重要的命令为:%\CJKcaption{GB}章节标题为中文%\CJKfamily{hei}{}%song,fs,kai,hei,songsl,fssl,kaisl,heisl%CTEX中文套装中定义了六种中文字体,分别是%song,宋体%fs,仿宋%kai,楷书%hei,黑体%以上这四种字体都是可以用的,并且还有对应的斜体可用(\it即可)%li,隶书%但看来这个是不能用的,怎样解决我还不知道,还不懂怎样安装字体%yuan,幼圆%这个也不能用%geometry宏包重要的命令为:%\geometry{height=10in,a4paper,body={14cm,21cm}}%具体内容由自己改写%fancyhdr宏包重要的命令为:%如下面所用到的页眉和页脚的定义,很典型的%fancyvrb宏包重要的命令为:%很多,应用方法很灵活。具体查阅其说明文档%fancybox宏包重要的命令为:%\shadowbox{}和\doublebox{},括号里面可以包含一个minipage环境,可以含一个图片%amsmath,amsfonts,amssymb,graphicx宏包重要的命令为:%这是一组非常重要的包,最重要的几个命令为:%\dfrac{}{}%用于显示一种分数,我在一个自定义命令中用过一次%\includegraphics[width=,height=]{}%插入图片的一般命令%有其它的一些常用的符号%subfigure宏包重要的命令为:%\subfigure[子标题]{\includegraphics[width=]{}}%详情见下%indentfirst宏包重要的命令为:%用了这个宏包之后,只要在后面连续打两个回车,就可以开始一个新的段,非常方便%multicol宏包重要的命令为:%\begin{multicols}{2}%.......%\end{multicols}%把文字放在这个环境中,就可以使这些文字分成两栏,非常好用。%picins宏包重要的命令为:%\parpic(宽度,高度)(水平偏移,垂直偏移)[选项][位置]{图形}%abstract宏包重要的命令为:%这个宏包我还没发现有有用的命令,但鉴于摘要的重要性,就保留它了。%anysize宏包重要的命令为:%\marginsize{25mm}{25mm}{15mm}{15mm}%用了anysize宏包以后,就可以用它方便地定义两面文档的装订对齐问题了,它会自动切换%详情见下%hyperref宏包重要的命令为:%用了这个宏包之后,会发现所有的参考文献和交叉引用都具有了超链接功能,太棒了!%listings宏包重要的命令为:%命令有一两个非常实用,主要是画框和控制程序清单字体的选项%它有一个很重要的特性,是可以把各种语言的关键字突显出来,很不错%units宏包重要的命令为:%$\nicefrac[\mathcal]{A}{B}$%\nicefrac{A}{B}%\nicefrac[\textit]{A}{B}%$\unitfrac[#1]{#2}{#3}$%$\unit[#1]{\it#2}$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%纸张版式的定义%\marginsize{25mm}{25mm}{15mm}{15mm}%用了anysize宏包以后,就可以用它方便地定义两面文档的装订对齐问题了,它会自动切换,即可代替下邻两句\geometry{a4paper,hmargin={3.7cm,3.3cm},vmargin={1.8cm,2.5cm}}\renewcommand{\baselinestretch}{1.5}%定义行间距\parindent24pt%重新定义缩进长度%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%自定义命令区%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%定义字体及字号\newcommand{\song}{\CJKfamily{song}}%宋体\newcommand{\fs}{\CJKfamily{fs}}%仿宋体\newcommand{\kai}{\CJKfamily{kai}}%楷体\newcommand{\hei}{\CJKfamily{hei}}%黑体\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont}\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont}\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont}\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont}\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont}\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%下面这一块程序用于去掉图片标题中的冒号\makeatletter\long\def\@makecaption#1#2{%\vskip\abovecaptionskip\sbox\@tempboxa{#1\quad#2}%\ifdim\wd\@tempboxa\hsize#1\quad#2\par\else\global\@minipagefalse\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%\fi\vskip\belowcaptionskip}\makeatother%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%下面这一片区域用来定义程序清单环境中的样式细节设置\lstset{frameround=tttt,%definetheframestyle%frameshape={RYRYNYYYY}{yny}{yny}{RYRYNYYYY}basicstyle=\small,%printwholelistingsmall%keywordstyle=\color{red}\underbar,%underlinedboldredkeywords%identifierstyle={},%nothinghappenstootheridentifiers%commentstyle=\color{white},%whitecomments%stringstyle=\ttfamily,%typewritertypeforstrings%stringspaces=false%nospecialstringspaces}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%关于去掉首页的页码的方法%在\maketitle后加上\thispagestyle{empty}就可以了%想让所有的页都无页码,则如下操作%\makeatletter%\let\ps@plain=\ps@empty%\makeatother%\pagestyle{empty}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%把proof环境中的关键字proof改为证明的方法%\proofname{证明}%或%\begin{proof}{证明}%........%\end{proof}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%这一块用来美化行内公式时靠字太紧的现象\newcommand{\f}[1]{\,\,$#1$\,}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%这一块用来美化输出一行序列时的各元素项靠得太紧的情况\newcommand{\seq}[4]{{\,\,(#1\,\,\,}{#2\,\,\,}{#3\,\,\,}{#4)}}\newcommand{\se}[4

1 / 6
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功