blob: 58ef9e145f6370fca9893960db08aa13876a42a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
%%
%% This is file `ptrace.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% plfonts.dtx (with options: `trace')
%%
%% Copyright (c) 2010 ASCII MEDIA WORKS
%% Copyright (c) 2016 Japanese TeX Development Community
%%
%% This file is part of the pLaTeX2e system (community edition).
%% -------------------------------------------------------------
%%
%% File: plfonts.dtx
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{ptrace}
[2016/04/30 v1.6b Standard pLaTeX package (font tracing)]
\RequirePackageWithOptions{tracefnt}
\DeclareRobustCommand\selectfont{%
\let\tmp@error@fontshape\error@fontshape
\let\error@fontshape\error@kfontshape
\edef\tmp@item{{\k@encoding}}%
\expandafter\expandafter\expandafter
\inlist@\expandafter\tmp@item\expandafter{\kyenc@list}%
\ifin@
\let\cy@encoding\k@encoding
\edef\ct@encoding{\csname t@enc@\k@encoding\endcsname}%
\else
\expandafter\expandafter\expandafter
\inlist@\expandafter\tmp@item\expandafter{\ktenc@list}%
\ifin@
\let\ct@encoding\k@encoding
\edef\cy@encoding{\csname y@enc@\k@encoding\endcsname}%
\else
\@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha
\fi
\fi
\let\font\tfont
\let\k@encoding\ct@encoding
\xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}%
\pickup@font
\font@name
\let\font\jfont
\let\k@encoding\cy@encoding
\xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}%
\pickup@font
\font@name
\expandafter\def\expandafter\k@encoding\tmp@item
\kenc@update
\let\error@fontshape\tmp@error@fontshape
\if@knjcmd \@knjcmdfalse
\expandafter\ifx
\csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname\relax
\expandafter\ifx
\csname rel@\k@encoding/\k@family/\k@series/all\endcsname\relax
\else
\csname rel@\k@encoding/\k@family/\k@series/all\endcsname
\fi
\else
\csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname
\fi
\fi
\let\font\afont
\xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}%
\pickup@font
\font@name
\ifnum \tracingfonts>\tw@
\@font@info{Roman:Switching to \font@name}\fi
\enc@update
\ifx\f@linespread\baselinestretch \else
\set@fontsize\baselinestretch\f@size\f@baselineskip
\fi
\size@update}
\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}}
\KanjiEncodingPair{JY1}{JT1}
\def\set@fontsize#1#2#3{%
\@defaultunits\@tempdimb#2pt\relax\@nnil
\edef\f@size{\strip@pt\@tempdimb}%
\@defaultunits\@tempskipa#3pt\relax\@nnil
\edef\f@baselineskip{\the\@tempskipa}%
\edef\f@linespread{#1}%
\let\baselinestretch\f@linespread
\def\size@update{%
\baselineskip\f@baselineskip\relax
\baselineskip\f@linespread\baselineskip
\normalbaselineskip\baselineskip
\adjustbaseline
\setbox\strutbox\hbox{\yoko
\vrule\@width\z@
\@height.7\baselineskip \@depth.3\baselineskip}%
\setbox\tstrutbox\hbox{\tate
\vrule\@width\z@
\@height.5\baselineskip \@depth.5\baselineskip}%
\setbox\zstrutbox\hbox{\tate
\vrule\@width\z@
\@height.7\baselineskip \@depth.3\baselineskip}%
\ifnum \tracingfonts>\tw@
\ifx\f@linespread\@empty
\let\reserved@a\@empty
\else
\def\reserved@a{\f@linespread x}%
\fi
\@font@info{Changing size to\space
\f@size/\reserved@a \f@baselineskip}%
\aftergroup\type@restoreinfo
\fi
\let\size@update\relax}}
\newbox\adjust@box
\newdimen\adjust@dimen
\def\adjustbaseline{%
\setbox\adjust@box\hbox{\char\euc"A1A1}%"
\cht\ht\adjust@box
\cdp\dp\adjust@box
\cwd\wd\adjust@box
\cvs\normalbaselineskip
\chs\cwd
\cHT\cht \advance\cHT\cdp
\iftdir
\setbox\adjust@box\hbox{\tbaselineshift\z@ M}%
\adjust@dimen\ht\adjust@box
\advance\adjust@dimen\dp\adjust@box
\advance\adjust@dimen-\cHT
\divide\adjust@dimen\tw@
\advance\adjust@dimen\cdp
\advance\adjust@dimen-\dp\adjust@box
\tbaselineshift\adjust@dimen
\ifnum \tracingfonts>\tw@
\typeout{baselineshift:\the\tbaselineshift}
\fi
\fi}
\endinput
%%
%% End of file `ptrace.sty'.
|