summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex3/xor/xo-trace.dtx
blob: 435994f1682ade8eb0a5d7aa945cdf56179189a3 (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
135
136
137
138
139
140
% \iffalse
%%
%% (C) Copyright 1999-2000 Frank Mittelbach, David Carlisle, Chris Rowley
%% All rights reserved.
%%
%% Not for general distribution. In its present form it is not allowed
%% to put this package onto CD or an archive without consulting the
%% the authors.
%% 
% \fi
%

%    \begin{macrocode}
\def\@tempa#1: #2.dtx,v #3 #4 #5 #6 #7${
  \ProvidesPackage{#2}[#4 #3 #5 #6]}
\@tempa$Id: xo-trace.dtx,v 1.9 2000/08/11 07:14:29 latex3 Exp $
%    \end{macrocode}
%
% Ignore white space in this package.
%    \begin{macrocode}
\IgnoreWhiteSpace
%    \end{macrocode}
%
%
%    \begin{macrocode}
\def\showmarks{
  \toks@\expandafter{\topmark}\typeout{topmark:\the\toks@}
  \toks@\expandafter{\firstmark}\typeout{firstmark:\the\toks@}
  \toks@\expandafter{\botmark}\typeout{botmark:\the\toks@}
}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\showfloatlists{{
  \let\@elt\@empty
  \typeout{free:~\@freelist}
  \typeout{active:~\@activelist}
  \typeout{mvl:~\@mvllist}
  \typeout{defer:~\area@ddd}
  \typeout{assigned:}
  \showfloatarea{t13}
  \showfloatarea{t12}
  \showfloatarea{t22}
  \showfloatarea{t11}
  \showfloatarea{t21}
  \showfloatarea{t31}
  \showfloatarea{b11}
  \showfloatarea{b21}
  \showfloatarea{b31}
  \edef\@tempa{currbox\expandafter\strip@prefix\meaning\@currbox>\space
              this@float\expandafter\strip@prefix\meaning\this@float@box>}
  \show\@tempa}}

\def\showfloatarea#1{
  \@ifundefined{area@#1}{}
     {\expandafter
      \ifx\csname area@#1\endcsname\@empty
      \else
        \typeout{~\space\space #1:~\csname area@#1\endcsname}
      \fi
     }
}
%    \end{macrocode}
%
%    \begin{macrocode}
%<*trace>
\def \@tracemessage #1{%
  \begingroup\let\@elt\space\typeout{:~\tf@indent~#1}\endgroup}
%    \end{macrocode}
%
%    \begin{macrocode}
\let\tf@indent\@empty
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@tracepush#1{%
  \tr@ce{entering~#1}
  \xdef\tf@indent{-\tf@indent}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@tracepop#1{%
  \tr@ce{leaving~#1}
  \xdef\tf@indent{\expandafter\@gobble\tf@indent}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def \tracefloats{\global\let \tr@ce \@tracemessage}
%    \end{macrocode}
%
%    \begin{macrocode}
\def \notrace {\global\let \tr@ce \@gobble}
%\notrace
%    \end{macrocode}
%
%    \begin{macrocode}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\traceonly#1{
  \notrace
  \def\@trace@command{#1}
  \gdef\@tracepush##1{
    \def\@trace@this{##1}
    \ifx\@trace@this\@trace@command
      \global\let\@this@tf@indent\tf@indent
      \tracefloats
      \tr@ce{entering~##1}
    \fi
    \xdef\tf@indent{-\tf@indent}}
  \def\@tracepop##1{
    \tr@ce{leaving~##1}
    \xdef\tf@indent{\expandafter\@gobble\tf@indent}
    \ifx\@this@tf@indent\tf@indent
      \global\let\@this@tf@indent\relax
      \notrace
    \fi}
}
%    \end{macrocode}
%
%    \begin{macrocode}
\tracefloats
%    \end{macrocode}
%
%    \begin{macrocode}
\def \@traceval #1{\tr@ce{\string #1~=~\the #1}}
%</trace>
%<-trace>\let\tr@ce\@gobble
%    \end{macrocode}
%
%    \begin{macrocode}
%<*progress>
\def \progress #1{\message{#1}}
\def \progress@separator{
       \progress{===============================
        ========================================^^J}}
\def \progress@nl #1{\progress{~ #1^^J}}
\def \progress@failed #1{\progress@nl{ ->~ failed:~ #1}}
%</progress>
%    \end{macrocode}