@@ -86,7 +86,7 @@ DefConstructor('\lxSVG@insertpicture{}', sub {
86
86
$document -> openElement(' ltx:picture' );
87
87
$document -> openElement(' svg:svg' ,
88
88
version => " 1.1" ,
89
- width => $props {pxwidth }, height => $props {pxheight },
89
+ width => $props {pxwidth }, height => $props {pxheight }, style => $props { style },
90
90
viewBox => " $props {minx} $props {miny} $props {pxwidth} $props {pxheight}" ,
91
91
overflow => " visible" );
92
92
my $x0 = -(0 + $props {minx });
@@ -117,6 +117,7 @@ DefConstructor('\lxSVG@insertpicture{}', sub {
117
117
my $w = max($width -> pxValue, 1);
118
118
my $h = max($height -> pxValue, 1);
119
119
my $content = $whatsit -> getArg(1);
120
+ my $base = Dimension(ToString(Expand(T_CS(' \pgf@shift@baseline' ))))-> pxValue;
120
121
my ($cwidth , $cheight , $cdepth ) = $content -> getSize;
121
122
Debug(" TIKZ size: " . ToString($width ) . " x " . ToString($height )) if $LaTeXML::DEBUG {pgf };
122
123
Debug(" TIKZ pos: " . ToString($minx ) . " x " . ToString($miny )) if $LaTeXML::DEBUG {pgf };
@@ -133,6 +134,7 @@ DefConstructor('\lxSVG@insertpicture{}', sub {
133
134
$whatsit -> setProperty(depth => Dimension(0));
134
135
$whatsit -> setProperty(pxwidth => $w );
135
136
$whatsit -> setProperty(pxheight => $h );
137
+ $whatsit -> setProperty(style => " vertical-align:" .$base ." px" ) if $base ;
136
138
# or tikz macro (see corescopes)
137
139
return ; },
138
140
# \pgfpicture seems to make a 0 sized box, which throws off our postprocessor
@@ -754,6 +756,7 @@ DefMacro('\pgfsys@shadingoutsidepgfpicture{}', <<'EoTeX');
754
756
\pgf@picminy=0pt%
755
757
\pgf@picmaxx=\pgf@x%
756
758
\pgf@picmaxy=\pgf@y%
759
+ \def\pgf@shift@baseline{0pt}%
757
760
\pgfsys@typesetpicturebox{\pgfpic}%
758
761
\endgroup
759
762
EoTeX
0 commit comments