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

[FR] Allow to use $$ for numbering equation in **bookdown** #1441

Open
cderv opened this issue Oct 4, 2023 · 0 comments
Open

[FR] Allow to use $$ for numbering equation in **bookdown** #1441

cderv opened this issue Oct 4, 2023 · 0 comments

Comments

@cderv
Copy link
Collaborator

cderv commented Oct 4, 2023

This based on ideas and discussion with @Abhi-1U around his work on texor, and what we do in Quarto.

We can use Lua to tweak the rendering and so remove some contraint.

For numering equation, this is documented here: https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#equations

To number and refer to equations, put them in the equation environments and assign labels to them using the syntax (#eq:label)

Currently it needs to be inside \begin{equation} environment, and can't be inside usual $$. Though we can catch the DisplayMath, and emit the right LaTeX we need.

See this self contained reprex in this gist https://gist.github.com/cderv/13b667d1c770fb29ba1fb28cc43f228b

  • HTML

image

  • PDF

image

We could rethink the syntax also. Quarto does a specific new syntax
https://quarto.org/docs/authoring/cross-references.html#equations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant