使用复选框创建多列

使用复选框创建多列

在此处输入图片描述

我需要用复选框创建多列。它应该像图中这样。请帮忙。

答案1

尝试制作一张表格。

代码:

    \documentclass{amsart}
    \usepackage{amssymb}
    \begin{document}
    \noindent
    \textbf{Clothing: Please place a check by the articles of clothing that you are wearing} (this is an indication as to the comfort level of your interior space):\\

    \begin{tabular}{ p{5cm}p{5.5cm}}

    \textbf{Top} & \textbf{Bottom}\\
    $\square$ Short Sleeve Shirt&$\square$ Trousers\\
    $\square$ Long Sleeve Shirt&$\square$ Knee -- Length Skirt\\
    $\square$ Sweater Vest&$\square$ Walking Shorts\\
    $\square$ Suit Vest&$\square$ Overalls\\
    $\square$ Long Sleeve Sweater&$\square$ Jeans\\
    $\square$ Long Sleeve Sweatshirt&$\square$ Athletic Sweat Pants\\
    $\square$ T-shirt&$\square$ Ankle -- Length Skirt\\
    $\square$ Thermal Underwear Top&$\square$ Thermal Underwear Bottoms\\
    \end{tabular}

\end{document} 

得出:

在此处输入图片描述

答案2

使用enumitem包很简单:

\documentclass{article}
\usepackage{amssymb}
\usepackage{tabularx}
\usepackage{enumitem}

\usepackage{showframe}
\renewcommand*\ShowFrameColor{\color{red}}

\begin{document}

\noindent\begin{tabularx}{\textwidth}{@{}XX@{}}
\hfil\textbf{Top}  &   \hfil\textbf{Bottom}   \\  
    \begin{itemize}[label=$\square$,leftmargin=*]
    \item test
    \item test
    \item test
    \end{itemize}   &
    \begin{itemize}[label=$\square$,leftmargin=*]
    \item test
    \item test
    \item test
    \end{itemize}
\end{tabularx}    
\end{document}

在此处输入图片描述

答案3

另一种可能性是multicols

\documentclass{amsart}
\usepackage{amssymb}
\usepackage{multicol}
\usepackage{enumitem}

\begin{document}
\noindent
\textbf{Clothing: Please place a check by the articles of clothing that you are wearing} (this is an indication as to the comfort level of your interior space):\\

\begin{multicols}{2}
top

bottom
\end{multicols}

\begin{multicols}{2}
\begin{itemize}[label=$\square$,leftmargin=*]
    \item test
    \item test
    \item test
    \item test
    \item test
    \item test
\end{itemize}
\end{multicols}

\end{document} 

在此处输入图片描述

答案4

这里有两个解决方案:一个使用ltablex,另一个使用tasks。两者都会破坏页面:

\documentclass{article}
\usepackage{amssymb} %
\usepackage{ltablex,tasks}
\keepXColumns
\usepackage{showframe}%
\renewcommand\ShowFrameLinethickness{0.3pt}

\begin{document}

\sffamily

\renewcommand\arraystretch{1.5}
\begin{tabularx}{\linewidth}{@{}>{$\square$\hspace{0.6em}}X>{$\square$\hspace{\labelsep}}X@{}}
  \multicolumn{2}{@{}p{\linewidth} @{}}{\textbf{Clothing: Please place a check by the articles of clothing that you are wearing} (this is an indication as to the comfort level of your interior space):\vspace{1ex}}\\
  \multicolumn{1}{c}{\bfseries Top} & \multicolumn{1}{c}{\bfseries Bottom} \\[0.5ex]
  \endfirsthead
  \multicolumn{1}{c}{\bfseries Top} & \multicolumn{1}{c}{\bfseries Bottom} \\[0.5ex]
  \endhead
  Short Sleeve Shirt & Trousers \\
  Long Sleeve Shirt & Knee -- Length Skirt \\
  Sweater Vest & Walking Shorts \\
  Suit Vest & Overalls \\
  Long Sleeve Sweater & Jeans \\
  Long Sleeve Sweatshirt & Athletic Sweat Pants \\
  T-shirt & Ankle -- Length Skirt \\
  Thermal Underwear Top & Thermal Underwear Bottoms %
\end{tabularx}

\noindent\textbf{Clothing: Please place a check by the articles of clothing that you are wearing} (this is an indication as to the comfort level of your interior space)
\begin{tasks}[label=$ \square $, item-indent =0pt](2)
  \task Short Sleeve Shirt
  \task Trousers%
  \task Long Sleeve Shirt \task Knee -- Length Skirt
  \task Sweater Vest
  \task Walking Shorts
  \task Suit Vest \task Overalls
  \task Long Sleeve Sweater \task Jeans
  \task Long Sleeve Sweatshirt \task Athletic Sweat Pants
  \task T-shirt \task Ankle -- Length Skirt
  \task Thermal Underwear Top \task Thermal Underwear Bottoms \end{tasks}

\end{document} 

在此处输入图片描述

相关内容