Changes

Jump to navigation Jump to search
no edit summary
< [[Main Page]] | [[Second Step]] | [[Next Steps]] >== Modifying the output style ==
It is possible to change the style of the output by using appropriate ''setup'' commands in the preamble. For example, to make the section titles bold and to use italic (rather than slanted) font for emphasized words, use
What is ConTeXt? What can I do with it? Let’s see. Take your favourite <context mode="mkiv" source="yes" text="which gives">\setuphead[section][style=\bfa]\setupbodyfontenvironment[text editordefault][em=italic], type in the following document and save it as a file <code>hello.tex</code>.
<texcode>
\starttext
Hello World\startsection[title={Testing ConTeXt}] This is my {\em first} ConTeXt document.\stopsection
\stoptext
</texcodecontext>
It shows already a ConTeXt essential: everything's between <tt>\startsomething</tt> and <tt>\stopsomething</tt>. If you don't have ConTeXt [[install|installedCategory:Basics]] (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>texexec --pdf hello.tex</pre> and now ConTeXt will start. It will give you some output on your terminal  <pre><nowiki> TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005  executable : pdfetex format : cont-en inputfile : test output : standard interface : en current mode : none TeX run : 1 This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (/opt/context/current/texmf/web2c/natural.tcx)entering extended mode(./test.tex ConTeXt ver: 2005.08.19 fmt: 2005.8.19 int: english mes: english language : language en is active<protectionstate 0>...</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. > [[Second StepCategory:Sample documents]]
765

edits

Navigation menu