Changes

Jump to navigation Jump to search
no edit summary
< [[Main Page]] | [[Second Step]] | [[Next Steps]] >== Modifying the output style ==
This page describes It is possible to change the fundamentals style of the output by using ConTeXtappropriate ''setup'' commands in the preamble. It includes hands-on examplesFor example, to make the section titles bold and the instructions assume that you have ConTeXt [[Installation hints|installed]]. If you don't want to install it yetuse italic (rather than slanted) font for emphasized words, you can [http://live.contextgarden.net try it on the web].use
Start by typing the following into a <context mode="mkiv" source="yes" text="which gives">\setuphead[section][style=\bfa]\setupbodyfontenvironment[Text Editors|text editordefault][em=italic] and saving it as <code>hello.tex</code>:
<texcode>
\starttext
Hello World\stoptext</texcode> Then go to the command-line and type: <pre>context hello.tex</pre> startsection[title={Testing ConTeXt will then process your document. It will output some information, such as follows—this output does ''not'' indicate an error: <pre><nowiki>mtx-context | run 1: luatex --fmt="/opt/context-minimals/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="hello" --lua="/opt/context-minimals/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./hello.tex" --c:input="./hello.tex" --c:kindofrun=1 "cont-yes.mkiv"}] This is LuaTeX, Version beta-0.74.0-2012122511 (rev 4541) my {\write18 enabled.(/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv em first} ConTeXt ver: 2013.01.27 21:24 MKIV fmt: 2013.1.28 int: english/english system > cont-new.mkiv loaded(/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkivsystem > beware: some patches loaded from cont-new.mkiv)system > files > jobname: hello, input: hello, result: hellofonts > latin modern fonts are not preloadedlanguages > language en is active(hello.tex{/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}fonts > preloading latin modern fonts (second stage)fonts > typescripts > unknown: library 'loc'{/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map}fonts > fallback modern rm 12pt is loadedbackend > xmp > using file '/opt/context-minimals/texmf-context/tex/context/base/lpdf-pdx.xml'pages > flushing realpage 1, userpage 1 ) )</opt/context-minimals/texmf-fonts/fonts/opentype/public/lm/lmroman12-regular.otf>mkiv lua stats > used config file - selfautoparent:/texmf/web2c/texmfcnf.luamkiv lua stats > used cache path - /home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32emkiv lua stats > resource resolver - loadtime 0.098 seconds, 1 scans with scantime 0.083 seconds, 21 shared scans, 13 found files, scanned paths: /home/adityam/texmfmkiv lua stats > stored bytecode data - 318 modules (0.150 sec), 68 tables (0.000 sec), 386 chunks (0.150 sec)mkiv lua stats > cleaned up reserved nodes - 41 nodes, 9 lists of 441mkiv lua stats > node memory usage - 2 glue, 2 penalty, 9 attribute, 28 glue_spec, 3 attribute_listmkiv lua stats > node list callback tasks - 6 unique task lists, 5 instances (re)created, 39 callsmkiv lua stats > used backend - pdf (backend for directly generating pdf output)mkiv lua stats > loaded patterns - en::2mkiv lua stats > jobdata time - 0.001 seconds saving, 0.000 seconds loadingmkiv lua stats > callbacks - 135 direct, 178 indirect, 313 totalmkiv lua stats > randomizer - resumed with value 0.13015339995276mkiv lua stats > lxml preparation time - 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached callsmkiv lua stats > result saved in file - hello.pdf, compresslevel 3, objectcompreslevel 3mkiv lua stats > loaded fonts - 2 files: lmroman12-regular.otf latinmodernmath-regular.otfmkiv lua stats > fonts load time - 0.069 seconds mkiv lua stats > luatex banner - this is luatex, version beta-0.74.0-2012122511 (tex live 2013/dev)(rev 4541)mkiv lua stats > control sequences - 36422 of 65536 + 100000mkiv lua stats > current memory usage - 23 MB (ctx: 23 MB)mkiv lua stats > runtime - 0.316 seconds, 1 processed pages, 1 shipped pages, 3.165 pages/second system | total runtime: 0.468</nowiki></pre> Once <tt>context</tt> has finished, it will leave behind a file called <tt>hello.pdf</tt>. Open it and you will see a "Hello world" document. <context source="no" mode="mkiv">\starttextHello Worldstopsection
\stoptext
</context>
[[Category:Basics]]&rarr; [[Second StepCategory:Sample documents]] {{Getting started navbox}}
1,003

edits

Navigation menu