83d5fc35ea
Add options to Fonts command
2025-11-16 12:35:13 +00:00
a075fb41bf
Rename Options to OptionsCompile as there will be different options for different Typst commands in the future
2025-11-16 12:18:50 +00:00
24c09dfcbe
Update VersionString comment
2025-11-16 12:05:09 +00:00
37d4b485dd
Add Docker caller & Add support for the fonts command
2025-11-16 12:03:36 +00:00
a8a2466172
Change error message
2025-11-15 20:19:26 +00:00
e9bd6a0928
Add CLIOptions as an alias type of Options
2025-11-15 20:40:21 +01:00
1294d5f009
Add support for multiple Typst callers
...
- Add Caller interface type
- Rename CLIOptions to Options
2025-11-15 20:38:58 +01:00
b419177edc
Add build tags for "non windows/unix" platforms instead of specific other platforms.
golangci-lint / lint (push) Successful in 22s
test / test (1.23.x, 0.12.0) (push) Failing after 4s
test / test (1.23.x, 0.13.0) (push) Failing after 3s
test / test (1.23.x, 0.13.1) (push) Failing after 4s
test / test (1.23.x, 0.14.0) (push) Failing after 3s
2025-11-15 20:27:08 +01:00
26b40a318d
Fix empty struct and map being encoded as empty Typst array
golangci-lint / lint (push) Successful in 34s
test / test (1.23.x, 0.12.0) (push) Failing after 4s
test / test (1.23.x, 0.13.0) (push) Failing after 3s
test / test (1.23.x, 0.13.1) (push) Failing after 3s
test / test (1.23.x, 0.14.0) (push) Failing after 3s
2025-11-06 21:41:53 +01:00
513d2ae906
Add ability to encode raw byte slices as Typst images
golangci-lint / lint (push) Successful in 20s
test / test (1.23.x, 0.12.0) (push) Failing after 4s
test / test (1.23.x, 0.13.0) (push) Failing after 3s
test / test (1.23.x, 0.13.1) (push) Failing after 3s
test / test (1.23.x, 0.14.0) (push) Failing after 3s
2025-11-04 23:17:17 +01:00
bc69f35948
Allow it to compile on unsupported platforms
golangci-lint / lint (push) Successful in 1m16s
test / test (1.23.x, 0.12.0) (push) Failing after 4s
test / test (1.23.x, 0.13.0) (push) Failing after 3s
test / test (1.23.x, 0.13.1) (push) Failing after 4s
test / test (1.23.x, 0.14.0) (push) Failing after 3s
2025-11-03 21:44:01 +01:00
bd9c1beac7
Add a way to change the working directory
2025-11-03 19:50:24 +01:00
79b86fb22c
Add TODO comment
2025-11-03 19:48:51 +01:00
ef185b9601
Add missing license headers
2025-11-03 19:48:05 +01:00
815a4fea7b
Add some test files.
2025-11-03 19:45:57 +01:00
473563756d
Fix linter warning about yoda conditions
2025-11-03 19:31:11 +01:00
d66d337897
Add compatibility with Typst 0.14.0
...
golangci-lint / lint (push) Successful in 1m38s
test / test (1.23.x, 0.12.0) (push) Failing after 5s
test / test (1.23.x, 0.13.0) (push) Failing after 5s
test / test (1.23.x, 0.13.1) (push) Failing after 4s
test / test (1.23.x, 0.14.0) (push) Failing after 4s
- Add new PDF standards
- Add --ignore-embedded-fonts flag
- Add --no-pdf-tags flag
- Add Typst 0.14.0 to test workflow
2025-10-24 22:01:41 +02:00
David Vogel
bdbda5f874
Merge pull request #4 from Dadido3/typst-0.13.1
...
golangci-lint / lint (push) Successful in 2m48s
test / test (1.23.x, 0.12.0) (push) Failing after 7s
test / test (1.23.x, 0.13.0) (push) Failing after 4s
test / test (1.23.x, 0.13.1) (push) Failing after 4s
Add Typst 0.13.1 to Compatibility list
2025-03-07 14:28:14 +01:00
e1879e4d36
Add Typst 0.13.1 to Compatibility list
2025-03-07 13:56:11 +01:00
ab3cee4666
Correct capitalization of Typst and Go
2025-02-27 18:23:30 +01:00
c3876b340b
Rename Variable* to Value*
...
- Rename MarshalVariable to MarshalValue
- Rename NewVariableEncoder to NewValueEncoder
- Rename VariableEncoder to ValueEncoder
- Rename VariableMarshaler to ValueMarshaler
- Rename MarshalTypstVariable to MarshalTypstValue
There are now wrappers which ensure compatibility with code that still uses some of the old functions/types.
- Improve image_test.go by adding an assertion
- Rename all occurrences of Variable to Value
- Remove "TODO: Handle images..." as that's already working with the image wrapper
- Update README.md
2025-02-27 18:07:46 +01:00
7c87e3fee8
Fix missing error handling in VariableEncoder.marshal
2025-02-27 17:35:43 +01:00
4ee94ec233
Add golangci-lint to GitHub actions
2025-02-27 17:29:42 +01:00
6ecfb61e5b
Make TestInjectValues deterministic
2025-02-27 16:28:19 +01:00
2a1d2990e7
Add simple example
2025-02-27 16:08:02 +01:00
9268a6691e
Rework passing-values example
...
This changes the example to use the template pattern; we now have a single Typst file containing a template function.
Instead of loading and rendering the template, we will now generate temporary Typst markup that will import the template function and call it with custom data.
This also means that it's pretty easy to test, preview and debug the template.typ outside of go-typst.
All that is needed is another Typst file which will call the template with mock data.
Also, we now use Compile instead of CompileWithVariables and inject encoded Go values into our temporary markup.
2025-02-27 16:07:34 +01:00
69bd0ed5b5
Add InjectValues function
...
This will make CompileWithVariables obsolete, as you can use InjectValues in combination with the normal Compile instead.
This also introduces a breaking change with CompileWithVariables, as now invalid identifiers will return an error.
2025-02-27 15:17:39 +01:00
112898d1d7
Rename example from passing-objects to passing-values
2025-02-27 10:35:01 +01:00
0668d15070
Add PDFStandard type and constants
...
Also rename the PDFStandard field in CLIOptions to PDFStandards, and change its type from string to []PDFStandard.
This is a breaking change.
2025-02-26 17:27:24 +01:00
c2d62b2373
Fix Custom command line options
2025-02-26 17:01:44 +01:00
David Vogel
d7fc966a42
Merge pull request #3 from faide/fontPath
...
Font path add unit test
2025-02-26 16:47:19 +01:00
Florent Aide
2b21d37fce
Merge remote-tracking branch 'origin' into fontPath
2025-02-26 16:26:32 +01:00
Florent Aide
fb12dfb9fa
add unit test for the font-path option
2025-02-26 16:20:36 +01:00
David Vogel
81bf84c51b
Merge pull request #2 from faide/fontPath
...
Add support for font-path option
2025-02-26 16:08:16 +01:00
Florent Aide
0e2bdda951
Add support for font-path option
2025-02-26 15:35:15 +01:00
c67b56bc06
Add Typst 0.13.0 to testing with GitHub actions
...
- Update README.md
2025-02-24 22:34:21 +01:00
648c449890
Simplify and improve stderr parsing
...
- Allow multiple errors and warnings
- Remove ErrorWithPath, which is now replaced by Error
- Simplify parsing, allow multiple errors
- Add more tests for stderr parsing
2025-02-24 22:32:27 +01:00
David Vogel
188f5c36cb
Merge pull request #1 from faide/0.13.0
...
add support for 0.13.0 html feature
2025-02-24 18:01:04 +01:00
Florent Aide
2f45207c40
add support for 0.13.0 html feature
2025-02-24 17:04:35 +01:00
fec22822ea
Update README.md
2025-01-12 14:57:32 +01:00
40b899ee67
Update README.md
2024-12-20 21:25:44 +01:00
5cd261c199
Add image.Image wrapper
2024-12-20 21:12:59 +01:00
d9b6725592
Add struct tag support
2024-12-20 18:33:07 +01:00
7b0454ae68
Change map and struct marshaling & Fix encoding issues
...
- Typst dictionaries can use string literals as keys, which is more stable than using identifiers. This also means we don't have to use CleanIdentifier.
- Add more tests for corner cases.
2024-12-19 18:07:44 +01:00
bff3077b6d
Add test for empty or nil byte slices
2024-12-19 17:38:15 +01:00
a0eb762709
Fix map keys being in random order by sorting them
2024-12-19 17:33:53 +01:00
1458dc5db7
Rename CLI.Render to CLI.Compile
2024-12-19 17:18:11 +01:00
d65ae34abb
Add MarshalVariable function
2024-12-19 17:16:52 +01:00
ed5897c9f6
Fix typst syntax with VariableEncoder
...
- Arrays with a single entry need a trailing comma
- Add writeRune method
- Negative numbers need to be put in code brackets, otherwise the typst parser will complain in some cases
- Add/change unit tests
- Let TestVariableEncoder test compile generated markup
- Update README.md
2024-12-19 16:48:50 +01:00
0a600dd2a1
Switch back to --diagnostic-format human
2024-12-19 16:14:11 +01:00