Open main menu

Changes

30 bytes added ,  13:20, 9 August 2020
m
Text replacement - "<cmd>" to "{{cmd|"
</texcode>
Suppose that we save this in the file <code>t-title.tex</code>. Then, we can use this in our main ConTeXt document with the following syntax, which is quite similar to the LaTeX version aside from the addition of the <{{cmd>|usemodule</cmd>}}<tt>[title]</tt> command in place of <code>\documentclass{article}</code>.
<texcode>
== In ConTeXt: A more advanced solution ==
The next solution use a an interface inspired by the ones from the core commands and tries to go away from hard coded values.
The values for the title are set with the <code>\setuptitle</code> command, it provides two arguments where the second argument is optional and could be used to change the layout for the three text blocks. The title block itself is placed with the <code>\placetitle</code> command.
The definition for the macro <code>\placetitle</code> could be extended without problems to change the values for the space before and after the title block or the distance between all elements with the <code>\setuptitle</code> command.
== Adding markings to headers and footers (in "A more reusable solution") ==
With just a few extra lines and two redefined definitions in this module,