It’s so pleasant to use [[nix]] to install and config complex software packages.
Here is how to make emacs org work with latex
config-latex.nix
# https://nixos.wiki/wiki/TexLive
# For a minimal set of packages needed for Emacs Orgmode
{ pkgs, lib, ... }:
let
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-basic dvisvgm dvipng # for preview and export as html
wrapfig amsmath ulem hyperref capt-of fontspec;
});
in { home.packages = lib.mkBefore [ tex ]; }
doom-emacs packages.el
(package! org-fragtog)
doom-emacs config.el
(use-package! org-fragtog
:config
(add-hook 'org-mode-hook 'org-fragtog-mode))
(after! org
(setq org-preview-latex-default-process 'dvisvgm)
(setq org-startup-with-latex-preview t))