Eric S Fraga <e.fr...@ucl.ac.uk> writes:
> On Thursday, 1 Apr 2021 at 16:50, Timothy wrote: >> I think in part this works for me because of a particular system I >> have in place (that IMHO works *wonderfully* with Org) which I plan on >> submitting patches to upstream (to Org) in the not-to-distant future. > > Interesting. Look forward to seeing this! If you want to get an "sneak peek" you may be interested in taking a quick look at: https://tecosaur.github.io/emacs-config/config.html#content-feature-preamble In essence this system is the combination of LaTeX snippet / generated content with feature detection. For example, this is what I have for working with Julia code: #+begin_src emacs-lisp (add-to-list 'org-latex-conditional-features '((and org-export-has-code-p "^[ \t]*#\\+begin_src julia\\|^[ \t]*#\\+BEGIN_SRC julia\\|src_julia") . julia-code) t) (add-to-list 'org-latex-feature-implementations '(julia-code :snippet org-latex-julia-mono-fontspec :order 0) t) (add-to-list 'org-latex-feature-implementations '(.microtype-lualatex :eager t :when (microtype julia-code) :prevents microtype :order 0.1 :snippet "\\usepackage[activate={true,nocompatibility},final,tracking=true,factor=2000]{microtype}\n")) (add-to-list 'org-latex-feature-implementations '(.custom-font-no-mono :eager t :prevents custom-font :order 0 :snippet (org-latex-fontset :serif :sans)) t) #+end_src It's been evolving for a several weeks now, and I feel like it should soon settle down enough that I will be happy preparing a patch based on it. -- Timothy