66 Commits

Author SHA1 Message Date
mkorje
5709092856
Remove obsolete short_fall parameter from stretch functions 2025-04-27 21:13:16 +10:00
mkorje
b30a38046c
Add delim-size parameter to mat, vec, and cases
Takes either a function or a relative length, just like with `lr`,
`stretch`, and `accent` which was changed in the previous two commits.
The short fall was changed in the first commit, so no test updates here.
The default is now much clearer to the user: `x => x * 1.1 - 0.1em`.
2025-04-27 21:04:39 +10:00
mkorje
92d06fbd9a
Allow a function as an argument to size in accent
The short fall is now only applied in the default for `accent`
(`x => x - 0.5em`). This is the reason for the updated tests.
2025-04-25 22:36:21 +10:00
mkorje
3506ef446d
Allow a function as an argument to size in stretch and lr
Previously there was always a short fall when scaling delimiters, even if
the user requested a specific size. This is no longer the case; the short
fall is only present in the default for `lr` (`x => x - 0.1em`), and is
the reason for the updated tests - the size of the delimiters is now
actually what was specified in the size argument. This also makes the
default for `lr` much clearer to the user.

A slight hack was used by exploiting the `name` property in the `func`
attribute macro so that the default value in the docs for `lr.size` would
clearly show what the default function was (instead of just its name
`default_lr_size` which is meaningless and inaccessible to the user).
2025-04-25 22:14:57 +10:00
mkorje
d4d3d55348
Subtract short fall from target size in glyph assemblies
Previously the short fall was only considered when selecting a pre-made
variant glyph and was not propogated to the target size in a glyph
assembly.
2025-04-25 15:24:27 +10:00
Laurenz Stampfl
96dd67e011
Switch PDF backend to krilla (#5420)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-04-01 14:42:52 +00:00
Max
012e14d40c
Unify layout of vec and cases with mat (#5934) 2025-03-31 09:38:04 +00:00
Max
4f0fbfb7e0
Add dotless parameter to math.accent (#5939)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-03-31 09:17:49 +00:00
Eduardo Sánchez Muñoz
38213ed534
Use u64 instead of usize to store counter and enumeration item numbers, so behavior does not vary from 64-bit to 32-bit platforms (#6026) 2025-03-24 18:16:33 +00:00
Max
96f6957371
Fix math.root frame size (#6021) 2025-03-11 10:18:15 +00:00
evie
3650859ae8
Fix cargo clippy warnings (mostly about .repeat.take and .next_back) (#6038) 2025-03-11 10:00:53 +00:00
Emmanuel Lesueur
52f1f53973
Fix curve with multiple non-closed components. (#5963) 2025-02-26 18:07:29 +00:00
Max
81efc82d3c
Fix math accent base height calculation (#5941) 2025-02-24 16:05:36 +00:00
Laurenz
69c3f95705
Bump MSRV to 1.83 and Rust in CI to 1.85 (#5946) 2025-02-24 12:28:01 +00:00
Laurenz
89e71acecd
Respect par constructor arguments (#5842) 2025-02-10 14:37:19 +00:00
PgBiel
3fba256405
Don't crash on image with zero DPI (#5835) 2025-02-10 10:39:04 +00:00
Malo
ca702c7f82
Documentation fixes and improvements (#5816) 2025-02-06 10:18:10 +00:00
Eric Biedert
85b0318158
Fix small copy-paste oversight (#5811) 2025-02-05 12:40:54 +00:00
Laurenz
12dbb012b1
Revert adding flatten-text to image (#5789) 2025-02-02 19:25:58 +00:00
Malo
f239b0a6a1
Change the default math class of U+22A5 ⊥ UP TACK to Normal (#5714) 2025-01-31 10:05:03 +00:00
frozolotl
3eb6e87af1
Include images from raw pixmaps and more (#5632)
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-01-31 09:56:25 +00:00
Laurenz
85d1778974
Support first-line-indent for every paragraph (#5768) 2025-01-27 13:15:20 +00:00
Laurenz
26e65bfef5
Semantic paragraphs (#5746) 2025-01-24 12:11:26 +00:00
Ian Wrzesinski
6fe1e20afb Update math TextElem layout to separate out SymbolElem 2025-01-23 16:30:29 -05:00
Ian Wrzesinski
fecdc39846 Use SymbolElem in more places and add char cast for content 2025-01-23 16:28:29 -05:00
Ian Wrzesinski
c47b71b435 Basic SymbolElem addition 2025-01-23 16:28:29 -05:00
Laurenz
6fcc432284
Don't link items if container is already linked (#5732) 2025-01-22 13:24:14 +00:00
Laurenz
6b9b78596a
Don't generate accessors for required fields (#5680) 2025-01-10 16:54:11 +00:00
Laurenz
e2b37fef33
Revamp data loading and deprecate decode functions (#5671) 2025-01-09 09:34:16 +00:00
Laurenz
dacd6acd5e
More flexible and efficient Bytes representation (#5670) 2025-01-08 10:57:56 +00:00
Michael Färber
5c876535cc
Move CellGrid from typst-layout to typst-library (#5585) 2025-01-06 15:20:28 +00:00
Max
bb38a01d06
Fix math size resolving (#5596) 2024-12-20 12:35:57 +00:00
Max
c3334a55fe
Fix arbitrarily nested equations in the base of math.attach (#5613) 2024-12-20 10:15:18 +00:00
PgBiel
6c2d54bbe3
Fix crash when block or text have negative sizes (#5610) 2024-12-20 10:03:12 +00:00
PgBiel
9b697d59ae
Fix infinite loop with footnote which never fits (#5498) 2024-12-18 16:54:14 +00:00
Emmanuel Lesueur
257764181e
New curve element that supersedes path (#5323)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-12-18 15:58:57 +00:00
Peng Guanwen
73253d4651
Support for defining which charset should be covered by a font (#5305)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-12-17 14:07:45 +00:00
PgBiel
60f246ece2
Fix sticky blocks at the top of blocks and pages (#5581)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-12-17 09:41:18 +00:00
Laurenz
1346385255
Rename pattern to tiling (#5590) 2024-12-17 09:25:27 +00:00
+merlan #flirora
d3620df4c6
Add reversed numbering (#5563) 2024-12-16 13:45:57 +00:00
Andrew Voynov
7f139517b9
Derivation comment for calculation in repeat (#5575) 2024-12-16 12:18:34 +00:00
Laurenz
521ceae889
Fix crash due to consecutive weak spacing (#5562) 2024-12-11 15:46:10 +00:00
PgBiel
c2cc09e71a
Forbid footnote migration in pending floats (#5497)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-12-09 09:55:58 +00:00
+merlan #flirora
73dd5a085e
Fix sizing of quadratic shapes (square/circle) (#5451)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
2024-12-09 09:33:30 +00:00
Laurenz Stampfl
67ef6066f4
Add support for converting text in SVGs to paths (#5390) 2024-12-08 17:06:25 +00:00
Max
468a60103d
Fix multiline annotations in over- elems in math changing the baseline (#5459) 2024-12-08 16:55:34 +00:00
PgBiel
62567fc91e
Fix multiple footnotes in footnote entry (#5545) 2024-12-08 16:35:54 +00:00
Laurenz
0228462ba1
Bump Rust to 1.83 (#5534) 2024-12-05 15:57:01 +00:00
Laurenz
e0122a5b50 Add HTML export format 2024-12-04 10:12:07 +01:00
Laurenz
f8f2ba6a5f Rename Document to PagedDocument 2024-12-04 10:12:07 +01:00