Dear Michael,

you probably missed to install pyx.def, color.cfg and graphics.cfg in your 
latex environment. This is required in order to force the graphics specials to 
be written in PyX style. You asked to do so by the [pyx] parameters to the 
xcolor and graphicx packages. (A quick and dirty solution could be to just 
place the three files in the current directory.)

Usually you don't need to take care of all that when using the graphics/x 
package and/or the color package, as there is a hack in PyX to automatically 
choose the output style to be in PyX mode. However, this doesn't seem to work 
for the xcolor package (at least seemed broken when I just tried it).

Best,


André


Am 13.07.2011 um 17:19 schrieb Michael J Gruber:

> I recall something changed about the handling of color/pyxgraphics
> recently but can't find it. So I'm asking for help here. (I've bisected
> and solved the epsfile problem myself already, so this is only fair :) )
> 
> The following fragment used to work:
> 
> text.set(mode="latex")
> text.preamble(r"""%
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{stone}
> \usepackage{multicol}
> \usepackage[english]{babel}
> \usepackage[pyx]{xcolor}
> \usepackage[pyx]{graphicx}
> \usepackage[14]{sizedef}
> \usepackage{sizesub}
> \usepackage{xspace}
> %
> \parindent=0pt
> \parskip=3.5ex
> \multicolsep=0pt
> \hyphenpenalty=10000\exhyphenpenalty=10000
> \newcommand{\tline}[1]{\hglue0pt\hbox to \textwidth{#1}}
> \newcommand{\topic}[1]{{\rmfamily\textbf{#1:}}}
> %
> """) #, [text.texmessage.ignore])
> midgray = color.gray(128./255)
> text.preamble(r"\definecolor{midgray}{gray}{%(gray)f}" % midgray.color)
> lcdgray = color.gray(0.75)
> text.preamble(r"\definecolor{lcdgray}{gray}{%(gray)f}" % lcdgray.color)
> capgray = color.gray(0.25)
> text.preamble(r"\definecolor{capgray}{gray}{%(gray)f}" % capgray.color)
> 
> (The Augsburg gang will recognize where this comes from...)
> Most of the preamble lines shoud be irrelevant, of course, but waht do I
> know.
> 
> Now I am getting the following with that:
> 
>  File ".py", line 47, in <module>
>    text.preamble(r"\definecolor{midgray}{gray}{%(gray)f}" % midgray.color)
>  File "/home/mjg/src/pyx/pyx/text.py", line 1149, in preamble
>    self.execute(expr, texmessages)
>  File "/home/mjg/src/pyx/pyx/text.py", line 1023, in execute
>    raise TexResultError("unhandled TeX response (might be an error)", self)
> pyx.text.TexResultError: unhandled TeX response (might be an error)
> The expression passed to TeX was:
>  \definecolor{midgray}{gray}{0.501961}%
>  \PyXInput{5}%
> After parsing the return message from TeX, the following was left:
>  *! Undefined control sequence.
>  <*> \definecolor
>                  {midgray}{gray}{0.501961}%
> 
>  ! LaTeX Error: Missing \begin{document}.
> 
> So, \definecolor is not defined (while it used to be). What's going on?
> 
> Cheers,
> Michael
> 
> 
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric 
> Ries, the creator of the Lean Startup Methodology on "Lean Startup 
> Secrets Revealed." This video shows you how to validate your ideas, 
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user

-- 
by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
   / \ \    / )   [email protected], http://www.wobsta.de/
  / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
 (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to