Changes

Jump to navigation Jump to search
1,470 bytes added ,  17:11, 21 October 2020
m
continuing Intro drafting
Another thing you might like to change is the page numbering. By default, ConTeXt places a page number at the center of the top of the page. To put make it at default to the center of the bottom of the page instead, you can use {{cmd|setuppagenumbering|[location{{=}}bottom]}}.
<texcode>
\setuppapersize[letter]
\setuppagenumbering[location=bottom]
\starttext
Hello, world!
\stoptext
</texcode>
 
It&rsquo;s worth thinking about why you use {{cmd|setuppagenumbering}} here. A page numbering is inherently global to a document: it can be turned on and off, and it can be configured differently in different parts of the document, but there is only one ''page numbering'' for a document. So all you can do is configure it with {{cmd|setuppagenumbering}}. There is no {{code|definepagenumbering}} and no {{code|\startpagenumbering}} or {{code|\stoppagenumbering}}. Oddly enough, there is a {{cmd|setupuserpagenumber}} command though, so if you find that {{cmd|setuppagenumbering}} isn&rsquo;t giving you enough options, you might look at {{cmd|setupuserpagenumber}} too.
 
When you add more text to your document, you might notice that by default, paragraphs are not indented. The way that paragraphs are indented in a ConTeXt is called {{code|indenting}}, so you can use {{cmd|setupindenting}} to configure it globally for your document. To make paragraphs by default indented by a medium amount, use {{cmd|setupindenting|[yes, medium]}}. (Here {{code|yes}} turns the indenting on, but by default the amount is still {{code|none}}, so {{code|medium}} is used to specify the amount.)
 
<texcode>
\setuppapersize[letter]
\setuppagenumbering[location=bottom]
\setupindenting[yes, medium]
\starttext
\input knuth
\stoptext
</texcode>
This is another example of the ''setup'' notation. The way that pages are numbered in ConTeXt is called {{code|pagenumbering}}, so you use {{cmd|setuppagenumbering}} to configure it. And the use of [ ] to enclose the argument is another example of the ''square brackets'' notation.
You also might want to change produces a full page with the way that paragraphs are indented. By defaultfollowing text: <context>\setupindenting[yes, they are not indented. medium]\input knuth</context> To make them indented by a medium amountgenerate some text for these paragraphs, use we have used {{cmd|setupindenting|[yes, medium]\input knuth}}to include a quotation from Knuth that is built-in to ConTeXt. You will find that this quotation is often used in ConTeXt documentation. (Here  While using {{codecmd|yessetupindenting}} turns will do the indenting onjob, but by default for the amount is still reasons discussed above it would actually be better first to use {{codecmd|nonedefineindenting}}, so to give your favorite indentation patterns names. Then you can use {{codecmd|mediumsetupindenting}} is used to specify make one of these the amount.)default for this document, as in: 
<texcode>
\setuppapersize[letter]
\setuppagenumbering[location=bottom]
\setupindentingdefineindenting[myStandardIndenting][yes, medium]\setupindenting[myStandardIndenting]
\starttext
\input knuth
\stoptext
</texcode>
The ''setup'' notation is being used here again. The way that paragraphs are indented in produces a ConTeXt is called {{code|indenting}}full page with the following text: <context>\defineindenting[myStandardIndenting][yes, medium]\setupindenting[myStandardIndenting]\input knuth</context> In practice, so you use will often see people skip over the {{cmd|setupindentingdefineindenting}} , but as discussed above, it is helpful to configure include it, for many reasons. The use of [ ] to enclose the arguments is again the ''square brackets'' notation. 
== Another example: ''define'' notation ==
53

edits

Navigation menu