diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2011-04-10 20:53:12 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2011-04-10 20:53:12 +0000 |
| commit | 47086e74dc63803678f9f67b5b38d3fcc2a31fca (patch) | |
| tree | d4c3265790106c1f601fce502cd153c823900343 /src | |
| parent | Tutorials. Japanese Tips and Advanced translation update by Masato HASHIMOTO. (diff) | |
| download | inkscape-47086e74dc63803678f9f67b5b38d3fcc2a31fca.tar.gz inkscape-47086e74dc63803678f9f67b5b38d3fcc2a31fca.zip | |
go wild adding % at the end of each latex line (pdf+latex output)
Fixed bugs:
- https://launchpad.net/bugs/643849
- https://launchpad.net/bugs/687344
(bzr r10154)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/latex-text-renderer.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp index 1f9bdfef1..a443a905a 100644 --- a/src/extension/internal/latex-text-renderer.cpp +++ b/src/extension/internal/latex-text-renderer.cpp @@ -196,22 +196,22 @@ static char const preamble[] = "%% \n" "%% For more information, please see info/svg-inkscape on CTAN:\n" "%% http://tug.ctan.org/tex-archive/info/svg-inkscape\n" -"\n" -"\\begingroup\n" -" \\makeatletter\n" +"%%\n" +"\\begingroup%\n" +" \\makeatletter%\n" " \\providecommand\\color[2][]{%\n" -" \\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package \'color.sty\' is not loaded}\n" +" \\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package \'color.sty\' is not loaded}%\n" " \\renewcommand\\color[2][]{}%\n" -" }\n" +" }%\n" " \\providecommand\\transparent[1]{%\n" -" \\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package \'transparent.sty\' is not loaded}\n" +" \\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package \'transparent.sty\' is not loaded}%\n" " \\renewcommand\\transparent[1]{}%\n" -" }\n" -" \\providecommand\\rotatebox[2]{#2}\n"; +" }%\n" +" \\providecommand\\rotatebox[2]{#2}%\n"; static char const postamble[] = " \\end{picture}%\n" -"\\endgroup\n"; +"\\endgroup%\n"; void LaTeXTextRenderer::writePreamble() @@ -598,19 +598,19 @@ LaTeXTextRenderer::setupDocument(SPDocument *doc, bool pageBoundingBox, SPItem * // scaling of the image when including it in LaTeX - os << " \\ifx\\svgwidth\\undefined\n"; - os << " \\setlength{\\unitlength}{" << d->width() * PT_PER_PX << "pt}\n"; - os << " \\ifx\\svgscale\\undefined\n"; - os << " \\relax\n"; - os << " \\else\n"; - os << " \\setlength{\\unitlength}{\\unitlength * \\real{\\svgscale}}\n"; - os << " \\fi\n"; - os << " \\else\n"; - os << " \\setlength{\\unitlength}{\\svgwidth}\n"; - os << " \\fi\n"; - os << " \\global\\let\\svgwidth\\undefined\n"; - os << " \\global\\let\\svgscale\\undefined\n"; - os << " \\makeatother\n"; + os << " \\ifx\\svgwidth\\undefined%\n"; + os << " \\setlength{\\unitlength}{" << d->width() * PT_PER_PX << "pt}%\n"; + os << " \\ifx\\svgscale\\undefined%\n"; + os << " \\relax%\n"; + os << " \\else%\n"; + os << " \\setlength{\\unitlength}{\\unitlength * \\real{\\svgscale}}%\n"; + os << " \\fi%\n"; + os << " \\else%\n"; + os << " \\setlength{\\unitlength}{\\svgwidth}%\n"; + os << " \\fi%\n"; + os << " \\global\\let\\svgwidth\\undefined%\n"; + os << " \\global\\let\\svgscale\\undefined%\n"; + os << " \\makeatother%\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. |
