如何减小括号的尺寸并将其颜色自定义为红色?我只是想减少 tikzpicture 的渲染。
\documentclass[]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix}
\begin{document}
\begin{tikzpicture}[decoration={brace},scale=2]
\node [rotate=90] (A) {A};
\node [fit=(A)] (fit) {};
\draw [decorate,line width=1pt]
([yshift=-5pt]fit.south west) -- ([yshift=5pt]fit.north west);
\end{tikzpicture}
\end{document}
提前致谢!
答案1
像这样?
\documentclass[]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix}
\begin{document}
\begin{tikzpicture}
\node [rotate=90,inner sep=0pt,text=red] (A) {A};
\draw [red,line cap=round,decoration={brace,amplitude=0.25ex},decorate,line width=1pt]
(A.north west) -- (A.north east);
\end{tikzpicture}
\end{document}
我已将 减小inner sep
到 0pt,删除fit
并将选项直接添加scale
到节点,因为它看起来合适。我还设置了line cap=round
(感谢 Heiko 的提醒),因为它看起来更好。