Changes

Jump to navigation Jump to search
m
Continuing to sandbox and intro to ConTeXt.
LIKE EVERYTHING IN THIS SANDBOX, THIS IS ONLY A DRAFT AND SHOULD NOT BE USED YET.
== The structure of ConTeXt ==
ConTeXt has a very logical structure: there are two basic rules of syntax and three basic principles of organization.
<context source="yes">
\startframed[corner=round]
An example of something.
\stopframed
</context>
\setupframed[corner=round]
\startframed
An example of something.
\stopframed
</context>
\startframed[definitionFrame]
A definition of something.
\stopframed
\startframed[exampleFrame]
An example of something.
\stopframed
</context>
<context source="yes">
\framed {An example of something.}
</context>
This is an example of how the Curly Braces Rule is used on in ConTeXt. In order to delimit the single unit that follows it, you use { }. Many Although many of ConTeXt's commands involve {{code|start}}, {{code|stop}}, {{code|setup}}, or {{define}}, but a fair number of them instead operate on the single unit following them, as {{cmd|framed}} does. Some, like {{cmd|framed}}, allow you to use either syntax.
Another situation where text needs to be treated as a single unit is when an argument to a command takes some text that involves [ ]. For example, the following code works fine because the text for the section title doesn&rsquo;t contain [ ]:
== Summary ==
Naturally not everything in ConTeXt can be derived from these two basic Rules and three basic Principles. There are many further details to learn in order to implement them, and not everything in ConTeXt is completely consistent with these Rules and Principles. However, they serve as a useful guide, and the design of ConTeXt really is remarkably consistent with these Rules and Principles, so they serve as a useful guide when you are trying to figure out how best to use the powerful tools that ConTeXt offers. == Some commands that use these principles == Here I'll put some commands.
53

edits

Navigation menu