这个问题是从提出的问题开始的这里由 Gonzalo Medina 先生回答
我现在试图达到这种效果:
\documentclass{book}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{mathptmx}
\usepackage{calc}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc,decorations.pathreplacing}
\begin{document}
\begin{equation}
\mathbf{P}_{T}=\begin{bmatrix}
x \\
{\tikzmark{starta}y\tikzmark{enda}}
\end{bmatrix} = \begin{bmatrix}
(L_{1} + r_{3})\cos\theta_{1} + r_{2}\sin\theta_{1} \\
(L_{1} + r_{3})\sin\theta_{1} - r_{2}\cos\theta_{1}
\end{bmatrix}
\end{equation}
\begin{tikzpicture}[remember picture,overlay]
\foreach \Value/\Length/\Text in {a/15pt/{\leftarrow~ tip measurement}}
{
\draw[decorate,decoration={brace,mirror,raise=5pt}]
({pic cs:start\Value}) -- coordinate (aux-\Value) ({pic cs:end\Value}|-{pic cs:start\Value});
}
\end{tikzpicture}
\end{document}
您能帮助我修改代码以获得如图所示的效果吗?谢谢!
答案1
不要认为这里需要括号:
代码:
\documentclass{book}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{mathptmx}
\usepackage{calc}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc,decorations.pathreplacing}
\begin{document}
\begin{equation}
\mathbf{P}_{T}=\begin{bmatrix}
x \\
{\tikzmark{starta}y\tikzmark{enda}}
\end{bmatrix} = \begin{bmatrix}
(L_{1} + r_{3})\cos\theta_{1} + r_{2}\sin\theta_{1} \\
(L_{1} + r_{3})\sin\theta_{1} - r_{2}\cos\theta_{1}
\end{bmatrix}
\end{equation}
\begin{tikzpicture}[remember picture,overlay]
\node [shift={(3.0em,-4.0ex)}, anchor=west] at ({pic cs:starta}) (X) {Tip measurement};
\draw [violet, thick, -latex] (X.west) -| ($({pic cs:starta})!0.5!({pic cs:enda})+(0,-0.5ex)$);
\end{tikzpicture}
\end{document}