忽略 TikZ 图节点中的字母“Q”的尾部

忽略 TikZ 图节点中的字母“Q”的尾部

如下TikZ图所示,$\triangle{ABC}$为锐角三角形,$\triangle{PQR}$内接于该三角形。大号是通过直线上的点最接近A

我想排版标签在绿线的交叉口处交流LP就像我正在排版字母““信的尾部”“这与它所代表的观点相差太远了。

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

%A triangle and its orthic triangle are drawn.
\path (-1.75,0) coordinate (A) (2.75,0) coordinate (B) (0,3.25) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\path node[anchor=north, inner sep=0, font=\footnotesize] at ($(A) +(0,-0.15)$){$A$};
\path node[anchor=north, inner sep=0, font=\footnotesize] at ($(B) +(0,-0.15)$){$B$};
\path node[anchor=south, inner sep=0, font=\footnotesize] at ($(C) +(0,0.15)$){$C$};
%
\path ($(B)!(A)!(C)$) coordinate (P) ($(A)!(B)!(C)$) coordinate (Q) (0,0) coordinate (R);
\draw (P) -- (Q) -- (R) -- cycle;
%
%
%The foot of the altitude from A onto the line through P and Q is labeled L.
\coordinate (L) at ($(P)!(A)!(Q)$);
\draw[dashed] (L) -- (Q);
\draw let \p1=($(L)-(P)$), \n1={atan(\y1/\x1)} in node[anchor=\n1, inner sep=0, font=\footnotesize] at ($(L) +({\n1+180}:0.15)$){$L$};

\draw let \p1=($(A)-(P)$), \n1={atan(\y1/\x1)} in node[anchor={\n1+180}, inner sep=0, font=\footnotesize] at ($(P) +(\n1:0.15)$){$P$};
\path node[anchor=north, inner sep=0, font=\footnotesize] at ($(R) +(0,-0.15)$){\textit{R}};


\draw[name path=path_1, green] ($(A)!0.15cm!90:(C)$) -- ($(C)!0.15cm!-90:(A)$);
\draw[name path=path_2, green] ($(P)!0.15cm!-90:(L)$) -- ($(L)!0.15cm!90:(P)$);
\coordinate[name intersections={of=path_1 and path_2, by=label_Q}];
\path node[anchor=south east, inner sep=0, font=\footnotesize] at (label_Q){$Q$};

\end{tikzpicture}

\end{document}

答案1

这是一个建议。

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

%A triangle and its orthic triangle are drawn.
\path (-1.75,0) coordinate (A) (2.75,0) coordinate (B) (0,3.25) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\path node[anchor=north, inner sep=0, font=\footnotesize] at ($(A) +(0,-0.15)$){$A$};
\path node[anchor=north, inner sep=0, font=\footnotesize] at ($(B) +(0,-0.15)$){$B$};
\path node[anchor=south, inner sep=0, font=\footnotesize] at ($(C) +(0,0.15)$){$C$};
%
\path ($(B)!(A)!(C)$) coordinate (P) ($(A)!(B)!(C)$) coordinate (Q) (0,0) coordinate (R);
\draw (P) -- (Q) -- (R) -- cycle;
%
%
%The foot of the altitude from A onto the line through P and Q is labeled L.
\coordinate (L) at ($(P)!(A)!(Q)$);
\draw[dashed] (L) -- (Q);
\draw let \p1=($(L)-(P)$), \n1={atan(\y1/\x1)} in node[anchor=\n1, inner sep=0, font=\footnotesize] at ($(L) +({\n1+180}:0.15)$){$L$};

\draw let \p1=($(A)-(P)$), \n1={atan(\y1/\x1)} in node[anchor={\n1+180}, inner sep=0, font=\footnotesize] at ($(P) +(\n1:0.15)$){$P$};
\path node[anchor=north, inner sep=0, font=\footnotesize] at ($(R) +(0,-0.15)$){\textit{R}};


\draw[name path=path_1, green] ($(A)!0.15cm!90:(C)$) -- ($(C)!0.15cm!-90:(A)$);
\draw[name path=path_2, green] ($(P)!0.15cm!-90:(L)$) -- ($(L)!0.15cm!90:(P)$);
\coordinate[name intersections={of=path_1 and path_2, by=label_Q}];
\path node[anchor=south east, inner sep=0, font=\footnotesize,text=blue] 
(aux) at (label_Q) {$O$};
\path node[anchor=north west, inner sep=0, font=\footnotesize] at (aux.north west)
{$Q$};
\end{tikzpicture}
\end{document}

在此处输入图片描述

当然,你可以在节点中替换text=blue为,我只是为了证明是opacity=0auxQ恰恰这里的O意思是,不尊重区分这些字形的小摆动。

答案2

您只需将 tikzpicture 的最后一行代码替换为

\path node[anchor=south east, inner sep=0, font=\footnotesize] at (label_Q){$\smash{Q}$};

在此处输入图片描述

相关内容