ludwig-austermann / typst-din-5008-letter

A template for DIN 5008 inspired typst letter
MIT License
15 stars 0 forks source link

Feature Request: Package System #6

Closed ondohotola closed 1 year ago

ondohotola commented 1 year ago

Would it be possible to provide a wrapper for the new package system, perhaps the local system?

That way one could store the thing in one location and import it from everywhere.

ludwig-austermann commented 1 year ago

Oh yes, a local package seems like a very nice idea! I will look into it.

ludwig-austermann commented 1 year ago

With the new version 0.1.0, it should be possible to use it as a local package.

ondohotola commented 1 year ago

Thanks. GREAT stuff.

After extraction one must install (on the mac) as follows:

unzip typst-din-5008-letter-main.zip
mv typst-din-5008-letter-main ~/Library/Application\ Support/typst/packages/local/din-5008-letter-0.1.0

And the local package import then looks like:

#import "@local/din-5008-letter:0.1.0": *

The examples provided do not work (any more) since typst does not go up beyond the document root, so the statement

#import "../letter.typ" : letter, letter-styling, debug-options, block-hooks

can be replaced by

#import "@local/din-5008-letter:0.1.0": letter, letter-styling, debug-options, block-hooks

or shorter

#import "@local/din-5008-letter:0.1.0": *
ludwig-austermann commented 1 year ago

Yes I think this should work exactly as you described.