欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

latex题注(caption)位置

发布时间:2023/12/15 59 生活家
生活随笔 收集整理的这篇文章主要介绍了 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}
egin{document}
egin{figure}[h!]
caption{A picture of a gull.}
centering
includegraphics[width=0.5 extwidth]{atom_in_cavity.jpg}
end{figure}
egin{figure}[h!]
centering
eflectbox{%
includegraphics[width=0.5 extwidth]{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}
egin{document}
egin{figure}
egin{minipage}{0.5 extwidth}
includegraphics[width= extwidth]{atoms_in_cavity.jpg}
end{minipage}%
egin{minipage}{0.5 extwidth}
caption{A picture of a gull.}
end{minipage}
end{figure}
egin{SCfigure}
centering
includegraphics[width=0.5 extwidth]{atoms_in_cavity.jpg}
caption{A picture of a gull}
end{SCfigure}
end{document}

——数声风笛离亭晚,我想潇湘君想秦!

总结

以上是生活随笔为你收集整理的latex题注(caption)位置的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。