Changes

Jump to navigation Jump to search
146 bytes added ,  14:58, 22 October 2020
m
Minor tweaks to the section titles
{{DISPLAYTITLE:An Introduction to ConTeXt}}
 
<!--
= An introduction to ConTeXt =
-->
ConTeXt has a very logical structure. Once you&rsquo;re familiar with its basic underlying principles, you will find that many of its commands seem quite natural. In this introduction, we&rsquo;ll look at two aspects of ConTeXt&rsquo;s structure:
= Your first A minimal ConTeXt document =
Now that you know the three main types of ConTeXt commands, let&rsquo;s look at how you use that structure to make documents. Here is a very minimal example of a ConTeXt document:
</texcode>
If you're not sure how to compile this, or if you want more detailed instructions for how to make a ConTeXt document in general, see the [[First Document]] page. When you compile thisthe code above, it produces a page with a 1 in the center at the top and with the text:
<context>
You can think of the code here this way: ConTeXt&rsquo;s way of formatting the entire text of the document is called {{code|text}}, so to apply that way of formatting you enclose the document text in {{cmd|starttext}} {{cmd|stoptext}}.
= Starting to customize Customizing things : paper size, page numbering, and paragraph indenting =
When you compile this document, you&rsquo;ll probably immediately see some things that you want to change. For example, the default paper size in ConTeXt is A4. This works well for most of the world, but if you&rsquo;re in the United States, you might prefer your paper size to be letter. That&rsquo;s easy enough. The way that paper is sized for a document in ConTeXt is called {{code|papersize}}. You could use {{cmd|definepapersize}} to define a {{code|letter}} configuration for {{code|papersize}}, but the page size {{code|letter}} is already built-in, so you don&rsquo;t need to do that. So since you want to configure {{code|papersize}} globally for the entire document, use {{cmd|setuppapersize|[letter]}} at the start of your document:
Note that ConTeXt does not have a {{code|\startindenting}} or {{code|\stopindenting}} command. Instead, the named indenting configurations that you have defined with {{cmd|defineindenting}} can be used in other commands that define regions that can have indenting.
= Custom Further customization: highlighting =
For another example of what you might want to customize, suppose that in a book you are writing, you want to italicize terms that you will define later in the book. At first glance, it might be tempting just to italicize each one individually, as in:
<context source="yes" text="which produces">
53

edits

Navigation menu