【发布时间】:2019-10-12 01:11:55
【问题描述】:
大家好,我正在尝试解决这个问题,但我无路可走:
这是我的代码:
---
title: "A Multi-page HTML Document"
author: "Yihui Xie and Romain Lesur"
date: "`r Sys.Date()`"
output:
pagedown::html_paged:
toc: true
toc_depth: 3
# change to true for a self-contained document, but it'll be a litte slower for Pandoc to render
self_contained: false
---
# Exercise 1{-}
<div style="width: 100%; height: 20px; border-bottom: 1px solid black; text-align: center">
<span style="font-size: 40px; background-color: white; padding: 0 10px;">
Exercicio 1 <!--Padding is optional-->
</span>
</div>
我想维护目录结构。换句话说,我想点击“练习 1”,它会将我带到练习一的页面。 但是我希望标题是下面这个自定义标题(我想点击“练习 1”e 只看到下面这个练习 1 样式):
<div style="width: 100%; height: 20px; border-bottom: 1px solid black; text-align: center">
<span style="font-size: 40px; background-color: white; padding: 0 10px;">
Exercicio 1 <!--Padding is optional-->
</span>
</div>
我说清楚了吗?
例如,如果我这样做:
# {-}
<div style="width: 100%; height: 20px; border-bottom: 1px solid black; text-align: center">
<span style="font-size: 40px; background-color: white; padding: 0 10px;">
Exercicio 1 <!--Padding is optional-->
</span>
</div>
我的 TOC 中的“练习 1”一词消失了。
非常感谢您的帮助
劳拉
【问题讨论】:
-
我相信我将不得不创建一个 .css 文件。我对吗?我该怎么做?
-
你可能想看看stackoverflow.com/questions/52576626/…,它可能会给你一个关于如何解决这个问题的提示
标签: r r-markdown pagedown