Putting “dangerous bend” symbols in the margin of difficult tutorial questions.

Nick Urbanik

May 26, 1997

Abstract

Use this to indicate which tutorial questions are more difficult (or less relevant to the core syllabus!)

1 Producing the documentation

Here is a short driver program that can be extracted with the L^{A}TEX2e docstrip program.

1 ⟨∗driver⟩

 2 \documentclass{article}%
 3 \usepackage{a4,doc}
 4 \EnableCrossrefs   % Make a full index.
 5 \CodelineIndex     % Index by line numbers rather than by page.
 6 \RecordChanges     % Show change history.
 7 \begin{document}
 8 \DocInput{dbend.dtx}
 9 \PrintIndex
10 \PrintChanges

Now tell the people what they need to do next to get the index and change list:

11 \message{Next, to make the index and changes list for this documentation:}
12 \message{2. makeindx -s gind.ist dbend}
13 \message{3. makeindx -s gglo.ist -o dbend.gls dbend.glo}
14 \message{Finally, run this file through LaTeX once more.}
15 \end{document}

16 ⟨/driver⟩

17 ⟨∗package⟩

18 \ProvidesPackage{dbend}[97/05/26 ver 1.0 Creates dangerous bend in
19 the margin]

It’s all in Don Knuth’s manfnt font.

20 \font\manual=manfnt

The dbend macro puts the double bend symbol right there, but it has greater depth than the manfnt.tfm file indicates, so it overwrites what comes below it, but it does not change the line spacing.

21 \def\dbend{{\manual\char127}}

bend The bend macro puts the double bend symbol right there, hopefully not overwriting any other text. However, it can increase the line spacing for that line.

22 \newcommand*{\bend}{\parbox[t][4.3ex][t]{1.5em}{\dbend\vfill}}
23 %\newcommand*{\tricky}{\llap{\dbend\hspace*{15mm}}}

tricky The tricky macro takes no arguments. It simply places the double bend symbol from Don Knuth’s TEXbook and places it in the margin.

24 \newcommand*{\tricky}{\makebox[0pt][r]{\dbend\hspace*{15mm}}}

25 ⟨/package⟩

This \endinput command prevents anything else from being read by docstrip, such as the character table.

26 \endinput

Index

Numbers written in italic refer to the page where the corresponding entry is described, the ones underlined to the code line of the definition, the rest to the code lines where the entry is used.

begin=  \subitem *+\begin+, 7
bend=  \subitem *+\bend+, 22
char=  \subitem *+\char+, 21
CodelineIndex=  \subitem *+\CodelineIndex+, 5
dbend=  \subitem *+\dbend+, 21--24
def=  \subitem *+\def+, 21
DocInput=  \subitem *+\DocInput+, 8
documentclass=  \subitem *+\documentclass+, 2
EnableCrossrefs=  \subitem *+\EnableCrossrefs+, 4
end=  \subitem *+\end+, 15

*+bend+, 1

                          endinput=  \subitem *+\endinput+, 26
                          font=  \subitem *+\font+, 20
                          hspace=  \subitem *+\hspace+, 23, 24
                          llap=  \subitem *+\llap+, 23
                          makebox=  \subitem *+\makebox+, 24
                          manual=  \subitem *+\manual+, 20, 21
                          message=  \subitem *+\message+, 11--14
                          newcommand=  \subitem *+\newcommand+, 22--24

                                                    parbox=  \subitem *+\parbox+, 22
                                                    PrintChanges=  \subitem *+\PrintChanges+, 10
                                                    PrintIndex=  \subitem *+\PrintIndex+, 9
                                                    ProvidesPackage=  \subitem *+\ProvidesPackage+, 18
                                                    RecordChanges=  \subitem *+\RecordChanges+, 6
                                                    ricky=  \subitem *+tricky+, \usage{2}
                                                    tricky=  \subitem *+\tricky+, 23, 24
                                                    usepackage=  \subitem *+\usepackage+, 3
                                                    vfill=  \subitem *+\vfill+, 22

Change History

v1.0 General: First release . . . . . . . . . . . 1