Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amssymb require in sphinx.sty may break use of math font packages #2348

Closed
jfbu opened this issue Feb 23, 2016 · 5 comments
Closed

amssymb require in sphinx.sty may break use of math font packages #2348

jfbu opened this issue Feb 23, 2016 · 5 comments
Assignees
Milestone

Comments

@jfbu
Copy link
Contributor

jfbu commented Feb 23, 2016

This is similar to #2290 which was fixed in 532e99c (stable)

Commit 19a7dfd added \RequirePackage{amssymb} to sphinx.sty. This commit is in master branch but not in 1.3.5 (hence I did not realize impact on a project of mine until trying it on master branch).

The problem is if one uses 'fontpkg' key to latex_elements to load some font packages. Among them, there may be math font packages, and the later loading of amssymb by sphinx.sty can cause conflicts. For example, using (in a lualatex project) \setmathfont{xits-math}, I got

(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols


/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty:240: LaTeX Er
ror: Command `\eth' already defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.240 ...mbol{\eth}            {\mathord}{AMSb}{"67}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.


/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty:259: LaTeX Er
ror: Command `\digamma' already defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.259 ...mbol{\digamma}        {\mathord}{AMSb}{"7A}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.


/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty:265: LaTeX Er
ror: Command `\backepsilon' already defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.265 ...mbol{\backepsilon}    {\mathrel}{AMSb}{"7F}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

The fix should be like for #2290 to move loading of amssymb earlier.

Actually amssymb loads automatically amsfonts. Hence one can reuse the 'amsfonts' key which was introduced in 532e99c and set its default value to r'\usepackage{amssymb}'.

(perhaps the key should be renamed to 'amssymb').

@tk0miya
Copy link
Member

tk0miya commented Feb 25, 2016

MEMO: the amssymb package came from #1971

@tk0miya tk0miya added this to the 1.4 milestone Feb 25, 2016
@tk0miya
Copy link
Member

tk0miya commented Mar 3, 2016

In my environment, it must load the amsmath package earlier too.

So I would move both amsmath and amssymb to the position of amsfonts key.
And then, rename it to amsmath and assigns \usepackage{amsmath,amssymb} by default.
Of course, I will remove amsfonts installation hack from sphinx.ext.math*. It is already replaced by amssymb.

@xuhdev What do you think?

@tk0miya tk0miya self-assigned this Mar 3, 2016
@xuhdev
Copy link
Contributor

xuhdev commented Mar 3, 2016

It looks good to me :)

@tk0miya
Copy link
Member

tk0miya commented Mar 3, 2016

Ok, I will modify it later.

@tk0miya tk0miya closed this as completed in 2a2da13 Mar 3, 2016
@tk0miya
Copy link
Member

tk0miya commented Mar 3, 2016

Modified.
Thank you always :-)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants