From edfafd101718cf8f7c1817dcd7106eee0f45b1b7 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 2 Sep 2025 21:52:59 -0400 Subject: [PATCH] Add latex packages for org export. --- nix/configuration/roles/emacs/default.nix | 1 + .../roles/emacs/files/emacs/elisp/lang-org.el | 4 ++ nix/configuration/roles/latex/default.nix | 45 ++++++++++++------- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/nix/configuration/roles/emacs/default.nix b/nix/configuration/roles/emacs/default.nix index 8689db6..a8270dd 100644 --- a/nix/configuration/roles/emacs/default.nix +++ b/nix/configuration/roles/emacs/default.nix @@ -134,6 +134,7 @@ in final.prettier # Format yaml, json, and JS final.terraform-ls final.typescript-language-server + final.tex ] } ''; diff --git a/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el b/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el index 120b364..870e332 100644 --- a/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el +++ b/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el @@ -87,4 +87,8 @@ (use-package gnuplot) (use-package graphviz-dot-mode) +(use-package htmlize + ;; For syntax highlighting when exporting to HTML. + ) + (provide 'lang-org) diff --git a/nix/configuration/roles/latex/default.nix b/nix/configuration/roles/latex/default.nix index 892ca72..f24573e 100644 --- a/nix/configuration/roles/latex/default.nix +++ b/nix/configuration/roles/latex/default.nix @@ -5,22 +5,6 @@ ... }: -let - tex = ( - pkgs.texlive.combine { - inherit (pkgs.texlive) - scheme-basic - dvisvgm - dvipng # for preview and export as html in org-mode - wrapfig - amsmath - ulem - hyperref - capt-of - ; - } - ); -in { imports = [ ]; @@ -40,6 +24,35 @@ in tex ]; } + { + nixpkgs.overlays = [ + (final: prev: { + tex = ( + pkgs.texlive.combine { + inherit (pkgs.texlive) + scheme-basic + dvisvgm + dvipng # for preview and export as html in org-mode + wrapfig + amsmath + ulem + hyperref + capt-of + svg # emacs org-mode pdf export + catchfile # emacs org-mode pdf export + xcolor # emacs org-mode pdf export + transparent # emacs org-mode pdf export + pgf # emacs org-mode pdf export + minted # emacs org-mode pdf export code block highlighting + upquote # emacs org-mode pdf export + lineno # emacs org-mode pdf export + ; + } + ); + }) + ]; + + } ] ); }