image wrongly aligned in latex

17 views
Skip to first unread message

Andrea Cassioli

unread,
Jan 28, 2015, 9:37:06 AM1/28/15
to sphin...@googlegroups.com
Hi,
I'd like to include some PNG image in docs. I use this

.. image:: myimage.png
   :scale: 50
   :align: center



It works perfectly with the HTML builder, but using the latexPDF builder the images are flush to the right. Any clue? 

The latex code is 

{\hfill\scalebox{0.500000}{\includegraphics{generate_hostid.png}}\hfill}


Guenter Milde

unread,
Jan 30, 2015, 8:13:54 AM1/30/15
to sphin...@googlegroups.com
On 2015-01-28, Andrea Cassioli wrote:

> [-- Type: text/plain, Encoding: --]
The \hfill macro does not work at the beginning of a line.

The Docutils LaTeX writer uses::

\noindent\makebox[\linewidth][c]{\includegraphics[scale=0.500000]{myimage.png}}

Try if this helps and if yes, file a bug report to suggest changing the
Sphinx LaTeX writer.

Günter

Andrea Cassioli

unread,
Feb 2, 2015, 3:56:29 AM2/2/15
to sphin...@googlegroups.com, mi...@users.sf.net
Thank you, 
I guess you are right!

Just post a bug report.
Reply all
Reply to author
Forward
0 new messages