我有 5 个不同的 pdf 文件/页面,其中两个是 A3 格式(横向),其余 4 个是 A4 格式(纵向)。
现在我想按照以下顺序将它们排列在一张 A1 页面上:
_________ _________
| | |
| A3 | A3 |
|_________|_________|
| | | | |
| A4 | A4 | A4 | A4 |
|____|____|____|____|
我已经尝试使用该pdfpages
包。使用以下代码,我能够排列 A1 页以及 A4 页。但 A4 页始终位于单独的页面上。
\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{pdfpages}
\geometry{a1paper, landscape, margin=0mm}
\begin{document}
\includepdfmerge[nup=2x1]{zeichnung1.pdf, zeichnung2.pdf}
\includepdfmerge[nup=4x1]{zeichnung3.pdf, zeichnung4.pdf, zeichnung5.pdf, zeichnung6.pdf}
\end{document}
还有一点,我不希望页面之间或侧边有任何边距。我必须安排技术图纸,因此它们必须完美契合。
提前致谢!
弗里德
答案1
您可以简单地使用tabular
环境来调整图形,如下所示:
\documentclass[]{article}
\usepackage{graphicx}
\usepackage{geometry}
\geometry{a1paper, landscape, margin=0mm}
\begin{document}
\begin{tabular}{*{2}{@{}c@{}}}
\includegraphics{zeichnung1.pdf} & \includegraphics{zeichnung2.pdf} \\
\includegraphics{zeichnung3.pdf}\includegraphics{zeichnung4.pdf} &
\includegraphics{zeichnung5.pdf}\includegraphics{zeichnung6.pdf} \\
\end{tabular}
\end{document}
答案2
我要感谢 javadr 的回答,这很有帮助。唯一让我感到不满意的是页面之间的边距。
但我想我找到了一个解决方案。我使用 TikZ。我不是 TikZ 专家(但谁能用如此庞大的软件包称自己是专家呢?)
以下代码对我来说很好用:
\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzstyle{node}=[inner sep=0pt, anchor=north west]
\geometry{a1paper, landscape, margin=0mm}%, left=-7mm}%
\begin{document}
\begin{tikzpicture}[remember picture, overlay, x=1mm, y=1mm]
\coordinate (N) at (current page.north);
\coordinate (NW) at (current page.north west);
\coordinate (NE) at (current page.north east);
\coordinate (E) at (current page.east);
\coordinate (S) at (current page.south);
\coordinate (SW) at (current page.south west);
\coordinate (SE) at (current page.south east);
\coordinate (W) at (current page.west);
\coordinate (C) at (current page.center);
\coordinate (WC) at ($(W)!0.5!(C)$);
\coordinate (SWC) at ($(SW)!0.5!(S)$);
\coordinate (EC) at ($(E)!0.5!(C)$);
\coordinate (SEC) at ($(SE)!0.5!(S)$);
\node[node] at (NW) {\includegraphics{zeichnung1.pdf}};
\node[node] at (N) {\includegraphics{zeichnung2.pdf}};
\node[node] at (W) {\includegraphics{zeichnung3.pdf}};
\node[node] at (WC) {\includegraphics{zeichnung4.pdf}};
\node[node] at (C) {\includegraphics{zeichnung5.pdf}};
\node[node] at (EC) {\includegraphics{zeichnung6.pdf}};
\draw[line width=0.5mm]
(N) -- (S)
(W) -- (E)
(WC) -- (SWC)
(EC) -- (SEC);
\draw[line width=0.7mm]
($(NW) + (5,-5)$) rectangle ($(C) + (-5,5)$)
($(N) + (5,-5)$) rectangle ($(E) + (-5,5)$)
($(W) + (5,-5)$) rectangle ($(SWC) + (-5,5)$)
($(WC) + (5,-5)$) rectangle ($(S) + (-5,5)$)
($(C) + (5,-5)$) rectangle ($(SEC) + (-5,5)$)
($(EC) + (5,-5)$) rectangle ($(SE) + (-5,5)$);
\end{tikzpicture}
\end{document}
(在此代码中我添加了一些我需要的框线)
祝你一切顺利!Frieder