TexLive: Difference between revisions
imported>StefanSchroeder m Repair bold. |
m Capitalize NixOS according to MoS |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 12: | Line 12: | ||
|- | |- | ||
! Name of TeX Live package | ! Name of TeX Live package | ||
! Name of | ! Name of NixOS-derivation | ||
! Comment | ! Comment | ||
|- | |- | ||
Line 55: | Line 55: | ||
}) | }) | ||
</code> | </code> | ||
For a minimal set of packages needed for Emacs Orgmode, as described in org-latex-default-packages-alist variable, install these packages: | |||
<pre> | |||
{ config, pkgs, ... }: | |||
let | |||
tex = (pkgs.texlive.combine { | |||
inherit (pkgs.texlive) scheme-basic | |||
dvisvgm dvipng # for preview and export as html | |||
wrapfig amsmath ulem hyperref capt-of; | |||
#(setq org-latex-compiler "lualatex") | |||
#(setq org-preview-latex-default-process 'dvisvgm) | |||
}); | |||
in | |||
{ # home-manager | |||
home.packages = with pkgs; [ | |||
tex | |||
]; | |||
} | |||
</pre> | |||
== Adding a Custom Package == | |||
If you have a custom LaTeX package or style file that is not part of the TeXLive distribution, you can add it to the package set like this: | |||
First, create a derivation for your package. The contents of <code>$out/tex</code> will later be placed in <code>texmf/tex</code> | |||
latex-corporate-identity = pkgs.stdenvNoCC.mkDerivation { | |||
name = "latex-corporate-identity"; | |||
src = ./path/to/package/tree; | |||
installPhase = "cp -r $src $out"; | |||
passthru.tlType = "run"; | |||
}; | |||
texlive-corporate-identity = { | |||
pkgs = [ latex-corporate-identity ]; | |||
}; | |||
The directory tree under the path specified as src looks like this: | |||
└── tex | |||
└── latex | |||
└── corporate-identity | |||
├── corporate-identity.sty | |||
You can now add the package to the combined set as you would with any other texlive package: | |||
tex = pkgs.texlive.combine { | |||
inherit (pkgs.texlive) scheme-full; | |||
inherit texlive-corporate-identity; | |||
}; | |||
== Troubleshooting == | == Troubleshooting == | ||
Line 69: | Line 114: | ||
* [https://www.tug.org/texlive/doc/texlive-en/texlive-en.html The Tex Live Guide 2018] | * [https://www.tug.org/texlive/doc/texlive-en/texlive-en.html The Tex Live Guide 2018] | ||
* [[Tex]] in NixOS-Wiki | * [[Tex]] in NixOS-Wiki | ||
* [https://flyx.org/nix-flakes-latex/ Building LaTeX Documents Reproducibly with Nix Flakes] | |||
[[Category:Applications]] |