/

页边距内容

.pagemargin 函数沿着页面的页边距,在固定位置显示内容。

该函数接受一个可选的 position 参数和一个主体参数 content

参数说明可接受值
position要定位的页面区域。topleftcornertoplefttopcentertoprighttoprightcornerrighttoprightmiddlerightbottombottomrightcornerbottomrightbottomcenterbottomleftbottomleftcornerleftbottomleftmiddlelefttoptopoutsidecornertopoutsidetopinsidecornertopinsidebottomoutsidecornerbottomoutsidebottominsidecornerbottominside
content要显示的元素。块级内容

示例 1

.pagemargin {topright}
    **这是**一段页边距内容。
Fixed positions

限定范围的页边距

pagedslides 文档中使用时,页边距内容仅从它被声明的那一页开始生效。这使得文档的不同部分可以采用不同的页边距设置。

示例 2

.pagemargin {topcenter}
    在所有页面上

## 第一页

## 第二页

.pagemargin {topleft}
    从第二页起

## 第三页
Scoped page margins

再次覆盖页边距,会从此处开始改变它。

示例 3

...

## 第三页

.pagemargin {topcenter}
    从第三页起
Scoped page margins

镜像位置

除了 toprightbottomleft 这样的固定位置外,Quarkdown 还支持镜像位置,它们会根据页面是左侧(偶数)还是右侧(奇数)而自适应调整。

上表中以斜体标记的位置即为镜像位置,它们指向 outside(外侧)与 inside(内侧)区域:

示例 4

.pagemargin {topoutside}
    **这是**一段页边距内容。
Mirror positions

页脚

大多数布局主题会将 bottomcenter 页边距与文档页脚关联,并为其应用不同的样式。例如,不同的块可能会以一行排列显示。页脚在 slides 文档中尤为常见。

.footer 函数是 .pagemargin {bottomcenter} 的简写形式。

示例 5

.theme {beaver} layout:{beamer}

.footer
    .docauthor

    **.docname**

    [GitHub](https://github.com/iamgio/quarkdown)
Page footer

页码

页边距可以承载页码。更多信息请参阅页码