Hey Pedro,

On 2025-06-14 02:41, Pedro Andres Aranda Gutierrez wrote:
> After giving it a thought, I would say that adding a new custom
> variable to control the default options might do the trick.
> Something like (in .dir-locals.el format):
> 
> #+BEGIN_SRC elisp
> (org-latex-fontspec-default-features
>       . (("Path" . "../fonts/")
>          ("Extension" . ".otf")
>          ("Numbers" . "OldStyle")))
> #+END_SRC
> 
> would cover the use case, right. For your example it could reduce to
> #+BEGIN_SRC elisp
> (org-latex-fontspec-default-features . (("Numbers" . "OldStyle")))
> #+END_SRC
> And that wouldn't be to cumbersome and flexible enough at the same
> time.

That definitely works!

> I wonder if we want to cover all cases like in
> #+BEGIN_SRC latex
> 
> \defaultfontfeatures[\rmfamily,\sffamily]{Ligatures=TeX}
> 
> #+END_SRC
> 
> That would surely make things too tricky, I fear.
> 
> WDYT? Do we really need it?

Right, there’s also ways to create and manipulate custom families and
faces. I agree that it might be too much; the goal isn’t to completely
replicate the `fontspec' interface, just provide some convenience for
common use-cases. My feeling is that this level of customization is
better left to `LaTeX', e.g. users could instead:

- add a `\defaultfontfeatures+' to append to already-existing defaults,
- tangle a `fontspec.cfg'.

Thanks,

-- 
Jacob S. Gordon
jacob.as.gor...@gmail.com

======================

Please avoid sending me HTML emails and MS Office documents.
https://useplaintext.email/#etiquette
https://www.gnu.org/philosophy/no-word-attachments.html

Reply via email to