feat(quiver): reposition URL comment in latex export
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -800,11 +800,11 @@
|
|||||||
"nixpkgs": "nixpkgs_10"
|
"nixpkgs": "nixpkgs_10"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766962538,
|
"lastModified": 1767975357,
|
||||||
"narHash": "sha256-313iDCii/tKr3UCPxCP2uzeH93Qk1cWbyrbU82dlF9Y=",
|
"narHash": "sha256-MDVh3/aVhkD1bh/r8c0gs9DL4e78CrUbUxOZHWlCwLM=",
|
||||||
"owner": "msyds",
|
"owner": "msyds",
|
||||||
"repo": "sydpkgs",
|
"repo": "sydpkgs",
|
||||||
"rev": "7a3eaf67885e23b7596bd1b91100e6f71d3bb985",
|
"rev": "233479ab277d47b1dbda202eafca50e61c659151",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -4,12 +4,17 @@ let cfg = config.sydnix.deertopia.quiver;
|
|||||||
in {
|
in {
|
||||||
options.sydnix.deertopia.quiver = {
|
options.sydnix.deertopia.quiver = {
|
||||||
enable = lib.mkEnableOption "Quiver, a commutative diagram editor";
|
enable = lib.mkEnableOption "Quiver, a commutative diagram editor";
|
||||||
|
package = lib.mkPackageOption sydpkgs.packages.${system} "quiver" {};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
sydnix.deertopia.nginx.vhosts."q".vhost =
|
sydnix.deertopia.nginx.vhosts."q".vhost =
|
||||||
let
|
let
|
||||||
package = sydpkgs.packages.${system}.quiver;
|
package = cfg.package.overrideAttrs (finalAttrs: prevAttrs: {
|
||||||
|
patches = (prevAttrs.patches or []) ++ [
|
||||||
|
./quiver/move-export-url.patch
|
||||||
|
];
|
||||||
|
});
|
||||||
in {
|
in {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|||||||
26
modules/nixos/deertopia/quiver/move-export-url.patch
Normal file
26
modules/nixos/deertopia/quiver/move-export-url.patch
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/src/quiver.mjs b/src/quiver.mjs
|
||||||
|
index 4c303d9a4a..59fc5c637c 100644
|
||||||
|
--- a/src/quiver.mjs
|
||||||
|
+++ b/src/quiver.mjs
|
||||||
|
@@ -610,7 +610,9 @@
|
||||||
|
// `tikzcd` environment.
|
||||||
|
let tikzcd = `\\begin{tikzcd}${
|
||||||
|
diagram_options.length > 0 ? `[${diagram_options.join(",")}]` : ""
|
||||||
|
- }\n${
|
||||||
|
+ }\n% ${
|
||||||
|
+ QuiverImportExport.base64.export(quiver, settings, options, definitions).data
|
||||||
|
+ }\n${
|
||||||
|
output.length > 0 ? `${
|
||||||
|
output.split("\n").map(line => `\t${line}`).join("\n")
|
||||||
|
}\n` : ""
|
||||||
|
@@ -622,9 +624,7 @@
|
||||||
|
tikzcd = `\\documentclass[tikz]{standalone}\n\\usepackage{quiver}\n\\begin{document}\n${tikzcd}\n\\end{document}`;
|
||||||
|
}
|
||||||
|
// URL.
|
||||||
|
- return `% ${
|
||||||
|
- QuiverImportExport.base64.export(quiver, settings, options, definitions).data
|
||||||
|
- }\n${tikzcd}`;
|
||||||
|
+ return tikzcd;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Early exit for empty quivers.
|
||||||
Reference in New Issue
Block a user