如何解决在 Latex 中使用“插入框”命令时如何添加带有连续编号的标题?
我在 Latex 中使用 InsertBoxL
命令生成了 3 个连续的图像,一个在另一个之下,每个图像旁边都有文字。有没有办法使用上面的命令在 Latex 中插入带有连续编号的标题?
我目前使用的 Latex 是:
\documentclass[11pt]{article}
\input{insBox}
\begin{document}
\InsertBoxL{0}{\rule{1.6in}{0.9in}} %text inserted here
\bigskip
\InsertBoxL{0}{\rule{1.6in}{0.9in}} %text inserted here
\bigskip
\InsertBoxL{0}{\rule{1.6in}{0.9in}} %text inserted here
\end{document}
我已经用 \rule
命令替换了我的实际图像。
任何帮助将不胜感激!
解决方法
要为您的框添加标题,您可以使用 \captionof
包中的 caption
宏:
\documentclass[11pt]{article}
\input{insbox}
\usepackage{caption}
\begin{document}
\InsertBoxL{0}{\rule{1.6in}{0.9in}} \captionof{figure}{some text}
\bigskip
\InsertBoxL{0}{\rule{1.6in}{0.9in}} \captionof{figure}{some text}
\bigskip
\InsertBoxL{0}{\rule{1.6in}{0.9in}} \captionof{figure}{some text}
\end{document}
然而,与这些奇怪的盒子东西不同,迷你页面可能更容易:
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption}
\captionsetup{singlelinecheck=false}
\begin{document}
\noindent\begin{minipage}[b]{1.6in}
\includegraphics[width=\textwidth]{example-image}
\end{minipage}%
\begin{minipage}[b]{\dimexpr\linewidth-1.6in}
\captionof{figure}{some text}
\end{minipage}%
\noindent\begin{minipage}[b]{1.6in}
\includegraphics[width=\textwidth]{example-image}
\end{minipage}%
\begin{minipage}[b]{\dimexpr\textwidth-1.6in}
\captionof{figure}{some tefffffxt}
\end{minipage}%
\noindent\begin{minipage}[b]{1.6in}
\includegraphics[width=\textwidth]{example-image}
\end{minipage}%
\begin{minipage}[b]{\dimexpr\textwidth-1.6in}
\captionof{figure}{some text}
\end{minipage}%
\end{document}
除了图片之外,还有现成的字幕包:
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{sidecap}
\begin{document}
\begin{SCfigure}
\includegraphics[width=.3\textwidth]{example-image-duck}
\caption{heading}
\end{SCfigure}
\begin{SCfigure}
\includegraphics[width=.3\textwidth]{example-image-duck}
\caption{heading}
\end{SCfigure}
\begin{SCfigure}
\includegraphics[width=.3\textwidth]{example-image-duck}
\caption{heading}
\end{SCfigure}
\end{document}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。