The choice latex
is a bad idea because it's not possible to get a correct result. The size of the arrow is to big . Look at the result of your "fine" attempt
\begin{tikzpicture}[>=to]
\node[draw,circle] at (0,0) (A) {A};
\node[draw,circle] at (1,0) (B) {B};
\draw[->] (A) to[out=45, in=135] (B);
\draw[->] (B) to[out=-135, in=-45] (A);
\draw[help lines] (0.5,0.5) -- (0.5,-0.5);
\end{tikzpicture}
In the next code outer sep=0pt
is necessary
\begin{tikzpicture}[>=to]
\node[draw,circle,outer sep=0pt] at (0,0) (A) {A};
\node[draw,circle,outer sep=0pt] at (1,0) (B) {B};
\draw (A) to[out=45, in=135] (B);
\draw[<-] (B.135) -- ++(-0.001,0.0009);
\draw (A) to[out=-45, in=-135] (B);
\draw[<-] (A.-45) -- ++(0.001,-0.0009);
\end{tikzpicture}
The problem is that the tikz definition you gave doesn't scale with the smaller math styles. To overcome that, we use the scalerel
package to scale (on the fly) the good normal-sized arrow to the same vertical extent as the original arrow that you are replacing, in the current math style.
\documentclass{minimal}
\usepackage{scalerel}
\usepackage{tikz}
\usetikzlibrary{arrows}
\let\svrightarrow\rightarrow
\newcommand{\TSrightarrow}{\mathbin{\tikz[baseline]\draw[arrows={-angle 90},yshift=0.75ex] (0,0) -- (.95em,0);}}
\renewcommand\rightarrow{\mathrel{\scalerel*{\TSrightarrow}{\svrightarrow}}}
\parindent 0pt
\begin{document}
$x^2 - 2x + 1 = 0 \svrightarrow (x-1)^2 = 0 \svrightarrow x = 1$\\~\\
$x^2 - 2x + 1 = 0 \rightarrow (x-1)^2 = 0 \rightarrow x = 1$\\~\\
\( \lim_{h\svrightarrow0}\frac{f(x+h)-f(x)}{h} \)\\~\\
\( \lim_{h\rightarrow0}\frac{f(x+h)-f(x)}{h} \)
\end{document}
Best Answer
This is a continuation of Fractal's nice answer the purpose of which is to make the formulae fit in the document without overlapping.
If you comment out
\hspace{\tmphspace}
you get