summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/example_rcfiles/asymptote_latexmkrc
blob: cc3fa5d1d0312b50a8830836a334abc754ae5ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This shows how to use Asymptote (http://asymptote.sourceforge.net/,
# or http://www.ctan.org/tex-archive/graphics/asymptote/)
# with latexmk.  Asymptote is a vector graphics language with a
# processing program that generates graphics files that can be used in
# a LaTex file.  
#
# A standard method of using it is with the asymptote LaTeX style file
# (http://www.ctan.org/tex-archive/graphics/asymptote/doc/asymptote.sty)
# The graphics drawing code is in the tex file, and applying pdflatex to
# the tex file produces a file with the same base name as the tex
# file, but with the extension 'asy'.  The .asy is processed by the
# program asy (part of the asymptote software) to produce graphics
# files (typically pdf files) that are used the next time pdflatex is
# run on the main tex file.  
#
# Latexmk can be arranged to run asymptote (i.e., the program asy)
# when needed, by defining the following custom dependency.  (The code
# is to be put in one of latexmk's rc files, e.g., ~/.latexmkrc.)


add_cus_dep( "asy", "tex", 0, "asy2tex" );
sub asy2tex { return system("asy $_[0].asy"); }