Skip to content

Instantly share code, notes, and snippets.

@aminophen
Last active January 30, 2022 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminophen/189f47fc8d928df812e591ce1b38c105 to your computer and use it in GitHub Desktop.
Save aminophen/189f47fc8d928df812e591ce1b38c105 to your computer and use it in GitHub Desktop.
Debug code for caption in plext.sty
diff --git a/plext.sty b/plext.sty
index 6948219..97ca652 100644
--- a/plext.sty
+++ b/plext.sty
@@ -173,6 +173,8 @@
\floatheight\ht\z@\advance\floatheight\dp\z@\relax
\floatruletick\z@
\fi
+ \typeout{float size:
+ \the\floatwidth:\the\floatheight:\float@pos}%
\setbox\@floatbox\vbox to\floatheight{\offinterlineskip
\hrule width\floatwidth height\floatruletick depth\z@
\vss\hbox to\floatwidth{%
@@ -246,6 +248,8 @@
\else
\csname \@captype @layoutc@ption\endcsname
\fi
+ \typeout{caption setup:
+ \caption@dir:\the\captionwidth:\caption@posa:\caption@posb}%
\@rotswfalse \@tempswafalse
\iftdir\if y\caption@dir \let\captiondir\yoko \@tempswatrue
\else\if z\caption@dir \let\captiondir\relax \@rotswtrue
@@ -253,12 +257,15 @@
\else\if t\caption@dir\let\captiondir\tate \@tempswatrue
\else\let\captiondir\yoko\fi
\fi
+ \typeout{dir: \meaning\captiondir}%
\setbox0\hbox{\if@rotsw $\fi\hbox{\captiondir
\captionfontsetup\parindent\z@\inhibitglue
\csname fnum@\@captype\endcsname\char\euc"A1A1\relax#1}%
\if@rotsw \m@th$\fi}%
+ \typeout{size: \the\wd0:\the\ht0:\the\dp0}%
\if@tempswa \@tempdima\ht0 \else\@tempdima\wd0 \fi
\ifdim\@tempdima>\captionwidth \@tempdima\captionwidth \fi
+ \typeout{width: \the\@tempdima}%
\@pboxswfalse
\setbox0\hbox{\if@rotsw $\fi
\if u\caption@posb\vbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment