Latex/pdf export does not generate correct linebreaks

Bug #898351 reported by Christoph Buchner
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

When exporting an inkscape file as latex+pdf, and this file includes text with a latex linebreak (i.e. "\\"), the resulting file breaks a document it is embedded in:
LaTeX Error: Something's wrong--perhaps a missing \item, at drawing.pdf_tex line 54.

This is related to, but not a duplicate of bug #771959

I have attached a zip file with a minimal example for reproduction.
For the record, I've tried with and without a regular/inkscape linebreak in the inkscape text field, does not make a difference.

drawing created with inkscape 0.48.2 r9819, .tex compiled with pdflatex on ubuntu 11.10

Revision history for this message
Christoph Buchner (bilderbuchi) wrote :
Revision history for this message
su_v (suv-lp) wrote :

@Johan - subscribed you as discussed on irc.

tags: removed: pdf
Revision history for this message
Christoph Buchner (bilderbuchi) wrote :

I think the minimal example is enough for starting work, but is there anything else I can do/contribute?

Revision history for this message
Christoph Buchner (bilderbuchi) wrote :

This is still occuring with inkscape 0.48.4-0.1ubuntu2

Revision history for this message
Ferdinand Rau (rauferd) wrote :

Are you sure that this is an Inkscape Bug and not one of your TeX distribution?
The minimal examples compiles just fine with MiKTeX 2.9 on Windows 7.

The intended linebreak does not appear in the resulting .pdf file, however, because \makebox does not honor "\\". The patch attached to bug #771959 should fix this, by putting everything in a \shortstack environment.
If there are no more compilation problems with recent pdflatex versions, this issue should be closed (or marked as a duplicate of #771959, even though it wasn't intended to be one in the first place).

Revision history for this message
Christoph Buchner (bilderbuchi) wrote :

Well, I get another error message when compiling with pdflatex 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian):
! (Inkscape) Color is used for the text in Inkscape, but the package 'color.sty
' is not loaded.
\\color ... the package 'color.sty' is not loaded}
                                                  \renewcommand \color [2][]{}
l.54 line2}}}

No idea if that has an impact. I get a pdf file just fine, and line1 line2 is on one line.
 If you want to mark it as duplicate of #771959, I'd find that more appropriate than closing. As this is a problem I had 3 years ago, it's not really relevant for me anymore, as I have since switched my toolchain as much as possible away from depending on inkscape+Latex functionality.

mporten (mathias-porten)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Patrick Storz (ede123) wrote :

Linebreaks are now supported by adding a "real" linebreak in Inkscape as covered by bug #771959 which should be an even better solution than to try adding linebreaks manually using "\\"

I therefore tend to consider this bug as "wontfix" as one can find a lot of command sequences that - when entered as plain text in Inkscape - could cause compilation in LaTeX to fail and we can not add suitable workarounds for all of them.

The basic idea of PDF+LaTeX export is a WYSIWYG approach (i.e. LaTeX document should look similar to what you see in Inkscape) and that can obviously never be true when adding command sequences in Inkscape.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.