我希望更接近要点德使用 可显示指南针标记\tkzShowLine[orthogonal....]
。遗憾的是,如以下最小示例所示,该选项size=
没有任何效果。
提前谢谢!
\documentclass{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,3/0/B,0/3/C, 1.5/1.5/D}
\tkzDefPointWith[orthogonal](D,B) \tkzGetPoint{E}
\tkzShowLine[orthogonal=through D,size=.5,color=orange,gap=-2](B,C)
\tkzShowLine[orthogonal=through D,size=2.5,color=red,gap=-3](B,C)
\tkzShowLine[orthogonal=through D,size=100,color=green,gap=-4](B,C)
\tkzDrawPolygon(A,B,C)
\tkzDrawPoints(A,B,C,E,D)
\tkzDrawLine[color=blue](A,E)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B,E)
\tkzLabelPoints[above left](C)
\tkzLabelPoints[below](D)
\end{tikzpicture}
\end{document}
答案1
图中你有四个罗盘标记。你可以用 修改四个标记的长度length
,然后你可以用 修改线 (BC) 上标记的距离size
(不幸的是,我忘记了一小段代码,size
即使使用最新版本也无法使用。我今天修改了代码。然后是gap
使用 D 修改最后两个标记的距离的选项
接下来的代码是用新版本编译的 在 CTAN 上版本号为 3.01c。下周版本号为 3.02,下面代码会引入。我忘了系数\tkz@show@size
\documentclass{standalone}
\usepackage{tkz-euclide}
\makeatletter
\def\tkzShowOrthLine{\pgfutil@ifnextchar[{\tkz@ShowOrthLine}{\tkz@ShowOrthLine[]}}
\def\tkz@ShowOrthLine[#1](#2,#3)(#4){%
\begingroup
\pgfkeys{show/.cd,
ratio = .75,
length = 1,
gap = -1,
size = 1}
\pgfkeys{show/.cd,#1}
\tkzVecKOrth(#2,#3)
\pgfnodealias{tkz@OLtmp}{tkzPointResult}
\tkz@VecKCoLinear[1](#2,tkz@OLtmp,#4)
\pgfnodealias{tkzPointCo}{tkzPointResult}
\tkzInterLL(#2,#3)(#4,tkzPointCo)
\pgfnodealias{tkzPOpoint}{tkzPointResult}
\tkzCalcLength(#4,tkzPOpoint)
\tkzGetLength{tkz@mathLen}
\tkz@VecKNorm[1](#2,#3)
\pgfnodealias{PO@tmp}{tkzPointResult}
\tkz@VecKCoLinear[1](#2,PO@tmp,tkzPOpoint)
\pgfnodealias{PO@tmp2}{tkzPointResult}
\tkz@VecKCoLinear[-1](#2,PO@tmp,tkzPOpoint)
\pgfnodealias{PO@tmp1}{tkzPointResult}
\tkz@VecKCoLinear[\tkz@show@size](tkzPOpoint,PO@tmp1,tkzPOpoint)
\pgfnodealias{PO@1}{tkzPointResult}
\tkz@VecKCoLinear[\tkz@show@size](tkzPOpoint,PO@tmp2,tkzPOpoint)
\pgfnodealias{PO@2}{tkzPointResult}
\ifdim\tkz@mathLen pt>10 pt\relax
\tkz@VecKNorm[1](#4,tkzPOpoint)
\pgfnodealias{PO@tmp1}{tkzPointResult}
\else
\tkz@VecKOrthNorm[1](tkzPOpoint,PO@2)
\pgfnodealias{PO@tmp1}{tkzPointResult}
\fi
\tkz@VecKCoLinear[-\tkz@show@gap](PO@tmp1,tkzPOpoint,tkzPOpoint)
\pgfnodealias{PO@3}{tkzPointResult}
\tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@1)
\tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@2)
\tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](PO@1,PO@3)
\tkzCompass[#1,length=\tkz@show@length](PO@2,PO@3)
\endgroup
}
\makeatother
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,3/0/B,0/3/C, 1.5/1.5/D}
\tkzDefPointWith[orthogonal](D,B) \tkzGetPoint{E}
\tkzShowLine[orthogonal=through D,color=orange,length=.5,size=1,gap=-1](B,C)
\tkzShowLine[orthogonal=through D,color=green,length=.75,size=.5,gap=-.75](B,C)
\tkzDrawPolygon(A,B,C)
\tkzDrawPoints(A,B,C,E,D)
\tkzDrawLine[color=blue](A,E)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B,E)
\tkzLabelPoints[above left](C)
\tkzLabelPoints[below](D)
\end{tikzpicture}
\end{document}