
나는 동적 크기의 셀을 갖고 수동이 아닌 매크로를 사용하여 채울 수 있도록 multicol
및 를 사용하여 테이블을 묶고 있습니다 .rule
대부분 작동하지만 열 사이의 선 높이를 줄이고 싶습니다. 내가 이것을 어떻게 구축하고 있는지에 대한 예와 전체 문서의 결과가 어떻게 보이는지 그림을 확인하세요.
\documentclass{article}
\usepackage[a5paper,margin=15mm, top=0.8cm, bottom=0.7cm, left=1cm, right=1cm,headsep=2pt]{geometry}
\usepackage{multicol}
\newcounter{qnumber}
\setcounter{qnumber}{0}
\newcommand{\question}[1]{%
\rule{\columnwidth}{0.01pt} \newline
\stepcounter{qnumber}
Q\theqnumber. \textsf{#1}
\vspace{4.5mm}
}
\begin{document}
\pagestyle{intervention}
\thispagestyle{intervention}
\setlength{\columnseprule}{0.1pt}
\section*{Week 1}
\begin{multicols}{2}
\question{Calculate the following:
\begin{enumerate}[(a)]
\item $10 \times 0.5$
\item $10 \times 0.25$
\end{enumerate}
}
\end{multicols}
\end{document}
다음과 같은 출력을 생성합니다.
이 높이를 어떻게 줄일 수 있나요?
답변1
다음은 tikz
.
\mypagerule
나는 페이지 상단과 하단으로부터의 거리(cm 단위)를 각각 나타내는 두 개의 인수를 사용하여 매크로를 만들었습니다 .
페이지마다 설정해야 하는데 올려주신 이미지를 보면 한 페이지만 있는 것 같네요.
코드는 다음과 같습니다(컴파일 가능하도록 수정했습니다).
\documentclass{article}
\usepackage[a5paper,top=0.8cm, bottom=0.7cm, left=1cm, right=1cm,headsep=2pt]{geometry}
\usepackage{multicol}
\usepackage{enumitem}
\setenumerate{label={(\alph*)},leftmargin=*}
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand{\mypagerule}[2]{%
\begin{tikzpicture}[overlay,remember picture]
\draw($(current page.north)-(0,#1)$)--($(current page.south)+(0,#2)$);% --
\end{tikzpicture}
}
\newcounter{qnumber}
\setcounter{qnumber}{0}
\newcommand{\question}[1]{%
\noindent
\rule{\columnwidth}{0.01pt} \newline
\stepcounter{qnumber}
Q\theqnumber.~\textsf{#1}
\vspace{4.5mm}
}
\begin{document}
\section*{Week 1}
\begin{multicols}{2}
\question{Calculate the following:
\begin{enumerate}
\item $10 \times 0.5$
\item $10 \times 0.25$
\end{enumerate}
}
\question{Calculate the following percentage:
\begin{enumerate}
\item $10$\% of $500$
\item $5$\% of $500$
\end{enumerate}
}
\question{Round the following numerbers (I don't know the rest of the question):
\begin{enumerate}
\item $10.456789789$
\item $51.5454844$
\end{enumerate}
}
\question{The following question is about Standard Form:
\begin{enumerate}
\item Express $3600$ in standard form
\item Write $2.1 \times {10}^{3}$ as a normal number
\end{enumerate}
}
\question{Mr Wilson and Mr Bedford have a peanlty shoot-out. The probability of Mr Wilson scoring is 0.4:
\begin{enumerate}
\item What is the probability he misses?
\end{enumerate}
}
\question{Ten students take ten penalties each. The number that each of them scores is below:
\begin{enumerate}
\item $1$
\item $2$
\item $3$
\item $4$
\item $5$
\item $6$
\item $7$
\item $8$
\item $9$
\item $10$
\end{enumerate}
}
\mypagerule{2}{6}
\end{multicols}
\end{document}
출력은 다음과 같습니다(실제 선의 두께는 정확합니다. 그림에서는 두꺼워 보이지만 그렇지 않습니다).
답변2
여기에 더 나은 해결책을 기다리는 우아하지 못한 해결책이 있습니다. 단순히 각 셀을 정의하는 s를 발생시킵니다 \rule
. 주석 처리된 부분은 더 나은 솔루션에 대한 잠재적인 단서이지만... 작동할 수 없습니다.
\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{multicol}
\usepackage{graphicx}
\begin{document}
\setlength{\columnseprule}{0.1pt}
%\def\columnseprulecolor{%
%\rotatebox{90}{\makebox[0.4\textheight][c]{\rule{0.4\textheight}{0.1pt}}}
% }%
\section*{Section Title}
\begin{multicols}{2}
\noindent\raisebox{2.25ex}{\rule{\columnwidth}{0.01pt}}
Here is some content, in its own cell defined by the column separator rule and the rules above and below it.\vspace{5ex}
\raisebox{2.25ex}{\rule{\columnwidth}{0.01pt}}
Here is some content, in its own cell defined by the column separator rule and the rules above and below it.\vspace{5ex}
\raisebox{2.25ex}{\rule{\columnwidth}{0.01pt}}
Here is some content, in its own cell defined by the column separator rule and the rules above and below it.\vspace{5ex}
\raisebox{2.25ex}{\rule{\columnwidth}{0.01pt}}
Here is some content, in its own cell defined by the column separator rule and the rules above and below it.\vspace{5ex}
\raisebox{2.25ex}{\rule{\columnwidth}{0.01pt}}
Here is some content, in its own cell defined by the column separator rule and the rules above and below it.\vspace{5ex}
\raisebox{2.25ex}{\rule{\columnwidth}{0.01pt}}
Here is some content, in its own cell defined by the column separator rule and the rules above and below it.\vspace{5ex}
\end{multicols}
\end{document}