EPS+LaTeX wrong size when text outside other drawing objects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
Hi, I'm back and still happy with the ps+LaTeX feature!
to reproduce: draw a box, put some text outside the box in 12pt font. Use eps+LaTeX to export to foo.eps and foo.tex and include these in a LaTeX document containing:
\documentclass{
\usepackage{
\usepackage{color}
\begin{document}
\input{foo}
\end{document}
When inkscape exports it thinks the bounding box for the drawing is at the limits of the text, but the eps file is only aware of the rectangle. Thus, when combined in the LaTeX document the rectangle is oversized and the text is in the wrong place.
I fix this manually by drawing an invisible box, but it is more complicated than this. When I write $\alpha$ on the far right of my image, I expect this to render as the greek letter, which is shorter than $\alpha$. So the right end of $\alpha$ is not the correct bound for exporting the non-text part. Making $\alpha$ right justified allows me to export an eps that is not larger than the latex that I expect to be rendered... but no one wants to estimate...
my platform is mac OS X and this is 0.47+devel r9504
tags: | added: eps exporting latex |
summary: |
- ps+LaTeX wrong size when text outside other drawing objects + EPS+LaTeX wrong size when text outside other drawing objects |
Yeah, I too have experienced the problem.
The problem is in the way the eps file is generated using Cairo, with text objects effectively ignored (and so the bounding box not being stretched by them), and then using the whole image to define the height and width of the image box. This has a knock on consequence to making the unitlength incorrect and so the whole thing buggers up.
I had a look at fixing it, but i'm not sure of the best way to do it. The definitions of the width and height in latex-text- renderer. cpp need to use the size of the exported ps and not the size of the document as inkscape thinks it is.