[OS X TeX] Re: compatibility of todo package with xelatex

Rob Rye rowenrye at gmail.com
Sat Apr 17 18:32:25 EDT 2010


Hi All,

I stumbled upon a solution for my problem after Federico pointed me in the right direction by pointing out the amssymb call in todo itself and the fact that it is a font-related package...

I moved 

\usepackage{todo}

to the beginning of the preamble.

It seems that under XeTeX/XeLaTeX the amssymb package (or presumably any other package that requires it) needs to come before other packages that use amslatex packages. I am guessing that I was using something else that called an amslatex style package (euler.sty?). I saw references to similar issues arising from the order of package calls under XeTeX in a previous discussion at

http://www.tug.org/pipermail/xetex/2008-October/011031.html

For completeness sake here is the new preamble (that works with the only change being I moved todo up to the beginning):

\documentclass[12pt,letterpaper,article]{memoir} 

\usepackage[marginpar]{todo}
\usepackage{ifxetex}

\ifxetex 

\usepackage{euler}
\usepackage[cm-default]{fontspec}
\usepackage{xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\else
%set the font specifications to use if xetex/xelatex is not available
\fi %closes ifxetex statement

\usepackage{hyperref}

And here is the preamble that was generating the error messages:

\documentclass[12pt,letterpaper,article]{memoir} 

\usepackage{ifxetex}

\ifxetex 

\usepackage{euler}
\usepackage[cm-default]{fontspec}
\usepackage{xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\else
%set the font specifications to use if xetex/xelatex is not available
\fi %closes ifxetex statement

\usepackage[marginpar]{todo}
\usepackage{hyperref}

Thanks,

Rob
On Apr 17, 2010, at 3:08 PM, Rob Rye wrote:

> Hi Federico,
> 
> You did correctly use
> 
> \RequirePackage{amssymb}
> 
> in the todo.sty
> 
> Cheers,
> 
> Rob
> On Apr 17, 2010, at 3:01 PM, Federico Garcia wrote:
> 
>> Hi Rob and all,
>> 
>> From my first look at the error messages, I think somehow the amssymb package is being loaded twice (so, the second time LaTeX complains that all the commands amssymb defines are already defined). This is not supposed to happen: LaTeX should check for loaded packages before attempting a second load.
>> 
>> I don't have access to the todo code right now, but the problem may be that I forgot to use \RequirePackage instead of \usepackage. Could you please check, in the todo.sty file, what the exact mention of amssymb is?
>> 
>> In case it's \usepackage, that's the problem right there: change it into \RequirePackage and it should work. (And please let me know so I can fix it and re-publish)
>> 
>> Otherwise this might have something to do with XeLaTeX---amssymb is, after all, a font package. I am curious to see what the XeLaTeX folks can tell us!
>> 
>> Best regards,
>> 
>> Federico
>> 
>> On Sat, Apr 17, 2010 at 5:45 PM, Rob Rye <rowenrye at gmail.com> wrote:
>> MacOSX TeX Group and Federico Garcia (developer of todo package),
>> 
>> I have recently started using the todo package to keep track of unfinished business in my manuscripts. I had always just used comments, but the todo package allows me to see a list of my unfinished tasks at the end of the pdf, all in one place. todo has worked flawlessly for me under LaTeX. I really like it. 
>> 
>> I have also begun trying to make the transition to XeLaTeX, having been intimidated at the prospect of really learning how to use fonts under LaTeX. When I typeset a document using XeLaTeX and todo, I get the following error messages (which are non-fatal but annoying):
>> 
>> /usr/local/texlive/2009/texmf-dist/tex/latex/amsfonts/amssymb.sty:231: LaTeX Er
>> ror: Command `\Finv' already defined.
>> 
>> See the LaTeX manual or LaTeX Companion for explanation.
>> Type  H <return>  for immediate help.
>>  ...                                              
>>                                                   
>> l.231 ...ol{\Finv}           {\mathord}{AMSb}{"60}
>>                                                   
>> ? 
>> 
>> /usr/local/texlive/2009/texmf-dist/tex/latex/amsfonts/amssymb.sty:232: LaTeX Er
>> ror: Command `\Game' already defined.
>> 
>> See the LaTeX manual or LaTeX Companion for explanation.
>> Type  H <return>  for immediate help.
>>  ...                                              
>>                                                   
>> l.232 ...ol{\Game}           {\mathord}{AMSb}{"61}
>>                                                   
>> ? 
>> 
>> /usr/local/texlive/2009/texmf-dist/tex/latex/amsfonts/amssymb.sty:237: LaTeX Er
>> ror: Command `\beth' already defined.
>> 
>> See the LaTeX manual or LaTeX Companion for explanation.
>> Type  H <return>  for immediate help.
>>  ...                                              
>>                                                   
>> l.237 ...ol{\beth}           {\mathord}{AMSb}{"69}
>>                                                   
>> ? 
>> 
>> /usr/local/texlive/2009/texmf-dist/tex/latex/amsfonts/amssymb.sty:238: LaTeX Er
>> ror: Command `\gimel' already defined.
>> 
>> See the LaTeX manual or LaTeX Companion for explanation.
>> Type  H <return>  for immediate help.
>>  ...                                              
>>                                                   
>> l.238 ...ol{\gimel}          {\mathord}{AMSb}{"6A}
>>                                                   
>> ? 
>> 
>> /usr/local/texlive/2009/texmf-dist/tex/latex/amsfonts/amssymb.sty:239: LaTeX Er
>> ror: Command `\daleth' already defined.
>> 
>> See the LaTeX manual or LaTeX Companion for explanation.
>> Type  H <return>  for immediate help.
>>  ...                                              
>>                                                   
>> l.239 ...ol{\daleth}         {\mathord}{AMSb}{"6B}
>>                                                   
>> 
>> Presumably these errors indicate that when running XeLaTeX and todo together I somehow end up defining several symbols found in assymb.sty a second time. Has anyone else used this combination of tools? If so, is there a workaround, other than hitting return over and over again to ignore the errors?
>> 
>> In case it matters, all of my TeX work is done using the TeXShop GUI (v. 2.33 as of this writing) under Snow Leopard.
>> 
>> Thanks,
>> 
>> Rob Rye
>> Astrobiologist-at-Large
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Federico Garcia
>> Artistic Director
>> Alia Musica Pittsburgh
>> www.alia-musica.org
>> www.fedegarcia.net
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20100417/435dddc5/attachment.html>


More information about the MacOSX-TeX mailing list