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 4538 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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
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