Converting Tikz code to PGF












1















I would like to convert an SVG image (from inkscape) into PGF so that I can call the image using include package{pgfornaments}.



Using svg2tikz (Save As > Latex with PStricks and Save As > Tikz code), but I cannot figure out how to convert that output to PGF code that can be used by pgfornaments.



Is there a converter that will strip out the Tikz front-end and render PGF code?
Or, are there settings in Export > Export to Tikz path that will render as PGF code?



Sample of my output (as Tikz code)



begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
begin{scope}[rotate around={90.0:(189.94021,85.82203)}]
path[draw=black,fill=black,miter limit=4.00,line width=0.032pt]
(137.4186,46.0503) .. controls (137.5137,51.9889) and (137.1626,63.2730) ..
(137.5933,63.9338) .. controls (137.8673,64.4875) and (137.9942,64.6226) ..
(138.9748,64.9034) .. controls (140.2243,65.1767) and (143.6854,65.3049) ..
(144.1519,64.9899) .. controls (144.5977,64.6890) and (144.8841,61.4342) ..
(144.9169,61.2122) .. controls (145.0740,56.9180) and (145.2158,53.4952) ..


Sample of my code (PStricks)



%LaTeX with PSTricks extensions
%%Creator: inkscape 0.92.3
%%Please note this file requires PSTricks extensions
psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
begin{pspicture}(256,245.44000244)
{
newrgbcolor{curcolor}{0 0 0}
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
newpath
moveto(229.711937,212.13954244)
curveto(223.773378,212.04444244)(212.489203,212.39554244)(211.828455,211.96491244)
curveto(211.274754,211.69091244)(211.139625,211.56395244)(210.858804,210.58342244)
curveto(210.585535,209.33391244)(210.457387,205.87276244)(210.772344,205.40625244)
curveto(211.073258,204.96053244)(214.328044,204.67404244)(214.550021,204.64133244)
curveto(218.844224,204.48414244)(222.267088,204.34241244)(227.607715,203.61839244)
lineto(207.616746,203.61797244)
curveto(208.805053,204.30850244)(209.063802,204.48101244)(209.929411,205.00819244)
lineto(209.713273,213.36042244)
curveto(209.714773,214.08932244)(209.696303,214.16726244)(209.956956,214.55688244)
curveto(210.159345,214.82979244)(210.407771,215.07556244)(210.988481,215.12536244)
curveto(221.851601,214.49965244)(226.399447,213.03761244)(229.711932,212.13972244)
closepath
}


Sample of vectorian pgfornaments



m 21.8584 19.4822 
c 24.1677 19.4822 29.308 19.6707 34.9033 21.0996
c 40.4978 22.5278 42.8549 24.837 42.8549 26.074
c 42.8549 27.3123 39.8551 28.5492 36.6661 28.0028
c 33.4758 27.455 32.6657 26.3602 32.6657 25.7168
c 32.6657 25.0747 33.57 24.5269 34.2612 25.0262









share|improve this question


















  • 1





    I believe there is an automatic solution but if not you merely need to convert curveto to pgfpathcurveto and round brackets to curly ones.

    – marmot
    1 hour ago











  • The detailed instructions of that can be found under second addendum in this answer.

    – marmot
    57 mins ago
















1















I would like to convert an SVG image (from inkscape) into PGF so that I can call the image using include package{pgfornaments}.



Using svg2tikz (Save As > Latex with PStricks and Save As > Tikz code), but I cannot figure out how to convert that output to PGF code that can be used by pgfornaments.



Is there a converter that will strip out the Tikz front-end and render PGF code?
Or, are there settings in Export > Export to Tikz path that will render as PGF code?



Sample of my output (as Tikz code)



begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
begin{scope}[rotate around={90.0:(189.94021,85.82203)}]
path[draw=black,fill=black,miter limit=4.00,line width=0.032pt]
(137.4186,46.0503) .. controls (137.5137,51.9889) and (137.1626,63.2730) ..
(137.5933,63.9338) .. controls (137.8673,64.4875) and (137.9942,64.6226) ..
(138.9748,64.9034) .. controls (140.2243,65.1767) and (143.6854,65.3049) ..
(144.1519,64.9899) .. controls (144.5977,64.6890) and (144.8841,61.4342) ..
(144.9169,61.2122) .. controls (145.0740,56.9180) and (145.2158,53.4952) ..


Sample of my code (PStricks)



