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

Cross reference to equations by number #2

Open
super-structure opened this issue Nov 29, 2023 · 0 comments
Open

Cross reference to equations by number #2

super-structure opened this issue Nov 29, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@super-structure
Copy link
Owner

Similar to how a <xref> to a table or figure will pull the generated number and/or title (based on an input parameter), a cross reference to an <equation-block> containing an <equation-number> should also pull the number content.

The resulting cross-reference text should consist of a localized variable text "Equation" (or abbreviation "eqn." if preferred). This could be controlled with a parameter: args.equationlink.style. This is similar to tables and figures, but there aren't titles for equation block elements.

Example of Empty Equation Number

An empty cross-reference to the following example, input as <xref href="topic.dita#topic-id/eq-001"/>:

<equation-block id="eq-001">
  <equation-number/>
  <image keyref="equation-image-01">
    <alt>a squared plus b squared.</alt>
  </image>
</equation-block>

should render as "Equation 1" with a hyperlink to the equation number.

Example of Populated Equation Number

<equation-block id="eq-3.2a">
  <equation-number>3.2a</equation-number>
  <image keyref="equation-image-01">
    <alt>a squared plus b squared.</alt>
  </image>
</equation-block>

should render as "Equation 3.2a" with a hyperlink to the equation number.

@super-structure super-structure added the enhancement New feature or request label Nov 29, 2023
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

No branches or pull requests

1 participant