Math & ScienceCustomize arrow

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
bstex
Posts: 69
Joined: Mon Oct 23, 2017 10:22 am

Customize arrow

Post by bstex »

Hi,
I have already this:

Code: Select all

\documentclass[a4paper,11pt]{book} 

\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage[version=4]{mhchem}

\begin{document}
\mhchemoptions{arrows=pgf{Straight Barb[left]}{0.12ex}}
\ce{A + B <--> C + D}
\end{document}
which is this:
Screen Shot 2017-11-04 at 17.50.44.png
Screen Shot 2017-11-04 at 17.50.44.png (12.85 KiB) Viewed 4371 times
and I'd like to change the distance between two arrows and the total length of the arrows.
Is it possible?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Customize arrow

Post by Stefan Kottwitz »

First idea for changing the length: add white space as an option in square brackets to the arrow:

\ce{A + B <-->[\hspace{30pt}] C + D}

Stefan
LaTeX.org admin
bstex
Posts: 69
Joined: Mon Oct 23, 2017 10:22 am

Customize arrow

Post by bstex »

Thank you for your reply, Stefan.
Well, I forgot to mention that I'd like the arrow to be shorter, not longer.
Post Reply