%LaTeX with PSTricks extensions
%%Creator: inkscape 0.92.3
%%Please note this file requires PSTricks extensions
psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
begin{pspicture}(256,245.44000244)
{
newrgbcolor{curcolor}{0 0 0}
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
newpath
moveto(229.711937,212.13954244)
curveto(223.773378,212.04444244)(212.489203,212.39554244)(211.828455,211.96491244)
curveto(211.274754,211.69091244)(211.139625,211.56395244)(210.858804,210.58342244)
curveto(210.585535,209.33391244)(210.457387,205.87276244)(210.772344,205.40625244)
curveto(211.073258,204.96053244)(214.328044,204.67404244)(214.550021,204.64133244)
curveto(218.844224,204.48414244)(222.267088,204.34241244)(227.607715,203.61839244)
lineto(207.616746,203.61797244)
curveto(208.805053,204.30850244)(209.063802,204.48101244)(209.929411,205.00819244)
lineto(209.713273,213.36042244)
curveto(209.714773,214.08932244)(209.696303,214.16726244)(209.956956,214.55688244)
curveto(210.159345,214.82979244)(210.407771,215.07556244)(210.988481,215.12536244)
curveto(221.851601,214.49965244)(226.399447,213.03761244)(229.711932,212.13972244)
closepath
}


Sample of vectorian pgfornaments



m 21.8584 19.4822 
c 24.1677 19.4822 29.308 19.6707 34.9033 21.0996
c 40.4978 22.5278 42.8549 24.837 42.8549 26.074
c 42.8549 27.3123 39.8551 28.5492 36.6661 28.0028
c 33.4758 27.455 32.6657 26.3602 32.6657 25.7168
c 32.6657 25.0747 33.57 24.5269 34.2612 25.0262









share|improve this question


















  • 1





    I believe there is an automatic solution but if not you merely need to convert curveto to pgfpathcurveto and round brackets to curly ones.

    – marmot
    1 hour ago











  • The detailed instructions of that can be found under second addendum in this answer.

    – marmot
    57 mins ago














1












1








1








I would like to convert an SVG image (from inkscape) into PGF so that I can call the image using include package{pgfornaments}.



Using svg2tikz (Save As > Latex with PStricks and Save As > Tikz code), but I cannot figure out how to convert that output to PGF code that can be used by pgfornaments.



Is there a converter that will strip out the Tikz front-end and render PGF code?
Or, are there settings in Export > Export to Tikz path that will render as PGF code?



Sample of my output (as Tikz code)



begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
begin{scope}[rotate around={90.0:(189.94021,85.82203)}]
path[draw=black,fill=black,miter limit=4.00,line width=0.032pt]
(137.4186,46.0503) .. controls (137.5137,51.9889) and (137.1626,63.2730) ..
(137.5933,63.9338) .. controls (137.8673,64.4875) and (137.9942,64.6226) ..
(138.9748,64.9034) .. controls (140.2243,65.1767) and (143.6854,65.3049) ..
(144.1519,64.9899) .. controls (144.5977,64.6890) and (144.8841,61.4342) ..
(144.9169,61.2122) .. controls (145.0740,56.9180) and (145.2158,53.4952) ..


Sample of my code (PStricks)



%LaTeX with PSTricks extensions
%%Creator: inkscape 0.92.3
%%Please note this file requires PSTricks extensions
psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
begin{pspicture}(256,245.44000244)
{
newrgbcolor{curcolor}{0 0 0}
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
newpath
moveto(229.711937,212.13954244)
curveto(223.773378,212.04444244)(212.489203,212.39554244)(211.828455,211.96491244)
curveto(211.274754,211.69091244)(211.139625,211.56395244)(210.858804,210.58342244)
curveto(210.585535,209.33391244)(210.457387,205.87276244)(210.772344,205.40625244)
curveto(211.073258,204.96053244)(214.328044,204.67404244)(214.550021,204.64133244)
curveto(218.844224,204.48414244)(222.267088,204.34241244)(227.607715,203.61839244)
lineto(207.616746,203.61797244)
curveto(208.805053,204.30850244)(209.063802,204.48101244)(209.929411,205.00819244)
lineto(209.713273,213.36042244)
curveto(209.714773,214.08932244)(209.696303,214.16726244)(209.956956,214.55688244)
curveto(210.159345,214.82979244)(210.407771,215.07556244)(210.988481,215.12536244)
curveto(221.851601,214.49965244)(226.399447,213.03761244)(229.711932,212.13972244)
closepath
}


Sample of vectorian pgfornaments



