Till Tantau | 1 Sep 14:27
Picon
Favicon

Re: Foreign Element tex4ht + svg

Dear Olivier,


I haven't had a look into this, but I'm sure translations can be fixed, somehow. 

Concerning 2) this is much trickier. As TeX is compiling the text, TeX obviously has no real idea about the size of the text *in the final svg*. After all, from TeX's point of view, the 

Am 13.08.2008 um 16:22 schrieb Olivier Binda:

Hello.

As Firefox 3 now supports the ForeignObject element  of the SVG 1.1 specification
I was wondering if pgf/tikz would support this feature for text nodes in the tex4ht driver.
That would remove the liit on complexity of text nodes for the tex4ht+svg engine and allow us to put online math courses beautifully decorated inside svg frames (for example)

I did a few experimenttions
(I basically let tex4ht do the translation to Xhtml and Mathml and only wrapp the code in <ForeignObject> and <xhtml> elements)
and with a quick and dirty hack of the pgfsys-tex4ht.def file, I somehow managed to produce valid xhtml code and svg with xhtml and mathml code inside that displayed ok in Firefox 3, even with very complicated text nodes.

There are a few caveats :
1) The translation is wrong (I got it wrong).

2) the size of the boxes are wrong too.
A partial solution would be to use the \tikz\text width and \tikz text height options.
But it would be really great if tikz could somehow automatically guess the sizes, say in most/lots of cases.

Now, is it possible to solve problem 1 ?

And what about problem 2 ?
If it isn't possible, maybee we can add some options to manually solve the problem for each picture/node ?

Here are my hacks :
\def\pgfsys <at> beginpicture{%
 % \Configure{[]}{$}{$}
 % \Configure{()}{$}{$}
%  \Configure{$$}{}{}{}%$$
  %\Configure{$}{}{}{}%$
  %\Configure{SUB}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}}
  %\Configure{SUP}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}}
  %\Configure{SUBSUP}{}{}{}
  %\Configure{htf}
   % {0}{+}{<tspan font-family="}
   % {\%s}{" font-size="\%s}{}{}
   % {">}{</tspan>}
}
\def\pgfsys <at> endpicture{%
   undo:
  %\Configure{htf}{0}{+}{<span\Hnewline
  %   class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</span>}
}

\def\pgfsys <at> hbox#1{%
  \HCode{<g transform="scale(1,-1) translate(-5,-25)">
}%
  \HCode{<foreignObject width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">
}%
   \box#1%
  \HCode{</body>
</foreignObject></g>\Hnewline }%
}

With the xetex engine, the tex4ht driver, the hack and this code :

{\everypar={}%<----- this is important to produce valid xhtml code in tikzpicture with text nodes (in vboxes a.k.a. with the text width option)
% a similar fix could maybee be done with the tex4ht commands of paragraphs : \HtmlPar, \IgnorePar, \ShowPar, see there
\tikzpicture
\tikzstyle{everynode}=[text width=2cm]
\node[entity,text width=6cm] (sheep) {I love $\int_0^1{\sin(t)\over 1+{1\over 1+e^x}}d t=2$}
child {node[attribute] {name}}
child {node[attribute,text width=0.8cm] {$color$}};
\endtikzpicture}

it produces this svg picture (open it with firefox 3...and not internet explorer or opera) :

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="177.78247pt" height="69.16722pt" viewBox="-88.89124 -52.50311 177.78247 69.16722 ">
<g transform="translate(0, 16.66411 ) scale(1,-1) translate(0,52.50311 )">
                          
<g>
 <g stroke="rgb(0.0%,0.0%,0.0%)">
 <g fill="rgb(0.0%,0.0%,0.0%)">
 <g stroke-width="0.4pt">
 <g>
 </g>
 <g>
 <g>
 <path d=" M  -88.69124 -16.46411 h  177.38248 v  32.92822 h  -177.38248 Z  " style="fill:none"/>
 <g>
 <g transform="matrix(1.0,0.0,0.0,1.0,-85.35826,-5.8133)">
 <g transform="scale(1,-1) translate(-5,-25)"> <foreignObject width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">       I love
