我正在尝试掌握 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% 相同,但方向相同。