Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Asymptote plugin for texmacs, v0.2 - possible bug in EPS sessions

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Asymptote plugin for texmacs, v0.2 - possible bug in EPS sessions


Chronological Thread 
  • From: "Yann Dirson" <address@hidden>
  • To: "chu-ching huang" <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] Asymptote plugin for texmacs, v0.2 - possible bug in EPS sessions
  • Date: Tue, 4 Oct 2005 16:09:26 +0200 (CEST)
  • Importance: Normal

> I found a bug(?) in tm_asy:
> $ASY -o $TEMP_DIR/$TEMP_PS_NAME $TEMP_DIR/$TEMP_ASY_NAME
> whatever the vaule of $TEMP_DIR was set, the ps file created by "asy" is
> always placed in
> the directory of work file being opened. And this will cause some trouble
> within TeXmacs
> session. Suggestion is : remove the $TEMP_DIR before $TEMP_PS_NAME above
> and
> the last line in tm_asy.

I am not sure to get your point here. TEMP_DIR is set to "", which
causes the temporary files to be created in current directory. This
behavious is inherited from the gnuplot plugin (since the asy plugin
is derived from the latter).

However, I have already thought about bad consequences of doing that
(inability to run the plugin from a read-only directory, race
condition when several users (or the same one) run the plugin from the
same directory (think /tmp)). Note again that the gnuplot plugin has
the same problems.

We could use PID in the temporary filename to protect from accidental
clashes, but that will not solve the "readonly dir" issue. And if we
want to use /tmp or similar, we face security issues without a sane
temporary-file tool. There are several such tools available to shell
scripts on Linux machines, but I do not know of a completely portable
one, let alone one which would generate filenames with a specific
suffix (like the "tempfile" tool we have on Debian), or which can make
us a temporary directory, which would allow us to create arbitrary
filenames inside in a secure way (like recent-enough versions the
openbsd-derived mktemp), as is required for asymptote.

The only portable solution I can see would be rewriting the plugin in
perl, and use the standard perl File::Temp module.


> Another minor inconsistence between TeXmacs and asy is:
> asy allows to use TeX syntex to input math symbols, for instance:
> \frac{}{}
> for fraction, but backslash will be ignored in TeXmacs asy session.

You can workaround this by protecting backslashes with a second one.
But it would be great if it was not needed. Maybe messing with the
input string with a filter could help, but I am a bit unsure.

Best regards,
Yann.





Archive powered by MHonArc 2.6.19.

Top of Page