Skip to content

1.2: Patching Typst Universe packages

Compare
Choose a tag to compare
@RossSmyth RossSmyth released this 16 Mar 20:58
· 48 commits to main since this release

Can now patch Typst Universe.

The derivation:

  patchUni = buildTypstDocument (self: {
    name = "patchUni";
    src = ./documents;
    file = "patchUni.typ";
    universePatches = [
      ./universe.patch
    ];
  });

The patch:

--- a/packages/preview/note-me/0.5.0/lib.typ
+++ b/packages/preview/note-me/0.5.0/lib.typ
@@ -1,2 +1,2 @@
-#import "note-me.typ": admonition, note, tip, important, warning, caution
-#import "note-me-more.typ": todo
\ No newline at end of file
+#import "note-me.typ": admonition, bote, tip, important, warning, caution
+#import "note-me-more.typ": todo
--- a/packages/preview/note-me/0.5.0/note-me.typ
+++ b/packages/preview/note-me/0.5.0/note-me.typ
@@ -80,7 +80,7 @@
   ],
 )
 
-#let note(title: "Note", children) = admonition(
+#let bote(title: "Note", children) = admonition(
   icon-path: "icons/info.svg",
   title: title,
   color: rgb(9, 105, 218),

The document:

#import "@preview/note-me:0.5.0": bote

#bote[
  Success!
]

Minor: Fixed template syntax mistake and added test for patching the document itself.