Markdown中的制表符空间 [英] Tab space in Markdown

查看:2010
本文介绍了Markdown中的制表符空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Markdown中使用一个/多个制表符空间.我使用的是".但是,如果我想使用多个制表符空间,那么MarkDown文档将看起来不太好.

I want to use one/multiple Tab space in Markdown. I used, "    &nbsp", which is working. But if i want to use multiple Tab space, then MarkDown Document will not look good.

我想在下面这样使用

Main Topic
*Tabspace* Subtopic1
*Tabspace**Tabspace* Some Points for subtopic1
*Tabspace* Subtopic2
*Tabspace**Tabspace* Some Points for subtopic2 

实际外观应该

Main Topic
    Subtopic1
        Some Points for subtopic1
     Subtopic2
        Some Points for subtopic2

& nbsp

Any other alternative for &nbsp

推荐答案

使用不间断空格

在Markdown中,与任何标记语言一样,选项卡空间折叠为单个空间. 此外,几个连续的水平空白(例如空格,制表符)会折叠为一个空格,或者从段落的开头将其删除.

Use non-breaking spaces

In Markdown, as any markup languages, the tab space collapses to a single space. Also, several consecutive horizontal whitespace (e.g. spaces, tabs) collapse to a single space or they are removed from the beginning of a paragraph.

您必须使用几个不间断的空格代替制表符空格:
一个空格字符,它可以防止连续的空格字符折叠成一个空格,还可以防止在其位置自动换行"..

该行在许多地方使用不间断的空格;它们没有崩溃.
该行在许多地方使用许多连续的空格.他们都崩溃了.

   This line uses     non-breaking     spaces in many places; they    are not   collapsed.
This line uses many consecutive spaces in many places; they are all collapsed.

此解决方案的优点在于您不需要在Markdown文档中使用任何代码(在HTML中,您必须使用 ).

The beauty of this solution is that you don't need to use any code in your Markdown document (in HTML you must use  ).

  • 在macOS中,您需要按⌥Opt + Space
  • 在Windows中,有时可以使用 Alt + 0 + 1 + 6 + 0 Alt + 2 + 5 + 5
  • 在许多商业软件中, Ctrl + Space
  • In macOS, you need to press ⌥ Opt+Space
  • In Windows, sometimes work Alt+0+1+6+0 or Alt+2+5+5
  • In many commercial software Ctrl+Space

主要主题

Subtopic1
subtopic1的一些要点
subtopic1的一些要点
subtopic1的一些要点

    Subtopic1
        Some Points for subtopic1
        Some Points for subtopic1
        Some Points for subtopic1

Subtopic2

Subtopic3
subtopic3的一些要点
subtopic3的一些要点
subtopic3的一些要点

    Subtopic3
        Some Points for subtopic3
        Some Points for subtopic3
        Some Points for subtopic3

警告
复制和粘贴前面的示例无法正常工作,因为有时系统会在复制粘贴操作中将不间断空格更改为普通空格:-(.

Warning
Copy and paste the previous example could not work because sometimes the system change non-breaking spaces to normal spaces in a copy-paste operation :‑(.

这篇关于Markdown中的制表符空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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