[OS X TeX] Asymptote and Latex for Tiger

Alain Matthes alain.matthes at mac.com
Mon Oct 9 18:01:16 EDT 2006


Le 9 oct. 06 à 23:00, Tim Brophy a écrit :

> Can I use Asymptote with Texshop? Or does it have to be from the  
> command line? If so, what do I do? Sorry for my ignorance.
>

First , Thanks Gerben !

I don't use Texshop but i suppose that you need only a script like   
asy4pdf.engine
in your home /Library/TeXShop/Engines/asy4pdf.engine.

But for me i put this script in "/usr/local/teTeX/bin/powerpc-apple- 
darwin7.9.0/" ,then this script must be executable

Sorry for my bad english :(



#!/bin/sh
location=$(dirname "$1")
basefname="${location}/`basename "$1" .tex`"
# process
cd $location
pdflatex --shell-escape "$1"
asy "${basefname}.asy"
pdflatex --shell-escape "$1"

My first compile with asy and texshop is :



\documentclass[]{prof}%prof.cls is my personnal class !!

\usepackage{asymptote}
\usepackage{epstopdf}
\begin{document}
\begin{asy}
texpreamble("\usepackage{fourier}");
texpreamble("\usepackage[utf8]{inputenc}");
defaultpen(font("T1","fut\textfamilyextension","m","n"));
% the interactivity with latex is very fine
% i can use fourier !!

import graph3;

size(200,0);

currentprojection=perspective(5,4,2);

real f(pair z) {return 0.5+exp(-abs(z)^2);}

draw((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle3);

draw(arc(0.12Z,0.2,90,60,90,15),ArcArrow);

picture surface=surface(f,4,(-1,-1),(1,1),10);

bbox3 b=limits(O,1.75(1,1,1));

xaxis(Label("$x$",1),b,red,Arrow);
yaxis(Label("$y$",1),b,red,Arrow);
zaxis(Label("$z$",1),b,red,Arrow);

label("$O$",(0,0,0),S,red);

add(surface);
\end{asy}
\end{document}

Greetings

Alain Matthes






------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list