From 01be2f28efbc2305125f42b3f608474f82745602 Mon Sep 17 00:00:00 2001 From: Han The Thanh Date: Tue, 6 Jan 2009 06:43:27 +0000 Subject: updated protcode.tex git-svn-id: svn://tug.org/texlive/trunk@11820 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/pdftex/thanh/ext/protcode.tex | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'Master/texmf-dist') 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 -- cgit v1.2.3