<!--l. 101--><math
 xmlns="http://www.w3.org/1998/Math/MathML" display="inline" ><msubsup><mrow
><mo
class="MathClass-op">&#x222B;</mo>
 <!--nolimits--></mrow><mrow
><mn>0</mn></mrow><mrow
><mn>1</mn></mrow></msubsup
><mfrac><mrow>  <mo
class="MathClass-op">sin</mo><!--nolimits--><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>t</mi></mrow><mo
class="MathClass-close">)</mo></mrow></mrow>
<mrow><mn>1</mn><mo
class="MathClass-bin">+</mo><mfrac><mrow>   <mn>1</mn></mrow>
<mrow><mn>1</mn><mo
class="MathClass-bin">+</mo><msup><mrow
><mi
>e</mi></mrow><mrow
><mi
>x</mi></mrow></msup
></mrow></mfrac></mrow></mfrac> <mi
>d</mi><mi
>t</mi> <mo
class="MathClass-rel">=</mo> <mn>2</mn></math></body> </foreignObject></g>
</g>
 </g>
 </g>
 <g>
 <g>
 <path d=" M  -0.1268 -42.67912 C  -0.1268 -37.68419 -9.56664 -33.67912 -21.33954 -33.67912 C  -33.11244 -33.67912 -42.55228 -37.68419 -42.55228 -42.67912 C  -42.55228 -47.67406 -33.11244 -51.67912 -21.33954 -51.67912 C  -9.56664 -51.67912 -0.1268 -47.67406 -0.1268 -42.67912 Z M  -21.33954 -42.67912  " style="fill:none"/>
 <g>
 <g transform="matrix(1.0,0.0,0.0,1.0,-33.00623,-44.8319)">
 <g transform="scale(1,-1) translate(-5,-25)"> <foreignObject width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml"> name</body> </foreignObject></g>
</g>
 </g>
 </g>
 <path d=" M  -8.33179 -16.66411 L  -16.83815 -33.67552  " style="fill:none"/>
 </g>
 <g>
 <g>
 <path d=" M  42.1485 -42.67912 C  42.1485 -37.33789 32.88837 -33.05513 21.33958 -33.05513 C  9.7908 -33.05513 0.53067 -37.33789 0.53067 -42.67912 C  0.53067 -48.02036 9.7908 -52.30312 21.33958 -52.30312 C  32.88837 -52.30312 42.1485 -48.02036 42.1485 -42.67912 Z M  21.33958 -42.67912  " style="fill:none"/>
 <g>
 <g transform="matrix(1.0,0.0,0.0,1.0,9.95845,-46.15134)">
 <g transform="scale(1,-1) translate(-5,-25)"> <foreignObject width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">       <!--l. 103--><math
 xmlns="http://www.w3.org/1998/Math/MathML" display="inline" ><mi
>c</mi><mi
>o</mi><mi
>l</mi><mi
>o</mi><mi
>r</mi></math> </body> </foreignObject></g>
</g>
 </g>
 </g>
  <path d=" M  8.32925 -16.66411 L  16.5525 -33.10518  " style="fill:none"/>
 </g>
  </g>
 </g>
 </g>
 </g>
 </g>
  </g>
</svg>

Best regards,
Olivier Binda
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Vasile Gaburici | 1 Sep 14:48
Picon

Actual pdf layers (aka "optional content")?

Has anyone considered implementing support for these in pgf? IMHO, the
main application would be beamer, where you wouldn't have to make each
frame a page. The trouble with the current approach is that
positioning is not that accurate, so the contents of a slide sometimes
"bobs" around with each frame; this is quite disturbing visually for
the audience. Some of my colleagues prefer PowerPoint to beamer for
this very reason.

There's a commercial package that supports PDF layers, but it also
depends on distiller. But pdftex 1.4 has had support for actual pdf
layers for quite a while now... pdftex 1.5.0 will also support merging
layers from included pdfs.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Kjell Magne Fauske | 1 Sep 15:03
Picon

Re: Actual pdf layers (aka "optional content")?

