typst formula: always uses A4 page as frame for contents
Summary:
The typst formula extension does not respect the size of the current page when generating a formula. Instead, it always generates its contents onto an A4 page, but puts the results on the current page, resulting in them not fitting.
It would be good to have it do the following:
- use current page as frame, if nothing is selected
- use selection bounding box as frame, if something is selected
This would make it possible to easily create formulas / layouts that fit into a predefined box.
Steps to reproduce:
- open Inkscape
- use a small template, or resize the page to make it (a lot) smaller than A4
- generate a very wide formula
What happened?
The generated formula looks nice... but it is too large.
What should have happened?
The extension should use the size of the selection border box as the size for the page, or the size of the current page, if there is no selection.
How to do that: https://typst.app/docs/reference/layout/page/
Version info
Inkscape 1.4 (092d2a6b6c, 2024-10-28)
Compile (Run)
GLib version: 2.72.4
GTK version: 3.24.33 (3.24.33)
glibmm version: 2.66.2
gtkmm version: 3.24.5
libxml2 version: 2.9.13
libxslt version: 1.1.34
Cairo version: 1.16.0 (1.16.0)
Pango version: 1.50.6 (1.50.6)
HarfBuzz version: 2.7.4 (2.7.4)
OS version: Linux Mint 21.3
Edited by Maren Hachmann