Coder Social home page Coder Social logo

issue about cross references about joss HOT 1 OPEN

Freakwill avatar Freakwill commented on August 17, 2024
issue about cross references

from joss.

Comments (1)

sneakers-the-rat avatar sneakers-the-rat commented on August 17, 2024 1

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 ;)

from joss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.