unimpressed with latex output

101 views
Skip to first unread message

Michael P. Soulier

unread,
Dec 6, 2010, 9:07:18 PM12/6/10
to sphin...@googlegroups.com
Hi,

I have an existing document that I'm currently building with rst2pdf, but I've
been trying to get it working with the supported pdflatex output instead. I've
run into one problem after another with sphinx generating output that latex
has a problem with.

I've received no feedback on this list so far.

The latest issue is this, during the build

[5] [6 <./usecase-tw.png>] <mbg_sg_mode1.png, id=77, 602.25pt x 420.57124pt>
<use mbg_sg_mode1.png> <use mbg_sg_mode1.png>
<mbg_sg_mode2.png, id=78, 702.625pt x 260.975pt> <use mbg_sg_mode2.png>
<use mbg_sg_mode2.png>

! LaTeX Error: Something's wrong--perhaps a missing \item.

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

l.382 \end{tabulary}

?
! Emergency stop.
...

l.382 \end{tabulary}

! ==> Fatal error occurred, the output PDF file is not finished!

Is anyone supporting the latex output? I'd love to work with someone to fix
this.

Cheers,
Mike
--
Michael P. Soulier <msou...@digitaltorque.ca>
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein

signature.asc

Guenter Milde

unread,
Dec 7, 2010, 2:50:45 AM12/7/10
to sphin...@googlegroups.com
On 2010-12-07, Michael P. Soulier wrote:

> I have an existing document that I'm currently building with rst2pdf,
> but I 've been trying to get it working with the supported pdflatex
> output instead. I 've run into one problem after another with sphinx
> generating output that latex has a problem with.

> The latest issue is this, during the build
...
> ! =3D=3D> Fatal error occurred, the output PDF file is not finished!

A latex log alone is usually not enought to find the problem. Could you
provide a minimal working example? (i.e. the smallest possible document
that shows this error as both, rst source and latex source)

Then we can experiment with it and try to find a solution.

> Is anyone supporting the latex output? I'd love to work with someone to fix
> this.

I actively work on the Docutils latex writer. Unfortunately, Sphinx does
not use the "upstream" writer for LaTeX (while, e.g., the Docutils HTML
writer is used for HTML). In my view, the long term solution should be to
get the Docutils latex2e writer to work with Sphinx.

I offer to cooperate in making the necessary changes to let Sphinx use
the Docutils "latex2e" writer -- I expect this to be a nontrivial task
with lots of discussion, decisions, and changes on both sides involved to
get a "Docutils - Sphinx LaTeX Interface".

Günter

Michael P. Soulier

unread,
Dec 7, 2010, 6:41:10 AM12/7/10
to sphin...@googlegroups.com
On 07/12/10 Guenter Milde said:

> A latex log alone is usually not enought to find the problem. Could you
> provide a minimal working example? (i.e. the smallest possible document
> that shows this error as both, rst source and latex source)
>
> Then we can experiment with it and try to find a solution.

Sure, I'll work on that.

> I actively work on the Docutils latex writer. Unfortunately, Sphinx does
> not use the "upstream" writer for LaTeX (while, e.g., the Docutils HTML
> writer is used for HTML). In my view, the long term solution should be to
> get the Docutils latex2e writer to work with Sphinx.

Sounds reasonable.

> I offer to cooperate in making the necessary changes to let Sphinx use
> the Docutils "latex2e" writer -- I expect this to be a nontrivial task
> with lots of discussion, decisions, and changes on both sides involved to
> get a "Docutils - Sphinx LaTeX Interface".

Brave man.

signature.asc

Michael P. Soulier

unread,
Dec 10, 2010, 8:51:39 AM12/10/10
to sphin...@googlegroups.com
On 07/12/10 Michael P. Soulier said:

> > A latex log alone is usually not enought to find the problem. Could you
> > provide a minimal working example? (i.e. the smallest possible document
> > that shows this error as both, rst source and latex source)
> >
> > Then we can experiment with it and try to find a solution.
>
> Sure, I'll work on that.

And I've found it. See the files attached to this issue.

http://bitbucket.org/birkenfeld/sphinx/issue/565/pdflatex-fails-to-process-latex-output

Mike

signature.asc

Michael P. Soulier

