diff --git a/templates/article.typ b/templates/article.typ index 5d2cf79..8eb2d9f 100644 --- a/templates/article.typ +++ b/templates/article.typ @@ -99,9 +99,15 @@ // Set page layout with conditional height based on export format set page( paper: paper, - orientation: orientation, + flipped: orientation == "landscape", margin: page-margin, - ..if export_format == "single-page" { (height: auto,) } else { (:) }, + ..if export_format == "single-page" and orientation == "landscape" { + (width: auto,) + } else if export_format == "single-page" { + (height: auto,) + } else { + (:) + }, numbering: pagenumbering, header: context { if counter(page).get().first() > 1 [ diff --git a/templates/default.typ b/templates/default.typ index f0f2996..31d5412 100644 --- a/templates/default.typ +++ b/templates/default.typ @@ -97,9 +97,15 @@ // Set page layout with conditional height based on export format set page( paper: paper, - flipped: false, + flipped: orientation == "landscape", margin: (top: 2.5cm, right: 1.5cm, bottom: 2cm, left: 2.5cm), - ..if export_format == "single-page" { (height: auto,) } else { (:) }, + ..if export_format == "single-page" and orientation == "landscape" { + (width: auto,) + } else if export_format == "single-page" { + (height: auto,) + } else { + (:) + }, numbering: pagenumbering, header: context { if counter(page).get().first() > 1 [ diff --git a/templates/modern.typ b/templates/modern.typ index b360d10..bc0de43 100644 --- a/templates/modern.typ +++ b/templates/modern.typ @@ -94,9 +94,15 @@ // Set page layout with conditional height based on export format set page( paper: paper, - orientation: orientation, + flipped: orientation == "landscape", margin: (top: 2.5cm, right: 1.5cm, bottom: 2cm, left: 2.5cm), - ..if export_format == "single-page" { (height: auto,) } else { (:) }, + ..if export_format == "single-page" and orientation == "landscape" { + (width: auto,) + } else if export_format == "single-page" { + (height: auto,) + } else { + (:) + }, numbering: pagenumbering, fill: rgb("#fafafa") ) diff --git a/templates/report.typ b/templates/report.typ index 853376e..b1d4175 100644 --- a/templates/report.typ +++ b/templates/report.typ @@ -105,9 +105,15 @@ // Set page layout with conditional height based on export format set page( paper: paper, - orientation: orientation, + flipped: orientation == "landscape", margin: page-margin, - ..if export_format == "single-page" { (height: auto,) } else { (:) }, + ..if export_format == "single-page" and orientation == "landscape" { + (width: auto,) + } else if export_format == "single-page" { + (height: auto,) + } else { + (:) + }, numbering: pagenumbering, header: context { let page-num = counter(page).get().first()