从考试类别中删除问题编号

从考试类别中删除问题编号

我正在使用考试类来创建表格。我想删除问题编号,因为将问题编号放在表格中没有意义。可以这样做吗?

这是 MWE

\documentclass[a4paper]{exam}
\usepackage{multicol, setspace}
\usepackage{textcomp, booktabs,colortbl}
\usepackage[table]{xcolor}
\setlength\columnsep{10pt}
\newcommand\YesNo{%
\hfill\mbox{\begin{oneparcheckboxes}
    \choice Yes
    \choice No
\end{oneparcheckboxes}}}
\onehalfspacing
\begin{document}

\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
OPD ENCOUNTER FORM}}}
\end{center}
\vspace{0.1in}

\makebox[\textwidth]{Name :\enspace\hrulefill}
\begin{multicols}{2}
\vspace{0.2in}
\makebox[0.45\textwidth]{Age:\enspace\hrulefill}
\makebox[0.5\textwidth]{Sex:\enspace\hrulefill}
\end{multicols}
\makebox[\textwidth]{Address:\enspace\hrulefill}

\begin{multicols}{2}
\makebox[0.45\textwidth]{Dated: \enspace\hrulefill}
\makebox[0.45\textwidth]{Ref: \enspace\hrulefill} 
\end{multicols} 
\begin{document}
\begin{questions}
\question I do not want it to be numbered
\question I do not need numbered question either 
\end{questions}
\end{document} 

答案1

您可以添加\qformat{}丢弃问题编号。此外,如果您不想缩进,请添加

\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
}

然后。

\documentclass[a4paper]{exam}
\usepackage{multicol, setspace}
\usepackage{textcomp, booktabs,colortbl}
\usepackage[table]{xcolor}
\setlength\columnsep{10pt}
\newcommand\YesNo{%
\hfill\mbox{\begin{oneparcheckboxes}
    \choice Yes
    \choice No
\end{oneparcheckboxes}}}
\onehalfspacing

\qformat{}                           %% This will remove question numbers.
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
}
\begin{document}

\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
OPD ENCOUNTER FORM}}}
\end{center}
\vspace{0.1in}

\makebox[\textwidth]{Name :\enspace\hrulefill}
\begin{multicols}{2}
\vspace{0.2in}
\makebox[0.5\textwidth]{Age:\enspace\hrulefill}%
\makebox[0.5\textwidth]{Sex:\enspace\hrulefill}
\end{multicols}
\makebox[\textwidth]{Address:\enspace\hrulefill}

\begin{multicols}{2}
\makebox[0.5\textwidth]{Dated: \enspace\hrulefill}%
\makebox[0.5\textwidth]{Ref: \enspace\hrulefill}
\end{multicols}
\begin{questions}
\question I do not want it to be numbered
\question I do not need numbered question either
\end{questions}
\end{document}

相关内容