m 21.8584 19.4822 
c 24.1677 19.4822 29.308 19.6707 34.9033 21.0996
c 40.4978 22.5278 42.8549 24.837 42.8549 26.074
c 42.8549 27.3123 39.8551 28.5492 36.6661 28.0028
c 33.4758 27.455 32.6657 26.3602 32.6657 25.7168
c 32.6657 25.0747 33.57 24.5269 34.2612 25.0262









share|improve this question














I would like to convert an SVG image (from inkscape) into PGF so that I can call the image using include package{pgfornaments}.



Using svg2tikz (Save As > Latex with PStricks and Save As > Tikz code), but I cannot figure out how to convert that output to PGF code that can be used by pgfornaments.



Is there a converter that will strip out the Tikz front-end and render PGF code?
Or, are there settings in Export > Export to Tikz path that will render as PGF code?



Sample of my output (as Tikz code)



begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
begin{scope}[rotate around={90.0:(189.94021,85.82203)}]
path[draw=black,fill=black,miter limit=4.00,line width=0.032pt]
(137.4186,46.0503) .. controls (137.5137,51.9889) and (137.1626,63.2730) ..
(137.5933,63.9338) .. controls (137.8673,64.4875) and (137.9942,64.6226) ..
(138.9748,64.9034) .. controls (140.2243,65.1767) and (143.6854,65.3049) ..
(144.1519,64.9899) .. controls (144.5977,64.6890) and (144.8841,61.4342) ..
(144.9169,61.2122) .. controls (145.0740,56.9180) and (145.2158,53.4952) ..


Sample of my code (PStricks)



%LaTeX with PSTricks extensions
%%Creator: inkscape 0.92.3
%%Please note this file requires PSTricks extensions
psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
begin{pspicture}(256,245.44000244)
{
newrgbcolor{curcolor}{0 0 0}
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
newpath
moveto(229.711937,212.13954244)
curveto(223.773378,212.04444244)(212.489203,212.39554244)(211.828455,211.96491244)
curveto(211.274754,211.69091244)(211.139625,211.56395244)(210.858804,210.58342244)
curveto(210.585535,209.33391244)(210.457387,205.87276244)(210.772344,205.40625244)
curveto(211.073258,204.96053244)(214.328044,204.67404244)(214.550021,204.64133244)
curveto(218.844224,204.48414244)(222.267088,204.34241244)(227.607715,203.61839244)
lineto(207.616746,203.61797244)
curveto(208.805053,204.30850244)(209.063802,204.48101244)(209.929411,205.00819244)
lineto(209.713273,213.36042244)
curveto(209.714773,214.08932244)(209.696303,214.16726244)(209.956956,214.55688244)
curveto(210.159345,214.82979244)(210.407771,215.07556244)(210.988481,215.12536244)
curveto(221.851601,214.49965244)(226.399447,213.03761244)(229.711932,212.13972244)
closepath
}


Sample of vectorian pgfornaments



m 21.8584 19.4822 
c 24.1677 19.4822 29.308 19.6707 34.9033 21.0996
c 40.4978 22.5278 42.8549 24.837 42.8549 26.074
c 42.8549 27.3123 39.8551 28.5492 36.6661 28.0028
c 33.4758 27.455 32.6657 26.3602 32.6657 25.7168
c 32.6657 25.0747 33.57 24.5269 34.2612 25.0262






tikz-pgf inkscape pgfornament






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









KittyKitty

595




595








  • 1





    I believe there is an automatic solution but if not you merely need to convert curveto to pgfpathcurveto and round brackets to curly ones.

    – marmot
    1 hour ago











  • The detailed instructions of that can be found under second addendum in this answer.

    – marmot
    57 mins ago














  • 1





    I believe there is an automatic solution but if not you merely need to convert curveto to pgfpathcurveto and round brackets to curly ones.

    – marmot
    1 hour ago











  • The detailed instructions of that can be found under second addendum in this answer.

    – marmot
    57 mins ago








1




1





I believe there is an automatic solution but if not you merely need to convert curveto to pgfpathcurveto and round brackets to curly ones.

– marmot
1 hour ago





I believe there is an automatic solution but if not you merely need to convert curveto to pgfpathcurveto and round brackets to curly ones.

– marmot
1 hour ago













The detailed instructions of that can be found under second addendum in this answer.

– marmot
57 mins ago





The detailed instructions of that can be found under second addendum in this answer.

– marmot
57 mins ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479014%2fconverting-tikz-code-to-pgf%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479014%2fconverting-tikz-code-to-pgf%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)