如何使用Pandoc在Markdown生成的投影仪pdf中的代码块上添加边框 [英] How to add border to code blocks in generated beamer pdf from Markdown using Pandoc

查看:63
本文介绍了如何使用Pandoc在Markdown生成的投影仪pdf中的代码块上添加边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了如何通过书写来添加行号,

I've found how to add line numbers by writing,

```{.c .numberLines}
int x = 1;
int y = x;
```

但是想知道如何在代码块上添加边框.

But wonder how to add a border to the code blocks.

推荐答案

最简单的方法是修改 default.beamer 模板并传递-listings 变量,以在pdf创建过程中将其替换为pandoc.查看清单文档中有关框架的信息: http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/listings/listings.pdf

The "easiest" way to do this is to modify the default.beamer template and pass the --listings variable to pandoc during pdf creation. Take a look at the information for frames in the listings documentation: http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/listings/listings.pdf

这篇关于如何使用Pandoc在Markdown生成的投影仪pdf中的代码块上添加边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