调整乳胶中的侧标题

问题描述

我想通过将标题向左(或向右)冲洗并与图的顶部对齐来调整乳胶中的侧面标题。 附上一个 MWE

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[ragged]{sidecap}    
\begin{document}

\begin{SCfigure}
\includegraphics[width=5cm]{name}
\caption{I would like the caption to occupy say 0.2linewidth and be left (or right) adjusted and on top}\label{fig:testA}
\end{SCfigure}
\end{document}

解决方法

要使标题左对齐或右对齐,sidecap 包提供了选项 raggedrightraggedleft

要将标题与图的顶部对齐,您可以使用 \sidecaptionvpos{figure}{t}

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[
%ragged
%raggedright
raggedleft
]{sidecap}   
\sidecaptionvpos{figure}{t} 
\begin{document}

\begin{SCfigure}
\includegraphics[width=5cm]{name}
\caption{I would like the caption to occupy say 0.2linewidth and be left (or right) adjusted and on top}\label{fig:testA}
\end{SCfigure}
\end{document}

enter image description here

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...