integrating sketch with mactex

107 views
Skip to first unread message

UnlimitedMoops

unread,
Oct 29, 2013, 5:54:44 PM10/29/13
to sketch...@googlegroups.com
hi..

Currently I've built sketch from scratch. It creates the correct PDF if I run it like this.

CODE: SELECT ALL  •  OPEN IN WRITELATEX
sketch -T sample.sk -o sample.tex
pdflatex sample.tex


Now I'm trying to integrate it into MacTeX. I think I want to get LaTeXmk to launch it then run pdfLaTeX on the resulting .tex file but so far no luck. I've modified .latexmkrc in the same directory as follows:

CODE: SELECT ALL  •  OPEN IN WRITELATEX
add_cus_dep('sk', 'tex', 0, 'makesketch');
sub makesketch {
    system("sketch -T '$_[0]'.sk -o '$_[0]'.tex");
    system("pdflatex '$_[0]'.tex");
}


So far no luck. On running "latexmk -pdf" with just "example.sk" in the directory I get:

CODE: SELECT ALL  •  OPEN IN WRITELATEX
Subroutine makesketch redefined at (eval 16) line 2, <GEN1> chunk 1.
Latexmk: This is Latexmk, John Collins, 11 Nov. 2012, version: 4.35.
**** Report bugs etc to John Collins <collins at phys.psu.edu>. ****

Latexmk: No file name specified, and I couldn't find any


Can someone help me to get this working?

thanks!

Gene

unread,
Jan 27, 2014, 8:52:19 PM1/27/14
to sketch...@googlegroups.com
I don't use latexmk, so can't offer a solution.  The error message you're getting is from perl, obviously complaining about a redefinition of the name of your sub.  Did you by chance put the same definition in two different latexmkrc files?

If that was not the problem, then your best bet is to try the StackExchange for LaTeX or maybe a MacTeX-specific forum.
Reply all
Reply to author
Forward
0 new messages