TexLive: Difference between revisions

Klinger (talk | contribs)
Add a section on adding a custom package to the combined package set
Line 74: Line 74:
}
}
</pre>
</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 ==