Skip to content

'cases' from amsmath step equation numbers for each line in the case #304

Description

@Lycanic

cases is an environment which is used within an equation to have a wide { spanning multiple lines. In typical latex, this is paired with an equation number for only the cases environment as a whole (that is, if there are 3 lines in cases, it has one equation number for the whole 'cases'). In chirun currently, cases steps the equation number for every line within it, as well as the 'default' step (that is, if there are 3 lines in cases and the previous equation was numbered '1', the 'cases' line will be numbered '2' and the next equation will be numbered '6' (with line numbers 3,4, and 5 'unlisted').

An example for this can be seen at https://lti.chirun.org.uk/media/chirun-packages/output/a8034c60-4344-470e-ad59-456c21c7aa2f/index.html with source:

\documentclass[a4paper]{report}
\usepackage{amsmath}
\begin{document}

\chapter{Chapter 1}
\begin{equation}
x
\end{equation}

\begin{equation}
A=\begin{cases} B\\C\\D
\end{cases}
\end{equation}

\begin{equation}
x
\end{equation}

\end{document}

In plastex, cases is defined in amsmath.py as a child of _AMSEquation. Altering this to _AMSEquationStar stops the incorrect addition of lines (whilst leaving the correct numbering if cases is within an equation, but I'm unsure if it has the other impacts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions