2

I'm a new user of the extension svg2tikz. I created a figure in Inkscape and exported it to TeX. When I export a the .svg file from inkscape to TikZ, the text is not located where it is in the .svf file.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{blindtext}


\begin{document}


\definecolor{c0000ff}{RGB}{0,0,255}

\begin{figure}
    \centering
\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
\begin{scope}[shift={(-130.00729,-79.00466)}]
    \path[draw=black,fill=c0000ff,miter limit=4.00,fill opacity=0.098,line
      width=1.600pt,rounded corners=0.0000cm] (131.0073,80.0047) rectangle
      (502.2522,423.5963);
    \path[shift={(65.33081,-189.77046)},fill=black,line join=miter,line
      cap=butt,line width=0.800pt] (0.0000,0.0000) node[above right] (flowRoot4138)
      {TEXT};
\end{scope}
\end{tikzpicture}
    \caption{Caption}
\end{figure}

\end{document}

pdf file

inkscape picture

So you have any idea how to solve this problem. Thank you.

  • Welcome to TeX - LaTeX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – Andrew Swann Sep 15 '17 at 9:11
  • The position and size of the rectangle is defined with (131.0073,80.0047) rectangle (502.2522,423.5963). The text starts at (0.0000,0.0000). Therefore the text does not appear in the rectangle. You adapt these values to reach the desired result. – Harald Lichtenstein Sep 15 '17 at 9:55
  • Thank you @HaraldLichtenstein for your answer. I'm wondering in fact if there is any way to do it automatically in inkscape before converting everthint to Tikz. – techer Sep 15 '17 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.