0

I've already had a question about numbering equations: Start counting by 1 instead of 0, list of equations

The problem I had there is solved, but the solution doesn't work with all of my equations. So now I have a follow-up question:

In my thesis I also have chemical equations like the third in the following code example. There are three equations in one align environment because I want them in tabular form. If I split them into separate equation or align environments, they aren't aligned. But the code for the list of equation requires to split the enviroment (go to question above). How can I label these equations individually for the purpose of showing them, with the correct equation number, in the List of Equations? Also I have an structure of chapters and sections in my thesis. For better understanding I'd like that the numbers in the List of Equations start with the number of the chapter (e.g. first eqution in chapter 2: 2.1, second 2.2, third 2.3; and in the third chapter 3.1, 3.2, etc.).

\documentclass[twoside,a4paper,11pt,openright]{report}

\usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{newtxtext, newtxmath} \usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{microtype}
\usepackage[inner=25mm,outer=35mm,top=20mm,bottom=30mm,]{geometry}
\usepackage{array}
\usepackage[pdftex]{graphicx}
\usepackage{float}
\selectlanguage{german}

\usepackage{siunitx}
\usepackage{chemformula} \usepackage{tocloft} % eigene "list of things" \usepackage{caption}

\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}

% redefinition of \equation for convenience \let\oldequation = \equation \let\endoldequation = \endequation \AtBeginDocument{\let\oldlabel = \label} \newcommand{\mynewlabel}[1]{% \StrBehind{#1}{eq:}[\Str]% remove "eq:" from labels \edef\temp{\noexpand\myequations{\Str\noexpand\quad\expandonce{@currentlabel}}}% add tag to the entry in the list of equations \temp % execute the command \oldlabel{#1} % call the original label command \myequations{\Str}\oldlabel{#1}} \renewenvironment{equation}{% \oldequation \let\label\mynewlabel }{\endoldequation}

%\newcommand{\listequationsname}{} %Formelverzeichnis \newlistof{myequations}{equ}{Formelverzeichnis} \newcommand{\myequations}[1]{% \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}} \setlength{\cftmyequationsnumwidth}{3em}

\begin{document}

\chapter{Einleitung} ...

\chapter{theoretische Grundlagen}

\begin{align} Q(t) = Q(t_0) + \int\limits_{t_0}^{t} I(t)\ \mathrm{d}t \end{align} \myequations{elektrische Ladung}

\begin{align} R_i = {\frac {U_0 - U_l}{I_l}} \end{align} \myequations{Innenwiderstand} %\nomenclature

\begin{samepage} \begin{align} & \text{Oxidation:} &\ch{MH + OH-} &\ch{->[Entladung]} \ch{M + H2O + e- } \myequations{Entladung: Nickel-Elektrode} \ & \text{Reduktion:} &\ch{NiOOH + H2O + e-} &\ch{->[Entladung]} \ch{Ni(OH)2 + OH-} \myequations{Entladung: MH-Elektrode} \[1.5ex] \hline \nonumber \[-1.5ex] % Linie horizontal & \text{Redoxreaktion:} &\ch{MH + NiOOH + H2O} &\ch{->[Entladung]} \ch{M + Ni(OH)2 + H2O} \myequations{Entladung: Gesamtreaktion} \ \nonumber \end{align} \end{samepage}

\newpage \listofmyequations

\end{document}

  • 2
    What is the problem? Sorry, I can't figured out.. Do you like to have separate numbering for chem formulas? How this numbering should be? Please show us an example (on sketch) for this. – Zarko May 04 '23 at 08:37

0 Answers0