Hi,

REVTeX [ https://journals.aps.org/revtex ] is a LaTeX class/style files 
distributed by American Physical Society for submitting 
papers to APS journals. 

I was trying to setup my document written with Sphinx for REVTeX. I found 
useful information to setup conf.py and it now mostly  working
with REVTeX. One exception is the place of \author{} in the tex file 
created by Sphinx.

Standard Sphinx-latex writer put \authon{} entry just after the preambles 
with \title{} and other stuffs. However, REVTeX requestes to put 
\author{} entries between \begin{document} and \maketitle,  and \author{} 
entry after preambles produce error.

After some experiments, I found that if I modified HEADER and BEGIN_DOC in 
sphinx/writes/latex.py to:

==========
HEADER = r'''%% Generated by Sphinx.
.....
%(preamble)s

\newcommand{\sphinxlogo}{%(logo)s}
\renewcommand{\releasename}{%(releasename)s}
%(makeindex)s
'''

BEGIN_DOC = r'''
\begin{document}
\title{%(title)s}
\date{%(date)s}
\release{%(release)s}
\author{%(author)s}
%(shorthandoff)s
%(maketitle)s
%(tableofcontents)s
'''
==========

I checked sphinx/doc documents with this modified version of 
writers/latex.py and found NO problem.

I would greatly appreciated if you have better way for this problem and 
could let me know it.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to