![使用审查员填写空白笔记](https://linux22.com/image/467696/%E4%BD%BF%E7%94%A8%E5%AE%A1%E6%9F%A5%E5%91%98%E5%A1%AB%E5%86%99%E7%A9%BA%E7%99%BD%E7%AC%94%E8%AE%B0.png)
我正在使用 Censor 包为我的课程创建填空笔记,这是我在这个论坛上找到的解决方案这里。
我不知道如何让学生填写的空白更长——也就是说,我不想文本成为____但更像是____________因为大多数人的笔迹都不是那么完美。有没有办法给空格的长度增加一个倍数,或者用两个或三个下划线代替一个字符,这样普通人就可以在其中一个空格中写上自己的笔迹?
如果有人有一个不同的、更清晰的解决方案那就太好了;这篇文章解释了我需要做的事情的要点。
答案1
采用所引用问题中的代码,我进行了修改,\censor@box
以打印双宽框和\@cenword
打印双宽下划线。
\documentclass{article}
\usepackage{censor,xcolor}
\censorruledepth=-.2ex
\censorruleheight=.1ex
\makeatletter
\renewcommand\StopCensoring{%
\def\censor##1{\textcolor{blue}{##1}}%
\def\censorbox##1{\bgroup\color{blue}\un@censorbox{##1}\egroup}%
\let\xblackout\blackout%
}
\renewcommand\censor@box[2][]{\fboxsep=0pt\fbox{\color{white}%
#1\setbox0\hbox{#2#2}% <---DOUBLE-WIDE BOX
\rule[-\the\dp0]{\the\wd0}{\the\ht0+\the\dp0}}}
\renewcommand\@cenword[1]{\censorrule{\widthofpbox{#1#1}}}% <--- DOUBLE WIDE UNDERLINE
\makeatother
\begin{document}
And the answer is \censor{forty two}.
\StopCensoring
And the answer is \censor{forty two}.
\RestartCensoring
The beginning six words of the Gettysburg Address are \blackout{Four score and seven years ago}.
\StopCensoring
The beginning six words of the Gettysburg Address are \blackout{Four score and seven years ago}.
\RestartCensoring
The tabular answer is
\censorbox{\begin{tabular}{|c|c|}\hline a & b\\ \hline\end{tabular}}
\StopCensoring
The tabular answer is
\censorbox{\begin{tabular}{|c|c|}\hline a & b\\ \hline\end{tabular}}
\end{document}