Changes

Jump to navigation Jump to search
312 bytes added ,  13:05, 2 July 2020
''This page is about editing pages on this wiki in general. You may For editing command reference pages, also be interested in see [[Help:Command referenceReference]].'' {{todo|Warning: explain here the use of ToDo category.}}
== General ==
=== Linking to source files ===
Practically all of ConTeXt's source files are stored in the directory {{code|.../tex/context/base/mkiv}}. There are two templates to link to online copies of the source files.
Link to the most recent version (recommended):
* '''You type:''' <nowiki>{{src|type-akb.tex}}</nowiki>
* '''Links to:''' httphttps://reposource.orcontextgarden.cz/w/context.git/blob/HEAD:net/tex/context/base/mkiv/type-akb.tex
* '''Looks like:''' {{src|type-akb.tex}}
=== Displaying ConTeXt output (and source) ===
This wiki allows you to type ConTeXt code to obtain a PNG of the resultant output, with extraneous whitespace cropped. This is very useful for including in-page examples. Below are two simple ones; for more, see [[Help:Context]]. When using MkIV, it is good practice to include a comment {{code|1=% mode=mkiv}}: otherwise, the reader will have no indication that the example is compiled with MkIV instead of the usual MkII.
{| class=wikitable
| <pre>
<context>
The wiki's default is using ConTeXt Mark IIIV: \crlf
\contextversionnumber
</context>
</pre>
| <context>
The wiki's default is using ConTeXt Mark IIIV: \crlf
\contextversionnumber
</context>
|- style="vertical-align: top"
| <pre>
<context source=yes mode=mkiv text="This produces:">% mode=mkivThe wiki also still uses ConTeXt Mark IV: \crlf
\contextversionnumber
</context>
</pre>
| <context source=yes mode=mkiv text="This produces:">% mode=mkivThe wiki also still uses ConTeXt Mark IV: \crlf
\contextversionnumber
</context>
|}
 
 
=== Displaying a ConTeXt command syntax ===
If you want to show the calling convention(s) of a ConTeXt command, you can use <code><nowiki><syntax> ... </syntax></nowiki></code>. This is particularly useful in a "Command" page.
 
{| class=wikitable
! scope=col width=300 style="text-align: left"| You type
! scope=col width=300 style="text-align: left"| You see
|- style="vertical-align: top"
| <pre>
<syntax>page</syntax>
</pre>
| <syntax>page</syntax>
|}
 
=== Displaying TeX or ConTeXt code alone ===
</pre>
|}
 
{{About this wiki navbox}}

Navigation menu