-
Notifications
You must be signed in to change notification settings - Fork 323
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
Sections/Parts custom cross-reference #8080
Comments
Possibly to be added to: |
Thanks for opening this issue for the use-case I brought up. Sharing one more detail on my planned use, in case it's helpful in the development. In addition to being able to custom cross-ref sections/parts (e.g., Supplement 1) and divs/figures/tables (e.g., Supplemental Table 1), I would like to be able to cross-ref divs/figures/tables within sections/parts (e.g., S1 Table 1, S1 Table 2, S2 Figure 1). Once there is sections/parts custom cross-ref, I believe I can accomplish this by making custom divs/figures/tables types for each section/part, but flagging it now in case there is a better way to integrate this. Here's what I have in mind ---
title: "My Paper"
format: html
crossref:
custom:
- kind: float
key: suppsec
reference-prefix: Supplement
custom:
- kind: float
key: suppfigdetails
latex-env: suppfigdetails
reference-prefix: Figure
space-before-numbering: true
latex-list-of-description: Supplemental Figure
custom:
- kind: float
key: suppfiginfo
latex-env: suppfiginfo
reference-prefix: Figure
space-before-numbering: true
latex-list-of-description: Supplemental Figure
---
To keep this paper short, see @suppsec-details for more details. For a visual representation, see [S@suppsec-details] @suppfigdetails-tidbits.
For even more information, see @suppsec-information. For a visual representation, see [S@suppsec-information] @suppfiginfo-fascination.
## Details {#suppsec-details .appendix}
Here are fascinating tidbits.
![Tidbits](details-image.png){#suppfigdetails-tidbits}
## Information {#suppsec-information .appendix}
Even more fascinating tidbits!
![Fascination](details-image.png){#suppfiginfo-fascination} |
A few comments. A section wouldn't be a "float"; floats are blocks that can be repositioned in the resulting layout (think "LaTeX" figures). Currently, the only custom crossreference types that can be created are floats. Section crossrefs are what we (will) call "anchor crossrefs": they reference only a position in the document, and have otherwise no content associated with it. IT would be good to be able to customize them, but it's another big change in our crossref system. We would like to support it, but it won't happen in the near future. |
Currently it is not possible to define custom cross-reference for sections.
Initially from #4581 (reply in thread)
The text was updated successfully, but these errors were encountered: