答案1
这里有一种使用包的可能性tikzpagenodes
,它提供了(current page text area)
节点,因此它将适应不同的文档类、边距设置等。您必须编译两次。
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\tikzset{quarterpage/.style={draw, text width=.47*\textwidth, minimum height=.5*\textheight,
minimum width=.5*\textwidth, text depth=.47*\textheight, label={[yshift=8mm]below:\rule{.35\textwidth}{.7pt}}}}
\newcommand{\posA}{($.5*(current page text area.north west)+.5*(current page text area)$)}
\newcommand{\posB}{($.5*(current page text area.north east)+.5*(current page text area)$)}
\newcommand{\posC}{($.5*(current page text area.south west)+.5*(current page text area)$)}
\newcommand{\posD}{($.5*(current page text area.south east)+.5*(current page text area)$)}
\begin{document}
\begin{tikzpicture}[remember picture, overlay]
\node[quarterpage]at\posA{Here is problem 1. Please show your work in the space provided and write your answer at the bottom.};
\node[quarterpage]at\posB{Here is problem 2. Please show your work in the space provided and write your answer at the bottom.};
\node[quarterpage]at\posC{Here is problem 3. Please show your work in the space provided and write your answer at the bottom.};
\node[quarterpage]at\posD{Here is problem 4. Please show your work in the space provided and write your answer at the bottom.};
\end{tikzpicture}
\end{document}
答案2
这是你想要的?
\documentclass[12pt]{article}
\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\thispagestyle{empty}
\tikz[overlay,remember picture]
\draw[line width=2pt]($ (current page.north west)+(1cm,-1.2cm)$ ) rectangle ($ (current page.south east)+(-1cm,1.2cm)$);
\tikz[overlay,remember picture]\draw[line width=1pt]($ (current page.north)+(0,-1.2cm)$ ) rectangle ($ (current page.south)+(0,1.2cm)$);
\tikz[overlay,remember picture]\draw[line width=1pt]($ (current page.west)+(1cm,0)$ ) rectangle ($ (current page.east)+(-1cm,0)$);
Here you can write your text...
\end{document}
答案3
这不是最好的方法,但你可以使用以下方法来实现minipage
:
\documentclass[12pt]{article}
\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{blindtext}
\begin{document}
\thispagestyle{empty}
\tikz[overlay,remember picture]
\draw[line width=2pt]($ (current page.north west)+(1cm,-1.2cm)$ ) rectangle ($ (current page.south east)+(-1cm,1.2cm)$);
\tikz[overlay,remember picture]\draw[line width=1pt]($ (current page.north)+(0,-1.2cm)$ ) rectangle ($ (current page.south)+(0,1.2cm)$);
\tikz[overlay,remember picture]\draw[line width=1pt]($ (current page.west)+(1cm,0)$ ) rectangle ($ (current page.east)+(-1cm,0)$);
\begin{minipage}[0.4\textheight]{0.4\textwidth}
\blindtext
\end{minipage}\hspace{0.12\linewidth}
\begin{minipage}[0.4\textheight]{0.4\textwidth}
\blindtext
\end{minipage}
\vspace{0.15\textwidth}
\begin{minipage}[0.4\textheight]{0.4\textwidth}
\blindtext
\end{minipage}\hspace{0.12\linewidth}
\begin{minipage}[0.4\textheight]{0.4\textwidth}
\blindtext
\end{minipage}
\end{document}
答案4
另一个解决方案是使用tcbraster
(来自tcolorbox
)。您可以轻松地为每个框定义不同的方面。
\documentclass[a4paper]{article}
\usepackage[margin={1cm}]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
\begin{document}
\thispagestyle{empty}
\begin{tcbraster}[raster columns=2, raster rows=2, raster height=\textheight,
enhanced, sharp corners, raster column skip=-.5mm,
raster row skip=-.5mm, colback=white, underlay={\draw[red]([shift={(5mm,5mm)}]frame.south west)--([shift={(-5mm,5mm)}]frame.south east);},
watermark text={\thetcbrasternum}]
\begin{tcolorbox}
\lipsum[1]
\end{tcolorbox}
\begin{tcolorbox}
\lipsum[2]
\end{tcolorbox}
\begin{tcolorbox}
\lipsum[3]
\end{tcolorbox}
\begin{tcolorbox}
\lipsum[4]
\end{tcolorbox}
\end{tcbraster}
\end{document}