Markdown与LaTeX的描述环境等效吗? [英] What is the Markdown equivalent to LaTeX's description environment?

查看:84
本文介绍了Markdown与LaTeX的描述环境等效吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在与LaTeX的描述环境等效的Markdown?这使作者能够生成第一个单词为黑体字的列表,如下所示:

Is there a Markdown equivalent to LaTeX's description environment? This gives an author the ability to generate lists where the first word is boldfaced, like this:

LaTeX源为:

\begin{description}
  \item[First] The first item
  \item[Second] The second item
  \item[Third] The third etc \ldots
\end{description}

我想在Markdown中复制此内容,这样,如果我通过pandoc之类的工具运行Markdown,我将获得类似的结果.

I'd like to replicate this in Markdown so that if I run the Markdown through a tool such as pandoc I will get similar results.

推荐答案

Markdown不如LaTeX全面,或者甚至HTML :

Markdown isn't as comprehensive as LaTeX, or even HTML:

Markdown的语法仅用于一种目的:用作Web上写作的格式.

Markdown不能替代HTML,甚至不能替代HTML.它的语法非常小,仅对应一小部分HTML标签.

Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags.

它支持项目列表和编号列表,但不包含定义列表.

It supports bulleted and numbered lists, but not defiition lists.

但是,您提到使用诸如pandoc之类的工具"来处理输入文件. Pandoc使用raw_tex扩展名支持嵌入式LaTeX:

However, you mention using "a tool such as pandoc" to process your input file. Pandoc supports inline LaTeX using the raw_tex extension:

扩展名:raw_tex

除了原始HTML外,pandoc还允许原始LaTeX,TeX和ConTeXt包含在文档中.内联TeX命令将被保留,并保持不变地传递给LaTeX和ConTeXt编写器.因此,例如,您可以使用LaTeX包含BibTeX引文:

Extension: raw_tex

In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be included in a document. Inline TeX commands will be preserved and passed unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use LaTeX to include BibTeX citations:

This result was proved in \cite{jones.1967}.

请注意,在LaTeX环境中,例如

Note that in LaTeX environments, like

\begin{tabular}{|l|l|}\hline
Age & Frequency \\ \hline
18--25  & 15 \\
26--35  & 33 \\
36--45  & 22 \\ \hline
\end{tabular}

begin和end标签之间的材料将被解释为原始LaTeX,而不是markdown.

the material between the begin and end tags will be interpreted as raw LaTeX, not as markdown.

内联LaTeX在Markdown,LaTeX和ConTeXt以外的输出格式中被忽略.

Inline LaTeX is ignored in output formats other than Markdown, LaTeX, and ConTeXt.

因此,仅包括LaTeX description环境并使用raw_tex扩展名运行Pandoc应该会为您提供所需的结果.

So simply including your LaTeX description environment and running Pandoc with the raw_tex extension should give you the result you want.

您可能必须手动指定源格式,例如在命令中使用-f markdown_strict+raw_tex之类的东西.

You may have to specify the source format manually, e.g. by using something like -f markdown_strict+raw_tex in your command.

这篇关于Markdown与LaTeX的描述环境等效吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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