Math & ScienceAlternative to fleqn for mhchem and chemmacros

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Sonntag
Posts: 13
Joined: Sun May 24, 2015 3:37 pm

Alternative to fleqn for mhchem and chemmacros

Post by Sonntag »

Hi!

I would like to indent the reaction equation like in following example. With a lot of mistake it worked with mhchem. How can it be fixed with chemmacros?

Sonntag

Code: Select all

\documentclass{article}

\usepackage{amsmath}
\usepackage{fleqn}
\setlength{\mathindent}{1cm} 
\usepackage[option1 = <value1>, option2 = <value2>]{chemmacros} 

\begin{document}
\reaction{H2 + O* <=> OH* + H*} 
\end{document}

Recommended reading 2024:

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

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Alternative to fleqn for mhchem and chemmacros

Post by Johannes_B »

To be honest, i don't even see the problem.

Code: Select all

\documentclass[fleqn]{article}
\usepackage{chemmacros}
\usepackage{showframe}
\setlength{\mathindent}{.2cm}
\begin{document}
\reaction{H2 + O* <=> OH* + H*}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Sonntag
Posts: 13
Joined: Sun May 24, 2015 3:37 pm

Alternative to fleqn for mhchem and chemmacros

Post by Sonntag »

If I compile the example from above it look like this with 20 mistakes and if I let me show the first one I get directed to fleqn.clo.
file.php.jpeg
file.php.jpeg (12.53 KiB) Viewed 8499 times
Last edited by cgnieder on Sun Jul 05, 2015 12:37 pm, edited 2 times in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Alternative to fleqn

Post by Johannes_B »

Update your packages.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Sonntag
Posts: 13
Joined: Sun May 24, 2015 3:37 pm

Re: Alternative to fleqn

Post by Sonntag »

Today I've updated all packages. Have checked it right now on MikTex. No new updates couldn't found. And restarted the computer, but nothing has changed. What else could I do?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

Alternative to fleqn for mhchem and chemmacros

Post by Stefan Kottwitz »

Perhaps post your .log file here, as attachment to a post.

Stefan
LaTeX.org admin
Sonntag
Posts: 13
Joined: Sun May 24, 2015 3:37 pm

Re: Alternative to fleqn

Post by Sonntag »

Here is the log file:
Attachments
LaTeX2.log
(74.5 KiB) Downloaded 555 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Alternative to fleqn for mhchem and chemmacros

Post by Johannes_B »

Hi, please update the formats as seen in MikTeX Maintenance. That should help.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Sonntag
Posts: 13
Joined: Sun May 24, 2015 3:37 pm

Re: Alternative to fleqn

Post by Sonntag »

Thank you, for the suggestion.
But it hasn't change something. I still have the same number of mistakes.

Sonntag
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Alternative to fleqn

Post by Johannes_B »

What exactly did you do? Can you show us the log-file of the latest run after the update? Please give it a proper file name.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply