2

I am creating fill-in the blank notes for my class using the Censor package, a solution I found on this forum here.

What I can't figure out is how to make the blanks for my students to fill in longer -- ie, I don't want text to be ____ but more like ____________ since most people don't have tiny, perfect handwriting. Is there a way to add a multiplier to the length of the blank or replace a character with, say, two or three underscores instead of one so that normal people can fit their handwriting in one of the blanks?

If someone has a different, cleaner solution that would be great too; the post explains the gist of what I need to do.

1 Answers1

1

Taking the code at the referenced question, I have modified \censor@box to print a double-wide box and \@cenword to print a double-wide underline.

\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}

enter image description here