Skip to content

Commit

Permalink
Add sample for page-geometry using pagedjs
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 28, 2023
1 parent 219e771 commit 3f7327e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/page-geometry.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Page Geometry 101"
description = "Pick a paper and some margins"
extra.typesetters = [ "sile", "typst", "xelatex", "groff" ]
extra.typesetters = [ "sile", "typst", "xelatex", "groff", "pagedjs" ]
extra.typesetter_args = { groff = "-P-pA7" }
+++

Expand Down
20 changes: 20 additions & 0 deletions data/page-geometry/pagedjs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<head>
<style>
@page {
size: A7;
/* Work around a bug in paged.js, if bleed is not specified the
paper size doesn't fully take effect:
https://gitlab.coko.foundation/pagedjs/pagedjs/-/issues/450 */
bleed: 0;
margin: 1cm;
}
p {
text-indent: 1cm;
}
</style>
</head>
<p>
An A7 page with 1cm margins and 1cm paragraph indentation.
</p>
</html>
1 change: 0 additions & 1 deletion data/page-geometry/sile.sil
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
\frame[id=content,left=1cm,right=right(page)-1cm,top=1cm,bottom=bottom(page)-1cm]
\end{pagetemplate}
\set[parameter=document.parindent,value=1cm]

An A7 page with 1cm margins and 1cm paragraph indentation.
\end{document}

0 comments on commit 3f7327e

Please sign in to comment.