diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def index 97fdf109746..751ab7e6fa7 100644 --- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def @@ -72,7 +72,7 @@ % \Configure{SUB}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}} % \Configure{SUP}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}} % \Configure{SUBSUP}{}{}{} -% \Configure{htf} +% \Configure{htf} % {0}{+}{<tspan font-family="} % {\%s}{" font-size="\%s}{}{} % {">}{</tspan>} @@ -90,12 +90,12 @@ % we don't want tex4ht putting <p> and </p> tags automatically in our svg code and causing invalid xhtml in our svg pictures \newif\ifpgfsys@CssIncluded@\pgfsys@CssIncluded@false -\def\pgfsys@beginpicture{% +\def\pgfsys@beginpicture{% \pgfsys@svg@boxmodefalse% \EndP\HtmlParOff% \pgfkeys{/pgf/tex4ht node/escape=false}% % text only nodes are the default. Advantage : pure svg pictures are - % the default, nicer for text only nodes. + % the default, nicer for text only nodes. % Disadvantages : this rendering methods produce more invalid or degraded svg pictures than with the foreignelement tag %% we use css to control the display of foreignelement rendered text nodes \ifpgfsys@CssIncluded@ @@ -105,14 +105,14 @@ line-height:100\%; font-size:120\%; % this is the trick....a font of size 100% in % a box scaled down to half size makes it a - % half size font. + % half size font. % you'll have to double the size of things % that you want to have a regular size in - % this half-scaled box though + % this half-scaled box though font-family:STIXgeneral,Times,Symbol,cmr10,CMSY10,CMEX10;% % can't wait for the stix font...the cmr10, etc font are % available from the mozilla site, times and symbols should be - % okey + % okey padding:0; margin:0; % background-color:\#12ff55; usefull for debugging positioning @@ -155,8 +155,8 @@ \ifdim\pgf@y<1pt% \pgf@y=1pt% \fi% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% \pgfsysprotocol@flushcurrentprotocol% \HCode{<object data="\jobname-\the\pgf@sys@svg@picnum.svg" width="}% % Calculate pixel coordinates (this does not really make sense, but @@ -178,7 +178,7 @@ /pgf/tex4ht node/css/.get=\pgfsys@foreignobject@css }% \pgfsys@invoke{<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>\Hnewline% added that - <?xml-stylesheet href="\pgfsys@foreignobject@css.css" type="text/css"?>\Hnewline}% added that + <?xml-stylesheet href="\pgfsys@foreignobject@css.css" type="text/css"?>\Hnewline}% added that %%%%%%%%%%%%%%% maybee I should add an option to change the css, for the whole picture \pgfsys@invoke{<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="\the\pgf@xc" @@ -247,17 +247,17 @@ {% grouping necessary cause we change the catcode of ":" \catcode`:=11\relax %%% this is necessary to calculate the size of text nodes with - %%% inline maths + %%% inline maths % (it is an improvement of tex4ht, got to ask eitan gurary if he - % could put it in the tex4ht code) + % could put it in the tex4ht code) \gdef\DviMathAlt{% \a:DviMath\leavevmode \MathClass \ht:special{t4ht@(}\hbox\bgroup{\expandafter\ifx\csname ht:everypar\endcsname\relax\expandafter\everypar\else - \expandafter\ht:everypar\fi{}\leavevmode\ht:special{t4ht@)}}\DviSend + \expandafter\ht:everypar\fi{}\leavevmode\ht:special{t4ht@)}}\DviSend }% % these are configures for the foreignelement rendering method of text nodes : we let tex4ht write xhtml and mathml in the svg picture - % + % \gdef\pgfsys@foreignobject@configure{% \Configure{$}{\Configure{@math}{%\a:mathml display="inline" }\DviMathAlt}{\EndDviMath}{}%%% we REALLY need to use \DviMathAlt here instead of \DviMath see above remark @@ -278,15 +278,15 @@ \global\let\pgfsys@foreignobject@par=\par % use this instead of \par % -- \Configure is no \long macro (at % least in one of the older - % versions). - + % versions). + % these are the configures for the mtext rendering method of text % nodes : we turn everything into regular character (don't want math - % modes or subsup) - % and we hope it works (it doesn't if the text nodes aren't simple) + % modes or subsup) + % and we hope it works (it doesn't if the text nodes aren't simple) \gdef\pgfsys@mtext@configure{% % no configures for \(\) and \[\] those might be needed for - % context or Latex. Let me know ! + % context or Latex. Let me know ! \Configure{$$}{}{}{}% no block maths \Configure{$}{}{}{}%$ no inline maths \Configure{SUB}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}}% @@ -302,21 +302,21 @@ % pgfutil@minipage % -% I had to change it to make it play nice with the way tex4ht puts <p> and <\p> tags +% I had to change it to make it play nice with the way tex4ht puts <p> and <\p> tags % \newif\ifpgfsys@textonly \def\pgfutil@minipage[#1]#2{% \hbox to#2\bgroup \hsize=#2\relax - \vbox\bgroup -% though it works, I'm desabling the above-mentioned hack to make tex4ht behave with <p> <\p>, because it blurps the positioning + \vbox\bgroup +% though it works, I'm desabling the above mentioned hack to make tex4ht behave with <p> <\p>, because it blurps the positioning % (I''l try to fix that later, it's a css thing) % % \ifpgfsys@textonly\else\HtmlParOn\fi % % \noindent is better as it doesn't produce indentation AND it makes you leave vertical mode - \noindent%\leavevmode + \noindent%\leavevmode }% \def\pgfutil@endminipage{% % same thing here @@ -330,14 +330,14 @@ \newbox\pgfsys@foreignobject@Box \newdimen\pgf@s \newdimen\pgf@t -% this is the alternate hbox routine that renders text nodes through the foreignobject tag +% this is the alternate hbox routine that renders text nodes through the foreignobject tag \def\pgfsys@foreignobject@hbox#1{% % Compute box y translation (x translation is correct). \pgf@y=-\ht#1\relax \HCode{<g transform="scale(1,-1) translate(0,\pgf@sys@tonumber{\pgf@y}) % got to translate in y scale(0.5,0.5)">\Hnewline}% scaling work around (damn dumb browsers !) % Compute box size (scaled 2 times) - % this is necessary to make the browser scale the font down 50% (the STUPID browsers won't make font-size:50% happen, + % this is necessary to make the browser scale the font down 50% (the STUPID browsers won't make font-size:50% happen, % so we have to work around this by making svg scale the things down 50%, doubling the size of the text node frame (i.e. no changement there) \pgf@x=2\wd#1\relax \pgf@y=2\ht#1\relax @@ -355,9 +355,9 @@ \pgf@t=0pt \else \advance \pgf@y by -2\pgf@s\relax - \pgf@t=2\pgf@t\relax + \pgf@t=2\pgf@t\relax \fi - % + % \HCode{<foreignObject x="0" y="\pgf@sys@tonumber{\pgf@t}" width="\pgf@sys@tonumber{\pgf@x}" height="\pgf@sys@tonumber{\pgf@y}">}% % this is to make use of the css, class and id options through which you can control the way things display @@ -372,8 +372,8 @@ % I'll have to look into this, perhaps there are better % doctype.... aren't recognised and produces invalid svg % pictures a workaround (not implemented yet) would be to make - % them into entities of the svg picture. - <body id="\pgfsys@foreignobject@id" class="\pgfsys@foreignobject@class" xmlns="http://www.w3.org/1999/xhtml" >\Hnewline + % them into entities of the svg picture. + <body id="\pgfsys@foreignobject@id" class="\pgfsys@foreignobject@class" xmlns="http://www.w3.org/1999/xhtml" >\Hnewline <div>\Hnewline }% \box#1% @@ -383,10 +383,10 @@ </foreignObject>\Hnewline }% % debug positioning not needed but it would be nice to let it there to control things later on - % \HCode{<rect x="0" y="0" width="\pgf@sys@tonumber{\pgf@x}" height="\pgf@sys@tonumber{\pgf@y}" + % \HCode{<rect x="0" y="0" width="\pgf@sys@tonumber{\pgf@x}" height="\pgf@sys@tonumber{\pgf@y}" % style="fill:yellow;stroke:red; fill-opacity:0.5;stroke-opacity:0.5"/>} \HCode{</g>\Hnewline}% - \global\advance\pgf@sys@svg@nodenum by 1\relax + \global\advance\pgf@sys@svg@nodenum by 1\relax }% % the options and the code that controls it all (switches between \pgfsys@mtext@hbox and \pgfsys@foreignelement@hbox) @@ -406,7 +406,7 @@ -% this might be needed +% this might be needed %\font\SvgText=cmr10\relax @@ -431,7 +431,7 @@ \pgf@sys@svg@sh% \pgfsys@endscope% \pgfsys@endpicture% - \hss% + \hss% }% \pgf@process{\pgf@sys@svg@pos}% \pgf@picminx=0pt% @@ -480,6 +480,6 @@ \endinput -%%% Local Variables: +%%% Local Variables: %%% mode: latex -%%% End: +%%% End: |