Difference between revisions of "User:Sciurus/sandbox"

From Wiki
Jump to navigation Jump to search
m (more edits to the command list)
m (link names again)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
LIKE EVERYTHING IN THIS SANDBOX, THIS IS ONLY A DRAFT AND SHOULD NOT BE USED YET.
+
[[Introduction]]
  
 
+
[[Some Basic Commands]]
= ''start-stop'', ''setup'', and ''define'' =
 
There are three main types of commands in ConTeXt:
 
 
 
# '''start-stop''': To apply ''something'' to some text, enclose the text in {{code|\start''something''}} {{code|\stop''something''}}.
 
# '''setup''': To configure ''something'' for the rest of the document, use {{code|\setup''something''}}.
 
# '''define''': To create a named customization of ''something'', use {{code|\define''something''}}.
 
 
 
Many commands don’t fit into one of these types, but here are some that do. Throughout this list {{code|start''something''}} is shorthand for {{code|start''something''}} {{code|stop''something''}}.
 
 
 
== Structure ==
 
These commands relate to the structure of a document.
 
 
 
* {{cmd|starttext}}: In a typical document, the text to be typeset is enclosed by this. {{cmd|definetext}} and {{cmd|setuptext}} are defined but have little documentation and don’t appear to be used much.
 
* {{cmd|startdocument}} and {{cmd|setupdocument}}: If customization is wanted, the text to be typeset can be enclosed by {{cmd|startdocument}} instead of {{cmd|starttext}}. The command {{cmd|startdocument}} allows for document metadata and can be configured with {{cmd|setupdocument}}.
 
* {{cmd|definehead}} and {{cmd|setuphead}}: The generic name for a section of a document in ''head'', so these commands allow you to define and customize your own sections. The main built-in sections are: part, chapter, section, subsection, subsubsection, and their numberless counterparts. See the [[Titles]] page for further details.
 
* {{cmd|setupheader}}/{{cmd|setupfooter}}: These can be used to customize the headers and footers of a document, including whether or not anything should be displayed in them.
 
* {{cmd|setupheadertexts}}/{{cmd|setupfootertexts}}: If the headers and footers are set to display text, these commands allow you to customize what those texts are.
 
* {{cmd|definemakeup}}, {{cmd|setupmakeup}}, and {{cmd|startmakeup}}: A ''makeup'' is a page with a different formatting than the rest of the pages in the document (such as a title page or colophon). Use these commands to make and customize the formatting of such a page.
 
* {{cmd|definesectionblock}} and {{cmd|setupsectionblock}}: A ''section block'' is a section of the document with its own page numbering format (such as the built-in section blocks {{code|frontpart}}, {{code|bodypart}}, {{code|backpart}}, and {{code|appendix}}). You can use these commands to define and customize section blocks.
 
* {{cmd|definestartstop}} and {{cmd|setupstartstop}}: Use these commands to define and customize your own ''start-stop'' regions.
 
* {{cmd|setupblock}} and {{cmd|setupblock}}: Use these commands to define and customize your own formats for blocks of text. These are somewhat similar to ''start-stop'' regions, but there is one major difference: there commands such as {{cmd|hideblocks}} to turn off the display of blocks. For other such commands, see the documentation for {{cmd|setupblock}}.
 
* {{cmd|definelist}} and {{cmd|setuplist}}: Use these to define and customize your own types of lists.
 
* {{cmd|definelistalternative}} and {{cmd|setuplistalternative}}: These commands allow you to define and customize options for the {{code|alternative}} key in {{cmd|setuplist}}.
 
* {{cmd|definedescription}} and {{cmd|setupdescription}}: With these commands, you can define and customize your own ''descriptions''. For more details about descriptions, see the [[Description]] page.
 
* {{cmd|definecombinedlist}} and {{cmd|setupcombinedlist}}: Use these to define and custsomize combined lists. A ''combined list'' is a generalization of the table of contents. See the [[Table of contents]] page for further details.
 
* {{cmd|definepagebreak}}: This allows you to define a configuration for page breaks, as used in many different commands (including {{cmd|pagebreak}} and {{cmd|page}}.)
 
 
 
== Text formatting and decoration ==
 
These commands relate to how text is displayed, without repositioning the text (much).
 
 
 
* {{cmd|definehighlight}} and {{cmd|setuphighlight}}: These allow you to define and configure different ways of highlighting text.
 
* {{cmd|defineframed}}, {{cmd|setupframed}}: Use these to define and configure ways to place frames around single paragraphs of text. Note that this doesn’t break across pages.
 
* {{cmd|defineframedtext}} and {{cmd|setupframedtext}}: Use these to define and configure ways to place frames around multiple paragraphs of text. Note that this doesn’t break across pages.
 
* {{cmd|definetextbackground}} and {{cmd|steuptextbackground}}: Use these to define and configure ways to place frames around multiple paragraphs of text, in a way that will break across pages.
 
* {{cmd|definemathframed}} and {{cmd|setupmathframed}}: Use these to define and configure ways to place frames around symbols within mathematics.
 
* {{cmd|defineblank}} and {{cmd|setupblank}}: These allow you to configure empty vertical space to insert in your document with {{cmd|blank}}.
 
* {{cmd|definehspace}}: This allows you to configure empty horizontal space to insert in your document with {{cmd|hspace}}.
 
* {{cmd|setupwhitespace}}: Use this to set the default amount of vertical space between paragraphs.
 
* {{cmd|setupinterlinespace}}: Use this to set the default amount of vertical space between lines within paragraphs.
 
* {{cmd|definelines}} and {{cmd|setuplines}}: These allow you to define regions in which a new line in code really does mean a new line in the compiled output. As described in the [[Verse]] page, this is particularly suitable for typesetting poetry.
 
* {{cmd|definetyping}} and {{cmd|setuptyping}}: A ''typing'' region is a region in which you are typesetting verbatim text, such as computer code. These commands allow you to define and configure such regions.
 
* {{cmd|definetype}} and {{cmd|setuptype}}: ''type'' is inline text that you are typesetting verbatim, such as computer code. These commands allow you to define and configure such regions.
 
 
 
== Layout and Design ==
 
These commands relate to how text is laid out on the page, and possibly involve moving or positioning the text.
 
 
 
* {{cmd|definepapersize}} and {{cmd|setuppapersize}}
 
* {{cmd|definelayout}} and {{cmd|setuplayout}}
 
* {{cmd|setuppagenumbering}}
 
* {{cmd|definelayer}} and {{cmd|setuplayer}}
 
* {{cmd|definecolor}} and {{cmd|setupcolors}}
 
* {{cmd|definecolorgroup}}
 
* {{cmd|definepalet}} and {{cmd|setuppalet}}
 
* {{cmd|defineoverlay}}
 
* {{cmd|definecombination}} and {{cmd|setupcombination}}
 
 
 
 
 
== Utilities ==
 
These commands have various functions that don’t relate directly to text formatting and design.
 
 
 
* {{cmd|defineconversion}} and {{cmd|convertnumber}}
 
* {{cmd|setupscale}} and {{cmd|scale}}
 
* {{cmd|definemode}}
 

Latest revision as of 22:44, 21 October 2020