![用于align=left多行节点](https://linux22.com/image/450895/%E7%94%A8%E4%BA%8Ealign%3Dleft%E5%A4%9A%E8%A1%8C%E8%8A%82%E7%82%B9.png)
我希望它是这样的:
\documentclass[12pt, border=50mm]{standalone}
\usepackage{tikz}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A},
\tkzDefPoint(4,0){B},
\tkzDefPoint(0,4){C},
\draw [black, very thick] (A)--(0:4) arc[radius=4, start angle=0, end angle= 90]--(C)--(A)--cycle;
\node at (5,4) {$x+y+z=1$};
\node at (5,3) {$text$};
\node at (5,2) {$2x^2=3$};
\node at (5.6,1) {$4x+5x-4=0$};
\end{tikzpicture}
\end{document}
答案1
一些备注:您不需要加载,TikZ
因为tkz-euclide
使用。除非您使用来自的代码,否则TikZ
您不需要使用。如果您想放置标签,您可以使用,但也可以。;
TikZ
tkzText
node
\documentclass[border=1cm]{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/0/B,0/4/C}
\tkzDrawSector(A,B)(C)
\tkzText[align=left, font={\baselineskip=4ex},
text width=3cm](6,3)
{$x+y+z=1$\\$text$\\$2x^2=3$\\$4x+5x-4=0$}
\end{tikzpicture}
\end{document}
答案2
这非常简短pstricks
:
\documentclass[svgnames]{article}
\usepackage{amsmath, array}
\usepackage{pstricks}
\begin{document}
\psset{unit=3cm, linejoin=1}
\begin{pspicture}(0,0)(2,1)
\pswedge{1}{0}{90}
\rput[tl](1,1){$\begin{array}{l}x + y + z = 1 \\ \text{text}\\ 2x^2 = 3 \\ 4x + 5y - 4 = 0\end{array}$}
\end{pspicture}
\end{document}
答案3
\documentclass[tikz, border=1cm]{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A},
\tkzDefPoint(4,0){B},
\tkzDefPoint(0,4){C},
\draw [black, very thick] (A)--(0:4) arc[radius=4, start angle=0, end angle= 90]--(C)--(A)--cycle;
\node[align=left, font={\baselineskip=4ex}] at (6,2.5) {$x+y+z=1$\\$text$\\$2x^2=3$\\$4x+5x-4=0$};
\end{tikzpicture}
\end{document}
答案4
这里有两种可能性。在这两种情况下,放置都是从点开始的磷位于四分之一圆弧起点的 1/4 处。由于above right
我使用的键(来自positioning
Ti钾Z 库),明确相对于磷是south west
包含文本的矩形节点的锚点。
请注意,您应该删除行后的逗号\tkzDefPoint
:每个逗号都会导致警告Missing character: There is no , in font nullfont!
打印在 TeX 的标准输出和日志文件上!
用于align=left
多行节点
\documentclass[12pt, border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
\tkzDefPoint(0,4){C}
\draw[black, very thick]
(A) -- (0:4)
arc[radius=4, start angle=0, end angle=90] coordinate[pos=0.25] (P)
-- (C) -- cycle;
\node[align=left, above right=0em and 1em of P]
{%
$x+y+z=1$\\[0.5ex]
\textit{some text}\\[0.5ex]
$2x^2=3$\\[0.5ex]
$4x+5x-4=0$%
};
\fill[blue] (P) circle[radius=3pt] node[below left=2pt of P] {$P$};
\end{tikzpicture}
\end{document}
行距的变体:hpekristiansen'sfont={\baselineskip=4ex}
主意(但是,我建议font={\setlength{\baselineskip}{4ex}}
或者font={\baselineskip=4ex\relax}
代替)。
tabular
在单行节点内使用
\documentclass[12pt, border=2mm]{standalone}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
\tkzDefPoint(0,4){C}
\draw [black, very thick] (A) -- (0:4)
arc[radius=4, start angle=0, end angle=90] coordinate[pos=0.25] (P)
-- (C) -- cycle;
\node[above right=0em and 1em of P]
{%
\renewcommand{\arraystretch}{1.2}% set row spacing
\begin{tabular}{@{} l @{}}
$x+y+z=1$\\
\textit{some text}\\
$2x^2=3$\\
$4x+5x-4=0$
\end{tabular}%
};
\fill[blue] (P) circle[radius=3pt] node[below left=2pt of P] {$P$};
\end{tikzpicture}
\end{document}