Markdown 等同于 LaTeX 章节和部分?
Markdown equivalent to LaTeX chapters and parts?
我正在考虑 markdown 和 LaTeX 之间的关系,两者之间的(许多)差异之一是分段。 Markdown 使用主题标签等同于 HTML header 标签,类似地 LaTeX 有 \section{}
、\subsection{}
等用于分段。然而,LaTeX 也有 \chapter{}
和 \part{}
,但我想不出这些在 Markdown 中等同于什么。想法?
一个想法是将单独的部分和章节变成单独的 Markdown 文档,但这感觉不太对。
One of Markdown's design goals is to be very simple:
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.
由于 LaTeX 比 HTML 更具表现力,Markdown 语法对应的 LaTeX 子集比 HTML 更小。
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself.
如果您的目标是 HTML,您应该寻找与章节或部分相对应的 HTML。一种选择是 the <article>
tag:
The <article>
HTML element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include: a forum post, a magazine or newspaper article, or a blog entry, a product card, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.
另一种选择是<section>
:
The <section>
HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.
如果您的目标是 LaTeX(或通过 LaTeX 生成的 PDF),您可能希望直接使用 LaTeX。具体如何操作取决于您使用的工具。 Pandoc,例如,supports raw LaTeX via the raw_tex
extension.
我正在考虑 markdown 和 LaTeX 之间的关系,两者之间的(许多)差异之一是分段。 Markdown 使用主题标签等同于 HTML header 标签,类似地 LaTeX 有 \section{}
、\subsection{}
等用于分段。然而,LaTeX 也有 \chapter{}
和 \part{}
,但我想不出这些在 Markdown 中等同于什么。想法?
一个想法是将单独的部分和章节变成单独的 Markdown 文档,但这感觉不太对。
One of Markdown's design goals is to be very simple:
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.
由于 LaTeX 比 HTML 更具表现力,Markdown 语法对应的 LaTeX 子集比 HTML 更小。
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself.
如果您的目标是 HTML,您应该寻找与章节或部分相对应的 HTML。一种选择是 the <article>
tag:
The
<article>
HTML element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include: a forum post, a magazine or newspaper article, or a blog entry, a product card, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.
另一种选择是<section>
:
The
<section>
HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.
如果您的目标是 LaTeX(或通过 LaTeX 生成的 PDF),您可能希望直接使用 LaTeX。具体如何操作取决于您使用的工具。 Pandoc,例如,supports raw LaTeX via the raw_tex
extension.