PDF+LaTeX does not export proper font size in LaTeX file

Bug #892572 reported by Spencer Stirling
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Johan Engelen

Bug Description

In the output option PDF+LaTeX (omit text and create separate LaTeX file) the font sizes are not output correctly. Same thing for EPS+LaTeX and PS+LaTeX. I have written patches to fix this issue (UPDATE: see the fixed patches in my next message below). These are patches onto the 0.48.2 version.

These patches also add EXTRA functionality: combined EPS+PDF+LaTeX export. Some people still need to support both regular LaTeX and PDFLaTeX simultaneously, hence they need *both* EPS and PDF files at the same time. The trick is to export both types of files and remove the filename extension on the \includegraphics line in the .pdf_tex file.

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

> the font sizes are not output correctly

Possibly related earlier reports:
Bug #595315 “need eps/ps/pdf+LaTeX font size warning”
<https://bugs.launchpad.net/inkscape/+bug/595315>
Bug #718638 “LaTeX font size support”
<https://bugs.launchpad.net/inkscape/+bug/718638>

tags: added: exporting latex pdf
tags: added: eps
Revision history for this message
su_v (suv-lp) wrote :

@Johan - could you review the patch and verify whether it addresses the earlier reports about the font size?

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
Revision history for this message
Spencer Stirling (stirling) wrote :

I apologize, but I just realized that the patches that I sent won't work (I was using a LaTex command "SetFigFontNFSS" to set the font size, but I forgot to add code to define it. I'm an idiot. I didn't notice because, by chance, that command was already defined in the document that I was testing on. GRRRR)

I also read the comments on bug #718638 and so I added the functionality that Johan requested there (an option to turn OFF font size support, and leave it off by default). I basically stole the code from the other patch supplied in that bug (however, that patch has a bug in it as well, so it won't compile - hence you really need this patch).

Attached is the new patch. The original trunk is called inkscape-0.48.2, and the new trunk is called inkscape-0.48.2-new. Again, this patch also adds some new functionality: combined PDF+EPS+LaTeX support for poor souls like me who are forced to support both latex and pdflatex simultaneously. This option is also "off" by default

Thank you

Revision history for this message
baptiste (baptiste-pierrat) wrote :

Tested and working on the 0.48.x branch. Would be nive to have this feature on future releases.

description: updated
Revision history for this message
Johan Engelen (johanengelen) wrote :

After reading the new code: does it work when the filename contains more than one dot? E.g: "figure1.2.eps"

Revision history for this message
Spencer Stirling (stirling) wrote :

Yes, that works because g_strrstr matches the last occurrence of the "."

The only problem occurs when somebody has a dot in their filename (e.g. figure1.2) but explicitly removes the ".pdf" extension for some reason. In that case the code will think that ".2" is the extension, and it will cut it off. I'm not certain how to fix this except using ".pdf" rather than "." as the search string, however this seems to introduce as much ugliness as it fixes. Any suggestions?

Revision history for this message
Johan Engelen (johanengelen) wrote :

I think it would be good to explicitly search for the 3 'problem' extensions that need to be removed in the tex source: ".pdf", ".eps", and ".ps".
Thanks

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.