我希望将这些图片打印在同一页上,以便我可以将它们剪下来。如果它们之间没有水平间隙就好了。修剪标记可获得加分!
M(n)WE:
\documentclass[a4paper]{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[ht]
\centering
\includegraphics[width=18cm,height=13cm]{example-image-a}
\includegraphics[width=18cm,height=13cm]{example-image-b}
\end{figure}
\end{document}
答案1
在你的序言中输入这一行:
\usepackage[left=0cm,right=0cm,top=0cm,bottom=0cm]{geometry}
答案2
\documentclass[a4paper]{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[p]
\centering
\vspace{-3cm}
\makebox[0pt]{\fbox{\begin{minipage}{18cm}
\includegraphics[width=\linewidth,height=13cm]{example-image-a}\\[-\lineskip]
\includegraphics[width=\linewidth,height=13cm]{example-image-b}
\end{minipage}}}
\end{figure}
\end{document}
答案3
我认为保持图像的纵横比很重要。因此,我建议您替换选项
width=18cm, height=13cm
和
width=\textwidth, height=0.475\textheight, keepaspectratio
当然,你也可以(可能也应该)设置\textwidth
和的值\textheight
。要间接设置它们,你可以geometry
使用以下选项加载包:
\usepackage[margin=1mm,a4paper]{geometry}
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[margin=1mm,a4paper]{geometry}
\begin{document}
\begin{figure}[p!]
%\caption{Hello World} % <-- optional
\centering
\includegraphics[width=\textwidth,height=0.475\textheight,keepaspectratio]{example-image-a}
\includegraphics[width=\textwidth,height=0.475\textheight,keepaspectratio]{example-image-b}
\end{figure}
\end{document}