emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Allow LaTeX reference command (\ref) to be customised


From: Timothy
Subject: Re: [PATCH] Allow LaTeX reference command (\ref) to be customised
Date: Wed, 09 Jun 2021 21:36:54 +0800
User-agent: mu4e 1.4.15; emacs 28.0.50

Nicolas Goaziou <mail@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]