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