Footnote cross-ref
guslaet opened this issue · 8 comments
Hi! This is a very interesting extension, and I wonder if it might help solve another limitation in Quarto (as it seems to me so far).
Do you think it would be possible to use nameref to refer to html/markdown anchors within footnotes? This could help with a very obvious and widespread practice that is to have a cross-ref like “See n. 76 above”.
Hi @guslaet, Can you provide an example of what are you trying to achieve (which does not work right now, but you want to get it to work)? I am somewhat confused 😅.
I have to apologize for the lack of clarity. 2 weeks ago I was actually getting started with both Quarto and LaTeX and having some difficulty with their respective jargons. I found a workaround for that, and I am actually advancing quite fast (and happy about it).
Anyway, the point was to make direct reference to footnotes and being able to have it rendered “See n. 76.”
I was able to do it placing a double anchor within the footnote – one for the HTML and another for LaTeX. For instance:
This is some text.^[[This]{#My_footnote_anchor}\label{My_footnote_anchor} is an anchored footnote.]
See n. \ref{My_footnote_anchor} [above](#My_footnote_anchor), p. \pageref{My_footnote_anchor}.
Which is a lot of repetitions (I had to write My_footnote_anchor
5 times) for something so simple (in the end, not necessarily in the program). It renders perfectly in LaTeX, but weirdly in HTML. In LaTex we get (just the cross-ref):
See n. 24 above, p. 125.
Whereas in HTML we get:
See n. ??? above, p. .
It works for me, since I need to produce a thesis, not a website, but still... It would be nice to have a more direct treatment of this kind of cross-reference (which is quite traditional) such as we have for figures, sections, tables etc.
Oh, I got your idea now. But unfortunately, I think the goal of nameref
is somewhat different. nameref
is simply creating a named reference instead of a plain numbered reference. And referencing to footnotes is an unresolved issue of pandoc (see here). My suggestion would be to use the latex commands to serve your purpose for now. Also, you can ask about this on Stackoverflow with quarto
tag or on the Quarto GitHub discussion.
I think it is possible to create a separate Extension or at least write up a lua filter to do this for latex format only. But Can I ask why are you using the word above?
Would not it be more appropriate as,
See n. 76, p. 125
Oh, I just used it in order to have a word where I could put the link in the HTML version (I'm still attached to it because of my history with ConnectedText).
And you're right: it would be far more appropriate without it, especially when one is authoring. At this point however, my text is finished. I am actually converting it from ConnetedText to Quarto to generate the print version of my thesis (and as a test case because I decided to abandon ConnectedText and define a new research/write workflow).
Oh, okay. Can you post a question on StackOverflow with quarto tag about this? Because I think I can write a small filter just for latex format (not for html). I am asking this because I am actively following questions on SO regarding quarto and since your issue can not be solved with nameref, would you kindly close this one?
Oh! Forgive me. I didn’t realize I had to close the issue. Sorry for that.
I posted the question in SO, as you suggested.
https://stackoverflow.com/questions/76030546/how-to-cross-referece-footnotes-and-page-numbers-in-quarto-latex-pdfs
Thank you for the attention.
And I have already proposed a solution to your question there in SO