From d06fa70487d7bb964278f2b3f52b7e9361253d11 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 31 May 1990 21:06:05 +0000 Subject: [PATCH] fixes to do the right thing with indexes; need to set \underrealtrue before calling \index; use \underrealfalse to get the substitution from \tt git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@972 dc483132-0cff-0310-8789-dd5450dbe970 --- doc/api/fixunder.sty | 25 ++++++++++--------------- doc/implement/fixunder.sty | 25 ++++++++++--------------- 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/doc/api/fixunder.sty b/doc/api/fixunder.sty index 30c006d7e..fa5b3d747 100644 --- a/doc/api/fixunder.sty +++ b/doc/api/fixunder.sty @@ -1,20 +1,15 @@ % % re-define _ to be normal, and to provide a reasonable underscore. % -\catcode`\_=12 +\def\makeunderactive{\catcode`\_=\active\relax} +\def\makeunderother{\catcode`\_=12\relax} +\def\makeunderletter{\catcode`\_=11\relax} +\def\makeundernormal{\catcode`\_=8\relax} +\makeunderother \def\cctwlunder{_} -\catcode`\_=\active -\def\_{_} -\def_{\leavevmode {\tt \char95}} -% -% fix up index commands to deal with active _ -% from LATEX.TEX: -% LATEX VERSION 2.09 <4 Aug 1988>, Copyright (C) 1988 by Leslie Lamport - -\def\makeindex{\if@filesw \newwrite\@indexfile - \immediate\openout\@indexfile=\jobname.idx - \def\index{\let_=\cctwlunder\@bsphack\begingroup - \def\protect####1{\string####1\space}\@sanitize - \@wrindex\@indexfile}\typeout - {Writing index file \jobname.idx }\fi} +\newif\ifunderreal +\underrealfalse +\makeunderactive +\def_{\ifunderreal\cctwlunder\else\leavevmode {\tt \cctwlunder}\discretionary{}{}{}\fi} +\let\_=_ diff --git a/doc/implement/fixunder.sty b/doc/implement/fixunder.sty index 30c006d7e..fa5b3d747 100644 --- a/doc/implement/fixunder.sty +++ b/doc/implement/fixunder.sty @@ -1,20 +1,15 @@ % % re-define _ to be normal, and to provide a reasonable underscore. % -\catcode`\_=12 +\def\makeunderactive{\catcode`\_=\active\relax} +\def\makeunderother{\catcode`\_=12\relax} +\def\makeunderletter{\catcode`\_=11\relax} +\def\makeundernormal{\catcode`\_=8\relax} +\makeunderother \def\cctwlunder{_} -\catcode`\_=\active -\def\_{_} -\def_{\leavevmode {\tt \char95}} -% -% fix up index commands to deal with active _ -% from LATEX.TEX: -% LATEX VERSION 2.09 <4 Aug 1988>, Copyright (C) 1988 by Leslie Lamport - -\def\makeindex{\if@filesw \newwrite\@indexfile - \immediate\openout\@indexfile=\jobname.idx - \def\index{\let_=\cctwlunder\@bsphack\begingroup - \def\protect####1{\string####1\space}\@sanitize - \@wrindex\@indexfile}\typeout - {Writing index file \jobname.idx }\fi} +\newif\ifunderreal +\underrealfalse +\makeunderactive +\def_{\ifunderreal\cctwlunder\else\leavevmode {\tt \cctwlunder}\discretionary{}{}{}\fi} +\let\_=_ -- 2.26.2