On Mon, Sep 1, 2008 at 2:48 PM, Vasile Gaburici <vgaburici <at> gmail.com> wrote:
> Has anyone considered implementing support for these in pgf? IMHO, the
> main application would be beamer, where you wouldn't have to make each
> frame a page. The trouble with the current approach is that
> positioning is not that accurate, so the contents of a slide sometimes
> "bobs" around with each frame; this is quite disturbing visually for
> the audience. Some of my colleagues prefer PowerPoint to beamer for
> this very reason.
>
> There's a commercial package that supports PDF layers, but it also
> depends on distiller. But pdftex 1.4 has had support for actual pdf
> layers for quite a while now... pdftex 1.5.0 will also support merging
> layers from included pdfs.
>

Not sure if this is related, but I think the animate package supports
PDF layers:

http://www.ctan.org/tex-archive/help/Catalogue/entries/animate.html

Regards,
Kjell Magne Fauske

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Till Tantau | 1 Sep 16:51
Picon
Favicon

Re: Actual pdf layers (aka "optional content")?

Hello everyone,

the main problem with integrating "real" pdf layers into pgf is that  
they are, well, very pdf-specific. The whole concept has (primarily)  
little to do with drawing graphics.

The "whobbeling" is almost always due to the fact that \only is used  
instead of \uncover. However, I can certainly sympathise with users  
that have trouble "getting rid of a whobble".

Unfortunately, real pdf layers will not necessarily solve this  
problem. They will, most likely, only reduce file size.

Anyway, for the moment animate.sty seems to be the best thing to get  
real pdf layers. In future versions of beamer real layers may be used,  
but I fear this will have less benefit than one might hope.

Best regards,
Till

Am 01.09.2008 um 15:03 schrieb Kjell Magne Fauske:

> On Mon, Sep 1, 2008 at 2:48 PM, Vasile Gaburici  
> <vgaburici <at> gmail.com> wrote:
>> Has anyone considered implementing support for these in pgf? IMHO,  
>> the
>> main application would be beamer, where you wouldn't have to make  
>> each
>> frame a page. The trouble with the current approach is that
>> positioning is not that accurate, so the contents of a slide  
>> sometimes
>> "bobs" around with each frame; this is quite disturbing visually for
>> the audience. Some of my colleagues prefer PowerPoint to beamer for
>> this very reason.
>>
>> There's a commercial package that supports PDF layers, but it also
>> depends on distiller. But pdftex 1.4 has had support for actual pdf
>> layers for quite a while now... pdftex 1.5.0 will also support  
>> merging
>> layers from included pdfs.
>>
>
> Not sure if this is related, but I think the animate package supports
> PDF layers:
>
> http://www.ctan.org/tex-archive/help/Catalogue/entries/animate.html
>
> Regards,
> Kjell Magne Fauske
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users
>

--
Prof. Dr. Till Tantau <tantau <at> tcs.uni-luebeck.de>
http://www.tcs.uni-luebeck.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Vasile Gaburici | 1 Sep 17:42
Picon

Re: Actual pdf layers (aka "optional content")?

On Mon, Sep 1, 2008 at 5:51 PM, Till Tantau <tantau <at> tcs.uni-luebeck.de> wrote:
> Hello everyone,
>
> the main problem with integrating "real" pdf layers into pgf is that
> they are, well, very pdf-specific. The whole concept has (primarily)
> little to do with drawing graphics.

I'm not sure I follow this argument. "Optional content" is described
in the "Graphics" chapter of the PDF spec, even though one there's no
restriction to using them just for graphics. Granted, according to the
spec, the PDF layers are meant to be more coarse-grained that the
layers in a drawing program (say PGF/TikZ), but look at the microtype
package documentation for a sample of what can be achieved with
layers. However, that was all done at a low level, using PDF literals;
it seems too much work for the average interactive drawing/slide.

> The "whobbeling" is almost always due to the fact that \only is used
> instead of \uncover. However, I can certainly sympathise with users
> that have trouble "getting rid of a whobble".
>
> Unfortunately, real pdf layers will not necessarily solve this
> problem. They will, most likely, only reduce file size.

