Labelling and numbering equations inside \begin{align} \end{align} latex environment. #9511
-
DescriptionI am trying to use Quarto to build a website that has pages with lots of equations. I am a mathematical physicist and a heavy user of latex. I would like to be able to use the \begin{align} and \end{align} latex environment. I am rendering all pages in html. The rendering works fine. However, the equation numbers are not generated. For example, I have the following block in a .qmd file \begin{align}
H &= - \frac{1}{2} \frac{d^2}{d x^2} \label{hamiltonian} \\
\psi_n(x) &= \exp\left(i \frac{n}{R} x \right) \frac{1}{\sqrt{2\pi R}} \,,\quad n \in \mathbb{Z} \label{wavefunctions} \\
E_n &= \frac{1}{2} \, \frac{n^2}{R^2}\,. \label{energylevels}
\end{align} I didn't include the rest of my .qmd file, but the full output looks like that in the following image. Note the missing equation numbers. I am using a basic website format as explained here. project:
type: website
output-dir: docs
website:
title: "String Theory and Quantum Gravity"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd
format:
html:
theme: cosmo
css: styles.css
toc: true
page-layout: full
editor: visual How do I get Quarto to automatically generate equation numbers when using the latex align environment? I know that using the double-dollar signs to write and label equations works if I supply labels using {#eq-abc}, but I would really like to use the full functionality of latex, since my equations will get quite complicated and run over multiple lines. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am redirecting to the issue that is discussing it: |
Beta Was this translation helpful? Give feedback.
I am redirecting to the issue that is discussing it: