(It looks like Inkscape couldn't open a file for writing to.)
The following "works" with your example. If all your generated code is like that then it might work with that, but it isn't a full solution.
The direct replacement for \curveto
is \pgfpathcurveto
. So you could redefine the PSTricks macros to their PGF equivalents (where such exist) as follows:
\documentclass{article}
%\url{http://tex.stackexchange.com/q/82308/86}
\usepackage{tikz}
\def\moveto(#1,#2){%
\pgfpathmoveto{\pgfpoint{#1 pt}{#2 pt}}}
\def\curveto(#1,#2)(#3,#4)(#5,#6){%
\pgfpathcurveto{\pgfpoint{#1 pt}{#2 pt}}{\pgfpoint{#3 pt}{#4 pt}}{\pgfpoint{#5 pt}{#6 pt}}}
\let\psset=\tikzset
\def\pscustom[#1]{\tikzset{#1}}
\tikzset{
xunit/.style={x={(#1,0)}},
yunit/.style={y={(0,#1)}},
runit/.style={},
linecolor/.style={color=#1},
linewidth/.style={line width=#1},
}
\def\newrgbcolor#1#2{\definecolor{#1}{RGB}{#2}}
\def\pspicture(#1,#2){\tikzpicture}
\def\endpspicture{%
\pgfusepath{stroke}
\endtikzpicture}
\let\newpath=\relax
\begin{document}
%LaTeX with PSTricks extensions
%%Creator: 0.48.2
%%Please note this file requires PSTricks extensions
\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
\begin{pspicture}(272,129)
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1,linecolor=curcolor]
{
\newpath
\moveto(1.410771,63.47461)
\curveto(6.288991,93.43519)(6.900971,94.37507)(27.182131,102.49149)
\curveto(41.727261,108.31238)(35.032981,125.42937)(51.364001,125.36952)
\curveto(67.695031,125.30962)(67.928601,83.44326)(69.419751,64.22647)
\curveto(70.630951,48.61748)(74.370481,32.72818)(94.65164,24.61178)
\curveto(109.19677,18.79088)(101.39868,1.81368)(117.97023,1.87438)
\curveto(134.06073,1.93338)(134.11602,42.07748)(136.03504,63.349)
\curveto(136.94551,73.44118)(139.86205,86.13389)(143.15997,91.12848)
\curveto(146.45789,96.12308)(151.68117,98.38715)(161.82175,102.44536)
\curveto(176.36688,108.26625)(169.6726,125.38324)(186.00362,125.32339)
\curveto(202.33465,125.26349)(199.36351,96.7115)(204.05937,64.18034)
\curveto(208.75523,31.64918)(209.0101,32.68208)(229.29126,24.56568)
\curveto(243.83639,18.74478)(236.0383,1.76758)(252.60985,1.82828)
\curveto(268.70035,1.88728)(256.58629,30.46878)(270.65931,63.2234)
}
}
\end{pspicture}
\end{document}
What I would do in such a circumstance is actually use something like the above to generate a pgf soft path, then cut-and-paste that into my real document. I wouldn't use hacks like the above in a proper document.
Best Answer
Ok so here we go.
I decided to make this visual tutorial because some people are just more cartesian... Also because the extension has changed in the last years.
But don't be lazy, be sure to check this answer and this too, and if you run into problems with text check this.
First thing is to download the svg2tikz (here), this should be pretty straightforward, just click on the green button and save (or open) the .zip file.
Open your windows explorer and go to
C:\Program Files\Inkscape\share\extensions
it is inside this folder that the extension files will be drop, leave it open.Open the zip file and navigate to
svg2tikz-master\svg2tikz\extensions\
it should look like this:Select the first 3 files and drag'n'drop them to the folder you left open before. This should be
C:\Program Files\Inkscape\share\extensions
, and look like this:Once you done that, open Inkscape. Make your drawing and select
Save As...
You may also use the Extension menu and go for Export, but you won't get to choose where the file is saved.
At the end of the list you will see
Tikz Code .tex
like this:In my example the image code is: