我有一个类似的问题,例如:
不幸的是,我尝试包含图像,但这种方式似乎不起作用。
我已按照上述问题的答案之一所建议的方式尝试了以下操作:
\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage{booktabs}
\usepackage{hvfloat}
\begin{document}
\section{Test Section with Several Rotated Objects}
\hvFloat[%
nonFloat=true,%
capWidth=w,%
capPos=t,%
rotAngle=90,%
objectPos=c%
]\begin{figure}
\centering
\setlength\fboxsep{0pt}
\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[scale=0.5,trim=33 355 137 50, clip=true]{image1}
\includegraphics[scale=0.5,trim=55 135 65 135, clip=true]{image2}}
\caption{caption.}
\label{img:caption}
\end{figure}
\end{document}
但这会返回错误:
! Argument of \caption@ydblarg has an extra }.
<inserted text>
\par
l.12 \setlength
\fboxsep{0pt}
有人能给我指明正确的方向吗?谢谢。
答案1
请阅读文档浮动因为您没有使用它的任何语法。
您的示例的来源应该是:
% arara: pdflatex
\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage[demo]{graphicx}
\usepackage{hvfloat}
\begin{document}
\section{Test Section with Several Rotated Objects}
\hvFloat[%
nonFloat=true,%
capWidth=w,%
capPos=t,%
rotAngle=90,%
objectPos=c%
]{figure}{%
\setlength\fboxsep{0pt}
\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[scale=0.5,trim=33 355 137 50, clip=true]{image1}
\includegraphics[scale=0.5,trim=55 135 65 135, clip=true]{image2}}
}{caption.}{img:caption}
\end{document}