Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Metafont
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Syntax=== Metafont has numeric and string constant tokens with mainstream syntaxes; strings are delimited by <code>"</code> quotes, numeric constants can have decimals but not an [[scientific notation|exponent part]]. All other tokens are classified as ''symbolic'', and can be redefined arbitrarily; there is no restriction that tokens with certain meanings must have names consisting of certain characters. At runtime, there can additionally be ''capsule'' tokens, which are effectively constant value tokens of arbitrary type; in the source code those appear as symbolic tokens. Except where characters are involved in numeric or string constants, the extent of the token containing a particular character depends on to which class the character belongs; unlike [[TeX]], Metafont has fixed character classes. The characters <code>,</code>, <code>;</code>, <code>(</code>, and <code>)</code> are "loners" and only form single character tokens. For the character classes <code><=>:|</code>, <code>ββ</code> (single quotes), <code>+-</code>, <code>/*\</code>, <code>!?</code>, <code>#&@$</code>, <code>^~</code>, <code>[</code>, <code>]</code>, <code>{}</code>, and <code>.</code>, as well as the class of underscore together with upper and lower case AβZ, the token consists of the longest consecutive sequence of characters from the same class. Whitespace characters don't contribute tokens. <code>%</code> starts a comment lasting until end of line. A notable application of these rules is that <code>#</code> is frequently appearing as part of variable names in Metafont code, e.g. <code>em#</code> and <code>pt#</code>. Delimiters (such as parentheses) do not have built-in meanings, instead there is a command that turns two symbolic tokens into a pair of matching delimiters, but normally Metafont programs use only the ordinary parentheses. Besides to override priorities in expressions, delimiters are also required around certain kinds of macro arguments.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Metafont
(section)
Add topic