Undefined control sequence error for \preparecolorset

286 views
Skip to first unread message

roc...@wcsu.edu

unread,
Dec 19, 2016, 11:55:53 AM12/19/16
to MathBook XML Support
When I compile the example below into LaTeX and try to compile that file I get an "Undefined control sequence" error for \preparecolorset on line 32 of svgnam.def.

Minimum Working Example:

<?xml version="1.0" encoding="UTF-8"?>

<mathbook>
<article xml:id="MWE">
<p>This is a minimum working example.</p>

</article>
</mathbook>


The issue seems to occur because the \PassOptionsToPackage come before the \usepacage (see below).  If I switch these two lines the issue disappears.

From the generated LaTeX file:

%% Color support, xcolor package
%% Always loaded.  Used for:
%% mdframed boxes, add/delete text, author tools
\PassOptionsToPackage{usenames,dvipsnames,svgnames,table}{xcolor}
\usepackage{xcolor}
%%
MWE.xml
MWE.tex

Rob Beezer

unread,
Dec 19, 2016, 1:10:25 PM12/19/16
to mathbook-x...@googlegroups.com
Thanks very much for the careful report. That option-passing command is meant
to precede both "xcolor" and "listings", since the latter also loads "xcolor".
This was motivated by a solution posted at:

http://tex.stackexchange.com/questions/57364/option-clash-for-package-xcolor

To move it afterwards seems to behave for me, but I think renders it ineffective.

Your MWE.tex compiles fine for me with pdflatex and xelatex. It also
compiles fine on SageMathCloud (both are Ubuntu Linux systems). And likely the
configuration in your MWE has been hit lots of times by other users.

Can you tell us more about your OS, TeX distribution (age?), and which TeX
engine you are using (pdflatex, xelatex, ...)? Do you have another place you
can test that is different in some substantial way?

Thanks,
Rob
> --
> You received this message because you are subscribed to the Google Groups
> "MathBook XML Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to mathbook-xml-sup...@googlegroups.com
> <mailto:mathbook-xml-sup...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

roc...@wcsu.edu

unread,
Dec 19, 2016, 1:26:57 PM12/19/16
to MathBook XML Support, bee...@ups.edu
OS: Mac OS Sierra Version 10.12.1 

Compiler: pdfTex, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) compiling with format=pdflatex

I hadn't thought to try SageMathCloud, when I upload it to my account there it works. Is this likely an issue with the Mac or TeX Live?

roc...@wcsu.edu

unread,
Dec 19, 2016, 1:33:58 PM12/19/16
to MathBook XML Support, bee...@ups.edu
P.S. If I comment out either of the previously mentioned lines it will compile as well on my computer.

Rob Beezer

unread,
Dec 19, 2016, 1:45:26 PM12/19/16
to mathbook-x...@googlegroups.com
I tried modifying the LaTeX output of the sample article so that the
option-passing command was removed, and then adjusted the loading of xcolor to be

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

and it seemed to compile just fine. I think this was added due to some
conflicts with the "lilypond" package, which provides support for musical
scores. I'm going to be into some of that soon, and might experiment there if
we don't make any progress first.

https://github.com/rbeezer/mathbook/commit/1ecfa86a267a9a64e0b4b464e3ea00b8365c7fed

Rob

Rob Beezer

unread,
Dec 19, 2016, 1:55:43 PM12/19/16
to mathbook-x...@googlegroups.com
Thanks. I'm at a bit of a loss - everything looks reasonably up-to-date.

SMC will be TeXLive, that's the default for Ubuntu. And we have lots of Mac
users and no reports of problems.

Would you have ever installed anything related to xcolor or listings in your
"private" texmf tree? I've been bit by that one, where I have something taking
priority that was once very new, but is now is very old. You can temporarily
move a package out, rebuild the cache (mktexlsr, texhash, or similar), and try
again?

Rob

roc...@wcsu.edu

unread,
Dec 19, 2016, 2:18:35 PM12/19/16
to MathBook XML Support, bee...@ups.edu
Wow, thank you so much.  Good call on the private texmf tree, for some reason I had an old copy of xcolor in there (dated to 2004).

deleting that seems to have solved the issue.


On Monday, December 19, 2016 at 1:55:43 PM UTC-5, Robert Beezer wrote:
Thanks.  I'm at a bit of a loss - everything looks reasonably up-to-date.

SMC will be TeXLive, that's the default for Ubuntu.  And we have lots of Mac
users and no reports of problems.

Would you have ever installed anything related to  xcolor  or  listings  in your
"private" texmf tree?  I've been bit by that one, where I have something taking
priority that was once very new, but is now is very old.  You can temporarily
move a package out, rebuild the cache (mktexlsr, texhash, or similar), and try
again?

Rob

On 12/19/2016 10:26 AM, roc...@wcsu.edu wrote:
> OS: Mac OS Sierra Version 10.12.1
>
> Compiler: pdfTex, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) compiling with
> format=pdflatex
>
> I hadn't thought to try SageMathCloud, when I upload it to my account there it
> works. Is this likely an issue with the Mac or TeX Live?
>
> --
> You received this message because you are subscribed to the Google Groups
> "MathBook XML Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email

Rob Beezer

unread,
Dec 19, 2016, 2:52:51 PM12/19/16
to mathbook-x...@googlegroups.com
BINGO! ;-)

Now that qualifies as "very old." Thanks for working through that so quickly
and easily.

Let us know when your project is ready for public consumption.

Rob

On 12/19/2016 11:18 AM, roc...@wcsu.edu wrote:
> Wow, thank you so much. Good call on the private texmf tree, for some reason I
> had an old copy of xcolor in there (dated to 2004).
>
> deleting that seems to have solved the issue.
>
> On Monday, December 19, 2016 at 1:55:43 PM UTC-5, Robert Beezer wrote:
>
> Thanks. I'm at a bit of a loss - everything looks reasonably up-to-date.
>
> SMC will be TeXLive, that's the default for Ubuntu. And we have lots of Mac
> users and no reports of problems.
>
> Would you have ever installed anything related to xcolor or listings in
> your
> "private" texmf tree? I've been bit by that one, where I have something taking
> priority that was once very new, but is now is very old. You can temporarily
> move a package out, rebuild the cache (mktexlsr, texhash, or similar), and try
> again?
>
> Rob
>
> On 12/19/2016 10:26 AM, roc...@wcsu.edu <javascript:> wrote:
> > OS: Mac OS Sierra Version 10.12.1
> >
> > Compiler: pdfTex, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) compiling
> with
> > format=pdflatex
> >
> > I hadn't thought to try SageMathCloud, when I upload it to my account
> there it
> > works. Is this likely an issue with the Mac or TeX Live?
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "MathBook XML Support" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to mathbook-xml-sup...@googlegroups.com <javascript:>
> > <mailto:mathbook-xml-sup...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "MathBook XML Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to mathbook-xml-sup...@googlegroups.com
> <mailto:mathbook-xml-sup...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages