Calling sketch from LaTeX

130 views
Skip to first unread message

James Arruda

unread,
Oct 27, 2010, 10:31:07 AM10/27/10
to Sketch Users
I am curious (and my googling hasn't found anything), if there is a
way to call sketch from within latex? Really, being able to say in
Latex 'run this on the command line' would be very useful. This way I
can have latex call sketch, build a .tex file of my drawing, and draw
it all in one step.

It would really make my figure making much faster when making small
tweaks to the figures. Thanks.
Message has been deleted

James Arruda

unread,
Oct 27, 2010, 11:47:14 AM10/27/10
to Sketch Users
After enough searching I found my answer. For anyone curious, this is
what I did.

1. Enable \write18 priveledges (add "--enable-write18" to the command
line when building the document)
2. added the following command to my latex document:
\immediate\write18{sketch airfoil.txt Sketch1.txt > blade.tex}

I also wanted to define terms inside my latex file. I'm using windows,
so I also wrote out a file with the definitions I wanted to change
rapidly doing the following:

\immediate\write18{echo def theta \thetaVal def beta \betaVal >
opts.txt}
\immediate\write18{sketch opts.txt airfoil.txt Sketch1.txt >
simple.tex}

All files are in the same directory. This is probably bad form in some
way, but hopefully this helps someone else as well.

Azoun

unread,
Oct 27, 2010, 1:38:38 PM10/27/10
to Sketch Users
The answer to your issue is here

http://www.ctan.org/tex-archive/macros/latex/contrib/esk/

Bye

Michele
Reply all
Reply to author
Forward
0 new messages