feat(emacs): configure plex in a package
This commit is contained in:
@@ -19,6 +19,7 @@ in {
|
|||||||
imports = [
|
imports = [
|
||||||
./emacs/nix/jinx.nix
|
./emacs/nix/jinx.nix
|
||||||
./emacs/nix/tufte-latex.nix
|
./emacs/nix/tufte-latex.nix
|
||||||
|
./emacs/nix/plex-latex.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|||||||
@@ -7,14 +7,40 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
sydnix.emacs.tex.extraTexPackages = {
|
sydnix.emacs.tex.extraTexPackages =
|
||||||
inherit (pkgs.texlive)
|
let syd-plex = pkgs.stdenvNoCC.mkDerivation (final: {
|
||||||
plex
|
pname = "syd-plex-latex";
|
||||||
plex-otf
|
version = "1.0.0";
|
||||||
fontaxes
|
src = ./plex-latex;
|
||||||
unicode-math
|
nativeBuildInputs = [ pkgs.texlive.combined.scheme-small ];
|
||||||
xetex
|
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
|
||||||
|
fontaxes
|
||||||
|
unicode-math
|
||||||
|
xetex
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
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