I'm reading a textbook on different forms of convergence, and I've seen several examples in the text where they have an arrow with a letter above it to indicate different types of convergence. Does anyone know how to make that symbol? I tried what I thought was the most obvious guess ("\to^P") but that didn't work…
[Tex/LaTex] Convergence in Distribution
arrows
Related Solutions
Well, this one was a little strange but I think I know what is happening. Let me take a brief detour: Consider the following construction
\draw (0,0) -- (1,1) node (a) {A};.
What we expect from this piece of code is to put a node after the main path is created. Notice that the node has no idea of the nature of the path. Even if we use [pos=0.xx]
it just looks for the last available path so there is no organic connection between the node placement and the path creation.
It turns out that edge
is a to
operation added in a similar manner without any relation whatsoever to the main path constructed before that. Another example (zoomed in)
\begin{tikzpicture}
\path[->,
draw,
line width=1mm % To make the arrowhead bigger
] (0,0);
\end{tikzpicture}
So, an arrowhead with a path of zero length. Same happens with the edge if we dissect one of your paths
\path [line] (leftrow1.two north) % This is the main path as the example above
edge[out=90, in=90] node {}(tripletoprow); % This is added afterwards without the
% line option in place creating the
% illusion that the path is having
% a disconnected arrowhead
so shorten makes things even worse because it's shortening a zero length path taking the arrowhead even further. Once we get the problem right, then, it's easy to fix the problem via shifting the line
option to the edge
;
\documentclass[preview,tikz,border=3mm]{standalone}
\usetikzlibrary{shapes, arrows}
\tikzset{line/.style={draw, latex'-},
seq/.style={rectangle split, rectangle split horizontal, rectangle split parts=#1, draw}
}
\begin{document}
\begin{tikzpicture}
\node [seq=3] (leftrow1) at (0cm, 4cm){};
\node [seq=3] (tripletoprow) at (4cm, 4cm){};
\path (leftrow1.two north) edge[out=90, in=90,line] (tripletoprow);
\end{tikzpicture}
\end{document}
Also see the manual for the \tikztonodes
operation to avoid the extra node{}
before the target point.
There are probably a lot of different ways to address this, but I find the following quite effective:
\draw[-latex] (aidais3.south) to[out=270,in=225,looseness=2] (temps.265);
\draw[-latex] (aime.south) to[out=270,in=270,looseness=2] (temps.280);
\draw[-latex] (détestes3.south) to[out=270,in=260,looseness=2] (temps.south);
Note that I have specified the in
angle and the out
angle of the arrows. Note that I have also tweaked the final destination by using an angle of your temps
node, as noted in Add more anchors to standard TikZ nodes. You can tweak the looseness
parameter as you see fit :)
Here's the complete code:
% arara: pdflatex
\documentclass[11pt]{beamer}
\usepackage{ulem}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\usetikzlibrary{positioning}
\usepackage{philex}
\begin{document}
\begin{frame}{Contraintes sur le mouvement}
\lb{}{La fille que j'aidais aime ce que tu détestes.}
\begin{center}
\begin{tikzpicture}[scale=.8]
\tikzset{every tree node/.style={align=center,anchor=north}}% to allow linebreaks
\Tree
[.TP
[.DP
[.DP \edge[roof]; {La fille} ]
[.\node(aidais){CP}; \edge[roof]; {que j'\fbox{aidais}} ] ]
[.T$'$
[.\node(temps) {V\\\Huge\color{blue}?}; ]
[.VP
[.DP \edge[roof]; {\sout{La fille...}} ]
[.V$'$
%[.V \fbox{aime} ]
[.V \node(aime){\fbox{aime}}; ]
[.\node(détestes) {CP}; \edge[roof]; {ce que tu \fbox{détestes}} ] ] ] ] ]
\node (aidais2) [below=.7cm of aidais] {};
\node (aidais3) [right=.2cm of aidais2] {};
\node (temps2) [below=.3cm of temps] {};
\node (détestes2) [below=.7cm of détestes] {};
\node (détestes3) [right=.3cm of détestes2] {};
%\draw[semithick,->] (aidais3)..controls +( west:1) and +(east:1)..(temps2);
%\draw[semithick,->] (aime)..controls +( west:1) and +(east:1)..(temps2);
%\draw[semithick,->] (détestes3)..controls +( west:4) and +(east:4)..(temps2);
\draw[-latex] (aidais3.south) to[out=270,in=225,looseness=2] (temps.265);
\draw[-latex] (aime.south) to[out=270,in=270,looseness=2] (temps.280);
\draw[-latex] (détestes3.south) to[out=270,in=260,looseness=2] (temps.south);
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
Best Answer
You can use
\xleftarrow[]{}
and\xrightarrow[]{}
from theamsmath
package (you have to include it in your preamble using\usepackage{amsmath}
).For example this code
A\xleftarrow[f(x)]{n+\mu-1}B \xrightarrow[T]{n\pm i-1}C
generates