unread,
Dec 15, 2010, 8:10:03 PM12/15/10
to sphin...@googlegroups.com
On 10/12/10 Michael P. Soulier said:

> And I've found it. See the files attached to this issue.
>
> http://bitbucket.org/birkenfeld/sphinx/issue/565/pdflatex-fails-to-process-latex-output

In trying to debug this issue myself I've been quite surprised when I remove
some apparently troublesome latex, rebuild and find that latex stops on yet
something else. It seems like the document is full of problems. And yet, I
have another document that is no so dissimilar, and it builds fine.

It's very confusing, and undermines my confidence in sphinx for my purposes.

Regards,

signature.asc

Guenter Milde

unread,
Dec 16, 2010, 2:20:44 AM12/16/10
to sphin...@googlegroups.com
On 2010-12-16, Michael P. Soulier wrote:
> On 10/12/10 Michael P. Soulier said:


> In trying to debug this issue myself I've been quite surprised when I remove
> some apparently troublesome latex, rebuild and find that latex stops on yet
> something else.

This looks like you were not at the core of the problem yet: LaTeX
error messages can be hard to decipher or even misleading --
the latex interpreter sometimes realizes too late that there is a
problem.

> It seems like the document is full of problems. And yet, I have another
> document that is no so dissimilar, and it builds fine.

This should be a good base for a minimal example: try to remove as much
as possible from the document so that the resulting minimal example
will still show the original problem and attach it to the next mail.

Günter

Michael P. Soulier

unread,
Dec 16, 2010, 7:15:14 AM12/16/10
to sphin...@googlegroups.com
On 16/12/10 Guenter Milde said:

> This should be a good base for a minimal example: try to remove as much
> as possible from the document so that the resulting minimal example
> will still show the original problem and attach it to the next mail.

Did you see the attachment to the bug report I mentioned previously?

Mike

signature.asc

Guenter Milde

unread,
Dec 17, 2010, 3:05:09 AM12/17/10
to sphin...@googlegroups.com
On 2010-12-16, Michael P. Soulier wrote:

> --S1dYL6sY+prtcMLk
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline

I found it. But 80 lines of

\def\PYG@tok@cm{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}

etc. is not what I expect as a *minimal* working example.

Removing everything not related to the problem, I get:

\documentclass{minimal}
\usepackage{tabulary}

\begin{document}

\begin{tabulary}{\linewidth}{|L|L|}
\hline

External
&
\begin{itemize}
\item hallo
\end{itemize}

The interface

\\

Internal: 1 Static Address
&
This address is allocated from the
customer's internal network range.
\\
\hline
\end{tabulary}

\end{document}

Removing (or commenting) the "itemize" environment, I realize that
this is the problem.

It looks like you cannot use itemize in tabulary -> check the tabulary
documentation.

BTW: processing
https://bitbucket-assetroot.s3.amazonaws.com/birkenfeld/sphinx/20101210/565/usecases.rst
with Docutils' rst2latex.py results in a compilable LaTeX file but this
might not be what you need...


Günter

Michael P. Soulier

unread,
Dec 17, 2010, 10:27:22 AM12/17/10
to sphin...@googlegroups.com
On 17/12/10 Guenter Milde said:

> It looks like you cannot use itemize in tabulary -> check the tabulary
> documentation.

But rst permits it, so it's a bug that sphinx is generating this output.

> BTW: processing
> https://bitbucket-assetroot.s3.amazonaws.com/birkenfeld/sphinx/20101210/565/usecases.rst
> with Docutils' rst2latex.py results in a compilable LaTeX file but this
> might not be what you need...

Sounds like Sphinx needs to catch up to docutils then.

Thanks,

signature.asc

Michael P. Soulier

unread,
Dec 17, 2010, 10:43:38 AM12/17/10
to sphin...@googlegroups.com
On 17/12/10 Michael P. Soulier said:

> > It looks like you cannot use itemize in tabulary -> check the tabulary
> > documentation.
>
> But rst permits it, so it's a bug that sphinx is generating this output.

I removed anything nested in my tables, embedded block quotes were broke the
document too, and now I get this

