Commit Graph

140 Commits

Author SHA1 Message Date
Laurenz 2a19e7f4dc Bump ecow 2023-10-09 15:00:07 +02:00
MALO 333e4037fc
Add `Repr` trait (#2269) 2023-10-04 12:08:56 +02:00
Laurenz 7a46a85d3e Improve span stability after incremental parsing 2023-09-19 16:53:59 +02:00
Sébastien d'Herbais de Thun 163c2e1aa2
Gradient Part 1 - Color rework (#2171) 2023-09-19 15:48:33 +02:00
Laurenz 305524d005 Update tests for type system changes 2023-09-11 14:42:43 +02:00
Laurenz 2f672b4e2e Allow packages to specify their minimum compiler version 2023-09-04 16:29:57 +02:00
Laurenz 0e5c48ad0d Add a bit more docs to `compile` 2023-08-29 18:01:18 +02:00
Laurenz a71a2057f2 More type safety for spans 2023-08-29 17:35:35 +02:00
Laurenz afc95ed19d Virtual path type
Fixes #1937
2023-08-22 14:21:04 +02:00
Laurenz 2ea451b83b Refactor SVG export a bit 2023-08-08 13:00:47 +02:00
Wenzhuo Liu 61e4ad6bba
Add SVG export (#1729) 2023-08-08 12:54:13 +02:00
Laurenz b8b0137504 Bytes type
- Moves `Bytes` from `util` to `eval` module
- Accepts bytes in `str` function for bytes -> str conversion
- Adds `bytes` function for str | array -> bytes conversion
- Adds `array` function for bytes -> array conversion
- Adds `len`, `at`, and `slice` methods for bytes
- Adds `encoding` parameter to `read` function
2023-08-04 15:46:46 +02:00
bluebear94 3c94e05ced
Warn if layout doesn't stabilize (#1684) 2023-08-03 00:24:25 +02:00
lolstork b37c1e2731
Add infrastructure for compiler warnings (#1731) 2023-07-19 12:52:47 +02:00
Laurenz f5953887c9 Extract syntax module into typst-syntax crate 2023-07-18 21:04:46 +02:00
Laurenz 04bffc4f12 Reintroduce `--root` 2023-06-28 10:36:53 +02:00
Laurenz 7b92bd7c34 Basic package management 2023-06-27 18:40:17 +02:00
Laurenz f1025071ed Tidy up 2023-06-24 15:05:59 +02:00
Mathias Fischler 2e03fb34cb
Add infrastructure to enrich errors with hints (#1486) 2023-06-24 14:18:21 +02:00
Luis David Licea Torres 3284e7fac7
Support for inside and outside margins (#1308)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-06-12 12:46:34 +02:00
Yang Hau 0dc1776202
refactor: Replace once_cell to std lib (#1402) 2023-06-07 14:42:58 +02:00
Laurenz fd417da04f Improve value casting infrastructure 2023-06-06 22:06:16 +02:00
Laurenz 219f14355b Rename `into_u16` to `as_u16` 2023-06-06 19:06:56 +02:00
Eric Biedert ff903674f9
Fix tests on windows (#1222) 2023-05-23 12:36:54 +02:00
Laurenz Stampfl 752817ae74
Add support for date & time handling (#435) 2023-05-23 10:41:20 +02:00
Laurenz 551ea99d05 Show default values in documentation
Fixes #169
Fixes #1102
2023-05-17 14:41:46 +02:00
Laurenz ad347632ab Make ligatures copyable and searchable
Fixes #479
Fixes #1040
2023-05-03 10:33:18 +02:00
Alex Saveau f740c0b03f
Support picking the last subtest by using a random big number (#970) 2023-04-26 10:02:17 +02:00
Alex Saveau b75cad2d3b
Parallelize tests (#900) 2023-04-23 14:35:18 +02:00
astrale-sharp 4cea7007d0
use clap for parsing tests. (#876) 2023-04-21 11:16:32 +02:00
Alex Saveau c505a0f5dc
Add UPDATE_EXPECT envvar to update tests (#748) 2023-04-20 10:47:31 +02:00
Laurenz d10b53df0b Clippy 2023-04-18 19:16:13 +02:00
Johannes Wolf 4d9c6b28d0
cli: Allow reading every path not of type dir (#414) 2023-03-30 00:36:22 +02:00
Laurenz e84df1a036 Fix tests on Windows
Fixes #386.
2023-03-28 14:30:21 +02:00
Kian-Meng Ang 25acefeb5b
Fix typos (#115)
Found via `codespell -S target -L
crate,ist,thi,alle,dedented,ue,tung,nd,ende,overriden,dependant`
2023-03-22 09:02:51 +01:00
Laurenz ab43bd802e Renaming and refactoring 2023-03-19 22:39:19 +01:00
Laurenz af7fe4d760 Hover and autocomplete in show rules 2023-03-17 18:18:47 +01:00
Laurenz ad05ba5925 Spans in math 2023-03-12 13:20:36 +01:00
Martin Haug 2720a44b96 Merge branch 'main' into ng 2023-03-12 09:58:47 +01:00
Laurenz 62f35602a8 New #[func] macro 2023-03-10 12:55:21 +01:00
Laurenz 2c13ff9bfe Make render background color configurable 2023-03-09 13:07:36 +01:00
Laurenz d7a65fa26d Rework style chain access 2023-03-08 14:35:33 +01:00
Laurenz 1b2b53ecb9 Require font to be a named argument 2023-03-08 10:44:24 +01:00
Laurenz 25b5bd1175 Fully untyped model 2023-03-07 15:17:13 +01:00
Laurenz 6ab7760822 Split up `model` module 2023-03-01 16:33:28 +01:00
Laurenz 7597b99789 New default style 2023-02-25 20:04:30 +01:00
Laurenz 09077d6382 Fix more bad font names 2023-02-24 15:08:00 +01:00
Laurenz 56b6a2a908 Impl `Eq` for syntax tree types 2023-02-17 10:01:40 +01:00
Laurenz ec05ed7e06 Move assets 2023-01-31 15:05:42 +01:00
Laurenz 43ef60c09c Tracing-based expression tooltips 2023-01-27 12:05:12 +01:00
Laurenz 4653ffebb4 Math module 2023-01-23 15:23:52 +01:00
Laurenz 40561e57fb Remove most fields from `SyntaxKind` enum 2023-01-15 12:40:27 +01:00
Laurenz ab03f32240 Reorganize syntax module 2023-01-14 12:34:17 +01:00
Laurenz 29b31c4a5a New import syntax 2023-01-03 12:32:17 +01:00
Laurenz f5f7df7247 Documentation 2022-12-20 16:11:37 +01:00
Laurenz b4b022940b Syntax and example sections 2022-12-19 01:16:35 +01:00
Laurenz b6202b646a Reflection for castables 2022-12-15 23:11:20 +01:00
Laurenz 9ba4d2c134 New macro setup 2022-12-14 10:09:44 +01:00
Laurenz 4c73456fc1 Move highlighting into new IDE module 2022-12-14 10:02:19 +01:00
Laurenz 9bc90c371f Introspection 2022-12-02 15:45:18 +01:00
Laurenz 0efe669278 Reorganize library and tests 2022-11-29 14:18:13 +01:00
Laurenz 6bafc63910 Document metadata 2022-11-26 23:52:01 +01:00
Laurenz 96f72eee6c Separate typesetting and compilation 2022-11-24 17:51:07 +01:00
Laurenz 5ae81971f2 Introduce `Library` 2022-11-23 16:07:54 +01:00
Laurenz b2a3d3f235 More general evaluation interface 2022-11-23 12:00:06 +01:00
Laurenz 2ce727fc95 Make inner node and node data private 2022-11-22 14:40:56 +01:00
Laurenz 72361106bc Add flag for model printing 2022-11-20 21:39:19 +01:00
Laurenz 321121c6c3 Move font folder 2022-11-20 18:14:13 +01:00
Laurenz 8eeb4ad8f6 Rename `margins` to `margin` 2022-11-19 23:33:33 +01:00
Laurenz efd1853d06 Show it!
- New show rule syntax
- Set if syntax
- Removed wrap syntax
2022-11-07 12:46:05 +01:00
Laurenz eb951c008b Style changes 2022-11-04 11:38:09 +01:00
Laurenz 33928a00dc Tidy up library 2022-11-03 16:50:26 +01:00
Laurenz 46921a8c28 Separate test crate
This removes the not-really-cyclic dependency that confuses rust-analyzer. See also: https://github.com/rust-lang/rust-analyzer/issues/2414
2022-11-03 16:13:35 +01:00
Laurenz cbbc46215f Layout elements and pure rust rendering 🥏 2020-08-02 21:17:42 +02:00
Laurenz 659248d52f Raw lengths 🚲
Replace unitless length with raw f64 and introduce length type with unit.
2020-08-01 19:15:55 +02:00
Laurenz 04c05502be Add some fonts 📜 2020-08-01 17:59:38 +02:00
Laurenz 06dbac6efd Port font handling to fontdock and ttf-parser 🛳
- Use fontdock for indexing fonts and querying
- Typst binary now automatically indexes and uses system fonts in addition to a fixed font folder!
- Removes subsetting support for now (was half-finished anyways, plan is to use harfbuzz for subsetting in the future)
- Adds font width configuration support
2020-08-01 00:10:54 +02:00
Laurenz bbcdeb128c Move, rename and switch some things (boring) 🚚
- Problems -> Diagnostics
- Position -> Pos
- offset_spans -> Offset trait
- Size -> Length (and some more size types renamed)
- Paper into its own module
- scope::Parser -> parsing::CallParser
- Create `Decorations` alias
- Remove lots of double newlines
- Switch from f32 to f64
2020-07-29 18:09:51 +02:00
Laurenz e2ef4f64e7 Rename errors to problems and make error! macro more ergonomic 🧼
Also adds a `warning!` macro.
2020-07-26 17:28:43 +02:00
Laurenz 751812f451 Serialize layouts with serde 🔠 2020-02-04 21:36:29 +01:00
Laurenz e63ce52ae0 Merge `Parsed` and `Layouted` types into `Pass` with `Feedback` 🌝🎢🌚 2020-02-04 19:22:23 +01:00
Laurenz 5c11aa7223 Adapt for tonty and fix a few bugs 🚧 2020-02-04 11:22:00 +01:00
Laurenz ec60795575 Port tests 🚁 2020-02-03 15:05:34 +01:00
Laurenz 3150fd5643 Better Debug/Display and Derives 🧽 2020-02-03 12:22:02 +01:00
Laurenz 40ea35cbe7 Upgrade to new toddle interface 🐳 2020-02-03 10:37:50 +01:00
Laurenz 78da2bdd5d Decoupled function parser 🔗 [WIP] 2020-01-21 17:09:31 +01:00
Laurenz 95e6b078fe Move to non-fatal errors 🪂 [WIP]
- Dynamic models instead of SyntaxTrees
- No more ParseResult/LayoutResult
- Errors and Decorations which are propagated to parent contexts
- Models are finally clonable
2020-01-19 21:53:24 +01:00
Laurenz 277f2d2176 ColorToken serialization + function fix 🚧 2020-01-18 15:58:36 +01:00
Laurenz 70878885f5 Do argument parsing ☑ 2020-01-16 23:00:39 +01:00
Laurenz 08b91a265f Powerful parser testing 🐱👤 2020-01-16 17:51:04 +01:00