我一直在尝试使用迷你页面来制作与 Office 文本框相当的内容。这个想法是在一页上放置不同大小的面板,例如 4 个大小相同的面板或一个宽面板后面跟着两个长面板。
下面我有一个相当笨拙的解决方案。有没有更好的方法可以做到这一点,以便我可以更加灵活。例如,我是否可以用英寸、厘米或磅来指定迷你页面的高度?
谢谢
\documentclass[landscape]{article}
\usepackage{microtype}
\geometry{letterpaper}
\usepackage{wallpaper}
\ULCornerWallPaper{1.0}{/Users/tahnoon/Dropbox/Projects/ai_ppt.pdf} \topmargin=0.25in \headheight=1in \headsep=0.1in
\usepackage{lipsum}
\begin{document}
\null
\vspace{-3cm}
\setlength{\tabcolsep}{0.4cm}
\begin{tabular}{p{0.35\paperwidth} p{0.35\paperwidth}}
\fbox{
\begin{minipage}[t][0.35\paperheight]{0.35\paperwidth}
\lipsum[1]
\end{minipage}}
&
\fbox{\begin{minipage}[t][0.35\paperheight]{0.35\paperwidth}
\lipsum[4]
\end{minipage}} \\
&\\
\fbox{\begin{minipage}[t][0.35\paperheight]{0.35\paperwidth}
\lipsum[2]
\end{minipage}} &
\fbox{\begin{minipage}[t][0.35\paperheight]{0.35\paperwidth}
\lipsum[3]
\end{minipage} }\\
\end{tabular}
\end{document}
答案1
\documentclass[10pt,landscape]{article}
%\usepackage{geometry} %
\usepackage[letterpaper,top=0.75in, bottom=0.75in, left=2.2in, right=0.75in,showframe]{geometry}
\usepackage{microtype}
\usepackage{wallpaper}
\ULCornerWallPaper{1.1}{ai_ppt}
\usepackage{lipsum}
\begin{document}
\noindent
\fbox{%
\begin{minipage}[c][\dimexpr 0.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr\textwidth-2\fboxsep-2\fboxrule\relax}
\lipsum[1]
\end{minipage}%
}%
\vfill
\noindent
\fbox{%
\begin{minipage}[l][\dimexpr 0.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr 0.495\textwidth-2\fboxsep-2\fboxrule\relax}%
\lipsum[2]
\end{minipage}%
}%
\hfill
\fbox{%
\begin{minipage}[r][\dimexpr 0.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr 0.495\textwidth-2\fboxsep-2\fboxrule\relax}%
\lipsum[4]
\end{minipage}%
}%
%
\newpage
%
\noindent
\fbox{%
\begin{minipage}[l][\dimexpr\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}
\lipsum[1]
\end{minipage}%
}%
\hfill
\begin{minipage}[r][\textheight][t]{.495\textwidth}
\noindent\fbox{%
\begin{minipage}[c][\dimexpr 0.49\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr \textwidth-2\fboxsep-2\fboxsep\relax}%
\lipsum[2]
\end{minipage}
}
\vfill
\fbox{%
\begin{minipage}[c][\dimexpr 0.49\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr \textwidth-2\fboxsep-2\fboxsep\relax}%
\lipsum[2]
\end{minipage}
}
\end{minipage}%
%
\newpage
%
\noindent
\fbox{%
\begin{minipage}[l][\dimexpr.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}
\lipsum[1]
\end{minipage}%
}%
\hfill
\fbox{%
\begin{minipage}[r][\dimexpr 0.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}%
\lipsum[2]
\end{minipage}%
}%
\vfill
\noindent
\fbox{%
\begin{minipage}[l][\dimexpr 0.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}%
\lipsum[4]
\end{minipage}%
}%
\hfill
\fbox{%
\begin{minipage}[r][\dimexpr 0.495\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}%
\lipsum[2]
\end{minipage}%
}%
\end{document}
答案2
您可以在循环中更紧凑地完成 Harish Kumar 解决方案中的所有操作。
\documentclass[landscape]{article}
\usepackage[top=0.75in,bottom=0.75in,left=2in,right=0.75in]{geometry}
\usepackage{pgffor}
\usepackage{lipsum}
\begin{document}
\foreach \x/\y/\z/\p/\q in {.48/.937/l/1/\vfil, .48/.45/l/1/\hfil,
.48/.45/r/1/\newpage, 1/.45/l/1/\hfill,1/.5/r/1/\newpage}{%
\noindent\fbox{%
\begin{minipage}[\z][\dimexpr\x\textheight-2\fboxsep\relax]
[t]{\dimexpr\y\textwidth\relax}%
\lipsum[\p]
\end{minipage}%
}\q
}
\end{document}