Why not? The problems seems caused by re-rendering the same frame with
slightly different content. If the base layer is rendered only once,
it cannot possibly wobble when other layers are drawn on top of it,
because overlaying is done in the PDF viewer (unless the viewer has
bugs, of course).

> Anyway, for the moment animate.sty seems to be the best thing to get
> real pdf layers. In future versions of beamer real layers may be used,
> but I fear this will have less benefit than one might hope.

Well, I've not seen any animate.sty stuff causing any page to wobble.

>
>
> Best regards,
> Till
>
>
>
>
> Am 01.09.2008 um 15:03 schrieb Kjell Magne Fauske:
>
>> On Mon, Sep 1, 2008 at 2:48 PM, Vasile Gaburici
>> <vgaburici <at> gmail.com> wrote:
>>> Has anyone considered implementing support for these in pgf? IMHO,
>>> the
>>> main application would be beamer, where you wouldn't have to make
>>> each
>>> frame a page. The trouble with the current approach is that
>>> positioning is not that accurate, so the contents of a slide
>>> sometimes
>>> "bobs" around with each frame; this is quite disturbing visually for
>>> the audience. Some of my colleagues prefer PowerPoint to beamer for
>>> this very reason.
>>>
>>> There's a commercial package that supports PDF layers, but it also
>>> depends on distiller. But pdftex 1.4 has had support for actual pdf
>>> layers for quite a while now... pdftex 1.5.0 will also support
>>> merging
>>> layers from included pdfs.
>>>
>>
>> Not sure if this is related, but I think the animate package supports
>> PDF layers:
>>
>> http://www.ctan.org/tex-archive/help/Catalogue/entries/animate.html
>>
>> Regards,
>> Kjell Magne Fauske
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win
>> great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in
>> the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> pgf-users mailing list
>> pgf-users <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pgf-users
>>
>
> --
> Prof. Dr. Till Tantau <tantau <at> tcs.uni-luebeck.de>
> http://www.tcs.uni-luebeck.de
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Mark Butala | 2 Sep 04:57
Picon
Favicon

Poor quality (unsmooth) shade with pdflatex that looks smooth with latex->dvips->ps2pdf

Hello all,

I have noticed some quality issues with gradients (shades) produced with pgf.  The problem only happens with I compile with pdflatex but I do not see the problem when I do latex->dvips->ps2pdf.  I am running on a stock ubuntu hardy machine which installs pgf version 1.18 (I do not know if this is still a problem with version 2.0).

You can reproduce my problem with the following steps or (or download the output of my steps from the links I include):

1) Download the following example from the PGF and TikZ examples gallery (I have this issue with any tikzpicture with a shade - just using a standard example):

http://www.fauskes.net/pgftikzexamples/parabola-plot/

2) Compile with latex->dvips->ps2pdf  (I did the following)

latex parabola-plot.tex; dvips -o parabola-plot_dvips.ps parabola-plot.dvi; ps2pdf parabola-plot_dvips.ps

You can download the output here:

http://butala.csl.uiuc.edu/~butala/parabola-plot_dvips.pdf

3) Compile with pdflatex  (I did the following)

pdflatex parabola-plot.tex

You can download the output here:

http://butala.csl.uiuc.edu/~butala/parabola-plot.pdf


Note that the gradient in the output generated with pdflatex (parabola-plot.pdf) seems to be composed of many horizontal lines whereas the gradient in the latex->dvips->ps2pdf version (parabola-plot_dvips.pdf) is perfectly smooth.

OK, now this may just be an artifact of my pdf viewer (I use evince).&nbsp ; However, the real reason that I am asking about this is that I use the following to produce a nice background for large (4 feet by 3 feet) posters:

