为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

LaTeX的一些代码样式

2010-11-12 9页 doc 45KB 21阅读

用户头像

is_468343

暂无简介

举报
LaTeX的一些代码样式LaTeX的一些代码样式 LaTeX的一些代码样式 2007年01月12日 星期五 17:36 把自己总结的用了很久的一些LaTeX的代码样式发上来,这些样式平时用得很多。对我来说非常珍贵呀。 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %一些最基本的环境 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %居中环境 \begin{center} \end{center} %左对齐环境 \begin{flushleft} \end{flush...
LaTeX的一些代码样式
LaTeX的一些代码样式 LaTeX的一些代码样式 2007年01月12日 星期五 17:36 把自己的用了很久的一些LaTeX的代码样式发上来,这些样式平时用得很多。对我来说非常珍贵呀。 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %一些最基本的环境 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %居中环境 \begin{center} \end{center} %左对齐环境 \begin{flushleft} \end{flushleft} %右对齐环境 \begin{flushright} \end{flushright} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %小页环境(可嵌入上面那三种环境中形成组合) \begin{minipage}{**cm} \end{minipage} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %列举样式 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % itemize 列举样式1:· · · · \begin{itemize} \vspace{-2.8mm}\item \vspace{-2.8mm}\item \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % itemize 列举样式2:*  *  *  * \begin{itemize} \vspace{-2.8mm}\item[*] \vspace{-2.8mm}\item[**] \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % itemize 列举样式3:任意符号 \begin{itemize} \renewcommand\labelitemi{}%这里面写符号 \vspace{-2.8mm}\item \vspace{-2.8mm}\item \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % itemize 列举样式4:彩色符号 \begin{itemize} \setlength\baselineskip{12pt} %用这个命令来调整间距应该比较具有通用性   \item[\textcolor{black}{$\spadesuit$}]  文字。。。   \item[\textcolor{red}{$\heartsuit$}]  文字。。。   \item[\textcolor{black}{$\clubsuit$}]  文字。。。   \item[\textcolor{red}{$\diamondsuit$}] 文字。。。 \end{itemize} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % enumerate 列举样式1:1. 2. 3. 4. \begin{enumerate} \vspace{-2.8mm}\item \vspace{-2.8mm}\item \end{enumerate} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % enumerate 列举样式2:(1) (2) (3) (4) \begin{enumerate} \renewcommand\labelenumi{    \theenumi    }%就在前面那个括号的空格处加符号 %\setlength\itemindent{}%这个会使列举的左移或右移指定的距离 \vspace{-2.8mm}\item \vspace{-2.8mm}\item \end{enumerate} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形插入样式 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式1:定点 %图形排版时名称一般都在下方 \begin{center} \includegraphics[width=10cm,height=6cm]{*.eps}%就在前面括号中写图片名 \renewcommand{\figurename}{图} \caption{} \label{} \end{center} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式2:浮动 %图形排版时名称一般都在下方 \begin{figure} \begin{center} \includegraphics[width=10cm,height=6cm]{*.eps}%就在前面括号中写图片名 \renewcommand{\figurename}{图} \caption{} \label{} \end{center} \end{figure} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式3:两个图片并列,统一取名 %图形排版时名称一般都在下方 \begin{figure} \begin{center} \begin{minipage}[c]{0.5\textwidth} \centering\includegraphics[width=5cm,height=3cm]{*.eps}%就在前面括号中写图片名 \end{minipage}% \begin{minipage}[c]{0.5\textwidth} \centering\includegraphics[width=5cm,height=3cm]{*.eps}%就在前面括号中写图片名 \end{minipage} \renewcommand{\figurename}{图} \caption{} \label{} \end{center} \end{figure} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式4:两个图片并列,分别取名 %图形排版时名称一般都在下方 \begin{figure} \begin{center} \begin{minipage}[c]{0.5\textwidth} \centering\includegraphics[width=5cm,height=3cm]{}%就在前面括号中写图片名 \renewcommand{\figurename}{图} \caption{ } \label{} \end{minipage}% \begin{minipage}[c]{0.5\textwidth} \centering\includegraphics[width=5cm,height=3cm]{}%就在前面括号中写图片名 \renewcommand{\figurename}{图} \caption{ } \label{} \end{minipage} \end{center} \end{figure} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式5:两个图片作为子图并列,分别取名。四个可形成图形阵列。在下方有一个总名称 \begin{figure} \centering \subfigure[子标]{\includegraphics[width=0.45\textwidth]{*.eps}} %\mbox{\hspace{0.5cm}} \subfigure[子标题]{\includegraphics[width=0.45\textwidth]{*.eps}} \\ \subfigure[子标题]{\includegraphics[width=0.45\textwidth]{*.eps}} %\mbox{\hspace{0.5cm}} \subfigure[子标题]{\includegraphics[width=0.45\textwidth]{*.eps}} \renewcommand{\figurename}{图} \caption{总标题} \label{} \end{figure} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式6:图片在盒子中 \begin{figure} \begin{center} \fbox{\includegraphics[width=10cm,height=6cm]{*.eps}}%就在前面括号中写图片名 \renewcommand{\figurename}{图} \caption{} \label{} \end{center} \end{figure} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %图形排版样式7:图文混排,段落插入图片用picins宏包和\parpic命令 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \parpic{% \includegraphics[width=3.0cm]% {*.eps}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 表格样式 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 基本表格样式 % 在下面那个括号中,用|表示画竖线,而l表示单元格中的内容在单元格中左对齐, % c表示单元格中的内容在单元格中中对齐,r表示单元格中的内容在单元格中右对齐。 % 如|c|c|c|就表示画一个3列有竖线的表,当然|也可略,就不画竖线出来; % 用\hline画横线,一般是表的一行内容输入完并强制换行(\\)后,在后面写 % \hline,然后后面再写下一行内容。当然\hline也可略,就不画横线出来; % 下面这个表格是一个3行3列的表格 \begin{tabular}{|c|c|c|} \hline *** & *** & ***\\ \hline *** & *** & ***\\ \hline *** & *** & ***\\ \end{tabular} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 下面这种形式可以指定表格的宽度。在下面那个括号中写上0.5\textwidth % 就可得到一个半张纸宽的一个表格; % 写上\textwidth就可得到一个整张纸宽的一个表格。 \begin{tabular*}{***}{|c|c|c|} \hline *** & *** & ***\\ \hline *** & *** & ***\\ \hline *** & *** & ***\\ \end{tabular*} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 表格样式1:标题在图表上方,去掉了冒号 \begin{table} \begin{center} %\makeatletter\def\@captype{table}\makeatother \renewcommand{\tablename}{表} \caption{} \label{} \begin{tabular}{} \end{tabular} \end{center} \end{table} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %表格样式2:用tabularx宏包 \begin{center} \begin{tabularx}{350pt}{|c|X|c|X|} \hline \multicolumn{2}{|c|}{Multicolumn entry!}& THREE& FOUR\\ \hline one& \raggedright\arraybackslash\setlength\baselineskip{12pt} The width of this column depends on the width of the table.& three& \raggedright\arraybackslash\setlength\baselineskip{12pt} Column four will act in the same way as column two, with the same width. \\ \hline \end{tabularx} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %表格样式3:高级表格控制 \begin{table} \begin{center} \scriptsize \renewcommand{\arraystretch}{1.3} \caption{Quasi-normal frequencies for the scalar perturbation in the stationary Schwarzschild background. \label{tab:1}} \begin{tabularx}{380pt}{*{5}{>{\centering\arraybackslash}X|}>{\centering\arraybackslash}X} \hline &&\multicolumn{2}{c|} {\textbf{Exact solution}}&\multicolumn{2}{c}{\textbf{Numerical solution}} \\ \hline $\sqrt{M}$&$m$&$\omega_R$&$\omega_I$&$\omega_R$&$\omega_I$ \\ \hline 0.2&1&1&-0.4&1.002&-0.400 \\ 0.4&1&1&-0.8&0.965&-0.799 \\ 0.4&2&2&-0.8&2.003&-0.800 \\ 0.4&3&3&-0.8&3.004&-0.800 \\ 0.4&4&4&-0.8&4.005&-0.800 \\ 0.5&2&2&-1&1.999&-1.000 \\ 0.5&3&3&-1&2.993&-1.000 \\ 0.5&4&4&-1&4.007&-1.000 \\ 1&4&4&-2&4.004&-2.001 \\ 2&10&10&-4&10.014&-4.001 \\ 3&10&10&-6&10.028&-6.011 \\ 4&10&10&-8&9.973&-7.983 \\ \hline \end{tabularx} \end{center} \end{table} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %公式样式 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %摘引环境1:段摘引 \begin{verbatim} \end{verbatim} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %摘引环境2:行内摘引 \verb|*********| % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %程序清单样式 \lstset{language=matlab} \begin{lstlisting}[frame=trBL]{} clf; k=-80:80; a(k~=0)=sin(pi*k(k~=0)/2)./(k(k~=0)*pi); a(k==0)=0.5; stem(k,a); t=-3:0.01:3 \end{lstlisting} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %  参考文献样式 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \small \renewcommand\refname{\hei 参考文献} \begin{thebibliography}{99} \setlength{\parskip}{0pt}  %段落之间的竖直距离 \bibitem{tang} \bibitem{liu} \end{thebibliography} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 参考文献结束 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/
本文档为【LaTeX的一些代码样式】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索