Next: Interactive mode, Previous: Base modules, Up: Top
Type asy -h to see the full list of command line options
supported by Asymptote:
Usage: asy [options] [file ...]
Options:
-V,-View View output; command-line only
-a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [Center]
-autoplain Enable automatic importing of plain [true]
-autorotate Enable automatic PDF page rotation [false]
-batchMask Mask fpu exceptions in batch mode [false]
-batchView View output in batch mode [false]
-bw Convert all colors to black and white [false]
-c,-clearGUI Clear GUI operations [false]
-cmyk Convert rgb colors to cmyk [false]
-d,-debug Enable debugging messages [false]
-x,-deconstruct X Deconstruct into transparent GIF objects magnified by X
-gray Convert all colors to grayscale [false]
-h,-help Show summary of options; command-line only
-historylines n Retain n lines of history [1000]
-i,-ignoreGUI Ignore GUI operations [false]
-inlinetex Generate inline tex code [false]
-interactiveMask Mask fpu exceptions in interactive mode [true]
-interactiveView View output in interactive mode [true]
-k,-keep Keep intermediate files [false]
-l,-listvariables List available global functions and variables [false]
-localhistory Use a local interactive history file [false]
-m,-mask Mask fpu exceptions; command-line only
-multipleView View output from multiple batch-mode files [false]
-O,-offset pair PostScript offset [(0,0)]
-f,-outformat format Convert each output file to specified format [eps]
-o,-outname name Alternative output name for first file
-p,-parseonly Parse file [false]
-prompt string Prompt ["> "]
-q,-quiet Suppress welcome message [false]
-rgb Convert cmyk colors to rgb [false]
-safe Disable system call; command-line only [true]
-scroll n Scroll standard output n lines at a time [0]
-tabcompletion Interactive prompt auto-completion [true]
-tex engine TeX engine ("latex|pdflatex|tex|pdftex|none") ["latex"]
-s,-translate Show translated virtual machine code [false]
-twice Run LaTeX twice (to resolve references) [false]
-unsafe Enable system call; command-line only [false]
-u,-user x General purpose user string [""]
-v,-verbose Increase verbosity level [0]
All boolean options, except for -unsafe, -safe, and
help, can be negated by prepending no to the option name.
If no arguments are given, Asymptote runs in interactive mode
(see Interactive mode). In this case, the default output file
is out.eps.
If - is given as the file argument, Asymptote reads from
standard input.
If multiple files are specified, they are treated as separate
Asymptote runs.
Default option values may be entered as Asymptote code in a
configuration file named config.asy (or the file specified by
the environment variable ASYMPTOTE_CONFIG or -config option).
Asymptote will look for this file in its usual search path.
Typically the configuration file is placed in the
.asy directory in the user's home directory
(%USERPROFILE%\.asy under MSDOS).
Configuration variables are accessed using the long form of the option names:
import settings; outformat="pdf"; batchView=false; interactiveView=true; batchMask=false; interactiveMask=true;Command-line options override these defaults. Most configuration variables may also be changed at runtime.
The default output format is EPS for the (default)
latex tex engine and PDF for the pdflatex tex engine.
An alternative output format (without antialiasing) may be produced by
using the -f format option. This supports any format supported
by the ImageMagick convert program (version 6.2.4 or
later recommended; an Invalid Parameter error message indicates
that the MSDOS utility convert is being used instead of
the one that comes with ImageMagick).
To give specific options to the convert
program, call convert manually. This example enables antialiasing and
produces a tiff format at double the usual size:
asy -o - venn | convert -density 288x288 -geometry 100%x eps:- venn.tiff
If the option -unsafe is given, Asymptote runs
in unsafe mode. This enables the int system(string s) call, allowing one
to execute arbitrary shell commands. The default mode, -safe,
disables this call.
A PostScript offset may be specified as a pair (in bp units) with the
-O option:
asy -O 0,0 file
The default offset is zero. The default value of the page alignment
setting align is Center.
The -u option may be used to specify arbitrary Asymptote
code on the command line as a string. It is not necessary to terminate
the string with a semicolon. Multiple -u options are executed
in the order they are given. Command-line code like -u
x=sqrt(2) can be executed within a module like this:
real x; access settings; usersetting(); write(x);
When the -l option is used with file arguments, it only lists
global functions and variables defined in the specified file(s).
Additional debugging output is produced with each additional -v option:
-v-vvLaTeX and
dvips processing information.
-vvvLaTeX bidirectional pipe diagnostics.
-vvvv-vvvvvAsymptote traceback diagnostics.