Skip to content

Consistent Rule name and token meta information #3

@rowanc1

Description

@rowanc1

For the default rule name, it would be great if we could have some consistency with dollarmath package? Maybe math_block_amsmath? Or simply make it a math_block and add some metadata to the token to indicate that it is AMS?

It would be great to have consistency between:

$$
\begin{equation}
Ax = b
\end{equation}
$$ (math)

and

\begin{equation}
\label{math}
Ax = b
\end{equation}

and

```{equation}
:label: math
Ax = b
```

and

$$
Ax = b
$$ (math)

In terms of downstream packages not having to know the intricacies of how the math was parsed, this would mean the tokens in all cases would be something close to:

token.type = 'math_block'
token.content = 'Ax = b' || '\begin{...'
token.meta = {amsmath: true, label: 'math', numbered: true}

Maybe optionally strip out equation environments and parse simple label information. In the future as well, as packages may want to label things on their own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions