PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
265 stars 208 forks source link

Control over margins in web-build versions of worksheets #2205

Open rhinopotamus opened 3 months ago

rhinopotamus commented 3 months ago

Because of the way pretext-latex.xsl builds a \newgeometry{} command from a <worksheet>, you can control margins in the print build. However, the web build doesn't know anything about margin attributes of a worksheet. I feel like it should be possible to pass margin attributes to the css similarly, but I don't know enough about xslt / css / etc. to figure this out immediately.)

Originally posted by @rhinopotamus in https://github.com/PreTeXtBook/pretext/issues/2192#issuecomment-2211508037

davidfarmer commented 3 months ago

It is on my to-do list to look into this.

The current goal of worksheets is to fit as much as possible on a page.

Can you describe some use cases for adjusting the margins?

rhinopotamus commented 3 months ago

So I'm currently translating an existing LaTeX workbook into PreTeXt. (See also the web build on github pages.)

We plan to use the print version to send to a print-on-demand shop to make a spiral-bound physical workbook for students to buy. However, it'd also be neat for students to be able to print out individual sections as needed, perhaps if they want a fresh copy of a particular section for revisions, and it'd be nice to have the formatting the same between the print version and the version generated by the print button on web.

davidfarmer commented 3 months ago

Why is it the html version, and not the print-on-demand PDF, which the student would use to print one section?

rhinopotamus commented 3 months ago

I mean that it would be nice if they could click this guy and then get the same formatting. image