![是否有任何地方提供 ConTeXt 的“文章类克隆”?](https://linux22.com/image/303819/%E6%98%AF%E5%90%A6%E6%9C%89%E4%BB%BB%E4%BD%95%E5%9C%B0%E6%96%B9%E6%8F%90%E4%BE%9B%20ConTeXt%20%E7%9A%84%E2%80%9C%E6%96%87%E7%AB%A0%E7%B1%BB%E5%85%8B%E9%9A%86%E2%80%9D%EF%BC%9F.png)
我正在尝试掌握 ConTeXt。这是一个有趣的系统。不过,与 LaTeX 相比,这是一个相当大的变化。是否有某种 ConTeXt 模板,例如 LaTeX 文章类克隆,我可以研究它来了解这种排版系统的工作原理?对于来自 LaTeX 的我来说,应该熟悉一些,这样我就可以识别哪个宏对输出产生了什么影响。
答案1
由于 LaTeXarticle
类非常基础,因此其大部分功能都可以在 ConTeXt 中轻松重现。例如,快速浏览一下 ConTeXt wiki 可以找到以下详细信息摘要,标题和字体选择,同时在手动的还指明了页眉和页脚的方向。这可能会导致类似
\definestartstop
[abstract]
[before={%
\midaligned{\bf Abstract}%
\blank[medium]%
\startnarrower[2*middle]
\tfx
},
after={%
\stopnarrower
\blank[big]%
}%
]
\define\maketitle{%
\startalignment[center]
\blank[force,2*big]
{%
\tfd
\getvariable{metadata}{title}%
\par
}%
\blank[3*medium]
{%
\tfa
\getvariable{metadata}{author}%
\par
}%
\blank[2*medium]
{%
\tfa
\getvariable{metadata}{date}%
\par
}%
\blank[3*medium]
\stopalignment
}
\setvariables
[metadata]
[
title=Some things I did,
author=Joseph Wright,
date=Today,
]
\setupheadertexts
\setupfootertexts[pagenumber]
\starttext
\maketitle
\startabstract
This is some abstract text: it is not very interesting.
This is some abstract text: it is not very interesting.
This is some abstract text: it is not very interesting.
This is some abstract text: it is not very interesting.
This is some abstract text: it is not very interesting.
\stopabstract
\section{Introduction}
This is just some filler text to make this document work.
This is just some filler text to make this document work.
This is just some filler text to make this document work.
This is just some filler text to make this document work.
This is just some filler text to make this document work.
This is just some filler text to make this document work.
This is just some filler text to make this document work.
\stoptext
这当然不是与标准 LaTeX 文章 100% 相同,但方向相同。