mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Changelog
This commit is contained in:
parent
942fa6636d
commit
310c229c61
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1569,7 +1569,7 @@ checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "xmp-writer"
|
name = "xmp-writer"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/typst/xmp-writer#a4a36967cd73c9c19548e940bbcc55583a901417"
|
source = "git+https://github.com/typst/xmp-writer#0bce4e38395877dad229ea4518d4f78038738155"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "yaml-front-matter"
|
name = "yaml-front-matter"
|
||||||
|
@ -5,6 +5,22 @@ description: |
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
## February 15, 2023
|
||||||
|
- [Box]($func/box) and [block]($func/block) have gained `fill`, `stroke`,
|
||||||
|
`radius`, and `inset` properties
|
||||||
|
- Blocks may now be explicitly sized, fixed-height blocks can still break
|
||||||
|
across pages
|
||||||
|
- Blocks can now be configured to be [`breakable`]($func/block.breakable) or not
|
||||||
|
- [Numbering style]($func/enum.numbering) can now be configured for nested enums
|
||||||
|
- [Markers]($func/list.marker) can now be configured for nested lists
|
||||||
|
- The [`eval`]($func/eval) function now expects code instead of markup and
|
||||||
|
returns an arbitrary value. Markup can still be evaluated by surrounding the
|
||||||
|
string with brackets.
|
||||||
|
- PDFs generated by Typst now contain XMP metadata
|
||||||
|
- Link boxes are now disabled in PDF output
|
||||||
|
- Tables don't produce small empty cells before a pagebreak anymore
|
||||||
|
- Fixed raw block highlighting bug
|
||||||
|
|
||||||
## February 12, 2023
|
## February 12, 2023
|
||||||
- Shapes, images, and transformations (move/rotate/scale/repeat) are now
|
- Shapes, images, and transformations (move/rotate/scale/repeat) are now
|
||||||
block-level. To integrate them into a paragraph, use a [`box`]($func/box) as
|
block-level. To integrate them into a paragraph, use a [`box`]($func/box) as
|
||||||
|
@ -116,10 +116,8 @@ fn write_catalog(ctx: &mut PdfContext) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Write the document information.
|
// Write the document information.
|
||||||
let meta_ref = ctx.alloc.bump();
|
|
||||||
let mut xmp = XmpWriter::new();
|
|
||||||
|
|
||||||
let mut info = ctx.writer.document_info(ctx.alloc.bump());
|
let mut info = ctx.writer.document_info(ctx.alloc.bump());
|
||||||
|
let mut xmp = XmpWriter::new();
|
||||||
if let Some(title) = &ctx.document.title {
|
if let Some(title) = &ctx.document.title {
|
||||||
info.title(TextStr(title));
|
info.title(TextStr(title));
|
||||||
xmp.title([(None, title.as_str())]);
|
xmp.title([(None, title.as_str())]);
|
||||||
@ -129,6 +127,7 @@ fn write_catalog(ctx: &mut PdfContext) {
|
|||||||
xmp.creator([(author.as_str())]);
|
xmp.creator([(author.as_str())]);
|
||||||
}
|
}
|
||||||
info.creator(TextStr("Typst"));
|
info.creator(TextStr("Typst"));
|
||||||
|
info.finish();
|
||||||
xmp.creator_tool("Typst");
|
xmp.creator_tool("Typst");
|
||||||
xmp.num_pages(ctx.document.pages.len() as u32);
|
xmp.num_pages(ctx.document.pages.len() as u32);
|
||||||
xmp.format("application/pdf");
|
xmp.format("application/pdf");
|
||||||
@ -136,10 +135,9 @@ fn write_catalog(ctx: &mut PdfContext) {
|
|||||||
xmp.rendition_class(RenditionClass::Proof);
|
xmp.rendition_class(RenditionClass::Proof);
|
||||||
xmp.pdf_version("1.7");
|
xmp.pdf_version("1.7");
|
||||||
|
|
||||||
info.finish();
|
|
||||||
|
|
||||||
let xmp_buf = xmp.finish(None);
|
let xmp_buf = xmp.finish(None);
|
||||||
let mut meta_stream = ctx.writer.stream(meta_ref, &xmp_buf);
|
let meta_ref = ctx.alloc.bump();
|
||||||
|
let mut meta_stream = ctx.writer.stream(meta_ref, xmp_buf.as_bytes());
|
||||||
meta_stream.pair(Name(b"Type"), Name(b"Metadata"));
|
meta_stream.pair(Name(b"Type"), Name(b"Metadata"));
|
||||||
meta_stream.pair(Name(b"Subtype"), Name(b"XML"));
|
meta_stream.pair(Name(b"Subtype"), Name(b"XML"));
|
||||||
meta_stream.finish();
|
meta_stream.finish();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user