
現在、TikZ プロットに注釈を付けて、限界値を指摘しようとしています (下の図を参照)。
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw [stealth-,thin] (0,0.9)-- +(16pt,0pt) node[right,font=\footnotesize]
{Limiting value: $\lim\limits_{x\rightarrow 0}\omega=0$};
\end{tikzpicture}
\end{document}
私が抱えている問題は、ノードに接続する線を描画すると、西側のアンカーがテキストの中央ではなく、ノード全体の中央にきちんと配置されてしまうことです。
質問: 矢印がノード全体ではなくテキストの中央にきちんと配置されるようにアンカーの位置合わせを行うにはどうすればよいでしょうか?
答え1
\smash
1 つの方法は、ノードの配置に影響を与えたくないテキストに使用することです。または、次の 2 つの手順でノードを配置することもできます。
コード:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw [stealth-,thin] (0,0.9)-- +(16pt,0pt) node[right,font=\footnotesize]
{Limiting value: \smash{$\lim\limits_{x\rightarrow 0}\omega=0$}};
\end{tikzpicture}
\medskip
\begin{tikzpicture}
\draw [stealth-,thin] (0,0.9)-- +(16pt,0pt) node[right,font=\footnotesize] (A) {Limiting value:};
\node [anchor=west,font=\footnotesize, inner sep=0pt] at (A.east) {$\lim\limits_{x\rightarrow 0}\omega=0$};
\end{tikzpicture}
\end{document}