feat(emacs): configure plex in a package
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
11
modules/home/users/msyds/emacs/nix/plex-latex/syd-plex.sty
Normal file
11
modules/home/users/msyds/emacs/nix/plex-latex/syd-plex.sty
Normal 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}
|
||||
Reference in New Issue
Block a user