From b6e5d6f352cf16da4c07e8fe8dc7611cdcb6e1a2 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 16 Jun 2021 23:05:17 +0200 Subject: dev/latex: init --- usecases/desktop/development/latex.nix | 110 +++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 usecases/desktop/development/latex.nix (limited to 'usecases/desktop/development') diff --git a/usecases/desktop/development/latex.nix b/usecases/desktop/development/latex.nix new file mode 100644 index 0000000..d9dc80a --- /dev/null +++ b/usecases/desktop/development/latex.nix @@ -0,0 +1,110 @@ +inputs: + +{ pkgs, config, ... }: + +let + # TODO: add latexmkrc + texliveEnv = with pkgs; texlive.combine { + inherit (texlive) + scheme-small + + latexmk + texdoc + # Needed for texdoc but somehow not automatically added + luatex + + collection-langenglish + collection-langfrench + csquotes + + glossaries + glossaries-english + glossaries-french + glossaries-extra + + microtype + fontspec + lm-math + cm-super + a4wide + + biber + biblatex + biblatex-ieee + biblatex-apa + + nath + stmaryrd + + placeins + wrapfig + + algorithms + algorithmicx + + # For Metropolis Beamer theme + catchfile + + minted + + asymptote + + todonotes + + standalone + + dirtree + + cleveref + xurl + # For varioref + tools + + footmisc + + morewrites + + # For Metropolis Beamer theme + pgfopts + + beamertheme-metropolis + beamercolorthemeowl + + # Dependencies somehow missing + logreq xstring fvextra ifplatform framed + # For standalone + currfile + # For glossaries + xindy mfirstuc xfor datatool tracklang + # For datatool + substr + # For asymptote + everypage media9 ocgx2 + ; + }; +in +{ + + users.extraUsers.minijackson.packages = with pkgs; [ + texliveEnv + biber + #tomorrowPygments + asymptote + ghostscript + xdotool + ]; + + # Fira Code is nice for code reading + fonts.fonts = with pkgs; [ fira-code cm_unicode ]; + + vim = { + lsp.texlab = { + cmd = [ "${pkgs.unstable.texlab}/bin/texlab" ]; + settings.texlab.build = { + executable = "${texliveEnv}/bin/latexmk"; + args = [ "-synctex=1" "-interaction=nonstopmode" "-shell-escape" "-use-make" "-8bit" "-xelatex" "-output-directory=latexmk-build" "%f" ]; + auxDirectory = [ "latexmk-build" ]; + }; + }; + }; +} -- cgit v1.2.3