latex题注(caption)位置

http://anything-is-ok.blog.163.com/blog/static/205720233201301634053760/

我们以插入图片为例来说明latex中将题注(caption)置于不同位置的方法。

一般而言图片的题注会加在图片下方。如果想要使题注位于图片上方,只需要 \caption{caption-content} 置于命令 \includegraphics[options]{picture-file} 之前即可。下面是一个例子。

\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h!]
\caption{A picture of a gull.}
\centering
\includegraphics[width=0.5\textwidth]{atom_in_cavity.jpg}
\end{figure}
\begin{figure}[h!]
\centering
\reflectbox{%
\includegraphics[width=0.5\textwidth]{atom_in_cavity.jpg}}
\caption{A picture of the same gull
looking the other way!}
\end{figure}
\end{document}

有的时候我们还可能希望题注出现在图片的右面。这可以通过两种方法实现。第一,在figure环境中嵌套小页(minipage)环境来实现。第二,使用sidecap宏包中的SCfigure环境。下面例子中我们分别使用了这两种方法实现了题注的侧置。

\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{sidecap}
\begin{document}
\begin{figure}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=\textwidth]{atoms_in_cavity.jpg}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
\caption{A picture of a gull.}
\end{minipage}
\end{figure}
\begin{SCfigure}
\centering
\includegraphics[width=0.5\textwidth]{atoms_in_cavity.jpg}
\caption{A picture of a gull}
\end{SCfigure}
\end{document}


——数声风笛离亭晚,我想潇湘君想秦!
posted @ 2013-07-27 10:36  hujianhua  阅读(35273)  评论(0编辑  收藏  举报