Skip to content

Use \tag{} info for eq cross referencing in the HTML book output #310

Open
@AlbertLei

Description

@AlbertLei

In writing papers one sometimes needs to give an equation a special name, using the \tag{} command. A minimal example is as follows:

$$
a \ge b \tag{IC}
$${#eq-ic}

[Equation (-@eq-ic)] is nice.

The generated HTML book output made two 'mistakes'

  • it uses both (1) and (IC) as equation tags
  • More importantly, it uses 1 rather than IC for cross referencing.

Screen Shot 2022-02-05 at 9 55 05 PM

Meanwhile, the PDF output is normal:

Screen Shot 2022-02-05 at 9 57 19 PM

I wish to achieve the same output as in the PDF output. Is there any workaround?

I am using quarto 0.3.18 (I also have pandoc 2.17.0.1 installed, not sure whether this matters). Currently I work around by defining Pandoc metadata eq.ic: IC and then Equation {{< meta eq.ic >}}. It works well for me, both HTML and PDF. But I hope there is a more direct way to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    booksenhancementNew feature or requesthtmlIssues with HTML and related web technology (html/css/scss/js)mathany issue related to math support in specific formats

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions