To have a fixed size part of a figure that uses size(..) you want to put that fixed size thing in a picture and add it to the current picture. See https://asymptote.sourceforge.io/FAQ/section4.html#fixedsize . So, if I understand what you want, can you add a fixed size picture and put the length-labeler below that? Michael pointed to a section that contains a description of truepoint, which I believe will get you the bottom of the fixed size picture.
Thank you both. I did want a mapsto, exactly. I have a domain axis and a parallel codomain axis and I am mapping the one to the other. Having the start bars all the same distance from their originating points seemed natural. I can make a command that draws a circle at both ends and find intersections, with the line between the endpoints, and then puts in the arrow and the bar, but I thought that was the expected behavior of draw(..). John, I'll say that the behavior was a bit of a surprise, at least...
Thanks Michael. I'm not a C++ person and I find that I have trouble making much of the code, but you look right to me. I appreciate your help. I put in an issue on GitHub.
Thanks Michael. I'm not a C++ person and I find that I have trouble making much of the code, but you look right to me. I appreciate your help.
Yes. I'm expecting the bar to be connected to the line there. The same behavior happens if you use Margin or TrueMargin (I could not get Margins to work), which made me wonder if I just misunderstood something obvious about bars (it does not seem to have to do with shortening the path).
No, if I change the lines in the middle to say this. // Leaves a gap with the bar draw(diag, arrow=EndArrow(NoFill), bar=BeginBar, Margin(0.6pt)); then the figure is unchanged.
In the code below there are two diagonal lines, each with a bar at the start and an arrow at the end. However, when I use the margin commands the bar is separated from the lines, whereas the arrow is not. I expected the bar to be at the end of the line. Bug? Or I expected wrong? // test.asy // Bar is separated from the line stem but arrow is not? settings.outformat="pdf"; dotfactor = 2; dot((0,0), red); dot((10,10), red); path diag = subpath((0,0)--(10,10),0.1,0.9); // works fine // draw(diag, arrow=EndArrow(NoFill),...
Hello, In brief: I get this error message when I use settings.tex="lualatex"; but not when I use pdflatex. $ asy input_output Importing teach/calc_i/asy/texpreamble.asy Importing teach/calc_i/asy/jh.asy This is LuaHBTeX, Version 1.22.0 (TeX Live 2025) restricted system commands enabled. LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-08-13> lualatex: Not writing to .log (openout_any = p; no extended check). ! I can't write on file `.log'. Please type another transcript file name: !...