是否可以在pdf导出中包装内联代码和受防护的代码块?

时间:2019-08-23 18:43:16

标签: pdf r-markdown bookdown

我有以下简单的RMarkdown文档(确实是某些 bookdown 本书章节的一部分):

---
output:
  bookdown::pdf_document2: default
  bookdown::word_document2: default
---

Here is the text with inline link to great website `https://bookdown.org/yihui/bookdown/markdown-syntax.html#block-level-elements`.

Below is fenced code block which I need to wrap

```
<html>
<head>
<title>Lorem Ipsum</title>
</head>
<body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
</body>
```

当前,此文档以截断行的形式呈现为PDF:

incorrect code render to pdf

但是我需要像在docx文档中那样包装代码:

correct code render to docx

我应该在YAML前言中进行哪些更改以允许将代码包装在pdf导出上?

0 个答案:

没有答案