我使用typearea
package of KOMA-Script在一个PDF文档中生成纵向和横向页面-请参见Option 2 here。
然而,几何设置只适用于纵向页面,而不适用于横向页面。
1.使用标题中的几何设置?
或
2.在KOMA命令中设置横向页面的几何图形?
---
title: "Portrait and Landscape"
format:
pdf:
geometry:
- top=80mm
- bottom=30mm
- left=30mm
- right=30mm
include-in-header:
text: |
\usepackage{typearea}
---
# Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
\newpage
<!-- changing the orientation to landscape --------------------------------- -->
\KOMAoptions{paper=landscape,pagesize}
\recalctypearea
# Running Code (Landscape)
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
You can add options to executable code like this
The `echo: false` option disables the printing of code (only output is displayed).
\newpage
<!-- % changing the orientation to portrait again -------------------------- -->
\KOMAoptions{paper=portrait,pagesize}
\recalctypearea
# Quarto (Portrait)
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
1条答案
按热度按时间gjmwrych1#
usegeometry
选项在这种情况下会很有帮助。通常
typearea
并不关心你是否在任何配置下使用它和geometry包,特别是,这意味着geometry并不识别typearea
对页面参数所做的任何改变,例如当它改变纸张大小时--这不是geometry本身所提供的功能。一旦设置了选项
usegeometry
,typearea
就会尝试将其所有选项转换为geometry
的选项。如果在文档中激活新参数,typearea
甚至会调用\newgeometry
。由于geometry
不支持使用\newgeometry
更改纸张大小或页面方向,typearea
使用内部命令和几何长度来根据需要提供此类更改。此外,请参阅TeXStackExchange提供的this优秀答案,该答案演示了使用和不使用
geometry
包时实现此操作的方法。showframe
只是为了显示边距 *