\newenvironment{poster}
{%
\small\noindent\ignorespaces\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\shade [top color=bgGradOne,bottom color=bgGradTwo]
(current page.north west) rectangle +(\paperwidth,-0.1\paperheight);
\shade [top color=bgGradTwo,bottom color=bgGradOne]
(current page.south east) rectangle +(-\paperwidth,0.9\paperheight);
\end{tikzpicture}
\vfill\begin{center}\begin{minipage}[c][\posterheight]{\posterwidth}
}
{\end{minipage}\end{center}\vfill\ignorespacesafterend}


When I printed a poster at kinkos using the above to produce the gradient background, I noticed the unsmooth horizontal lines - just like in the example I showed above with pdflatex.  I did not try to print a latex->dvips-&gt ;ps2pdf version of the poster - poor grad. students usually cannot afford to burn $100 for testing purposes :).

Any ideas?  Thanks in advance for any ideas!

---
- Mark

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Jon Engel | 2 Sep 15:48
Picon

Re: Actual pdf layers (aka "optional content")?


One advantage would be that a Beamer frame could appear as a single page in
the thumbnail lists and page counters produced by pdf readers.  Is there a
way to make that happen without layers?
Jon Engel

Hello everyone,

the main problem with integrating "real" pdf layers into pgf is that  
they are, well, very pdf-specific. The whole concept has (primarily)  
little to do with drawing graphics.

--

-- 
View this message in context: http://www.nabble.com/Actual-pdf-layers-%28aka-%22optional-content%22%29--tp19254186p19270614.html
Sent from the pgf-users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Mark D. Butala | 3 Sep 00:16
Favicon

Poor quality (unsmooth) shade with pdflatex that looks smooth with latex->dvips->ps2pdf

Hello all,

I have noticed some quality issues with gradients (shades) produced with 
pgf.  The problem only happens with I compile with pdflatex but I do not 
see the problem when I do latex->dvips->ps2pdf.  I am running on a stock 
ubuntu hardy machine which installs pgf version 1.18 (I do not know if 
this is still a problem with version 2.0).

You can reproduce my problem with the following steps or (or download 
the output of my steps from the links I include):

1) Download the following example from the PGF and TikZ examples gallery 
(I have this issue with any tikzpicture with a shade - just using a 
standard example):

http://www.fauskes.net/pgftikzexamples/parabola-plot/

2) Compile with latex->dvips->ps2pdf  (I did the following)

latex parabola-plot.tex; dvips -o parabola-plot_dvips.ps 
parabola-plot.dvi; ps2pdf parabola-plot_dvips.ps

You can download the output here:

http://butala.csl.uiuc.edu/~butala/parabola-plot_dvips.pdf 
<http://butala.csl.uiuc.edu/%7Ebutala/parabola-plot_dvips.pdf>

3) Compile with pdflatex  (I did the following)

pdflatex parabola-plot.tex

You can download the output here:

http://butala.csl.uiuc.edu/~butala/parabola-plot.pdf 
<http://butala.csl.uiuc.edu/%7Ebutala/parabola-plot.pdf>

Note that the gradient in the output generated with pdflatex 
(parabola-plot.pdf) seems to be composed of many horizontal lines 
whereas the gradient in the latex->dvips->ps2pdf version 
(parabola-plot_dvips.pdf) is perfectly smooth.

OK, now this may just be an artifact of my pdf viewer (I use evince).  
However, the real reason that I am asking about this is that I use the 
following to produce a nice background for large (4 feet by 3 feet) posters:

\newenvironment{poster}
{%
\small\noindent\ignorespaces\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\shade [top color=bgGradOne,bottom color=bgGradTwo]
(current page.north west) rectangle +(\paperwidth,-0.1\paperheight);
\shade [top color=bgGradTwo,bottom color=bgGradOne]
(current page.south east) rectangle +(-\paperwidth,0.9\paperheight);
\end{tikzpicture}
\vfill\begin{center}\begin{minipage}[c][\posterheight]{\posterwidth}
}
{\end{minipage}\end{center}\vfill\ignorespacesafterend}

When I printed a poster at kinkos using the above to produce the 
gradient background, I noticed the unsmooth horizontal lines - just like 
in the example I showed above with pdflatex.  I did not try to print a 
latex->dvips->ps2pdf version of the poster - poor grad. students usually 
cannot afford to burn $100 for testing purposes :).

