diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2010-02-24 21:19:52 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2010-02-24 21:19:52 +0000 |
| commit | 8d7774019aa0bd74ac3fbc194c907643a2c21cab (patch) | |
| tree | 4fe473643a6bd697ee0ec1fd3a435a4bf39d05b4 /src | |
| parent | output clones to latex too (diff) | |
| download | inkscape-8d7774019aa0bd74ac3fbc194c907643a2c21cab.tar.gz inkscape-8d7774019aa0bd74ac3fbc194c907643a2c21cab.zip | |
add original width of picture to be able to *not* specify width in latex doc. still work to be done.
(bzr r9101.1.18)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/latex-text-renderer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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"; |
