This is a continuation of my question.
Now when I work with it, it seems to me that this code produces the label letters that are slightly bigger that the corresponding letters in the text formulas (Say, look at the letter A in the in-line formula, in the caption - these looks the same, and letter A the label of the vetrex A - this one looks bigger for me).
Question: How to make them the same?
In general: How to make the labels on the picture of the same size as in the text?
It is obvious (for me), that the problem is in the way how the function opendot works, but neither @Charles Staats (who suggested it and helped me a lot), nor me understand how it works.
Restrictions:
- The option to scale the picture must be preserved. Sometimes I need to scale the picture, this shouldn't affect the labels - all of them have to be the same (and equal the letters in the main text formulas) regardless of the picture size.
- The points have to stay "empty". This is the entire three volume book design, which I really want to preserve.
- The graphics has to stay vector. Therefore,
settings.prc = false; // IMPORTANT settings.render = 0; // IMPORTANT
is really important. So, please no solutions with the entire picture with labels change.
The ability to change the picture has to stay, the labels has always be the same as in the body text.
Thank you.
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[OT1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[pdftex]{graphicx}
\usepackage{euler,beton}
\usepackage[inline]{asymptote}
%============================================================
\begin{document}
Triangle $ABC$.
\begin{figure}[h]
\centering
\caption{Triangle $ABC$.}\label{OrthoCenterTetr}
\begin{asy}
settings.outformat = "pdf";
settings.prc = false; // IMPORTANT
settings.render = 0; // IMPORTANT
import three;
import geometry;
texpreamble("\usepackage{euler,beton}");
%============================================================
void opendot(picture pic=currentpicture, triple v, material p=currentpen,
light light=nolight, string name="", render render=defaultrender)
{
pen q=(pen) p;
pen fillpen = light.background;
if (invisible(fillpen)) fillpen = currentlight.background;
if (invisible(fillpen)) fillpen = white;
real size=0.5*linewidth(dotsize(q)+q);
pic.add(new void(frame f, transform3 t, picture pic, projection P) {
triple V=t*v;
assert(!is3D(), "opendot() not supported unless settings.prc == false and settings.render != 0");
if(pic != null)
dot(pic,project(V,P.t),filltype=FillDraw(fillpen=fillpen, drawpen=q));
},true);
triple R=size*(1,1,1);
pic.addBox(v,v,-R,R);
}
%============================================================
void opendot(picture pic=currentpicture, Label L, triple v, align align=NoAlign,
string format=defaultformat, material p=currentpen,
light light=nolight, string name="", render render=defaultrender)
{
Label L=L.copy();
if(L.s == "") {
if(format == "") format=defaultformat;
L.s="("+format(format,v.x)+","+format(format,v.y)+","+
format(format,v.z)+")";
}
L.align(align,E);
L.p((pen) p);
opendot(pic,v,p,light,name,render);
label(pic,L,v,render);
}
%============================================================
size(4cm, 0);
currentprojection=orthographic((5,2,3));
real a=3;
real b=4;
real c=4;
triple A=(0,0,a);
triple B=(0,b,0);
triple C=(c,0,0);
draw(A--B--C--A,linewidth(1));
draw(O--A^^O--B^^O--C,dashed);
path3 p=O--(6,6*c/b,0);
path3 q=B--C;
path3 p1=O--(6,0,6*c/a);
path3 q1=A--C;
triple H1=intersectionpoint(p,q);
triple H2=intersectionpoint(p1,q1);
path3 h1=A--H1;
path3 h2=B--H2;
triple H=intersectionpoint(h1,h2);
draw(h1);
draw(h2);
draw(O--H,dashed);
opendot(Label("$H_2$",align=NW),H2);
opendot(Label("$H_1$",align=SE),H1);
opendot(Label("$H$",align=NE),H);
opendot(Label("$A$",align=N),A);
opendot(Label("$B$",align=E),B);
opendot(Label("$C$",align=SW),C);
opendot(Label("$O$",align=0.7S+0.3E),O);
\end{asy}
\end{figure}
\end{document}
defaultpen(fontsize(10));
is an Asymptote command to set the font to 10 points (or 10 bp, I don't remember which). Ideally this should be taken care of by theinline
option you are using, but perhaps you can add it manually.