-
Notifications
You must be signed in to change notification settings - Fork 1
Tagging Hacks
Lupino edited this page Jan 6, 2025
·
1 revision
Tagging of boxes with background and lines using the tcolorbox package: background and frame must be tagged as artifacts. We do this by injecting PDF code directly into the box definition:
\tcbuselibrary{breakable}
\tcbuselibrary{hooks}
\newtcolorbox{<name>}{%
...
,before pre={\pgfsys@invoke{/Artifact <</Type/Background>> BDC}}%
,before upper={\pgfsys@invoke{EMC}}%
,extras middle and last pre={%
frame code pre={\pgfsys@invoke{/Artifact <</Type/Background>> BDC}}%
,interior code app={\pgfsys@invoke{EMC}}%
}%
}
The first two lines (before pre
and before upper
) tag non-breaking boxes and the first part of breaking boxes, the extras
lines handle the second to last parts of breaking boxes. Note that handling of breaking boxes requires the breakable
and hooks
libraries.