summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/program
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-11-13 01:36:32 +0000
committerKarl Berry <karl@freefriends.org>2008-11-13 01:36:32 +0000
commitec239becc730792dccf130c2730eacf65208f6a5 (patch)
tree5e381c89d24c9fcbc0f495ba4e89bd314e38fd59 /Master/texmf-dist/tex/latex/program
parentc07499000ddf2a3ab735e999cb969917816bcfc3 (diff)
program 3.3.1 (12nov08)
git-svn-id: svn://tug.org/texlive/trunk@11276 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/program')
-rw-r--r--Master/texmf-dist/tex/latex/program/program.sty15
1 files changed, 15 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/program/program.sty b/Master/texmf-dist/tex/latex/program/program.sty
index 49d1e2ae9ae..10caef2ecad 100644
--- a/Master/texmf-dist/tex/latex/program/program.sty
+++ b/Master/texmf-dist/tex/latex/program/program.sty
@@ -15,6 +15,7 @@
% Changed \FOREACH \ATEACH to use \@typename
% Added \boldsubm (uses \boldsymbol instead of text \bf)
% 3.3.11: Changed the default style to \sfvariables, old style is \bfvariables
+% 3.3.12: Fixed the interaction with \index and \makeindex (which uses |)
%
%
% A LaTeX2e style file for typesetting algorithms.
@@ -991,3 +992,17 @@
\def\www{\bgroup\def~{\hskip 1pt plus 3pt minus 1pt\relax}\www@}
\def\www@#1{$\langle$#1$\rangle$\egroup}
+%% Fix the use of | in \index:
+
+\def\makeindex{%
+ \newwrite\@indexfile
+ \immediate\openout\@indexfile=\jobname.idx
+ \def\index{\@bsphack\begingroup
+ \catcode`\|=12
+ \@sanitize
+ \@wrindex}\typeout
+ {Writing index file \jobname.idx}%
+ \let\makeindex\@empty
+}
+\def\index{\@bsphack\begingroup\catcode`\|=12\@sanitize\@index}
+