Le 08/03/2020 à 09:12, Stefano David a écrit :
Hi,

On Monday, 2 March 2020 16:10:56 UTC+1, Angel de Vicente wrote:

    Assume in conf.py  I have:

        author = 'John Smith \\ Michael Jackson'

As Jean-Francois already wrote, it should suffice to write

author = 'John Smith \\and Michael Jackson \\and Angel de Vicente'

to have the result you desire. I can't test it right now, but I will in the 
next days. I just got a small project where this is a requirement, so I need to 
make it work as well :-)

Hi Stefano

when testing this you may also need to add the following definition of \and

latex_elements['preamble'] = r"""
   % One line per author on title page
   \DeclareRobustCommand{\and}%
     {\end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}}%
"""

(this is the content of my matplotlib PR I linked to)
If not using this, then \and simply separates horizontally: this is
hard-coded in LaTeX source code for title page mark-up.

Using however the above redefinition I get a nice

       John Smith
  Michael Jackson
 Angel de Vicente

in output on frontpage.

With LaTeX's \\ as in

'John Smith \\\\ Michael Jackson \\\\ Angel de Vicente',

or

r'John Smith \\ Michael Jackson \\ Angel de Vicente',


the names are centered around identical vertical
axis, it gives a bad ragged look, like this

   John Smith
 Michael Jackson
 Angel de Vicente


And as Takeshi pointed out one should use the latex_documents config variable

latex_documents = [
    ('index',
     'foo.tex',
     'Test',
     'John Smith \\and Michael Jackson \\and Angel de Vicente',
     'manual')
]

Cheers,
Jean-François


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/r42qgo%242l2h%241%40ciao.gmane.io.

Reply via email to