3

This question is building from the question asked here and answered by Mr. Gonzalo Medina

I am now trying to get this effect:

enter image description here

\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} 

Can you assist me in modifying the code to get the above effect as shown in the image? Thanks!

Joe
  • 9,080
  • 1
    Here are some related questions: http://tex.stackexchange.com/questions/140529/graphics-equations-put-text-on-equations, http://tex.stackexchange.com/questions/263480/undersetting-an-arrow-beneath-an-equation, and http://tex.stackexchange.com/questions/191217/arrow-pointing-to-subscript-in-equation – Steven B. Segletes Oct 30 '15 at 11:53

1 Answers1

3

Don't think the brace is necessary here:

enter image description here

Code:

\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}

Peter Grill
  • 223,288