summaryrefslogtreecommitdiff
path: root/macros/lollipop/doc/manual/trace.tex
blob: febf97fa76cac0a640603a681e7c6252f34c5d0b (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
% trace.tex copyright 1992 Victor Eijkhout
%                 copyright 2014--2016 Vafa Khalighi
%
%
%    This program is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 3 of the License, or
%    (at your option) any later version.
%
%    This program is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with this program.  If not, see <http://www.gnu.org/licenses/>.
%
%
\Chapter[chap:tracing] Tracing

\Section Do you really want to see this?

You can get glimpses of Lollipop's internal workings by enabling some
of the internal traces. The extreme positions
\Ver>    \Trace:yes<Rev
and
\Ver>    \Trace:no<Rev
cause all trace information and no trace at all respectively to be
generated. You may find this trace interesting, or it may dumbfound you.
Of course, if your name is Victor you find it pretty useful.

The following traces are available:
\Ver>    \NewTrace:def  % definition of user constructs
    \NewTrace:ref  % cross references
    \NewTrace:ext  % external files
    \NewTrace:doc  % document structure
    \NewTrace:font % font loading
    \NewTrace:out  % output routine
    \NewTrace:indent % indentation control
    \NewTrace:gen  % general tools<Rev

\ImpNote
Trace messages are generated by calls to
\Ver>    \Tmessage[type]{text}<Rev
Setting
\Ver>    \Trace:no<Rev
defines \cs{Tmessage} to discard its arguments. This is the most
efficient way of generating no trace information.

Tracing is controlled by a global parameter \cs{trace@all}. 
A value of~$-1$
disables all tracing; $+1$~corresponds to all tracing on; $0$~gives
selective tracing. In the third case a call
\Ver>    \Trace:xyz<Rev
set \ver>\trace:xyz> positive so that only 
\ver>\Tmessage[xyz]{...}> calls will
produce output. Enabling a selective trace sets \cs{trace@all} to zero, in
case it was~$-1$.
\ImpNoteStop

\endinput