[latex3-commits] [git/LaTeX3-latex3-latex2e] TL21-2-fltrace: Adding first version of \showfloat in fltrace (460018bc)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri May 7 23:19:43 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : TL21-2-fltrace
Link       : https://github.com/latex3/latex2e/commit/460018bca46a10d05f4f38be4f24ce7c7e204aef

>---------------------------------------------------------------

commit 460018bca46a10d05f4f38be4f24ce7c7e204aef
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri May 7 23:19:43 2021 +0200

    Adding first version of \showfloat in fltrace


>---------------------------------------------------------------

460018bca46a10d05f4f38be4f24ce7c7e204aef
 base/ltoutput.dtx | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/base/ltoutput.dtx b/base/ltoutput.dtx
index 69bfa1f0..6e61a749 100644
--- a/base/ltoutput.dtx
+++ b/base/ltoutput.dtx
@@ -30,7 +30,7 @@
 %%% From File: ltoutput.dtx
 %<flafter>\ProvidesPackage{flafter}
 %<fltrace>\ProvidesPackage{fltrace}
-%<flafter,fltrace>       [2018/11/28 v1.4d
+%<flafter,fltrace>       [2021/05/07 v1.4e
 %<flafter>                  Standard LaTeX floats after reference (FMi)]
 %<fltrace>                  Tracing LaTeX floats algorithm (FMi)]
 %
@@ -4025,6 +4025,16 @@
 %   wrong value.\footnote{This is a somewhat questionable design.}
 %    \begin{macrocode}
  \begingroup
+%    \end{macrocode}
+%    When the user requests \cs{tracefloatvals} then they should show
+%    regardless of the tracing state, so locally we make sure that it
+%    is activated.
+% \changes{v1.4e}{2021/05/07}{Enable display when doing \cs{tracefloatvals}}
+%    \begin{macrocode}
+  \tracefloats
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
   \@dblfloatplacement
   \@floatplacement
   \fl at trace{***Float placement parameters:}%
@@ -4052,6 +4062,7 @@
                           {trace float vals}%
 \def \tracefloatvals{%
  \begingroup
+  \tracefloats
   \@dblfloatplacement
   \@floatplacement
   \fl at trace{***Float placement parameters:}%
@@ -4077,6 +4088,29 @@
 }
 \EndIncludeInRelease
 %    \end{macrocode}
+%
+%
+%
+%  \begin{macro}{\showfloat}
+%    Give some information about the content of a float register.
+%    (No error recovery no anything if you specify something that
+%    isn't a float.)
+%    \begin{macrocode}
+\def\showfloat#1{\begingroup
+    \tracefloats
+    \fl at trace{***Float #1 details:}%
+    \expandafter\fl at showfloat\csname bx@#1\endcsname
+  \endgroup
+}
+\def\fl at showfloat#1{%
+  \fl at traceval{\count#1}%    % this here should be interpreted
+  \fl at traceval{\ht#1}%
+  \fl at traceval{\dp#1}%
+  {\tracingonline1\showboxbreadth10\showboxdepth3\showbox#1}%
+}
+%    \end{macrocode}
+%  \end{macro}
+%
 %    We need to make sure that \texttt{fltrace} comes before
 %    \texttt{flafter} to make the tracing work.
 %    \begin{macrocode}





More information about the latex3-commits mailing list.