Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> I agree there is no good reason to hard-code "\ref", but, off the top of > my head, there may be a couple of things to consider: > > 1. There is still a dangling \ref in `org-latex-footnote-defined-format'; I noticed this, but looking at the usage I think the user would be surprised if changing \ref for sections, figures etc. also changed how footnotes looked. > 2. This change is already somewhat trivial using a link filter: > > (defun my-ref-link-filter (s &rest _) > (replace-regexp-in-string (rx string-start "\\ref") "\\foo" s nil t)) > > (add-to-list 'org-export-filter-link-functions #'my-ref-link-filter) As are many things :P but I think it's worth making some more obvious to users, and IMO this is worth it. > 3. \hyperref is still hard-coded in `org-latex-link'; your patch could > look like a partial solution. A reference with a named description does use hyperref, but I think that would still be expected --- let me know if you think otherwise though. > Those are not strong objections, so if you think none of them is worth > considering, then I'm fine with your patch. If what I've said above makes sense, I think it would be good to merge 👍. All the best, Timothy.