\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.9 2005/11/15 17:46:37 tantau Exp $ % Copyright 2005 by Till Tantau . % % This program can be redistributed and/or modified under the terms % of the GNU Public License, version 2. \RequirePackage{xcolor} % Driver commands for tex4ht % % Load common pdf commands: % \input pgfsys-common-svg.def % % tex4ht-specific stuff: % \def\pgfsys@invoke#1{\HCode{#1}} \newcount\pgf@sys@svg@picnum \def\pgfsys@beginpicture{% \Configure{[]}{$}{$} \Configure{()}{$}{$} \Configure{$$}{}{}{}%$$ \Configure{$}{}{}{}%$ \Configure{SUB}{\HCode{}}{\HCode{}} \Configure{SUP}{\HCode{}}{\HCode{}} \Configure{SUBSUP}{}{}{} \Configure{htf} {0}{+}{}{} } \def\pgfsys@endpicture{% % undo: \Configure{htf}{0}{+}{}{} } \def\pgfsys@typesetpicturebox#1{% \global\advance\pgf@sys@svg@picnum by 1\relax% % Ok, compute width/height \pgf@xa=\pgf@picminx% \pgf@ya=\pgf@picminy% \pgf@xb=\pgf@picmaxx% \pgf@yb=\pgf@picmaxy% \pgf@x=\pgf@xb% \advance\pgf@x by-\pgf@xa% \pgf@y=\pgf@yb% \advance\pgf@y by-\pgf@ya% \ifdim\pgf@y<1pt% \pgf@y=1pt% \fi% \pgf@xc=\pgf@x% \pgf@yc=\pgf@y% \pgfsysprotocol@flushcurrentprotocol% \HCode{

SVG-Viewer needed.

}% \special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}% \pgfsys@invoke{\Hnewline \Hnewline }% \setlength\pgf@x{\pgf@shift@baseline}% \advance\pgf@x by-\pgf@picminy\relax% \advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height \advance\pgf@picmaxx by-\pgf@picminx\relax% maxx is now the width \setbox#1=\hbox{\hskip-\pgf@picminx\lower\pgf@picminy\box#1}% \ht#1=\pgf@picmaxy% \wd#1=\pgf@picmaxx% \dp#1=0pt% \leavevmode\raise-\pgf@x\box#1% \pgfsys@invoke{\Hnewline \Hnewline }% \special{t4ht<\jobname-\the\pgf@sys@svg@picnum.svg}% } \def\pgfsys@hbox#1{% \pgf@x=.5\wd#1% \ifx\tikz@textcolor\relax% \else% \ifx\tikz@textcolor\@empty% \pgfsetfillcolor{.}% \else% \pgfsetfillcolor{\tikz@textcolor}% \fi% \fi% tweak for TikZ \HCode{\Hnewline }% \wd#1=0pt% \ht#1=0pt% \dp#1=0pt% \box#1 \HCode{\Hnewline }% } \def\pgfsys@outerinvoke{\ifpgfpicture\expandafter\pgfsys@invoke\else\expandafter\@gobble\fi} \def\pgfsys@shadingoutsidepgfpicture#1{% \begingroup% #1% \setbox\pgfpic=\hbox to0pt{% \pgfsys@beginpicture% \pgfsys@beginscope% \pgf@sys@svg@sh@defs% \pgf@sys@svg@sh% \pgfsys@endscope% \pgfsys@endpicture% \hss% }% \pgf@process{\pgf@sys@svg@pos}% \pgf@picminx=0pt% \pgf@picminy=0pt% \pgf@picmaxx=\pgf@x% \pgf@picmaxy=\pgf@y% \pgf@baseline=0pt% \pgfsys@typesetpicturebox\pgfpic% \endgroup% } \def\pgfsys@shadinginsidepgfpicture#1{% #1% \pgf@sys@svg@sh@defs% hmmm.... \pgf@process{\pgf@sys@svg@pos} \pgf@xa=-.5\pgf@x% \pgf@ya=-.5\pgf@y% \pgfsysprotocol@literal{\Hnewline}% \pgf@sys@svg@sh% \pgfsysprotocol@literal{\Hnewline}% } % Protect against color.4ht evil meddling with xcolor: \let\pgf@xcolor@declaredcolor=\@declaredcolor \let\pgf@xcolor@undeclaredcolor=\@undeclaredcolor \AtBeginDocument{ \let\pgf@texht@declaredcolor=\@declaredcolor \let\pgf@texht@undeclaredcolor=\@undeclaredcolor \def\@declaredcolor{\ifpgfpicture\expandafter\pgf@xcolor@declaredcolor\else\expandafter\pgf@texht@declaredcolor\fi} \def\@undeclaredcolor{\ifpgfpicture\expandafter\pgf@xcolor@undeclaredcolor\else\expandafter\pgf@texht@undeclaredcolor\fi} \ConfigureEnv{pgfpicture}{}{}{}{} } \endinput %%% Local Variables: %%% mode: latex %%% End: