我想写几行文字。除了每行从第6列开始之外,它们应该正常格式化。例如,我不希望代码块格式规则使这一文本块看起来像代码,因为我将使用其他格式,如粗体面等。如何在Markdown中做到这一点?


当前回答

对于引用/缩进的段落,这个hack可能会工作(取决于渲染引擎):

| | | |
|-|-|-|
|  | _"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 laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."_ | |
|

呈现为:

其他回答

一种方法是使用项目符号,它允许您指定多个缩进级别。项目符号用两个空格、星号和另一个空格的倍数插入。

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>

这种方法有一个很大的优点,那就是当您查看原始文本时,它也很有意义。

如果你不想看到项目符号本身,你应该(取决于你在哪里使用markdown)能够为整个标记下来的区域在css中添加li {list-style-type: none;}。

一些Markdown实现似乎使用~字符进行缩进。

看看这个“>”是否有用:

Line 1
> line 2 
>> line 3

作为一个变通办法,我建议插入一个竖条(|),后面跟着硬空格(Alt- code在Windows: Alt+0160)。这保留了条后的缩进,从而为原始和渲染Markdown提供了一个视觉上可接受的解决方案。

This is a normal line of text.
|    This is an indented line of text.
|        This is another indented line of text.

在段落开头使用数学环境放置一个确定的空格,如:

$\qquad$我的文本行…

这对我有用,希望对你也有用。