Difference between revisions of "System Macros"

From Wiki
Jump to navigation Jump to search
(cleaned up the introduction a bit)
Line 1: Line 1:
This is an evolving copy of the original article [http://tex.aanhet.net/context/syst-gen-doc.pdf ConTeXt System Macros, part 1: general macros] by [[User:Taco|Taco]].
+
== Introduction ==
 
 
=== Abstract ===
 
  
 
All large macro packages for TeX have the need for a number of low-level macros to easy the programming effort. This is definately true for the ConTeXt package, where the extensive use of key--value pairs and the multilingual interface introduce extra complications to the already tricky art of TeX programming.
 
All large macro packages for TeX have the need for a number of low-level macros to easy the programming effort. This is definately true for the ConTeXt package, where the extensive use of key--value pairs and the multilingual interface introduce extra complications to the already tricky art of TeX programming.
  
Some of these internal macros are real gems, and nearly all of them can also be used in your own source documents. Although most of ConTeXt is described in the source code, sometimes the explanations are too technical for a casual user, and some of the documentation, especially the examples, is still in dutch.
+
Some of these internal macros are real gems, and nearly all of them can also be used in your own source documents. Although most of ConTeXt is described in the source code, sometimes the explanations are too technical for a casual user, and some of the documentation, especially the examples, is still in dutch.
  
This series of articles will try to highlight the most usable commands of the internal macro layer, using english examples, and removing most of the technical stuff (like the definitions of the macros themselves, and the optimization history).
+
The 'System Macrs' documentation attempts to explain the most usable commands of the internal macro layer, using english examples to clarify usage.
  
 
Disclaimer: Quite a lot of the explanation text is copied from source code documentation by Hans Hagen. Always assume that the errors are mine and the good jokes are his.
 
Disclaimer: Quite a lot of the explanation text is copied from source code documentation by Hans Hagen. Always assume that the errors are mine and the good jokes are his.
  
__TOC__
+
The current text will mostly deal with the file [[source:syst-gen.tex| syst-gen.tex]].  
 
+
Most of those macros are very basic, and many of them are related to programming constructs like flow control (<code>\if</code> statements), data structures (comma separated lists), and definitions.
== Introduction ==
 
 
 
This article will mostly deal with the file [[source:syst-gen.tex| syst-gen.tex]]. All except the first couple of macros appear in this file, which is input immediately after the inclusion of a stripped down version of the plain TeX format. Most of the following macros are very basic, most of them are related to programming constructs like flow control (<code>\if</code> statements), data structures (comma separated lists), and definitions.
 
  
[[System Macros/Fundamentals]]
+
== Contents ==
  
[[System_Macros/Mnemonics_and_Aliases]]
+
[[System Macros/Fundamentals|Fundamentals]]
  
[[System_Macros/Scratch_Variables]]
+
[[System_Macros/Mnemonics_and_Aliases|Mnemonics & Aliases]]
  
[[System_Macros/Expansion_Control]]
+
[[System_Macros/Scratch_Variables|Scratch Variables]]
  
[[System_Macros/Handling_Arguments]]
+
[[System_Macros/Expansion_Control|Expansion Control]]
  
[[System_Macros/Definitions_and_Assignments]]
+
[[System_Macros/Handling_Arguments|Handling Arguments]]
  
[[System_Macros/Branches_and_Decisions]]
+
[[System_Macros/Definitions_and_Assignments|Definitions & Assignments]]
  
[[System_Macros/Action_Processing]]
+
[[System_Macros/Branches_and_Decisions|Branches & Decisions]]
  
[[System_Macros/Comma_Separated_Lists]]
+
[[System_Macros/Action_Processing|Action Processing]]
  
[[System_Macros/Key_Value_Assignments]]
+
[[System_Macros/Comma_Separated_Lists|Comma Separated Lists]]
  
[[System_Macros/User_Interaction]]
+
[[System_Macros/Key_Value_Assignments|Key-Value Assignments]]
  
 +
[[System_Macros/User_Interaction|User Interaction]]
  
 
[[Category:ConTeXt programming]]
 
[[Category:ConTeXt programming]]
 
[[Category:Inside ConTeXt]]
 
[[Category:Inside ConTeXt]]

Revision as of 09:37, 1 August 2006

Introduction

All large macro packages for TeX have the need for a number of low-level macros to easy the programming effort. This is definately true for the ConTeXt package, where the extensive use of key--value pairs and the multilingual interface introduce extra complications to the already tricky art of TeX programming.

Some of these internal macros are real gems, and nearly all of them can also be used in your own source documents. Although most of ConTeXt is described in the source code, sometimes the explanations are too technical for a casual user, and some of the documentation, especially the examples, is still in dutch.

The 'System Macrs' documentation attempts to explain the most usable commands of the internal macro layer, using english examples to clarify usage.

Disclaimer: Quite a lot of the explanation text is copied from source code documentation by Hans Hagen. Always assume that the errors are mine and the good jokes are his.

The current text will mostly deal with the file syst-gen.tex. Most of those macros are very basic, and many of them are related to programming constructs like flow control (\if statements), data structures (comma separated lists), and definitions.

Contents

Fundamentals

Mnemonics & Aliases

Scratch Variables

Expansion Control

Handling Arguments

Definitions & Assignments

Branches & Decisions

Action Processing

Comma Separated Lists

Key-Value Assignments

User Interaction