latex编辑札记

来源:互联网 发布:c语言按位与 编辑:程序博客网 时间:2024/04/29 17:02

1. 单栏文档排双栏图片:

\usepackage{subfigure}(要注意subfigure宏包与subfig宏包的区别)

\begin{figure}

\begin{minipage}[t]{0.5\linewidth}

\centering

\includegraphics[width=2.2in]{fig3.pdf}

\caption{fig1}

\label{fig:side:a}

\end{minipage}%

\begin{minipage}[t]{0.5\linewidth}

\centering

\includegraphics[width=2.2in]{fig4.pdf}

\caption{fig2}

\label{fig:side:b}

\end{minipage}

\end{figure}

2. 双栏文档排单栏图片:

\begin{figure*}

----figure coding---

\end{figure*}

3. 多幅图片混排

\begin{figure}

\centering

\subfigure[yellow people]{\includegraphics[width=0.48\linewidth]{yellow.pdf}}

\subfigure[white people]{\includegraphics [width=0.48\linewidth]{white.pdf}}\\

\subfigure[black people]{\includegraphics [width=0.48\linewidth]{black.pdf}}

\subfigure[total people]{\includegraphics [width=0.48\linewidth]{total.pdf}}

\caption{c}

\label{fig:example}

\end{figure}

3. 表格中的文字换行

\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}

%然后使用&\tabincell{c}{}&就可以在表格中自动换行

%比如这么用

\begin{tabular}{|c|c|}

\hline

 1 & the first line \\

\hline

 2 & \tabincell{c}{haha\\ heihei\\zeze} \\

\hline

\end{tabular}

4. 表格代码:

\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}

\begin{table}[htbp]

\setlength{\abovecaptionskip}{0pt}

\setlength{\belowcaptionskip}{10pt}

\centering

 \caption{Type Sizes For Camera-Ready Papers}

 \label{tab2}

 \begin{tabular}{|c|c|c|}

 \hline

Solution & \tabincell{c}{Triangles rendered on our machine\\(million/sec)}

 & Results report from original paper \\\hline

Our approach &  101 & / \\\hline

Geometry Clipmaps (2004) & 73 & 59Million \\\hline

Cignoni et (2003) & 65 & 16Million \\\hline

Lindstrom (2002) & 24 & 2.4Million \\\hline

VDPM Hoppe(1998) & 7 &  0.48Million \\\hline

 \end{tabular}

\end{table}


原创粉丝点击