Re: Math coloring
[Henrik Holm] > [Stephan Lehmke] > > > I've made a micro-update of texpower 0.08f which > > now checks for amsmath 2.x. This is also updated > > in the development version of texpower 0.0.9b at > > http://lrb.cs.uni-dortmund.de/~lehmke/TeXPower/preview/texpower.sty > > Sorry for the delay -- I'm working very batch-wise nowadays > and I haven't been writing any presentations lately. > Your fix works great! Hm. It turns out that your math coloring fix doesn't work perfect: Amsmath implements an equation* environment, which works in exactly the same manner as the displaymath environment (I suspect it actually is an alias) in creating an un'numbered equation. The peculiar thing is, displaymath gets colored, but equation* doesn't. (Naturally, it is not a very big deal, since I can use displaymath instead.) Henrik
Re: Math coloring
[Stephan Lehmke] > I've made a micro-update of texpower 0.08f which > now checks for amsmath 2.x. This is also updated > in the development version of texpower 0.0.9b at > http://lrb.cs.uni-dortmund.de/~lehmke/TeXPower/preview/texpower.sty Sorry for the delay -- I'm working very batch-wise nowadays and I haven't been writing any presentations lately. Your fix works great! Henrik
Re: Math coloring
Henrik Holm wrote on 18 Mar 2002 10:14:29 +0100: > > \documentclass{article} > > \usepackage{amsmath} > \usepackage[colormath]{texpower} > > \begin{document} > Here is some displayed math > \[ > e^{-j\pi}+1=0 > \] > and an equation > \begin{equation} > x = y + z > \end{equation} > The equation doesn't get colored when amsmath is loaded (even if it is > loaded before texpower). > \end{document} *sigh* I have to admit the colormath code is among the most fragile parts of TeXPower. It tries to be as minimal invasive as possible, but in fact it seems impossible to do this kind of thing without meddling with a lot of internals, of LaTeX and of other package intruding into the same areas. Of course, among other problems, this leads to the unfortunate situation where any change in any external package can break the whole thing down. In this case, it seems the handling of the equation environment by amsmath has changed in version 2.x. Before, it was redefined to be a variant of gather, so it was handeled by the \everymath hack. Now, it is treated as a normal displayed math environment. I've made a micro-update of texpower 0.08f which now checks for amsmath 2.x. This is also updated in the development version of texpower 0.0.9b at http://lrb.cs.uni-dortmund.de/~lehmke/TeXPower/preview/texpower.sty regards Stephan -- Stephan Lehmke [EMAIL PROTECTED] Fachbereich Informatik, LS I Tel. +49 231 755 6434 Universitaet Dortmund FAX 6555 D-44221 Dortmund, Germany
Re: Math coloring
Hello Henrik, > > > > > \usepackage{amsmath} %% make sure this comes *before* TeXpower... > > \usepackage[colormath]{texpower} > > %% \usepackage{amsmath} %% not after it! > > Sadly, this doesn't do the trick -- as the (now minimal) > example reveals. But the example is also capable of showing > that it is amsmath's _fault_. Your code below works fine for me: pdfTeX Version 3.14159-1.00a-pretest-20010806 (Web2C 7.3.3.1) under Digital Unix, OSF1 (V4.0 1091 alpha). and as Wendy says, it doesn't matter which order is used to load the packages. The texpower.sty package file shows these versions: \def\fileversion{0.0.8f} \def\filedate{2000/06/27} and my tpoptions.cfg and tpsettings.cfg are both empty. My color.cfg is the standard one from a TeXLive CD: \@ifundefined{pdfoutput}{\ExecuteOptions{dvips}}{\ExecuteOptions{pdftex}} \endinput > But thanks, I apparently need to be reminded that it is wise > to load texpower very, very late. There must be something else wrong too. Check your .log file for a simple job, to track which files are being loaded. Perhaps you are getting something for dvips rather than for pdftex ? (Though that should lead to trouble with all math environments, not just one.) Maybe you are loading a non-standard version of something, which has coding that isn't as clean as it could be. Without seeing a .log file, there's nothing more I can suggest. Hope this helps, Ross Moore > > Henrik > > > > > \documentclass{article} > > \usepackage{amsmath} > \usepackage[colormath]{texpower} > > \begin{document} > Here is some displayed math > \[ > e^{-j\pi}+1=0 > \] > and an equation > \begin{equation} > x = y + z > \end{equation} > The equation doesn't get colored when amsmath is loaded (even if it is > loaded before texpower). > \end{document} >
Re: Math coloring
Wendy, thanks for taking the time to run my example. [Wendy McKay] > On a Mac OS 9.1 using Textures 2.1 > Your minimal example works no matter where the amsmath > package is included, if you intended the text to be blue, > and the math to be green. Interesting. I think (hope!) that it has to do with different versions of amsmath, rather than with different operating systems. Myself, I am using teTeX-beta (20020207 version) on a Redhat Linux computer. > However, in the first and longer example, all the displayed > math is in green except for this one > > $$ a = b + c $$ %but if you change the delimiters to: > > \[%<--- this will give green math > a = b + c > \] > > and you will get all the math in green for your example, so > the macros seem to work in my configuration as long as you > don't use $$...$$ for displays. Package versions: > I am using these versions of amsmath, and texpower: > --- > Package: amsmath 1997/03/20 v1.2d AMS math features > \@mathmargin=\skip43 > (amstext.sty > Package: amstext 1996/10/28 v1.2b > (amsgen.sty > File: amsgen 1996/10/29 v1.2b > ... > > Package: texpower 2000/06/27 Create Dynamic Presentations with LaTeX. > v0.0.8f > (ifthen.sty > Package: ifthen 1997/11/02 v1.0n Standard LaTeX ifthen package (DPC) > ) (calc.sty > Package: calc 1997/11/11 v4.0e Infix arithmetic (KKT,FJ) > ... I seem to be using the same texpower version as you (2000/06/27 v0.0.8f) For the rest of the packages: This is what \RequirePackage{snapshot} gives me: \RequireVersions{ *{application}{TeX} {1990/03/25 v3.x} *{format} {LaTeX2e} {2001/06/01 v2.e} *{file} {test-math.tex}{/00/00 v0.0} *{package}{snapshot}{2001/05/24 v1.11} *{class} {article} {2001/04/21 v1.4e} *{file} {size10.clo} {2001/04/21 v1.4e} *{package}{amsmath} {2000/07/18 v2.13} *{package}{amstext} {2000/06/29 v2.01} *{package}{amsgen} {1999/11/30 v2.0} *{package}{amsbsy} {1999/11/29 v1.2d} *{package}{amsopn} {1999/12/14 v2.01} *{package}{texpower}{2000/06/27 v0.0.8f} *{package}{ifthen} {2001/05/26 v1.1c} *{package}{calc}{1998/07/07 v4.1b} *{file} {tpoptions.cfg}{/00/00 v0.0} *{package}{color} {1999/02/16 v1.0i} *{file} {color.cfg} {2001/08/31 v1.1} *{file} {dvips.def} {1999/02/16 v3.0i} *{file} {dvipsnam.def}{1999/02/16 v3.0i} *{file} {tpsettings.cfg}{/00/00 v0.0} } The tpoptions.cfg and tpsettings.cfg files are the ones that followed texpower. Henrik
Re: Math coloring
Henrik On a Mac OS 9.1 using Textures 2.1 Your minimal example works no matter where the amsmath package is included, if you intended the text to be blue, and the math to be green. However, in the first and longer example, all the displayed math is in green except for this one $$ a = b + c $$ %
Re: Math coloring
[Ross Moore] > [Henrik Holm] > > > In many cases, the math coloring works nicely. However, with > > one of my most common ways of displaying equations, it does > > not work! I have included an example -- it isn't strictly > > «minimal», but it shows several types of math, some of which > > get colored, some don't. I haven't been able to find a > > pattern of which equations do and which don't. > > Load the packages in a different order! > > > \documentclass{article} > > > \usepackage{amsmath} %% make sure this comes *before* TeXpower... > \usepackage[colormath]{texpower} > %% \usepackage{amsmath} %% not after it! Sadly, this doesn't do the trick -- as the (now minimal) example reveals. But the example is also capable of showing that it is amsmath's «fault». But thanks, I apparently need to be reminded that it is wise to load texpower very, very late. Henrik \documentclass{article} \usepackage{amsmath} \usepackage[colormath]{texpower} \begin{document} Here is some displayed math \[ e^{-j\pi}+1=0 \] and an equation \begin{equation} x = y + z \end{equation} The equation doesn't get colored when amsmath is loaded (even if it is loaded before texpower). \end{document}
Math coloring
In many cases, the math coloring works nicely. However, with one of my most common ways of displaying equations, it does not work! I have included an example -- it isn't strictly «minimal», but it shows several types of math, some of which get colored, some don't. I haven't been able to find a pattern of which equations do and which don't. Henrik. \documentclass{article} \usepackage[colormath]{texpower} \usepackage{amsmath} \begin{document} Here is some math: $b+b=2b$, some displayed math \[ e^{-j\pi}+1=0 \] and an equation \begin{equation} x = y + z \end{equation} a \TeX\ displayed equation $$ a = b + c $$ an unnumbered equation: \begin{equation*} x = y + z \end{equation*} two aligned equations \begin{align} x &= y + z \\ a &= b + c \end{align} two gathered equations \begin{gather} x = y + z \\ a = b + c \end{gather} The ordinary equation doesn't get colored! \end{document}