[OS X TeX] Re: asymptote
Peter Dyballa
Peter_Dyballa at Web.DE
Thu Jan 29 19:28:45 EST 2009
Am 29.01.2009 um 22:59 schrieb Sylvain CHAMBON:
>> %%!TEX TS-program=<your asy engine's file name>
>
> it doesn't because '%' is not the caracter to comment a line with
> asymptote.
So use asymptote's comment character (// ?) as first element on that
line! (You could delete then one of the '%' characters.)
>
> but, my problem seems to be a bug... if i try the engine with my
> file (open from texshop, not a double-clic), it doesn't work : i
> have no typeset button. NOW, if i copy the same code into a new
> file, the typeset button steel available (and the cmd+T as well)
> and i can manage the compilation ! i write some lines, i save the
> file, typeset button is always here. BUT i close this new file, and
> open again : ARGGGG ! no typeset button again !!! it really seems
> to be a bug no ?
I wouldn't say it's a bug, it's just an overlooked file type. Could
we can convince Richard Koch to add ASY files to the files supported
by TeXShop.
In the meantime a workaround is possible:
• rename your ASY(s) file to <file name>.asy.tex (the asy should
remind *you* that's not a real TEX file),
• extend your ASY engine a bit that it creates a hardlink <file
name>.asy from the given <file name>.asy.tex file on which asy is
invoked.
#!/bin/bash
# visit the working place
cd "$(dirname "$1")"
# process the job file
bname="$(basename "$1")" # /path/to/file/name.asy.tex -> name.asy.tex
aname="$(basename "$bname" .tex)" # name.asy.tex -> name.asy
ln "$bname" "$aname" # create hardlink of name.asy.tex as name.asy
asy -f pdf -noprc -render=0 "$aname"
rm "$aname" # remove name.asy hardlink for next try
--
Greetings
Pete
This is a signature virus. Add me to your signature and help me to live
More information about the MacOSX-TeX
mailing list