10

sorry for this question without working example.

I am exporting MANY graphics from Inscape to "pdf + latex". All texts over 2 lines appear online in one line. Here is the code (but you don't have the picture)

\begingroup%
  \makeatletter%
  \providecommand\color[2][]{%
   \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
\renewcommand\color[2][]{}%
}%
  \providecommand\transparent[1]{%
    \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
\renewcommand\transparent[1]{}%
}%
   \providecommand\rotatebox[2]{#2}%
  \ifx\svgwidth\undefined%
    \setlength{\unitlength}{595.27558594bp}%
    \ifx\svgscale\undefined%
      \relax%
    \else%
      \setlength{\unitlength}{\unitlength * \real{\svgscale}}%
\fi%
\else%
\setlength{\unitlength}{\svgwidth}%
\fi%
\global\let\svgwidth\undefined%
\global\let\svgscale\undefined%
\makeatother%
\begin{picture}(1,1.4142857)%
\put(0,0){\includegraphics[width=\unitlength]{pictures/Zeichnung.pdf}}%
\put(0.28127876,0.21643443){\color[rgb]{0,0,0}\rotatebox{90}{\makebox(0,0)[lb]{\smash{1500 mm}}}}%
\put(0.19520245,0.40944517){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{500 mm}}}%
\put(0.6703142,0.10964459){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash[b]{Ambient temperature 5 h = 2000 mm}}}%
\put(0.78432201,0.39812598){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Ambient temperature 3 h = 100 mm}}}%
\end{picture}%
\endgroup%

and I want the text "Ambient 5 \newline h = 2000 mm" in two lines?

2 Answers 2

14

In Inkscape, you need to draw a rectangular with the texttool to create a text frame and write in that frame, rather than just clicking somewhere and start writing. This will then create a minipage in the pdf_tex, and if you set a linebreak in Inkscape by typing \\, this will appear in the pdf output.

0
10

In Inkscape, just write:

\shortstack{Ambient 5 \\ h = 2000 mm}

This should output the text as two lines in LaTeX.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .