![将节标题和旋转图像保持在同一页面上](https://linux22.com/image/308444/%E5%B0%86%E8%8A%82%E6%A0%87%E9%A2%98%E5%92%8C%E6%97%8B%E8%BD%AC%E5%9B%BE%E5%83%8F%E4%BF%9D%E6%8C%81%E5%9C%A8%E5%90%8C%E4%B8%80%E9%A1%B5%E9%9D%A2%E4%B8%8A.png)
我有一个类似的问题,例如:
不幸的是,我尝试包含图像,但这种方式似乎不起作用。
我已按照上述问题的答案之一所建议的方式尝试了以下操作:
\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}