如何在Markdown标记中缩进几行?

本文翻译自:How to indent a few lines in Markdown markup?

I want to write a few lines of text. 我想写几行文字。 They should be formatted normally except each line should start at the 6th column. 它们应该正常格式化,除非每行应从第6列开始。 Ie I don't want the code block formatting rule to make this chunk of text look like code as I'll use other formatting like bold face, etc. How to do that in Markdown? 即我不希望代码块格式化规则使这块文本看起来像代码,因为我将使用其他格式,如粗体等。如何在Markdown中执行此操作?


#1楼

参考:https://stackoom.com/question/pmUn/如何在Markdown标记中缩进几行


#2楼

One way to do it is to use bullet points, which allows you specify multiple levels of indentation. 一种方法是使用项目符号点,它允许您指定多个级别的缩进。 Bullet points are inserted using multiples of two spaces, star, another space Eg.: 使用两个空格的倍数插入子弹点,星形,另一个空间例如:

this is a normal line of text
  * this is the first level of bullet points, made up of <space><space>*<space>
    * this is more indented, composed of <space><space><space><space>*<space>

This method has the great advantage that it also makes sense when you view the raw text. 此方法具有很大的优势,在查看原始文本时也很有意义。

If you care about not seeing the bullet points themselves , you should (depending on where you're using markdown) to be able to add li {list-style-type: none;} to the css for the whole mark down area. 如果你不关心自己看到子弹点 ,你应该(取决于你使用markdown的位置)能够将li {list-style-type: none;}到整个降价区域的css。


#3楼

这是一个老线程 ,但我认为markdown的blockquotes('>')最适合这个:


#4楼

Check if you can use HTML with your markdown. 检查您是否可以在降价时使用HTML。 Maybe this works out for you: 也许这适合你:

  • List entry one <br/> 列表条目一个<br/>
    Indented line <br/> 缩进线<br/>
    <br/>
    And some more.. 还有一些......
  • Second entry 第二次进入
    • Subentry <br/> 子条款<br/>
      Hello there! 你好!

#5楼

do tab, then the + sign, then space, then your content 选项卡,然后是+符号,然后是空格,然后是您的内容

So 所以

* level one + level two tabbed


#6楼

If you really must use tabs, and you don't mind the grey background-color and padding, <pre> tags might work (if supported): 如果你真的必须使用标签,并且你不介意灰色背景颜色和填充, <pre>标签可能会起作用(如果支持):

<pre>
This        That        And             This
That        This        And             That    
</pre>
This        That        And             This
That        This        And             That
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值