Quick Start
BHCexam.cls provides a LaTeX document class for typesetting exam papers. Mathcrowd Question Bank is using this document to export exam papers as PDF files.
This document class can achieve the following:
- Supports setting whether to display answers.
- Supports setting whether to use column layout.
- Supports setting alignment options.
- Supports automatically aligning the length of options to the grid.
- Supports reserving space for fill-in-the-blank answers based on answer length.
- Supports setting whether to display point values for question groups.
- Supports reserving space for answering questions.
- Supports resetting numbering for question groups.
- Supports sub-questions and sub-sub-questions in short-answer questions.
⚠️ Attention
Given the many exam paper generation platforms available, using this macro package to locally compile .tex
files to create exam papers would be highly inefficient for primary and secondary school teachers.
ℹ️ Information
If you are editing math notes or lecture slides and chose LaTeX primarily for its support for mathematical equations, cross-references, and theorem blocks, you might want to check out MMarked.
🎉 Portal
If you already have a private deployment of a question database and are struggling to organize LaTeX question data and generate PDF exam papers, this macro package is what you need. Please go to Integration with the Question Bank.
Usage (Cloud)
You can find an example in this Overleaf project and edit it based on that.
Usage (Local)
- Install
If you are using TeXLive, you can install it using the package manager
tlmgr install bhcexam
or from GitHub get BHCexam.cls latest,
unzip it, and copy BHCexam.cls
to folder texmf
or the same folder as your .tex
file to be compiled.
- Create
example.tex
.
\documentclass[answers]{BHCexam}
\begin{document}
\title{XXX中学高一第一学期期中考试}
\subtitle{数学}
\notice{满分150分, 120分钟完成.}
\author{命题人: XXX}
\date{2019.11.15}
\maketitle
\begin{groups}
\group{选择}{本题组共8小题, 共40.0分}
\begin{questions}[ps]
\question [5] 设$P,Q$为两个非空实数集,定义集合$P+Q=\{a+b|a\in{P},b\in{Q}\}$.若$P=\{0,2,5\}$,$Q=\{1,2,6\}$,则$P+Q$中元素的个数是\key{B}.
\fourchoices{$9$}{$8$}{$7$}{$6$}
\begin{solution}{4cm}
$\because P=\{0,2,5\}$,$Q=\{1,2,6\}$,
$\therefore P+Q=\{1,2,3,4,6,7,8,11\}$.
故选B
\end{solution}
...
\end{questions}
...
\end{groups}
\end{document}
delete answers
Document Class Options and recompile to generate the student version without answers.
- Use
xelatex
to compile.
xelatex example.tex
Get the exam document using BHCexam.
In the Mathcrowd Question Bank, all exam resources are available for export in .tex
document format, and all use the BHCexam package. You can download them locally for editing and compilation. Additionally, you can support the community to gain more free download quotas.