[latex3-commits] [latex3/tagpdf] develop: some tests forminipage in hbox (02862e7)

github at latex-project.org github at latex-project.org
Mon Oct 14 15:12:57 CEST 2024


Repository : https://github.com/latex3/tagpdf
On branch  : develop
Link       : https://github.com/latex3/tagpdf/commit/02862e7c3cbe2282b7fa36c54084d760a00fa870

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

commit 02862e7c3cbe2282b7fa36c54084d760a00fa870
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Oct 14 15:12:57 2024 +0200

    some tests forminipage in hbox


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

02862e7c3cbe2282b7fa36c54084d760a00fa870
 experiments/minipage-in-hbox.tex | 76 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/experiments/minipage-in-hbox.tex b/experiments/minipage-in-hbox.tex
new file mode 100644
index 0000000..04f7294
--- /dev/null
+++ b/experiments/minipage-in-hbox.tex
@@ -0,0 +1,76 @@
+% tests minipages directly in hbox setting (e.g. tcolorbox)
+% requires 2024-11-01 for para/restore!!
+
+\DocumentMetadata{uncompress,testphase=phase-III}
+\documentclass{article}
+\ExplSyntaxOn
+\tagpdfsetup{role/new-tag=minipage/Div}
+\tl_set:Nn\l__ltboxes_tag_tl{minipage}
+\ExplSyntaxOff  
+\usepackage{tcolorbox}
+
+\makeatletter
+\def\tcb at lrbox#1#2#3{%
+  \edef\reserved at a{%
+    \endgroup
+    \setbox#1\hbox{%
+    \tagpdfparaOff %<------------
+     %
+      \begingroup\aftergroup}%
+    \def\noexpand\@currenvir{\@currenvir}%
+    \def\noexpand\@currenvline{\on at line}}%
+  \reserved at a
+    \@endpefalse%
+    \global\@newlistfalse%
+    \tcb at set@savebox at construction@true%
+    \let\tcbbreak\@@par%
+    \csname tcb at parbox@use@\kvtcb at parbox\endcsname%
+    \tcb at minipage{#2}%
+    \color{#3}%
+    \tcb at hyph@fix\ignorespaces} 
+\begin{document}
+
+\begin{tcolorbox}[title=Title]
+blub
+ \begin{minipage}{3cm}
+  box \begin{minipage}{2cm}
+      inner box
+      \end{minipage}
+ \end{minipage}
+\end{tcolorbox}
+
+
+\leavevmode 
+\hbox{%
+ \begin{minipage}{3cm}
+  box \begin{minipage}{2cm}
+      inner box
+      \end{minipage}
+ \end{minipage}}
+
+
+\hbox{\tagpdfparaOff
+ \begin{minipage}{3cm}
+  box1 \begin{minipage}{2cm}
+      inner box1
+      \end{minipage}
+ \end{minipage}}
+
+\setbox0=\hbox{\tagpdfparaOff
+ \begin{minipage}{3cm}
+  box2 \begin{minipage}{2cm}
+      inner box2
+      \end{minipage}
+ \end{minipage}}\box0 
+
+
+\leavevmode 
+\setbox0=\hbox{%
+ \begin{minipage}{3cm}
+  box3 \begin{minipage}{2cm}
+      inner box3
+      \end{minipage}
+ \end{minipage}}\box0
+
+
+\end{document}





More information about the latex3-commits mailing list.