如何在Markdown标记中缩进几行? [英] How to indent a few lines in Markdown markup?
问题描述
我想写几行文字.它们的格式应正常,除非每一行都应从第6列开始. IE.我不希望代码块格式化规则使这部分文本看起来像代码,因为我将使用其他格式(如粗体字等).在Markdown中如何做到这一点?
markdown的本机功能无法做到这一点.但是markdown允许内联HTML,因此编写
This will appear with six space characters in front of it
将产生:
&pb;
如果您可以控制页面上的CSS,则还可以使用标记并对其进行样式设置(内联或使用CSS规则).
无论哪种方式,markdown都不是布局工具,而是简化了Web编写过程,因此,如果您发现自己扩展了其功能集可以满足您的需要,则可以查看是否或不是您在这里使用正确的工具.查看Gruber的文档:
http://daringfireball.net/projects/markdown/syntax#html
I want to write a few lines of text. They should be formatted normally except each line should start at the 6th column. I.e. 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?
There's no way to do that in markdown's native features. However markdown allows inline HTML, so writing
This will appear with six space characters in front of it
will produce:
This will appear with six space characters in front of it
If you have control over CSS on the page, you could also use a tag and style it, either inline or with CSS rules.
Either way, markdown is not meant as a tool for layout, it is meant to simplify the process of writing for the web, so if you find yourself stretching its feature set to do what you need, you might look at whether or not you're using the right tool here. Check out Gruber's docs:
http://daringfireball.net/projects/markdown/syntax#html
这篇关于如何在Markdown标记中缩进几行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!