ConTeXt/Basics

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The Basics[edit| edit source]

ConTeXt is a lot simpler than LaTeX especially when you want to achieve custom look for your documents. The examples from now on expect you to use a text editor which is UTF-8 compatible. Start by entering the following into your favourite text editor:

 \starttext
 \ConTeXt is so easy!
 \stoptext

And compile it by typing:

 context yourfile.tex

As you can see, no document class or anything need to be defined to produce valid ConTeXt output. By default, ConTeXt produces PDF output. Now, let's try something more complicated:

 \mainlanguage[fi]
 \starttext
 \completecontent
 \part{Something}
 Lorem ipsum
 \chapter{Something else}
 Dolor sit amet
 \stoptext

Now we've set the language to Finnish both on hyphenation and the auto generated element names (such as Table of Contents). We've also defined a part and a chapter, and generated a ToC with the \completecontent command.


  Index