Chemmacros 写在反应旁边

Chemmacros 写在反应旁边

我正在使用该chemmacros包,我想知道是否可以在反应旁边写,例如像这样:在此处输入图片描述或者也许借助其他包。

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\usepackage[figuresleft]{rotating}
\usepackage{hyperref}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{chemmacros}
\chemsetup{modules={reactions,thermodynamics}}
\usepackage[margin=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage{helvet} 
\renewcommand{\familydefault}{\sfdefault}
\pagenumbering{roman}

\begin{document}
\begin{reactions*}
    2 NH3\gas{} + 5/2 O2\gas{} &-> 3 H2O\gas{} + 2 NO\gas{}\\
    2 NH3\gas{} + 2 O2\gas{} &-> 3 H2O\gas{} + N2O\gas{}\\
    2 NH3\gas{} + 3/2 O2\gas{} &-> 3 H2O\gas{} + N2\gas{}
\end{reactions*}
\end{document}

答案1

添加另一个对齐点:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\usepackage[figuresleft]{rotating}
\usepackage{hyperref}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{chemmacros}
\chemsetup{modules={reactions,thermodynamics}}
\usepackage[margin=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage{helvet} 
\renewcommand{\familydefault}{\sfdefault}
\pagenumbering{roman}

\begin{document}
\begin{reactions*}
    2 NH3\gas{} + 5/2 O2\gas{} &-> 3 H2O\gas{} + 2 NO\gas{}  & text\\
    2 NH3\gas{} + 2 O2\gas{} &-> 3 H2O\gas{} + N2O\gas{}  & text\\
    2 NH3\gas{} + 3/2 O2\gas{} &-> 3 H2O\gas{} + N2\gas{}  & text
\end{reactions*}
\end{document}

在此处输入图片描述

答案2

chemmacros有一个特殊的函数来排版这样的状态:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\usepackage[figuresleft]{rotating}
\usepackage{hyperref}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{chemmacros}
\chemsetup{modules={reactions,thermodynamics}}
\usepackage[margin=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage{helvet} 
\renewcommand{\familydefault}{\sfdefault}
\pagenumbering{roman}

\NewChemState\foo{symbol=H,superscript=$\circ$,unit=\kilo\joule,subscript-pos=right}

\begin{document}

\begin{align*}
    \ch{2 NH3\gas{} + 5/2 O2\gas{} &-> 3 H2O\gas{} + 2 NO\gas{}} && \foo(A){+2035}  \\
    \ch{2 NH3\gas{} + 2 O2\gas{} &-> 3 H2O\gas{} + N2O\gas{}}&& \foo(B){+36}\\
    \ch{2 NH3\gas{} + 3/2 O2\gas{} &-> 3 H2O\gas{} + N2\gas{}}&& \foo(C){-285}
\end{align*}

\end{document}

在此处输入图片描述

相关内容