I would like to achieve something like this:
or optionally with a sharp kink:
Is that possible?
I stumbled across this post and some answers where tikz was used but wasn't able to adjust it to my need.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI would like to achieve something like this:
or optionally with a sharp kink:
Is that possible?
I stumbled across this post and some answers where tikz was used but wasn't able to adjust it to my need.
Welcome to TeX.se, please consider giving an MWE. This will help us a lot to answer your question accurately, also saves us time from going to our crystal balls ;-)
.
A starting point
\documentclass{article}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay, remember picture] \coordinate (#1);}
%https://tex.stackexchange.com/questions/40535/matrix-with-arrows-and-labels
\begin{document}
\[
X = \qquad \bordermatrix{~ & ~ & ~ & ~ & ~
& ~ \cr
\tikzmark{varrowtop} ~ & 0 & 0 & 0 & 1 & 1\tikzmark{harrowright} \cr
~ & 0 & 0 & 1 & 1 & 1 \cr
~ & 0 & 0 & 1 & 1 & 0 \cr
~ & 0 & 0 & 1 & 1 & 0 \cr
\tikzmark{varrowbottom}~ & 0 & 0 & 0 & 0 & 0 \cr
}
\]
\tikz[overlay,remember picture] {
\draw[->] (varrowbottom) -- ([yshift=3ex]varrowtop) -- ([yshift=3ex]harrowright)
node[midway,above] {};
}
\end{document}
to get:
Smooth corners:
\documentclass{article}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay, remember picture] \coordinate (#1);}
\begin{document}
\[
X = \qquad \bordermatrix{~ & ~ & ~ & ~ & ~
& ~ \cr
\tikzmark{varrowtop} ~ & 0 & 0 & 0 & 1 & 1\tikzmark{harrowright} \cr
~ & 0 & 0 & 1 & 1 & 1 \cr
~ & 0 & 0 & 1 & 1 & 0 \cr
~ & 0 & 0 & 1 & 1 & 0 \cr
\tikzmark{varrowbottom}~ & 0 & 0 & 0 & 0 & 0 \cr
}
\]
\tikz[overlay,remember picture] {
\draw[->, rounded corners] (varrowbottom) -- ([yshift=3ex]varrowtop) -- ([yshift=3ex]harrowright)
node[midway,above] {};
}
\end{document}
to get:
tikzmark
package (which has the advantage of working even if the marks are defined after their usage...)
:-)
.
Feb 19, 2019 at 12:54