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

issue about cross references #1340

Open
Freakwill opened this issue May 21, 2024 · 1 comment · May be fixed by #1341
Open

issue about cross references #1340

Freakwill opened this issue May 21, 2024 · 1 comment · May be fixed by #1341

Comments

@Freakwill
Copy link

I use the following cross-references according to the docs of joss. But why dose it result in ???

A concise comparison ... frameworks provided in \autoref{frameworks}, such as ....

: Comparison ... frameworks. []{label="frameworks"}

The examples provided by the docs are not displayed in a right format also.

@sneakers-the-rat
Copy link
Contributor

taking 10m to help with triage, confirming this with MWE

: Comparison of programming languages. []{label="proglangs"}

| Language | Typing          | Garbage Collected | Evaluation | Created |
|----------|:---------------:|:-----------------:|------------|---------|
| Haskell  | static, strong  | yes               | non-strict | 1990    |
| Lua      | dynamic, strong | yes               | strict     | 1993    |
| C        | static, weak    | no                | strict     | 1972    |


autoref: \autoref{proglangs}
ref: \ref{proglangs}

and building PDF with the docker command

yields

Screenshot 2024-05-21 at 7 35 50 PM

but the latex version works

: Comparison of programming languages. \label{proglangs}

| Language | Typing          | Garbage Collected | Evaluation | Created |
|----------|:---------------:|:-----------------:|------------|---------|
| Haskell  | static, strong  | yes               | non-strict | 1990    |
| Lua      | dynamic, strong | yes               | strict     | 1993    |
| C        | static, weak    | no                | strict     | 1972    |


autoref: \autoref{proglangs}
ref: \ref{proglangs}
Screenshot 2024-05-21 at 7 37 17 PM

the intermediate LaTeX for the caption in the first case is

\caption{Comparison of programming languages. {}}\tabularnewline

and for the second case is

\caption{Comparison of programming languages.
\label{proglangs}}\tabularnewline

so i don't know exactly when the markdown gets latex'd but ya something not working.

I thought that it might have been that we didn't have bracketed_spans enabled, but if i instead just put in an HTML span like <span label="proglangs"></span> that also doesn't work.

If i look at the JATS output, the references are at least correctly created by autoref and ref commands, though proglangs is not added as the table's id property, which is what i see the latex style figure label doing.

  <p>autoref: <xref alt="Table 1" rid="proglangs">Table 1</xref> ref:
  <xref alt="1" rid="proglangs">1</xref></p>

so i think the problem maybe, might be that the lua code for handling references bails if the format is latex? but it also seems like the markdown span isn't being converted into the latex command in the initial pandoc translation stage before the lua filters are applied.
https://github.com/openjournals/inara/blob/b259a53005804d260208e8a30c9a09347169ea83/data/filters/resolve-references.lua#L2-L4

with the big caveat that i don't know how to read lua ;)

@sneakers-the-rat sneakers-the-rat linked a pull request May 22, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants