summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/logbox/logbox.dtx
blob: 99cb096b41164e9f4068a4709dd50c37e7155c70 (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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
% \iffalse meta-comment
% logbox : 2011/03/26 v1.0 - e-TeX showbox facilities for exploration purpose (FC)
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in
%    http://www.latex-project.org/lppl.txt
%
% This work consists of the main source file logbox.dtx
% and the derived files:
%       logbox.sty, logbox.ins, logbox.drv
% and               logbox.pdf
%
% Unpacking:
%    (a) Without logbox.ins:            etex logbox.dtx
%    (b) If logbox.ins is present:      etex logbox.ins
%    (c) If you insist on using LaTeX
%           latex \let\install=y\input{logbox.dtx}
%        (quote the arguments according to the demands of your shell)
%
% Documentation:                        pdflatex logbox.dtx
% Copyright (C) 2011 by FC <florent.chervet @t free.fr>
%<*ignore>
\begingroup
  \def\x{LaTeX2e}%
\expandafter\endgroup
\ifcase 0\ifx\install y1\fi\expandafter
         \ifx\csname processbatchFile\endcsname\relax\else1\fi
         \ifx\fmtname\x\else 1\fi\relax
\else\csname fi\endcsname
%</ignore>
%<*install>
\input docstrip.tex
\Msg{***************************************************************************}
\Msg{* Installation                                                            *}
\Msg{* Package logbox: 2011/03/26 v1.0 - e-TeX showbox facilities (FC) *}
\Msg{***************************************************************************}

\keepsilent
\askforoverwritefalse

\let\MetaPrefix\relax
\preamble

This is a generated file.

logbox : 2011/03/26 v1.0 - e-TeX showbox facilities (FC)

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3 of this license or (at your option) any later
version. The latest version of this license is in
   http://www.latex-project.org/lppl.txt

This work consists of the main source file logbox.dtx
and the derived files:
                logbox.sty, logbox.ins, logbox.drv,
        and:                logbox.pdf

logbox : 2011/03/26 v1.0 - e-TeX showbox facilities (FC)
Copyright (C) 2011 by FC <florent.chervet @t free.fr>

\endpreamble
\let\MetaPrefix\DoubleperCent

\generate{%
   \file{logbox.ins}{\from{logbox.dtx}{install}}%
   \file{logbox.sty}{\from{logbox.dtx}{package}}%
}

\askforoverwritetrue
\generate{%
   \file{logbox.drv}{\from{logbox.dtx}{driver}}%
}

\obeyspaces
\Msg{************************************************************************}
\Msg{*                                                                      *}
\Msg{* To finish the installation you have to move the following            *}
\Msg{* file into a directory searched by TeX:                               *}
\Msg{*                                                                      *}
\Msg{*                        logbox.sty                                    *}
\Msg{*                                                                      *}
\Msg{* To produce the documentation run the file `logbox.dtx'               *}
\Msg{*                     through pdfLaTeX.                                *}
\Msg{*                                                                      *}
\Msg{************************************************************************}
\endbatchfile
%</install>
%<*ignore>
\fi
%</ignore>
%<*driver>
\def\thisinfo {e-TeX showbox facilities (FC)}
\def\thisversion {1.0}
\PassOptionsToPackage {full}{tabu}
\RequirePackage [\detokenize{§§},hyperlistings]{fcltxdoc}
\AtBeginDocument{\embedfile{README}}
%%\CheckDates{interfaces=2011/02/12,tabu=2011/02/25}
\documentclass[a4paper,11pt,oneside,american,latin1,T1]{ltxdoc}     \usetikz{full}
\usepackage [latin1]{inputenc}
\usepackage [T1]{fontenc}
\usepackage {geometry}
\usepackage {numprint}
\usepackage {pdfcomment}
\usepackage {ragged2e}   % general tools
\usepackage {arial,bbding,relsize,moresize,manfnt,pifont,upgreek} % fonts
\csname endofdump\endcsname
\usepackage {Escan}
\usepackage {logbox}
\RequirePackage {tabu}
\let\microtypeYN=n
\ifx y\microtypeYN                                                          %
   \usepackage[expansion=all,stretch=20,shrink=60]{microtype}\fi            % font (microtype)
\CodelineNumbered\lastlinefit999
\abovecaptionskip=0pt
\lstset{color=LightCyan!30,
texcsstyle=\color{blue},
moretexcs=[1]{
    lstdefinestyle,tikz,
    lstinputlisting,lstset,tikzlabel,tikzrefXY,
    color,
    geometry,lasthline,firsthline,
    cmidrule,toprule,bottomrule,tabusetup*,tabusetup,
    everyrow,tabulinestyle,tabureset,savetabu,usetabu,preamble,
    taburulecolor,taburowcolors,ccolor,cbackground,background,rowbackground,rowcolor},
keywordstyle=[3]{\color{black}\bfseries},
morekeywords=[3]{&},
keywordstyle=[4]{\color{red}\bfseries},
morekeywords=[4]{\linegoal,$},
keywordstyle=[5]{\color{blue}\bfseries},
keywordstyle=[6]{\color{green}\bfseries},
keywordstyle=[7]{\color{yellow}\bfseries},
%extendedchars={true},
alsoletter={&},alsoletter={*},alsoletter={$},alsoletter={-},
morekeywords=[5]{blue},
morekeywords=[6]{green},
morekeywords=[7]{yellow},
texcsstyle=[7]{\color{Gold}},
texcs=[7]{includegraphics},
texcs=[77]{newEscan,renewEscan,provideEscan},
}
\hypersetup {%
  pdfauthor=Florent CHERVET,
  pdfkeywords={TeX, LaTeX, e-TeX, Escan, scantokens, environment, NewEnviron, package },
}
\geometry {top=0mm,headheight=8mm,includehead,reversemarginpar,asymmetric,headsep=3mm,bottom=14mm,footskip=5mm,inner=35mm,outer=20mm }
\begin{document}
   \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{157}
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \DoNotIndex{\globcount,\globdimen,\if,\fi,\else,\def,\the,\gdef,\global,\relax,\begingroup,\endgroup}
% \DoNotIndex{\@empty,\@gobble,\def,\edef,\bgroup,\egroup,\@tempcnta,\@tempcntb,\@nil,\@ifnextchar,\z@,\string,\scan,\scan-left,\scan-right,\ShowTokens,\p@,\providecommand}
% \DoNotIndex{\ProvidesPackage,\NeedsTeXFormat,\long,\let,\kernel@ifnextchar}
% \makeatletter
% \def\ThisInfo{\ifdefvoid \lsstyle {\stretchwith\,{\eTeX\ showbox\ facilities\ for\ exploration\ purpose}}
%                                   {\lsstyle \eTeX\ showbox\ facilities\ for\ exploration\ purpose}}
% \def\ttdefault{lmvtt}                                     \colorlet{pkgcolor}{MidnightBlue!20!Aquamarine!250}
% \renewcommand\lstlistingname {Example}
% \parindent\z@\parskip.4\baselineskip\topsep\parskip\partopsep\z@
% \newrobustcmd*\FC {{\leavevmode\color{copper}\usefont{T1}{fts}xn FC}}
% \colorlet{linkcolor}{pkgcolor!80!FireBrick!200}   \colorlet{csrefcolor}{pkgcolor}^^ARoyalBlue!70!Indigo!50!Black}
% \definecolor{macrocode}{rgb}{0.08,0.00,0.15}
% \providerobustcmd*\csred{\cs[\colorlet{csrefcolor}{red}]}
% \def\MacroFont{\ttfamily\bfseries }
% \def\macro@font {\def\Cr@scale{.87}\changefont{fam=pcrs,siz=10pt,ser=m,color=macrocode,spread=1}\let\AltMacroFont\macro@font }
% \AtBeginEnvironment {declcs}{\tabusetup* {font=\bfseries\large,rule width=\heavyrulewidth,linesep=1mm,tabuclineforhline}}^^A everyrow=\rowbackground{fill=OrangeRed!80,cell fading=o},
% \AtBeginEnvironment {declenv}{\tabusetup* {font=\bfseries\large,rule width=\heavyrulewidth,linesep=0mm,tabuclineforhline}}^^Aeveryrow=\rowbackground{fill=Snow!220,cell fading=-+{70}{0}{30}},
% \AtBeginEnvironment {lstlisting}{\Needspace{7\baselineskip}}
% \tikzAtEveryShipout {\ifnum \value{page}>\@ne  \fill [fill=Chartreuse,ultra nearly transparent] (0,0) rectangle (\paperwidth,-\headheight);\fi }
% \lstset{color=Chartreuse!7}
%
%  \sectionformat\section[hang]{
%       left=\declmarginwidth,
%       font=\bfseries\Large,
%       bookmark={color=pkgcolor,bold},
%       bottom=\smallskipamount,top=\medskipamount,
%  }
%  \sectionformat\subsection [hang]{
%       font=\raggedright\large\bfseries,
%       bookmark={color=MidnightBlue},
%  }
% \pagesetup [corpus]{norule,
%       font=\footnotesize,
%       head/left=\noindent\raise1.5mm\hbox{\thispackage},
%       head/font+=\mdseries\sffamily,
%       head/right=\noindent\raise1.5mm\hbox{\ThisInfo},
%       foot/left/font=\scriptsize\color{gray!80},
%       foot/left=\vbox to\baselineskip{\vss{{\rotatebox[origin=l]{90}{\thispackage\,[rev.\thisversion]\,\CopyRight2011\,\lower.4ex\hbox{\pkgcolor\NibRight}\,\FC}}}},
%       offset=15mm,
%       left/offset+=15mm,
%       foot/right=\oldstylenums{\arabic{page}}/\oldstylenums{\pageref{LastPage}},
%  }
% \pagesetup [plain]{%
%     norules,font=\scriptsize,
%     offset=15mm,
%     left/offset+=15mm,
%     foot/font=\scriptsize\color[gray]{.55},
%     foot/right=\oldstylenums{\arabic{page}}/\oldstylenums{\pageref{LastPage}},
%     foot/left=\vbox to\baselineskip{\vss{{\rotatebox[origin=l]{90}{\thispackage\,[rev.\thisversion]\,\CopyRight2011\,\lower.4ex\hbox{\pkgcolor\NibRight}\,\FC\quad \xemail{florent.chervet at free.fr}}}}},
% }
% \bookmarksetup{openlevel=3}
%
% \newrobustcmd\IMPLEMENTATION {\bigskip
%       ^^A\geometry {top=0mm,headheight=8mm,includehead,reversemarginpar,asymmetric,headsep=3mm,bottom=14mm,footskip=5mm,inner=35mm,outer=20mm }
%       \newgeometry {top=0mm,headheight=8mm,includehead,reversemarginpar,asymmetric,headsep=3mm,bottom=14mm,footskip=5mm,inner=35mm,outer=3mm }
%       \pagesetup*{inner/offset-=2cm}
%       \clearpage
%       \bookmarksetup {bold*}^^A,openlevel=1}
%       \sectionformat \section{bookmark={color=black}} \sectionformat \subsection{bookmark={color=gray}}
%       \section(Implementation)[\lsstyle\textsc{\bfseries Implementation}]{\larger\lsstyle\textsc{\bfseries Implementation}}\label{sec:implementation}\parindent1em
%  }
%
% \tikzAtFirstShipout{\node[anchor=north] at (30mm,-10mm) {\includegraphics [width=35mm,keepaspectratio] {logbox.png}};}
%
% \title  {\vspace*{-28pt}\Huge\bfseries \raisedhyperdef[10mm]{}{Escan}{\CTANhref[logbox]{\pkgcolor logbox}}\Footnotemark{*}
%          \tabusetup* {linesep=3mm ,same rows,font=\large\changefont{fam=txr}}
%           \tabubox { X[c] }{  \ThisInfo   \\
%                               \small\FC   \\
%                               \small\mdseries\thisdate~--~\hyperref[\thisversion]{version \thisversion }
%                    }\vspace*{-12pt}}
% \author {}
% \date   {}
% \makeatother
%
% \maketitle            \bookmark[bold,view=FitH 0,dest=Escan,color=black!80]{Escan}
%
% \Footnotetext{\rlap{*}\kern2em}{\parindent0pt\noindent
% This documentation is produced with the \textt{DocStrip} utility.\par
% \begin{tabu}{ X[-3] X[-1] >\ttfamily X }
% \smex To get the package,                   &run:          & etex \thisfile.dtx                   \\
% \smex To get the documentation              &run (thrice): & pdflatex \thisfile.dtx               \\
% \leavevmode\hphantom\smex To get the index, &run:          & makeindex -s gind.ist \thisfile.idx
% \end{tabu}\par
% The \xext{dtx}* is embedded into this \xext{pdf}* thank to \Xpackage{embedfile} by H. Oberdiek.}
%
% \vspace{-15mm}
%
% \begin{Abstract}[\leftmargin=1em\rightmargin\leftmargin\listparindent=0pt\itemindent=0pt\parsep=\medskipamount]
%
% Exploring a box content and its dimensions is often required for typography is made of measurements.
% \thispackage provides a few macros to achieve this task easily: \cs\viewbox* is the most useful.
%
% \thispackage is intended for exploration purpose, this is not a package for typesetting.
%
% \eTeX{} is obviously required \emph!
%
% \end{Abstract}
%
% \tocsetup{
%  before+=\hypersetup {linkcolor=black},label=toc,bookmark={text=Contents,bold,color=black},
%  section/skip=4pt plus2pt minus2pt,
%  subsection/skip=0pt plus2pt minus2pt,
%  dotsep=1.5mu,
%  section/dotsep,
%  subsection/dotsep=,
%  subsection/pagenumbers=off,
%  title/top = 12pt,
%  dot=\hbox{$\scriptscriptstyle\cdotp$},
%  title={\pkgcolor\leaders\vrule height3.4pt depth-3pt\hfill\null}\quad Contents of \thispackage\quad{\pkgcolor\leaders\vrule height3.4pt depth-3pt\hfill\null},
%  title/bottom=4pt,
%  title/font=\Large\bfseries,
%  multicols/beforeend=\aftergroup\tocrule,
%  columns=2,columns/rule color=pkgcolor,no columns rule,
%  }
%  \def\tocrule{\leavevmode{\pkgcolor\hrule}}
%
% \tableofcontents  \pagestyle{corpus}
%
% \listofsetup {lol}{
%       before+=\hypersetup {linkcolor=black},label=lol,bookmark={text=List of listings,color=black},
%       columns=2,columns/rule/color=pkgcolor,no columns rule,
%       title/bottom=4pt,
%       title={\pkgcolor\leaders\vrule height3.4pt depth-3pt\hfill\null}\quad List of listings and examples\quad{\pkgcolor\leaders\vrule height3.4pt depth-3pt\hfill\null},
%       multicols/beforeend=\aftergroup\tocrule,
%       lstlisting/number=off,
%       title/font=\Large\bfseries,
% }
%
% \listoflstlisting
%
% \section{Five exploration commands}
%
% \begin{declcs}\logbox \meta{box register}\stform| \meta{number}
% \end{declcs}\declcsbookmark\logbox
%
% \cs\logbox displays the contents of a \TeX{} box register in the \xext{log}*.§
% This is exactly \cs\showbox with: ^^A\loggingall
% \begin{itemize}[leftmargin=2em]
% \item \cs\showoutput set if \cs\tracingoutput$=$0 \\
%       If \cs\tracingoutput $>0$ it is assumed that the user set the tracing level he desired before \cs\logbox.
% \item The minimum value for\, \cs\showboxbreadth\, and\, \cs\showboxdepth\, is assumed to be  $10$
% \item The \eTeX{} \cs\interactionmode\, is temporarily set to $2$ (\cs\scrollmode) and restored to its previous value
%       just after the execution of\, \cs\showbox: \cs\logbox does not stop the compilation, just reports the box contents into the \xext{log}*.
% \end{itemize}
%
% \tabusetup* {X=X[c],frame=tabudotted}
% \begin{tabu*} { X >{\columnbackground{cell shape={rectangle,draw=pkgcolor}}} X }
% \begin{lstlisting}[caption={Example of \cs{logbox}},csred=logbox]
%   \setbox 0 =\hbox{ Hello }\logbox 0
% \end{lstlisting}
% &
%   \setbox 0 =\hbox{ Hello }\logbox 0
%   \begin{Verbatim}[fontsize=\footnotesize]
%   logbox: 0 on input line 55
%   > \box0=
%   \hbox(7.54149+0.0)x31.75774
%   .\glue 3.63054 plus 1.81337 minus 1.20892
%   .\T1/cmr/m/n/10.95 H
%   .\T1/cmr/m/n/10.95 e
%   .\T1/cmr/m/n/10.95 l
%   .\T1/cmr/m/n/10.95 l
%   .\T1/cmr/m/n/10.95 o
%   .\glue 3.63054 plus 1.81337 minus 1.20892
%
%   ! OK.
%   \end{Verbatim}
% \end{tabu*}
%
% \Needspace{6\baselineskip}
% \begin{declcs}\dimbox \meta{box register}\stform| \meta{number}
% \end{declcs}\declcsbookmark\dimbox
%
% \cs\dimbox typeset the type (\cs\hbox, \cs\vbox or \textt{void box}) and dimensions of a box in the document itself:§
% \tabusetup* {everyrow={\ifnum\thetaburow=3 \cbackground{cell shape={rectangle,draw=pkgcolor}}-\fi}, X=X[c],frame=tabudotted}
% \begin{Escan-top}[caption={Example of \cs{dimbox}}]
%   \setbox 0 = \hbox { Hello }\dimbox 0                    \par
%   \setbox 1 = \vtop {\hsize=60mm Hello \par (World)}\dimbox 1
% \end{Escan-top}
%
%  \begin{declcs}\viewbox \meta{box register} \stform| \meta{number}
%           \cs\viewbox* \meta{box register} \stform| \meta{number}
%  \end{declcs}\declcsbookmark\viewbox
%
% \cs\viewbox basically does \cs\dimbox and \cs\logbox.
%
% \cs\viewbox* prints a copy of the box in the document, after the dimensions have been reported:
% \tabusetup* {everyrow={\ifnum\thetaburow=3 \cbackground{cell shape={rectangle,draw=pkgcolor}}-\fi}, X=X[c],frame=tabudotted}
% \begin{Escan-top}[caption={\cs{viewbox}* gives all the informations}]
% \setbox 0 =\vtop {\hsize=60mm Hello \par (World)}
% \viewbox*0
% \end{Escan-top}
%
% And the \xext{log}* contains (artificially splitted here on two columns):§
% \tabusetup* {margins=<2pt>,frame={ < |[tabudotted]|[pkgcolor]
%                                    > |[pkgcolor]|[tabudotted]
%                                    ^{\tabucline [tabudotted]-\tabucline ^\doublerulesep [pkgcolor]-}
%                                    _{\tabucline _\doublerulesep [pkgcolor]-\tabucline^\doublerulesep [tabudotted]-}} }
% \begin{tabu*} { X[5] X[-4] }
% \begin{Verbatim}[fontsize=\footnotesize]
% logbox: 0 on input line 1
% > \box0=
% \vbox(7.54149+16.3369)x170.71652
% .\hbox(7.54149+0.0)x170.71652, glue set 146.21986fil
% ..\hbox(0.0+0.0)x0.0
% ..\rule(0.0+*)x0.0
% ..\T1/cmr/m/n/10.95 H
% ..\T1/cmr/m/n/10.95 e
% ..\T1/cmr/m/n/10.95 l
% ..\T1/cmr/m/n/10.95 l
% ..\T1/cmr/m/n/10.95 o
% ..\penalty 10000
% ..\glue(\parfillskip) 0.0 plus 1.0fil
% ..\glue(\rightskip) 0.0
% .\glue(\parskip) 0.0
% .\glue(\baselineskip) 5.38942
% .\hbox(8.21059+2.7369)x170.71652, glue set 133.2164fil
% \end{Verbatim}
% &
% \begin{Verbatim}[fontsize=\footnotesize]
% % ..\hbox(0.0+0.0)x0.0
% ..\T1/cmr/m/n/10.95 (
% ..\T1/cmr/m/n/10.95 W
% ..\kern-0.9067
% ..\T1/cmr/m/n/10.95 o
% ..\T1/cmr/m/n/10.95 r
% ..\T1/cmr/m/n/10.95 l
% ..\T1/cmr/m/n/10.95 d
% ..\T1/cmr/m/n/10.95 )
% ..\penalty 10000
% ..\glue(\parfillskip) 0.0 plus 1.0fil
% ..\glue(\rightskip) 0.0
%
% ! OK.
% \end{Verbatim}
% \end{tabu*}
%
%
% \begin{declcs}\ShowGroups
% \end{declcs}\declcsbookmark\ShowGroups
%
% The command \cs\ShowGroups executes the primitive \cs\showgroups but the compilation does not stop.
%
% \begin{declcs}\ShowLists
% \end{declcs}\declcsbookmark\ShowLists
%
% The command \cs\ShowLists executes the primitive \cs\showlists but the compilation does not stop.
%
% \begin{declcs}\ShowIfs
% \end{declcs}\declcsbookmark\ShowIfs
%
% The command \cs\ShowIfs executes the primitive \cs\showifs but the compilation does not stop.
%
%
% \StopEventually{ }
%
% \IMPLEMENTATION
%
% \subsection*{Identification}       \makeatletter
%
% The package namespace is \cs\logb@x
%
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{logbox}
         [2011/03/26 v1.0 - e-TeX showbox facilities for exploration (FC)]
%    \end{macrocode}
%
%    \begin{macro}{\logbox}
%
% \TeX{} \cs\showbox without stop in the compilation.
%
%    \begin{macrocode}
\protected\def\logbox {\begingroup \afterassignment\logb@x@log \count@ }
\def\logb@x@log {\ifnum\tracingoutput>0 \ifnum\showboxdepth<2 \showboxdepth=2 \fi
                                        \ifnum\showboxbreadth<10 \showboxbreadth=10 \fi
                 \else \showoutput \fi
    \message {^^Jlogbox: \the\count@ \on@line^^J}\expandafter \scrollmode
                            \expandafter \showbox \expandafter \count@ \expandafter
                                        \interactionmode\the\interactionmode \endgroup
}% \logb@x@log
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\dimbox}
%
% Typeset the type and dimensions of a box in the document.
%
%    \begin{macrocode}
\protected\def\dimbox {\begingroup \afterassignment\logb@x@dim \count@ }
\def\logb@x@dim {\nfss@text
   {\ifhbox\count@ hbox\else\ifvbox\count@ vbox\else box\fi\fi
    \the\count@: \ifvoid\count@ void\else wd=\the\wd\count@\
                                          ht=\the\ht\count@\
                                          dp=\the\dp\count@\
                            tot=\the\dimexpr\ht\count@ +\dp\count@ \relax\fi }\endgroup
}% \logb@x@dim
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\viewbox}
%
% Typeset the type and dimensions of a box in the document and inserts the content of that box.
%
%    \begin{macrocode}
\protected\def\viewbox {\begingroup \@ifstar
        {\def\logb@x@ {\@@par\copy\count@ }\afterassignment\logb@x@view \count@ }
        {\let\logb@x@ \relax \afterassignment\logb@x@view \count@ }}
\def\logb@x@view {\dimbox\count@ \logb@x@ \logb@x@log }
%    \end{macrocode}
%    \end{macro}
%
%
%    \begin{macro}{\Viewbox}
%
% Same as \cs\Viewbox but the content of the box is given as argument, rather than the box register.
%
%    \begin{macrocode}
\protected\def\Viewbox  {\@ifstar \logb@x@View \logb@x@View }
\long\def\logb@x@View #1{\begingroup \setbox0=\hbox {{#1}}\viewbox*0\endgroup }
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{ShowGroups}
%
% \eTeX{} \cs\showgroups without stop in the compilation.
%
%    \begin{macrocode}
\def\ShowGroups {\expandafter \scrollmode \expandafter \showgroups \expandafter
                                    \interactionmode\the\interactionmode \relax }
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\ShowLists}
%
% \eTeX{} \cs\showlists without stop in the compilation.
%
%    \begin{macrocode}
\def\ShowLists {\expandafter \scrollmode \expandafter \showlists \expandafter
                                    \interactionmode\the\interactionmode \relax }
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\ShowIfs}
%
% \eTeX{} \cs\showgroups without stop in the compilation.
%
%    \begin{macrocode}
\def\ShowIfs {\expandafter \scrollmode \expandafter \showifs \expandafter
                                    \interactionmode\the\interactionmode \relax }
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
%
% \begin{History}
%   \sectionformat\subsection{font=\raggedright\normalsize\pkgcolor,bottom=0pt,top=\smallskipamount }\makeatletter
%   \addtocontents{toc}{\tocsetup{subsection/font+=\protect\footnotesize}}
%
%   \begin{Version}{2011/03/26}{1.0}
%   \item First version. \quad But it works well yet \emph!
%   \end{Version}
%
% \end{History}
%
% \bookmarksetup {open=false}
% \restoregeometry
% \pagesetup* {inner/offset+=2cm}
% \PrintIndex
%
% \Finale