shafayetShafee/nameref

Sorry, but it's not working

joa-quim opened this issue · 4 comments

Hi, I installed this extension but I see no cross references.
First, it's not clear where the extension is installed. Apparently the command quarto add shafayetShafee/nameref installs a _extensions directory as a subdir of current dir, which is strange. So I ended up having it my project dir and also copied manually into C:\programs\Quarto\share\extensions\quarto\nameref (Windows here BTW) but still no results.

Anymore things that I should try?
Thanks.

Your current directory should be your project directory. Then doing quarto add shafayetShafee/nameref should install the _extension directory as a subdir of the current directory (and again, which should be the same as the project directory). And then everything should work as intended. No need to do any manual copy.

But that is what I have. See

image

And in a test case within the same qmd file the \nameref{grdcontour} reference is not shown at all in the rendered page.

image

Is quarto-web your project directory? If yes, then I think nameref is installed in the right place. However, is it a book or website you are trying to compile? And, you need to add nameref in the filter option, that is,

filters: 
  - nameref

As shown in this demo qmd file. Have you done this?

Also, please be warned about the limitation of this extension in case of book/website.

Ok, adding the filters makes it work, but apparently only for references in the same qmd file. The problem is that I have hundreds of qmd's (it's a manual website that I'm trying to build) and with this limitation the whole Quarto thing is useless.

I saw the Limitations paragraph and was afraid of this. However, with search help I found that we can do this cross qmd references [grdcontour](grdcontour.qmd#grdcontour) where this command is issued in another qmd. This works but is very cumbersome and requires knowing the file name of reference target. Could this mechanism be somehow integrated in nameref?