eps-latex export produced missaligned text

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
DL6ER
Posts: 3
Joined: Mon Apr 01, 2013 12:18 am

eps-latex export produced missaligned text

Postby DL6ER » Mon Apr 01, 2013 12:37 am

Hi,

I've already asked this question on TeX.StackExchange, but I need the help of real inkscpae enthusiasts ;)

What is the problem: I'm trying to import a graphic created in LibreOffice Draw in a LaTeX document. But that didn't work very well.

So far I've tried the Way:
  • Export Document to SVG file.
  • Open with Inkscape and Export using eps+latex
  • Including resulting xxx.eps_tex in latex

Although the SVG seems to be just fine (also in Inkscape), the exported positions of the text are bad (following is a snip of latex-code that is produced by inkscpae using the eps+latex feature):

Code: Select all

\begin{picture}(1,0.73115748)%
   \put(0,0){\includegraphics[width=\unitlength]{ModeDispersion.eps}}%
   \put(-0.05241193,0.78432034){\makebox(0,0)[lb]{\smash{Cladding (air)}}}%
   \put(-0.05241193,0.78432034){\makebox(0,0)[lb]{\smash{Substrate}}}%
   \put(-0.05241193,0.78432034){\makebox(0,0)[lb]{\smash{In}}}%
   \put(-0.05472789,0.25830639){\makebox(0,0)[lb]{\smash{Out}}}%
   \put(-0.05472789,0.25830639){\makebox(0,0)[lb]{\smash{Single-mode}}}%
\end{picture}%


Same goes for pdf+latex export.
Original LibreOffice (version 4.0.1.2) file and exported SVG (Inkscape 0.48.3.1):
http://www.x-linux.de/stackoverflow/ModeDispersion.odg
http://www.x-linux.de/stackoverflow/ModeDispersion.svg

This is how it looks like in Inkscape (looks ok):
Image

And this how it looks like in Latex (text misaligned):
Image

Now there comes the spooky part:
When I add some text in Inkscape itself, then this is working just as expected. Nevertheless the text created in Office is recognized as text in inkscape, but even when I change it there, the changed text will be just the same - misaligned.

Can anybody tell me how I can fix this problem?

Regards,
Nick

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: eps-latex export produced missaligned text

Postby brynn » Mon Apr 01, 2013 6:35 pm

Image
Welcome to INkscapeForum!

This and/or similar problems have been reported in this forum several times. Since I don't use EPS or LaTex, I've never paid close attention. But you may well find the answer by searching the forum ;)

DL6ER
Posts: 3
Joined: Mon Apr 01, 2013 12:18 am

Re: eps-latex export produced missaligned text

Postby DL6ER » Tue Apr 02, 2013 1:09 am

Hi brynn,

surely I had searched first, as I agreed to do so during the registration procedure ;)

The only related thing I found (searching for "latex" which should be obviously correct):
viewtopic.php" onclick="readonly();return false;"smilies" src="images/smilies/icon_e_confused.gif" alt=":?" title="Confused" />

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: eps-latex export produced missaligned text

Postby brynn » Wed Apr 03, 2013 11:00 pm

Aaahh, it's good to hear you searched first. So many people don't.

Oohhh, well that's not good, that other message hasn't been answered by anyone who knows anything about it (only by me, who doesn't know). I guess that's not a good sign for you.

Well, I've seen the misaligned text, where it looks like it types on top of other text, in another message. The circumstances were different (something about PDF, iirc) but maybe the solution could help you. Let me try to find that other message...

Oh wow, I can't believe I found it, lol. As I said, the circumstances are different here, but the problem, with new text getting added on top of older text, is similar. So maybe something here will help. Especially note ~suv's reply. viewtopic.php?f=5&t=13722

I've also see the same text issue in other topics, but I'll never be able to find them. But there are different causes and different fixes. So just because this looks the same, on the surface, it's likely not the answer for you. But maybe it will lead you to find the solution. I'll keep my fingers crossed :D

DL6ER
Posts: 3
Joined: Mon Apr 01, 2013 12:18 am

Re: eps-latex export produced missaligned text

Postby DL6ER » Thu Apr 04, 2013 6:13 am

Hi brynn,

I'm afraid that their solution won't help me as the problem is:
Even when objects are ungrouped, any attempt to edit the text boxes fails: Any new text entered is placed one letter on top of the other, and previously existing text cannot be selected. If a new textbox is created within the same file, however, the problem does not occur.

But I can edit the text boxes...in inkscape really everything looks and behaves just fine. An when I export it...then nothing is fine anymore.
It is not a problem like the characters themselves are on each other. The problem is, that the exported text boxes are all starting at the same coordinate. And therefore well-behaved LaTeX is setting all text boxes one over another.

I'm no XML- nor SVG-expert, but I will try digging into the code itself, maybe I will be able to "construct" a workaround. But as I'm afraid this will take several hours or even days, this has to be postpone.

Maybe next LibreOffice or even inkscape version will solve the problem on their own.


Return to “Discuss Software Issues”