Difference between revisions of "First Document"

From Wiki
Jump to navigation Jump to search
m (corrected link --pg)
(Writing style cleanup)
Line 2: Line 2:
  
  
What is ConTeXt? What can I do with it? Let’s see. Take your favourite [[Text editor]], type in the following document and save it as a file <code>hello.tex</code>.
+
This page describes the fundamentals of using ConTeXt. It includes hands-on examples, and the instructions assume that you have ConTeXt [[Installation hints|installed]]. If you don't want to install it yet, you can [http://live.contextgarden.net try it on the web].
 +
 
 +
Start by typing the following into a [[text editor]] and saving it as <code>hello.tex</code>:
  
 
<texcode>
 
<texcode>
Line 10: Line 12:
 
</texcode>
 
</texcode>
  
It shows already a ConTeXt essential: everything's between <tt>\startsomething</tt> and <tt>\stopsomething</tt>.
+
Then go to the command-line and type:
 
 
If you don't have ConTeXt [[Installation hints|installed]] (yet), you can first try out the latest version using the web interface http://live.contextgarden.net.
 
 
 
If you already installed it, you can go to the shell/command line and type in
 
  
 
<pre>
 
<pre>
Line 20: Line 18:
 
</pre>
 
</pre>
  
and now ConTeXt will start. It will give you some output on your terminal 
+
ConTeXt will then process your document. It will output some information, such as follows—this output does ''not'' indicate an error:
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 45: Line 43:
 
</nowiki></pre>
 
</nowiki></pre>
  
Don’t be worried. This is the way it should look. Once texexec has finished, it will leave behind a file called <tt>hello.pdf</tt>. Open it and you will see a "Hello world" on a virtual A4 paper and a page number.
+
Once <tt>texexec</tt> has finished, it will leave behind a file called <tt>hello.pdf</tt>. Open it and you will see a "Hello world" document.
  
 
> [[Second Step]]
 
> [[Second Step]]

Revision as of 05:11, 13 July 2007

< Main Page | Second Step | Next Steps >


This page describes the fundamentals of using ConTeXt. It includes hands-on examples, and the instructions assume that you have ConTeXt installed. If you don't want to install it yet, you can try it on the web.

Start by typing the following into a text editor and saving it as hello.tex:

\starttext
Hello World
\stoptext

Then go to the command-line and type:

texexec hello.tex

ConTeXt will then process your document. It will output some information, such as follows—this output does not indicate an error:

TeXExec | processing document 'hello.tex'
TeXExec | no ctx file found
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | writing option file hello.top
TeXExec | tex engine: pdfetex
TeXExec | tex format: cont-en
TeXExec | progname: context
This is pdfeTeXk, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5)
 \write18 enabled.
 %&-line parsing enabled.
 (c:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx)
entering extended mode
(./hello.tex

ConTeXt  ver: 2006.05.14 23:57  fmt: 2006.5.16  int: english  mes: english

language        : language en is active
<protectionstate 0>
...

Once texexec has finished, it will leave behind a file called hello.pdf. Open it and you will see a "Hello world" document.

> Second Step