Replies: 2 comments 2 replies
-
|
The good news is that embedding files is now supported on main after #5221 Implementing your proposal would just be a matter of extending the Typst compiler to accept also files with the |
Beta Was this translation helpful? Give feedback.
-
|
I've gotten this working using the // File name: source.typ
= A header
Lorem ipsum
#pdf.embed(
"source.typ",
relationship: "source",
mime-type: "text/plain",
description: "Document Source Code"
)This works great for single file documents, but it breaks down if you start to use imports. Notably, the embed function supports a bytes parameter to use instead for the content of the embedded file. Has anyone found a way to get a bytes object of the concatenated source, which can be passed to embed? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
the draw.io application is able to store the source of the diagram inside the so called editable png. This means the draw.io application can edit the resulting diagram. Something similar could be done with pdf. Since pdf support custom metadata. The idea is:
This would be beneficial for things like journals.
Let's say I would implement the function to simplify writing journal entries. These entries would be stored in the context (here is an early experiment which demonstrates how I plan to store the entries). Then I would use queries to extract any entry given its id or date. I would like to be able to write rust application which would be able to query resulting pdf (using typst as a library).
Beta Was this translation helpful? Give feedback.
All reactions