From 7bf331a498e491a7810343b5662f87027db2cd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Tue, 16 Dec 2025 12:41:54 -0700 Subject: [PATCH] feat(syd-plex-latex): init --- pkgs/syd-plex-latex/default.nix | 29 +++++++++++++++++++++++++++++ pkgs/syd-plex-latex/syd-plex.sty | 10 ++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/syd-plex-latex/default.nix create mode 100755 pkgs/syd-plex-latex/syd-plex.sty diff --git a/pkgs/syd-plex-latex/default.nix b/pkgs/syd-plex-latex/default.nix new file mode 100644 index 0000000..734cc02 --- /dev/null +++ b/pkgs/syd-plex-latex/default.nix @@ -0,0 +1,29 @@ +{ stdenvNoCC +, texlive +}: + +stdenvNoCC.mkDerivation (final: { + pname = "syd-plex-latex"; + version = "1.0.0"; + src = ./.; + nativeBuildInputs = [ texlive.combined.scheme-small ]; + passthru = { + pkgs = [ final.finalPackage ]; + tlDeps = with texlive; [ + plex + plex-otf + fontaxes + unicode-math + xetex + fontspec + ]; + tlType = "run"; + }; + installPhase = '' + runHook preInstall + dir="$out/tex/latex/syd-plex" + mkdir -p "$dir" + mv syd-plex.sty "$dir" + runHook postInstall + ''; +}) diff --git a/pkgs/syd-plex-latex/syd-plex.sty b/pkgs/syd-plex-latex/syd-plex.sty new file mode 100755 index 0000000..9ef55c9 --- /dev/null +++ b/pkgs/syd-plex-latex/syd-plex.sty @@ -0,0 +1,10 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{syd-plex}[2014/08/24 Configure IBM Plex fonts] + +% 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}