diff options
author | jfbu <jfbu@free.fr> | 2016-06-12 19:35:47 +0200 |
---|---|---|
committer | jfbu <jfbu@free.fr> | 2016-06-15 08:53:24 +0200 |
commit | 5510653d6ebe7f7f6b834879a66d18071e16a5d6 (patch) | |
tree | 45ec6d4dbe9f6020108f6fb56b083fdc2b489f26 /sphinx/quickstart.py | |
parent | 8608387585b6d24945a4ba94f80f50714425a6d4 (diff) | |
download | sphinx-git-5510653d6ebe7f7f6b834879a66d18071e16a5d6.tar.gz |
Fix #2629. Add new config option ``latex_keep_old_macro_names``
The cause of the issue was a clash about ``\titleref`` macro being already
defined in memoir class context. To avoid similar problems, this makes
the text styling macros
``\strong``, ``\code``, ``\bfcode``, ``\email``, ``\tablecontinued``,
``\titleref``, ``\menuselection``, ``\accelerator``, ``\crossref``,
``\termref``, ``\optional``,
also available with ``\sphinx`` prefix, with a conf.py boolean option to
let sphinx.sty only define ``\sphinx``-prefixed macros. As default value
is False, backwards compatibility is maintained.
On this occasion, some internal non-public macros have been renamed with
prefix ``\spx@``. The command
find . -name '*.sty' -exec grep -l \\\\spx@ {} \;
has been executed in TeXLive 2015 and 2016 installations to check no
package defines macros starting with ``\spx@``.
Some internal macros having public names (because they are written by
latex.py into the body of the latex document) have been renamed to have
``\sphinx`` prefix. The macros in sphinx.sty starting with \py@, or \DU,
or \PYG have not been modified. Similarly ``\release``, ``\version``,
``\releasename``, etc... have not been renamed.
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r-- | sphinx/quickstart.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 1f14c0d09..4680fecd4 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -359,6 +359,12 @@ latex_documents = [ # # latex_appendices = [] +# It false, will not define \strong, \code, \titleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + # If false, no module index is generated. # # latex_domain_indices = True |