mathedu4all / bhcexam Goto Github PK
View Code? Open in Web Editor NEWThe BHCexam document class attempts to make it easy for even a LaTeX novice to prepare exams.
Home Page: https://www.mathcrowd.cn
The BHCexam document class attempts to make it easy for even a LaTeX novice to prepare exams.
Home Page: https://www.mathcrowd.cn
从题库中下载的试卷运行中报错,已经正确安装了wget(题目中的图片可以加载),在反复测试中定位到错误的位置为qrcode
和maketitle
:
ERROR: cannot verify www.mathcrowd.cn's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=Encryption Everywhere DV TLS CA - G1': Unable to locally verify the issuer's authority. To connect to www.mathcrowd.cn insecurely, use `--no-check-certificate'. 无法建立 SSL 连接。
Undefined control sequence. \maketitle
下面为测试所用内容,题目部分可以正常加载,所以此处仅用test word
替代,测试并不影响报错信息
\documentclass[a4paper, windows]{BHCexam}
\begin{document}
\write18{wget 'http://www.mathcrowd.cn/index.php?r=worksheet/qrcode&id=OnM8' -O qrcode.png}
\logo{qrcode.png}
\title{2019年全国3高考}
\subtitle{数学文科试卷}
\notice{满分150分, 120分钟完成, 允许使用计算器,答案一律写在答题纸上.}
\author{微信关注公众号:橘子数学}
\date{}
\maketitle
test words
\end{document}
OUTPUT:
编译环境为:win10+texlive2019+BHCexam v1.0.
BHCexam.cls
中maketitle
部分定义:
\renewcommand*{\title}[1]{\gdef\@title{#1}}
\newcommand*{\subtitle}[1]{\gdef\@subtitle{#1}}
\newcommand*{\notice}[1]{\gdef\@notice{#1}}
\renewcommand*{\author}[1]{\gdef\@author{#1}}
\renewcommand*{\date}[1]{\gdef\@date{#1}}
\newcommand*{\logo}[1]{\gdef\@logo{#1}}
\renewcommand\maketitle{\begingroup
\renewcommand{\baselinestretch}{2}
\newpage
\IfFileExists{\@logo}{
\begin{minipage}{0.1\textwidth}
\includegraphics[width=1.5cm]{\@logo}
\end{minipage}
}{}
\begin{minipage}{0.9\textwidth}
\begin{center}
\heiti \Large
\@title \par
\@subtitle \par
\ifdefempty{\@notice}{}{
\fbox{\normalsize \@notice} \par
}
\songti \normalsize \@author \par
\end{center}
\end{minipage}
\begin{flushright}
\small \@date \par
\end{flushright}
\songti \normalsize
\endgroup}
是否应该将 \renewcommand
放到 \AtBeginDocument
内?
按照 ISO 和国标的要求应该用正体的 i。
「A」前面的逗号应该用中文逗号,西文逗号的用法要在后面接空格,这里的逗号和「A」太靠近。
另外如果要用开明式标点符号,应该用 ctex
设置 punct = kaiming
。句点可以用 xeCJK
的 Mapping = fullwidth-stop
功能将「。」映射为「.」(U+FF0E 全宽句点),不应用西文的半宽句点「.」。
补集应该用 \complement
。
按照 ISO 和国标的要求,数值和单位间留适当空隙。建议使用 siunitx
宏包处理国际单位:\SI{105}{cm}
。
应该用 \sin
和 \cos
得到正体的三角函数符号,按照 ISO 和国标的要求这里的 \pi
也要用正体。
这里应该用数学模式,\dots 后也应该有逗号。
印刷品的向量一般用粗斜体。
I start with the following:
\begin{solution}
\begin{figure}[htbp]
.......
\end{figure}
\end{solution}
不能通过编译,但吧figure放在solution外面,就可以通过编译
将
Lines 406 to 443 in cb920dc
\newcommand{\fourchoices}[4]{
\if@showparen \dotfill (\qquad) \fi
\par
\settowidth{\choicelengtha}{A.~#1~~~}
\settowidth{\choicelengthb}{B.~#2~~~}
\settowidth{\choicelengthc}{C.~#3~~~}
\settowidth{\choicelengthd}{D.~#4~~~}
\ifthenelse{\lengthtest{\choicelengtha>\choicelengthb}}{\setlength{\maxlength}{\choicelengtha}}{\setlength{\maxlength}{\choicelengthb}}
\ifthenelse{\lengthtest{\choicelengthc>\maxlength}}{\setlength{\maxlength}{\choicelengthc}}{}
\ifthenelse{\lengthtest{\choicelengthd>\maxlength}}{\setlength{\maxlength}{\choicelengthd}}{}
\ifthenelse{\lengthtest{\maxlength>0.4\linewidth}}
{
\begin{tabularx}{\linewidth}{X}
\setlength\tabcolsep{0pt}
A.~#1~~~\\
B.~#2~~~\\
C.~#3~~~\\
D.~#4~~~\\
\end{tabularx}
}%
{
\ifthenelse{\lengthtest{\maxlength>0.2\linewidth}}
{
\begin{tabularx}{\linewidth}{XX}
\setlength\tabcolsep{0pt}
A.~#1~~~ & B.~#2~~~\\
C.~#3~~~ & D.~#4~~~\\
\end{tabularx}
}%
{
\begin{tabularx}{\linewidth}{XXXX}
\setlength\tabcolsep{0pt}
A.~#1~~~ & B.~#2~~~ & C.~#3~~~ & D.~#4~~~\\
\end{tabularx}
}%
}
\unskip \unskip
}
其它两个命令同理
有的题目是求解,所以用\begin{solution}-“解:“ ,但有的题目是证明,这是用\begin{solution}似乎有点很准确。如何针对“证明题“用“证明:“或“证:”的词冠
如何修改默认字体为思源宋体?
建议将 可选参数s(显示分数)调整到整张试卷,即作为文档的参数,而不是试题的参数
从网站下载的BHCexam
文件放到测试文件同一目录下,编译报错,删掉所有的wget
部分,依然无法运行.
经过测试查错,终于运行成功,故特列出以下几个可能的问题:
\documentclass[a4paper,windows]{BHCexam}
xelatex
编译,且文件名不能为中文;|
,《
等)去掉
\begin{groups}
\end{groups}。
groups环境作用于整张试卷,没有必要设置该环境
\RequirePackage{amsmath,amsmath,amssymb} % ams数学相关
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.