如何在Markdown中为笔记创建文本框? [英] How can I create a text box for a note in markdown?

查看:947
本文介绍了如何在Markdown中为笔记创建文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用markdown编写文档.我正在使用出色的pandoc从markdown源创建docx和tex文件.我希望有一个文本框,向读者提供一些技巧和注释,就像编程书籍通常那样.我无法弄清楚如何在降价中做到这一点.你能帮忙吗?

I am writing a document in markdown. I am using the wonderful pandoc to create docx and tex files from the markdown source. I would like to have a textbox for tips and notes to readers the way programming books often do. I cannot figure out how to do this in markdown. Can you help?

推荐答案

我通常会在markdown文本中放置警报框(例如Note或Warning)(不仅在使用pandoc时,而且在所有支持markdown的地方)用两条水平线围绕内容:

What I usually do for putting alert box (e.g. Note or Warning) in markdown texts (not only when using pandoc but also every where that markdown is supported) is surrounding the content with two horizontal lines:

---
**NOTE**

It works with almost all markdown flavours (the below blank line matters).

---

是这样的:

注意

它适用于所有降价口味(下面的空白行很重要).

It works with all markdown flavours (the below blank line matters).

好处是您无需担心支持哪种降价风格或安装或启用哪个扩展.

The good thing is that you don't need to worry about which markdown flavour is supported or which extension is installed or enabled.

编辑:正如@ filups21在评论中提到的那样,似乎水平线由RMarkdown中的 *** 表示.因此,前面提到的解决方案并不能像最初声称的那样适用于所有降价促销.

EDIT: As @filups21 has mentioned in the comments, it seems that a horizontal line is represented by *** in RMarkdown. So, the solution mentioned before does not work with all markdown flavours as it was originally claimed.

这篇关于如何在Markdown中为笔记创建文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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