<mbg_and_src.png, id=139, 602.25pt x 511.9125pt> <use mbg_and_src.png>
<use mbg_and_src.png>)
! Incomplete \iffalse; all text was ignored after line 617.
<inserted text>
\fi
<*> mbg_engguide_6.1.tex

?
! Emergency stop.
<inserted text>
\fi
<*> mbg_engguide_6.1.tex

! ==> Fatal error occurred, no output PDF file produced!
Transcript written on mbg_engguide_6.1.log.
make[1]: *** [mbg_engguide_6.1.pdf] Error 1
make[1]: Leaving directory
`/home/msoulier/work/mitel-msl-tug/doc/engguide/_build/latex'
make: *** [pdflatex] Error 2

It seems there's no end to the problems in creating latex from this document.

signature.asc

Guenter Milde

unread,
Dec 17, 2010, 2:24:29 PM12/17/10
to sphin...@googlegroups.com
On 2010-12-17, Michael P. Soulier wrote:

> I removed anything nested in my tables, embedded block quotes

> broke the document too, and now I get this

><mbg_and_src.png, id=3D139, 602.25pt x 511.9125pt> <use mbg_and_src.png>


><use mbg_and_src.png>)
> ! Incomplete \iffalse; all text was ignored after line 617.

><inserted text>=20
> \fi=20
><*> mbg_engguide_6.1.tex
> =20
> ?=20
> ! Emergency stop.
><inserted text>=20
> \fi=20
><*> mbg_engguide_6.1.tex
> =20
> ! =3D=3D> Fatal error occurred, no output PDF file produced!

I can understand your frustration. However, this error message alone does
not help to locate the error. To find the core of the problem we need a
minimal example.

> It seems there's no end to the problems in creating latex from this
> document.

You could consider the rst2pdf extension that uses reportlab instead of
LaTeX for the task.

Guenter Milde

unread,
Dec 17, 2010, 2:25:37 PM12/17/10
to sphin...@googlegroups.com
On 2010-12-17, Michael P. Soulier wrote:
> On 17/12/10 Guenter Milde said:

>> It looks like you cannot use itemize in tabulary -> check the tabulary
>> documentation.

> But rst permits it, so it's a bug that sphinx is generating this output.

Yes. At least, this limitation should be documented.

> Sounds like Sphinx needs to catch up to docutils then.

Volunteers welcome.

Günter

Michael P. Soulier

unread,
Dec 17, 2010, 3:41:45 PM12/17/10
to sphin...@googlegroups.com
On 17/12/10 Guenter Milde said:

> I can understand your frustration. However, this error message alone does
> not help to locate the error. To find the core of the problem we need a
> minimal example.

I'll try to come up with another one.

> You could consider the rst2pdf extension that uses reportlab instead of
> LaTeX for the task.

I am but I would like to see sphinx stable and ready for prime-time. Obviously
it is not, today. rst2pdf is also not officially part of the sphinx project,
is it?

signature.asc

Michael P. Soulier

unread,
Dec 17, 2010, 3:42:49 PM12/17/10
to sphin...@googlegroups.com
On 17/12/10 Guenter Milde said:

> Yes. At least, this limitation should be documented.

Ideally the parser should halt before passing it to latex.

> > Sounds like Sphinx needs to catch up to docutils then.
>
> Volunteers welcome.

I wish I had the time to fix the world's code. Sadly I find I must typically
work on my own.

signature.asc

Georg Brandl

unread,
Jan 5, 2011, 12:25:43 PM1/5/11
to sphin...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 17.12.2010 21:42, schrieb Michael P. Soulier:
> On 17/12/10 Guenter Milde said:
>
>> Yes. At least, this limitation should be documented.
>
> Ideally the parser should halt before passing it to latex.

This should now be handled a little more gracefully in version 1.0.6.

>> > Sounds like Sphinx needs to catch up to docutils then.
>>
>> Volunteers welcome.
>
> I wish I had the time to fix the world's code. Sadly I find I must typically
> work on my own.

Yeah :| I have limited time as well to work on Sphinx, but this project
is definitely worth it, looking at all the great improvements that the
docutils writer has known in recent time.

Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk0kqZcACgkQN9GcIYhpnLC1YwCeNvnWR/IklqruOQEj8utynZjv
izIAn1RtPOedJdSjQyMcydrzlF6oZ/K1
=sxiP
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages