feat(emacs): configure plex in a package

This commit is contained in:
2025-11-22 02:04:44 -07:00
parent 9a49230095
commit 822d857ba9
3 changed files with 46 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ in {
imports = [
./emacs/nix/jinx.nix
./emacs/nix/tufte-latex.nix
./emacs/nix/plex-latex.nix
];
config = lib.mkIf cfg.enable {

View File

@@ -7,7 +7,33 @@ in {
};
config = lib.mkIf cfg.enable {
sydnix.emacs.tex.extraTexPackages = {
sydnix.emacs.tex.extraTexPackages =
let syd-plex = pkgs.stdenvNoCC.mkDerivation (final: {
pname = "syd-plex-latex";
version = "1.0.0";
src = ./plex-latex;
nativeBuildInputs = [ pkgs.texlive.combined.scheme-small ];
passthru = {
pkgs = [ final.finalPackage ];
tlDeps = with pkgs.texlive; [
plex
plex-otf
fontaxes
unicode-math
xetex
];
tlType = "run";
};
installPhase = ''
runHook preInstall
dir="$out/tex/latex/syd-plex"
mkdir -p "$dir"
mv syd-plex.sty "$dir"
runHook postInstall
'';
});
in {
inherit syd-plex;
inherit (pkgs.texlive)
plex
plex-otf

View File

@@ -0,0 +1,11 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{syd-plex}[2014/08/24 Configure IBM Plex fonts]
Example LaTeX package
% Redefine some commands to make unicode-math work lol. See §3.1 of the
% unicode-math manual.
\renewcommand*{\mathrm}[1]{\symup{#1}}
\RequirePackage{plex-otf}
\setmathfont{IBM Plex Math}
\setmainfont{IBM Plex Serif}