Asymptote FAQ - Section 9
Questions about output


Question 9.1. How can I disable automatic invocation of the PS viewer after an asy file is done processing?

It's actually not on by default, unless you happen to be using Microsoft Windows (because that is what most Microsoft Windows users expect). Microsoft Windows users can turn this feature off with the command-line option -noV or by putting
import settings;
interactiveView=false;
batchView=false;
in their config.asy file. See http://asymptote.sourceforge.net/doc/Options.html.

Question 9.2. How do I output jpeg images?

If you have the ImageMagick convert program installed, simply type
asy -f jpg test.asy 

Question 9.3. Can I embed bitmaps (photos) into my drawings and position and scale them?

Convert them to eps format and use the graphic(string) function just like a Label:
label(graphic("file"),(0,0));
See the example http://asymptote.sourceforge.net/gallery/orthocenter.asy and http://asymptote.sourceforge.net/doc/label.html.

Question 9.4. Does Asymptote support direct PDF output?

Currently, PDF conversion is possible with the -f pdf option, which supports transparency, annotations, and embedded movies and u3d images. However, we plan to eventually produce direct PDF output to support features not available in PostScript (e.g. general function shading).

Question 9.5. How to I produce large pictures of high quality in raster format (e.g. png, giff etc).

Try using some of the options to convert, mainly -geometry and -density. For example:
convert -geometry 1000x3000 example.eps example.png 
should give you the number of pixels you are looking for.

You can also change the default resolution of the image with:

convert -geometry 1000x3000 -density 300 -units PixelsPerInch example.eps example.png 
This does not change the number of pixels in the image, but just gives a hint as to how large each pixel should be displayed.

If you include the -density option without the -geometry option, convert will keep the image size constant (so a 4cm x 3cm eps figure will generate a 4cm x 3cm png image).

Question 9.6. Is it possible to produce multi-page documents with asymptote?

Yes, simply call the newpage() function. This is used by the slide.asy package to produce high-quality slide presentations (easier to use than Prosper).

LocalWords: brieftitle href copyto endcopy faq whatisasy MetaPost Gouraud sep LocalWords: colourspaces PostScript whereisasy MacOS docref RedHat Debian osx LocalWords: beforeasking whyasy whycamp readline Schamschula osxbadCPU lgccpp LocalWords: nogccpp gc Boehm nov brokenpdftex pdfetex pdftex cfg config qref LocalWords: brokentexinfo texinfo arounds latexintegration latexusage tex EPS LocalWords: Teixeira Ivaldi lasy pdflatex PDF inline endverbatim tkinter xasy LocalWords: tkinterdepend Uvh nodeps windir USERPROFILE winglobal popup XP PQ LocalWords: MSDOS miktex MikTex dvips texmf exe tensionsyntax greek pq LocalWords: dotfactor prepending matlabels usepackage amsmath latexpackage LocalWords: mathptmx internatfonts jul fourier textfamilyextension decsep pic LocalWords: lineargraph rotatelabel fixedsize colorssaturation colour NoFill LocalWords: doublearrows filltype arrowangle FillDraw EndPoint NoMargin xaxis LocalWords: reversearrow arrowsize axisticks RightTicks yaxis LeftTicks rgval LocalWords: threeaxispens xlimits ylimits MidPoint axislabelfont beginlabel LocalWords: axisticklabelfont overlappingticklabels endlabel ticklabel NoZero LocalWords: defaultformat SuppressQuiet MoveQuiet fixedsizegraphs LocalWords: BottomTop LeftRight fixedscaling graphlimits NColors LocalWords: custompalettes MyPalette Nongraphing dotloc dotlocs opic UnFill LocalWords: PenMargins addBox xmin xmax yequals calculateTransform changeaxis LocalWords: functioncolor latticeshade nonexplicitfun scalesecondaryaxis init LocalWords: emptymarkers paletterange comporint pseudocode framepicture aug LocalWords: unitsizes pathguide picarray genarrays cirdep someroutine interp LocalWords: automaticscaling Metapost accomodate manualscaling mppickup lray LocalWords: horiz verti LightSource unitsquare unitsize truesize psviewer noV LocalWords: interactiveView batchView jpeg jpg embedbitmaps eps directpdf pdf LocalWords: bigpictures png giff PixelsPerInch multipage newpage


Back: Questions about differences between Asymptote and MetaPost.
Return to contents.

Asymptote - 26 October 2008

Extracted from Asymptote Frequently Asked Questions, Copyright © 2008 .