Myriad-Dreamin/tinymist

Remove the blank margins in preview webpage

Closed this issue · 2 comments

pxwg commented

Motivation

Thanks for creating this high-quality lsp!

When writing Typst files on a 13-inch laptop, it's hard to see the text content (11pt font) if I use half the screen for writing without proper magnification. If there were an option to remove the blank margins of the document in the preview, it would greatly magnify the font and improve the writing experience.

Description

A shortcut to control trimming blank margins in the preview

An example in LaTeX

More Examples/Questions

No response

duplicate of #428 and #576. Two points, I repeat it:

  1. there might be some content "overflowing to margins", like some margin notes, page headings, or footnotes, and prevent the language server from detecting a correct page margin with only checking the output, i.e. without understanding your source code.
  2. If we cannot automatically detect it reliably, we might have to use the imperfect solution mentioned at #428 (comment).
pxwg commented

I used sys.input to get a different template for preview, and I think it is enough for the current usage. Thank you.