Debian Codegraph @

texmf-dist/tex/generic/tex4ht/adjustbox.4ht

raw
1 % adjustbox.4ht (2022-01-09-07:36), generated from tex4ht-4ht.tex
2 % Copyright 2019-2022 TeX Users Group
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either
6 % version 1.3c of this license or (at your option) any
7 % later version. The latest version of this license is in
8 % http://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions
10 % of LaTeX version 2005/12/01 or later.
11 %
12 % This work has the LPPL maintenance status "maintained".
13 %
14 % The Current Maintainer of this work
15 % is the TeX4ht Project <http://tug.org/tex4ht>.
16 %
17 % If you modify this program, changing the
18 % version identification would be appreciated.
19 \immediate\write-1{version 2022-01-09-07:36}
20
21 \NewConfigure{AdjustboxValignTop}{1}
22 \NewConfigure{AdjustboxValignMiddle}{1}
23 \NewConfigure{AdjustboxValignCenter}{1}
24 \NewConfigure{AdjustboxValignBottom}{1}
25 \pend:def\adjbox@valign@t{\a:AdjustboxValignTop}
26 \pend:def\adjbox@valign@t{\a:AdjustboxValignTop}
27 \pend:def\adjbox@valign@T{\a:AdjustboxValignTop}
28 \pend:def\adjbox@valign@M{\a:AdjustboxValignMiddle}
29 \pend:def\adjbox@valign@m{\a:AdjustboxValignMiddle}
30 \pend:defI\adjbox@valign@c{\a:AdjustboxValignCenter}
31 \pend:def\adjbox@valign@b{\a:AdjustboxValignBottom}
32 \pend:def\adjbox@valign@B{\a:AdjustboxValignBottom}
33
34 % make an unique ID for each adjustbox environment
35 \newcounter{adjustbox@4ht}
36 \def\update:adjustbox:id{\stepcounter{adjustbox@4ht}\def\AdjustboxId{adjustbox-\arabic{adjustbox@4ht}}}
37
38 \NewConfigure{Adjustbox}{2}
39
40 \def\:tempa#1#2#3#4{\update:adjustbox:id\a:Adjustbox\o:adjbox@@frame:{#1}{#2}{#3}{#4}\b:Adjustbox
41 }
42 \HLet\adjbox@@frame\:tempa
43
44 % suppress trying to draw the frame
45 \def\adjbox@boxframe#1#2#3{}
46
47 % patch macro that collects adjustbox contents and draw box. we disable this functionality, as all
48 % of this should be handled by CSS
49 % keys are set, so it should be possible to extract colors or frame size in theory
50 \long\def\:temp#1#2{%
51 % copy of definitions from \@adjustbox, to prevent compilation errors
52 \edef\adjbox@line{\the\inputlineno}%
53 \let\collectbox@mode\relax
54 \let\collectbox@noindent\relax
55 \let\adjbox@collectbox\@collectbox
56 \let\adjbox@begininnercode\@empty
57 \let\adjbox@endinnercode\@empty
58 \chardef\adjbox@innerlevel\z@
59 \update:adjustbox:id\adjbox@setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup}
60 \HLet\@adjustbox\:temp
61
62
63 % definitions for macros
64 % we don't save any colors and just use one configuration for all box types.
65 \def\:tempa#1{\update:adjustbox:id\a:Adjustbox\BOXCONTENT\b:Adjustbox}
66 \HLet\@bgcolorbox\:tempa
67 \def\:tempa#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox}
68 \HLet\@foregroundbox\:tempa
69 \def\:tempa#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox}
70 \HLet\@backgroundbox\:tempa
71
72 \Hinput{adjustbox}
73 \endinput
74