Any ideas?  Thanks in advance for any ideas!

--

-- 
- Mark

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
mbutala | 3 Sep 07:03
Picon
Favicon

Re: Poor quality (unsmooth) shade with pdflatex that looks smooth with latex->dvips->ps2pdf


Sorry for the dupe - I'm new to this whole mailing list thing.  My bad.

Please post replys on this message.

Mark D. Butala wrote:
> 
> Hello all,
> 
> I have noticed some quality issues with gradients (shades) produced with 
> pgf.  The problem only happens with I compile with pdflatex but I do not 
> see the problem when I do latex->dvips->ps2pdf.  I am running on a stock 
> ubuntu hardy machine which installs pgf version 1.18 (I do not know if 
> this is still a problem with version 2.0).
> 
> You can reproduce my problem with the following steps or (or download 
> the output of my steps from the links I include):
> 
> 1) Download the following example from the PGF and TikZ examples gallery 
> (I have this issue with any tikzpicture with a shade - just using a 
> standard example):
> 
> http://www.fauskes.net/pgftikzexamples/parabola-plot/
> 
> 2) Compile with latex->dvips->ps2pdf  (I did the following)
> 
> latex parabola-plot.tex; dvips -o parabola-plot_dvips.ps 
> parabola-plot.dvi; ps2pdf parabola-plot_dvips.ps
> 
> You can download the output here:
> 
> http://butala.csl.uiuc.edu/~butala/parabola-plot_dvips.pdf 
> <http://butala.csl.uiuc.edu/%7Ebutala/parabola-plot_dvips.pdf>
> 
> 3) Compile with pdflatex  (I did the following)
> 
> pdflatex parabola-plot.tex
> 
> You can download the output here:
> 
> http://butala.csl.uiuc.edu/~butala/parabola-plot.pdf 
> <http://butala.csl.uiuc.edu/%7Ebutala/parabola-plot.pdf>
> 
> 
> Note that the gradient in the output generated with pdflatex 
> (parabola-plot.pdf) seems to be composed of many horizontal lines 
> whereas the gradient in the latex->dvips->ps2pdf version 
> (parabola-plot_dvips.pdf) is perfectly smooth.
> 
> OK, now this may just be an artifact of my pdf viewer (I use evince).  
> However, the real reason that I am asking about this is that I use the 
> following to produce a nice background for large (4 feet by 3 feet)
> posters:
> 
> \newenvironment{poster}
> {%
> \small\noindent\ignorespaces\pagestyle{empty}
> \begin{tikzpicture}[remember picture,overlay]
> \shade [top color=bgGradOne,bottom color=bgGradTwo]
> (current page.north west) rectangle +(\paperwidth,-0.1\paperheight);
> \shade [top color=bgGradTwo,bottom color=bgGradOne]
> (current page.south east) rectangle +(-\paperwidth,0.9\paperheight);
> \end{tikzpicture}
> \vfill\begin{center}\begin{minipage}[c][\posterheight]{\posterwidth}
> }
> {\end{minipage}\end{center}\vfill\ignorespacesafterend}
> 
> 
> When I printed a poster at kinkos using the above to produce the 
> gradient background, I noticed the unsmooth horizontal lines - just like 
> in the example I showed above with pdflatex.  I did not try to print a 
> latex->dvips->ps2pdf version of the poster - poor grad. students usually 
> cannot afford to burn $100 for testing purposes :).
> 
> Any ideas?  Thanks in advance for any ideas!
> 
> -- 
> - Mark
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Poor-quality-%28unsmooth%29-shade-with-pdflatex-that-looks-smooth-with-latex-%3Edvips-%3Eps2pdf-tp19279487p19282962.html
Sent from the pgf-users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Robin Houston | 3 Sep 11:22
Picon
Gravatar

Re: Poor quality (unsmooth) shade with pdflatex that looks smooth with latex->dvips->ps2pdf

The pdflatex version actually looks better/smoother here, using
Apple's Preview.app.

Which viewer are you seeing problems with?

Robin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane