diff options
author | John Kohl <jtkohl@mit.edu> | 1990-05-31 21:50:43 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1990-05-31 21:50:43 +0000 |
commit | b24bba82b4a05d9bee6969747f23fb3793b3d2b3 (patch) | |
tree | 8a59dcc7d5427078b215cb94c3ecbfd87031fd4c /doc/api/fixunder.sty | |
parent | ed2da7b4b255926e13be656db6eef1dd240f2281 (diff) | |
download | krb5-b24bba82b4a05d9bee6969747f23fb3793b3d2b3.tar.gz krb5-b24bba82b4a05d9bee6969747f23fb3793b3d2b3.tar.xz krb5-b24bba82b4a05d9bee6969747f23fb3793b3d2b3.zip |
comment why it's fixed the way it is now
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@974 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'doc/api/fixunder.sty')
-rw-r--r-- | doc/api/fixunder.sty | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/doc/api/fixunder.sty b/doc/api/fixunder.sty index fa5b3d747a..b7ae58dbf3 100644 --- a/doc/api/fixunder.sty +++ b/doc/api/fixunder.sty @@ -1,5 +1,13 @@ +% fixunder.sty, 31 May 1990, John T. Kohl % -% re-define _ to be normal, and to provide a reasonable underscore. +% The contents of this file are in the public domain. +% +% +% play games with _ to make it active and to provide a reasonable _ +% character (from \tt in most cases), and a discretionary word-break point. + +% +% Some \makeunder... macros for convenience in setting catcodes. % \def\makeunderactive{\catcode`\_=\active\relax} \def\makeunderother{\catcode`\_=12\relax} @@ -8,6 +16,31 @@ \makeunderother \def\cctwlunder{_} +% +% The hair here is to allow things like \index to work reasonably with +% the new definition of underscore when the argument to index is part of +% a macro replacement and as such gets tokenized before \index is +% evaluated. +% [in the normal case at top-level, \index{foo_bar} works since \index +% does some hair to make _ into a reasonable character code, and \index +% does NOT use a macro expansion. If you have something like +% \def\foo#1#2{\index{#1} bar #2} +% then \foo{baz_quux}{frobnitz} will result in baz_quux getting +% tokenized BEFORE \foo is expanded, so that the catcode hair in \index +% is to no avail.] +% +% \underrealfalse declares that you want to replace with the \tt _; +% \underrealtrue declares that you want to replace with \char95 (ASCII _). +% +% for things like \index which write things out to files, set +% \underrealfalse before evaluating the \index macro, and what actually +% gets written to the file is an _, rather than something like +% {\leavemode \kern... } (the typical definition of \_). +% +% the above example would then be +% \def\foo#1#2{\underrealfalse\index{#1}\underrealtrue bar #2} +% + \newif\ifunderreal \underrealfalse \makeunderactive |