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}
![enter image description here](https://i.stack.imgur.com/Yj4qj.jpg)
chemfig
allows to add explizit node names to either bonds or atoms in its formulae by using the @{<name>}
syntax. These names can be used in a tikzpicture with the options remember picture, overlay
to draw the curved arrows. chemfig
provides the wrapper \chemmove
for this. So a combination of chemfig
and TikZ can be used to draw the schemes. (BTW: the chemfig
manual actually has quite a few examples of such schemes...)
Here is something that might get you started:
\documentclass{article}
\usepackage{chemfig}
\tikzset{
elmove/.style={->,shorten >=3pt, shorten <=3pt}
}
\begin{document}
\schemestart
\chemfig{*8(-[@{sb1}]=[@{db1}]-[@{sb2}]=[@{db2}]-[@{sb3}]=[@{db3}]-[@{sb4}]=[@{db4}])}
\arrow{<->}
\chemfig{*8(=-=-=-=-)}
\schemestop
\chemmove[red,elmove]{
\draw (db1) .. controls +(90:5mm) and +(45:5mm) .. (sb1) ;
\draw (db2) .. controls +(180:5mm) and +(135:5mm) .. (sb2) ;
\draw (db3) .. controls +(270:5mm) and +(225:5mm) .. (sb3) ;
\draw (db4) .. controls +(0:5mm) and +(315:5mm) .. (sb4) ;
% similar the others
}
\bigskip
\schemestart
\chemfig{**6(----[@{b}]--)}
\arrow(benzene.base east--.base west){->[][][15pt]}
\chemfig{**[120,420,dashed]6(---(-[,-1,,,draw=none]{+})-(-[:120]H)(-[:60]NO_2)--)}
\arrow(@benzene.45--){0}[45,.2]
\chemfig{@{N}\chemabove{N}{+}O_2}
\schemestop
\chemmove[blue,elmove]{
\draw[shorten <=-5pt] (b) .. controls +(30:5mm) and +(-90:1cm) .. (N) ;
}
\end{document}
![enter image description here](https://i.stack.imgur.com/ou51y.png)
My package modiagram
can be used to draw the electronic state diagram. IMHO It doesn't fit perfectly and a TikZ-only solution may be preferable. On the other hand the code is rather easy:
\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{chemformula,modiagram,chemfig}
% necessary due to stupid bug in `modiagram':
\newcommand*\makecolonother{\catcode`\:=12 }
\begin{document}
\ch{_4Be}: 1s$^2$~2s$^2$
ground state:
\begin{MOdiagram}[style=square,AO-width=8pt]
\AO(0pt){s}{0;pair}
\AO(12pt){s}{0;pair}
\AO(24pt){s}{0;}
\AO(34pt){s}{0;}
\AO(44pt){s}{0;}
\draw[overlay,red,->]
(AO2.north) .. controls +(0,.5) and +(0,.5) .. (AO3.north) ;
\end{MOdiagram}
excited state:
\begin{MOdiagram}[style=square,AO-width=8pt]
\AO(0pt){s}{0;pair}
\AO(12pt){s}{0;up}
\AO(24pt){s}{0;up}
\AO(34pt){s}{0;}
\AO(44pt){s}{0;}
\makecolonother
\draw[<-,overlay]
(AO2.south) -- ++(-100:3mm) node[below] {Cl} ;
\draw[<-,overlay]
(AO3.south) -- ++(-80:3mm) node[below] {Cl} ;
\end{MOdiagram}
\end{document}
![enter image description here](https://i.stack.imgur.com/kJ72m.png)
Best Answer
Use
\substack
you can change
[-1em]
to be any value as you want.(Added by Hendrik Vogt:) With
you get something quite close to
\rightrightarrows
.