summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex')
-rw-r--r--Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex41
1 files changed, 21 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex b/Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex
index 2f74bc227a3..57f735a9739 100644
--- a/Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex
+++ b/Master/texmf-dist/doc/pdftex/thanh/ext/protcode.tex
@@ -1,4 +1,4 @@
-\input abbr.tex
+% this code works with OT1 encoding only!
\def\setprotcode#1{%
\rpcode#1`\!=200
@@ -42,41 +42,42 @@
\lpcode#1`\v=50
\lpcode#1`\w=50
\lpcode#1`\x=50
- \lpcode#1`\y=50
- \adjustprotcode#1
+ \lpcode#1`\y=0
+ \adjustprotcode#1\relax
}
-\makeatletter
\newif\ifneedadjustprotcode
+\newbox\boxA
+\newcount\countA
+\newcount\countB
\def\adjustprotcode#1{%
\needadjustprotcodefalse
- \ifnum\pdftexversion > 13
+ \ifnum\pdftexversion = 14
\ifnum \expandafter`\pdftexrevision > `g
\needadjustprotcodetrue
- \fi
+ \fi
\else\ifnum\pdftexversion > 14
\needadjustprotcodetrue
- \fi\fi
+ \fi \fi
\ifneedadjustprotcode
- \@tempcnta=0
+ \countA=0
\loop
- \ifcase\lpcode#1\@tempcnta\else
- \adjustcp\lpcode#1\@tempcnta
+ \ifcase\lpcode#1\countA\else
+ \adjustcp\lpcode#1\countA
\fi
- \ifcase\rpcode#1\@tempcnta\else
- \adjustcp\rpcode#1\@tempcnta
+ \ifcase\rpcode#1\countA\else
+ \adjustcp\rpcode#1\countA
\fi
- \advance\@tempcnta 1
- \ifnum\@tempcnta < 256 \repeat
+ \advance\countA 1
+ \ifnum\countA < 256 \repeat
\fi
}
\def\adjustcp#1#2#3{%
- \setbox0=\hbox{%
+ \setbox\boxA=\hbox{%
\ifx#2\font\else#2\fi
\char#3}%
- \@tempcntb=\wd0
- \mul\@tempcntb #1#2#3%
- \div\@tempcntb \fontdimen6 #2%
- #1#2#3=\@tempcntb
+ \countB=\wd\boxA
+ \multiply\countB #1#2#3\relax
+ \divide\countB \fontdimen6 #2\relax
+ #1#2#3=\countB\relax
}
-\makeatother