Open user202729 opened 2 months ago
To elaborate on the rationale: the exact quote from the stackexchange answer is "you can define the baseline of TikZ pictures so you can align them neatly." So the desired behavior would be to put asymptote pictures side-by-side and easily set then to have the same y=0
coordinate, even if one of them extends up and the other extends down. For instance,
\begin{asy}[baseline=0]
unitsize(1cm);
draw((0, 0) -- (1, 1));
\end{asy}
\begin{asy}[baseline=0]
unitsize(1cm);
draw((0, 0) -- (-1, -1));
\end{asy}
should produce this
/
/
/
/
/
/
rather than this
/ /
/ /
/ /
This does seem desirable, but I'm not sure how to make it happen.
TikZ has this thing. https://tikz.dev/tikz-scopes#pgf./tikz/baseline
Can we do the same thing in Asymptote (i.e. in
asypictureB
orasymptote
LaTeX package)?(Rationale: it's listed in https://tex.stackexchange.com/questions/39577/what-are-the-relative-strengths-of-tikz-and-asymptote as one of the arguments against Asymptote.)
I can see an immediate problem: PDF does not provide any way to draw outside the bounding box (is there? I don't know of one).
So you need to pass the parameter of how much to lower the box to the TeX side, then we can simply do https://tex.stackexchange.com/questions/15853/vertical-alignment-of-inline-images .
I can think of two options:
asy
/asypicture
environment to specify that you want the baseline to be at point(0, 0)
or whatever it is.