\documentclass{article}
\usepackage{multicol}
\usepackage{pgffor}
\usepackage[a4paper,top=0cm,bottom=0cm,left=0cm,right=0cm]{geometry}
\raggedcolumns
\newcommand{\ListItem}[1]{\underline{\makebox[2cm][l]{#1}}}
\begin{document}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\vspace{2cm}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\end{document}
答案1
- 要使小页面水平对齐,只需在前面插入空行即可
\vspace{2cm}
(这样两组小页面都会缩进) - 我不清楚,您是否将边距设置为零。在我看来,特别是如果您打算打印此文档,您应该设置最小边距,这样打印机才能轻松处理。我会使用以下前言:
\documentclass{article}
\usepackage{multicol}
\usepackage{pgffor}
\usepackage[a4paper,margin=10mm]{geometry}
\parindent=0mm
\newcommand{\ListItem}[1]{\underline{\makebox[\linewidth][l]{#1}}}
- 我会把迷你页面弄窄,并在它们之间插入距离
\hfill
(这样迷你页面就会均匀分布在文本宽度上
(红线表示页面布局)。
完整 mwe:
\documentclass{article}
\usepackage{multicol}
\usepackage{pgffor}
\usepackage[a4paper,margin=15mm]{geometry}
\parindent=0mm
% \raggedcolumns
\newcommand{\ListItem}[1]{\underline{\makebox[\linewidth][l]{#1}}}
%------------- show page layout. don't use this in real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}\hfill
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}\hfill
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}\hfill
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\vspace{2cm}
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}\hfill
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}\hfill
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}\hfill
\begin{minipage}{0.2\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\end{document}
答案2
简短回答:使用\noindent
\documentclass{article}
\usepackage{multicol}
\usepackage{pgffor}
\usepackage[a4paper,top=0cm,bottom=0cm,left=0cm,right=0cm]{geometry}
\raggedcolumns
\newcommand{\ListItem}[1]{\underline{\makebox[2cm][l]{#1}}}
\begin{document}
\noindent\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\vspace{2cm}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\end{document}
答案3
\documentclass{article}
\usepackage{multicol}
\usepackage{pgffor}
\usepackage[a4paper,top=0cm,bottom=0cm,left=0cm,right=0cm]{geometry}
\raggedcolumns
\newcommand{\ListItem}[1]{\underline{\makebox[2cm][l]{#1}}}
\begin{document}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\vspace{1.5cm}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\foreach \x in {Rice,pulse,Salt,Oil,Pepper,Onion,Garlic,Ginger,Salad,Chicken,Spice}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\end{document}