我正在用markdown写文档。我正在使用神奇的pandoc从markdown源创建docx和tex文件。我想有一个文本框提示和注释的读者编程书籍经常做的方式。我不知道如何做到这一点在markdown。你能帮忙吗?
当前回答
你也可以使用https://www.npmjs.com/package/markdown-it-container
::: warning
*here be dragons*
:::
然后渲染为:
<div class="warning">
<em>here be dragons</em>
</div>
其他回答
另一个解决方案是使用CSS邻接并使用h4(或更高):
#### note
This is the note content
h4 {
display: none; /* hide */
}
h4 + p {
/* style the note however you want */
}
一行
> hello
> world
你好 世界
多线
方法
> hello
>
> world (new line)
你好 世界(新线)
方法b
> ```shell
> echo hello
> echo world
> ```
回声你好 呼应世界
使用GitHub,我通常会插入一个blockquote。
> **_NOTE:_** The note content.
变得……
注:说明内容。
当然,总有简单的HTML…
你试过使用双标签吗?做一个盒子:
Start on a fresh line
Hit tab twice, type up the content
Your content should appear in a box
它在带有html输出的常规Rmarkdown文档中为我工作。双选项卡部分应该出现在一个圆角矩形浅灰色框中。
你也可以使用https://www.npmjs.com/package/markdown-it-container
::: warning
*here be dragons*
:::
然后渲染为:
<div class="warning">
<em>here be dragons</em>
</div>
推荐文章
- 如何将LaTeX与Markdown混合?
- 乳胶渲染在README。md在Github上
- 在Markdown Jekyll中使用图像说明
- Slack Markdown链接没有解决
- 差异语法突出显示在Github Markdown
- 我如何创建一个文本框的笔记在markdown?
- 在Markdown中创建一个没有标题的表
- R -降价避免包装加载消息
- 在MarkDown中包含SVG(托管在GitHub上)
- 自动TOC在github风味markdown
- 使用pandoc从Markdown转换为PDF时设置空白大小
- 如何显示数学方程在一般github的markdown(不是github的博客)
- 使用Markdown的Sphinx而不是reST
- 降价和图像对齐
- 如何样式一个JSON块在Github维基?