From adac656f1fa2a6def2429c74ff7410c6e0ccd4d4 Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Wed, 24 Feb 2010 22:19:52 +0100 Subject: [PATCH] add original width of picture to be able to *not* specify width in latex doc. still work to be done. --- src/extension/internal/latex-text-renderer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp index 6c09a7396..6a57f71e6 100644 --- a/src/extension/internal/latex-text-renderer.cpp +++ b/src/extension/internal/latex-text-renderer.cpp @@ -404,6 +404,10 @@ LaTeXTextRenderer::setupDocument(SPDocument *doc, bool pageBoundingBox, SPItem * // write the info to LaTeX Inkscape::SVGOStringStream os; + // also write original width to LaTeX + // TODO: add \ifdef statements to be able to choose between specifying width or not to specify it! + os << " %\\setlength{\\unitlength}{" << d->width() * PT_PER_PX << "pt}\n"; + os << " \\begin{picture}(" << _width << "," << _height << ")%\n"; // strip pathname, as it is probably desired. Having a specific path in the TeX file is not convenient. os << " \\put(0,0){\\includegraphics[width=\\unitlength]{" << _filename << "}}%\n"; -- 2.30.2