LaTeX forum ⇒ Math & ScienceAlternative to fleqn for mhchem and chemmacros

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Re: Alternative to fleqn

Postby cgnieder » Sun Jul 05, 2015 12:42 pm

Johannes_B wrote:To be honest, i don't even see the problem.
  1. \documentclass[fleqn]{article}
  2. \usepackage{chemmacros}
  3. \usepackage{showframe}
  4. \setlength{\mathindent}{.2cm}
  5. \begin{document}
  6. \reaction{H2 + O* <=> OH* + H*}
  7. \end{document}


I'm surprised this works! chemmacros doesn't provide a \reaction macro but only a {reaction} environment. Actually it doesn't work – try this:

  1. \documentclass[fleqn]{article}
  2. \usepackage{chemmacros}
  3. \usepackage{showframe}
  4. \setlength{\mathindent}{.2cm}
  5. \begin{document}
  6. \reaction{H2 + O* <=> OH* + H*}
  7.  
  8. foo bar
  9. \end{document}


This does work:

  1. \documentclass[fleqn]{article}
  2. \usepackage{chemmacros}
  3. \usepackage{showframe}
  4. \setlength{\mathindent}{.2cm}
  5. \begin{document}
  6. \begin{reaction}
  7. H2 + O* <=> OH* + H*
  8. \end{reaction}
  9. foo bar
  10. \end{document}


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Tags:


Return to “Math & Science”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest