Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qrcode下载失败,maketitle报错但运行 #6

Closed
ghost opened this issue Dec 27, 2019 · 1 comment
Closed

qrcode下载失败,maketitle报错但运行 #6

ghost opened this issue Dec 27, 2019 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Dec 27, 2019

从题库中下载的试卷运行中报错,已经正确安装了wget(题目中的图片可以加载),在反复测试中定位到错误的位置为qrcodemaketitle:

  1. qrcode.png 下载提示SSL错误(题目中图片可正常下载)
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 连接。
  1. maketitle 报错:
Undefined control sequence. \maketitle

error
下面为测试所用内容,题目部分可以正常加载,所以此处仅用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:

title

编译环境为:win10+texlive2019+BHCexam v1.0.
BHCexam.clsmaketitle部分定义:

\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}
@mathedu4all mathedu4all added the bug label Jan 2, 2020
@mathedu4all
Copy link
Owner

为了用户编译的便利,网站已经放弃使用wget,而提供tex、cls以及图片的打包下载,解压缩即可编译.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant