Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Display math equation numbers now use a resilient style (eqno) #91

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

Omikhleia
Copy link
Owner

@Omikhleia Omikhleia commented Sep 28, 2024

... and also subscribe for labelrefs cross-referencing.

Closes #90

A SIL test input file:

\begin[class=resilient.book, papersize=a6]{document}
\font[family=Libertinus Serif]
\math[mode=display, numbered=true]{e^{i\pi} = -1}
\math[mode=display, number=2A]{e^{i\pi} = -1}
\math[mode=display, counter=stuff]{e^{i\pi} = -1}
\math[mode=display, marker=myeq, counter=stuff]{e^{i\pi} = -1}
\math[mode=display, counter=stuff]{e^{i\pi} = -1}

Equation \ref[marker=myeq] is especially remarkable.
\end{document}

Let's use a totally dumb style (purple color, oldstyle numbers, roman numbering, square brackets instead of parentheses), because... why not.

eqno:
  style:
    font:
      features: "+onum"
    color: "purple"
    numbering:
      after:
        text: "]"
      before:
        text: "["
      display: "roman"

Yay!

image

Solid and consistent 🤣

@Omikhleia Omikhleia self-assigned this Sep 28, 2024
@Omikhleia Omikhleia added the enhancement New feature or request label Sep 28, 2024
@Omikhleia
Copy link
Owner Author

Wait. Let's go full style-enabled and add something for our custom counter:

eqno-stuff:
  inherit: "eqno"
  style:
    color: "red"
    numbering:
      display: "alpha"

Oh yay, roll baby.

image

@Omikhleia Omikhleia added this to the 2.5.0 milestone Sep 28, 2024
@Omikhleia Omikhleia merged commit fc17232 into main Oct 7, 2024
2 checks passed
@Omikhleia Omikhleia deleted the feat-math-eqno-styling branch October 7, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Styling and cross-referencing display math equation numbers
1 participant