## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Custom \Rightarrow and \Leftrightarrow

Information and discussion about graphics, figures & tables in LaTeX documents.
bstex
Posts: 67
Joined: Mon Oct 23, 2017 10:22 am

### Custom \Rightarrow and \Leftrightarrow

Hi,
is there a way to customize the \Rightarrow and \Leftrightarrow to match with my customized rightarrow?
mwe.png (41.67 KiB) Viewed 2799 times

As you can see the rightarrow between A and B is perfect. But the other two arrows are not.

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
\documentclass[a4paper,11pt]{book}\usepackage{tikz}\usetikzlibrary{positioning,arrows.meta}\usepackage[version=4]{mhchem} \ExplSyntaxOn\cs_set:Npn \__mhchem_arrow_options_minLength:n  { {1.1em} }\ExplSyntaxOff \mhchemoptions{arrows=pgf{Straight Barb[round, angle=60:1.5pt 3]}{0.1ex}} \begin{document}I have these:\colorbox{green}{\ce{A -> B} \qquad C $\Rightarrow$ D \qquad 	E $\Leftrightarrow$ F} My MWE: \colorbox{green}{G \raisebox {0.35ex} {\tikz{\draw [double equal sign distance, -{Straight Barb[round, angle=60:1.5pt 1]}] (0,0) --++ (0.3,0)}} H}\end{document}

Thank you in advance.

kaiserkarl13
Posts: 636
Joined: Tue Mar 25, 2008 5:02 pm
I poked around in the code for mhchem for a while, but it's not obvious how to define => to mean what you want it to mean. (Writing \Rightarrow is always going to use the math symbol, hence the curviness; if you used \rightarrow instead of -> it would do the same thing.) One workaround is to use the txfonts package (pxfonts would also work), which uses straight double-arrow symbols.

The right way to do this is to add your own "=>" symbol into mhchem's machinery, though do take care not to confuse it with the harpoons (i.e., "<=>," "<<=>," and "<=>>").

bstex
Posts: 67
Joined: Mon Oct 23, 2017 10:22 am
Thanks for your reply.

I would prefer to have a customized arrow created with \tikz.
My problem is that I can't make the two horizontal lines to "stop" when they meet the arrow tip.
Also, I'd like the space between the two horizontal lines to be transparent.

Return to “Graphics, Figures & Tables”

### Who is online

Users browsing this forum: No registered users and 9 guests