vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
550 stars 90 forks source link

Recent change break the behavior of latexmkrc_asydir #414

Closed user202729 closed 9 months ago

user202729 commented 9 months ago

Consider:

There is a file asy/a-1.asy with content

if(!settings.multipleView) settings.batchView=false;
settings.tex="pdflatex";
defaultfilename="a-1";
if(settings.render < 0) settings.render=4;
settings.outformat="";
settings.inlineimage=true;
settings.embed=true;
settings.toolbar=false;
viewportmargin=(2,2);

draw((0, 0)--(1, 1));
label("hello");

(which can be can generated by a file a.tex with content

\documentclass{article}
\usepackage{asymptote}
\def\asydir{asy}
\begin{document}
\begin{asy}
  draw((0, 0)--(1, 1));
  label("hello");
\end{asy}
\end{document}

)

Compile it with

asy -o asy/ asy/a-1.asy

Before f25a3a9627adb94eef4d1fbe1c97c4702d8d282f, the output file would be generated in asy/a-1.pdf. After the change, it is generated in a-1.pdf.

This breaks the usage of asydir (the command above is used by latexmkrc_asydir)

johncbowman commented 9 months ago

Yes, it would be good to test commit f25a3a9627adb94eef4d1fbe1c97c4702d8d282f a bit more before making a release. However, using version 2.87-26,

./asy -dir base -o examples/ examples/venn -vv ends with Wrote examples/venn.eps

Perhaps you intended a different example?

user202729 commented 9 months ago

No, that example work.

The important part is defaultfilename="a-1";, for which examples/venn doesn't have a corresponding line. Without that line, the output file is indeed asy/a-1.asy.

And asymptote.sty package generates that file.