Appendix: "{$" Code Strings


[Home][Index][Previous][Next]
Formatting code strings are embedded in text to supply formatting information. They start with the characters "{$" and end with the character "}". (Why? Because I thought that the characters "{$" would be unlikely to be used together in "normal" text.)

Code strings are not case sensitive - {$exp=2} works just as well as {$EXP=2}. A blank space works just as well as an "=" - {$EXP 2} displays exactly the same as the previous codes.

{$EXP=exponent}
Formats the "exponent" text as an exponent (superscript)
  • Optional tokens?
    • None
  • Can contain nested codes?
    • Yes.
{$FONT=name text}
Displays "text" in the font described by "name", where name is one of the following:
  • Courier
  • defaultFont
  • Dialog
  • Helvetica
  • Symbol
  • TimesRoman
  • Optional tokens?
    • None
  • Can contain nested codes?
    • Yes.
  • {
{$COLOR=value text}
Displays "text" in the color "value", where "value" is a named Java color.
  • Optional tokens?
    • None
  • Can contain nested codes?
    • Yes.
{$IMG="pathname"}
Places an image (.GIF or .JPEG) at the current location within the question file, where "pathname" specifies the path to the image file relative to the web page that contains the applet. The quotation marks are optional around "pathname".
  • Optional tokens?
    ALIGN=value
    aligns the image.
    HEIGHT=value
    forces the image to be displayed at the given height (in pixels).
    WIDTH=value
    forces the image to be displayed at the given width (in pixels).
  • Can contain nested codes?
    • No.
{$SIZE=value text}
Displays "text" in the size (in pixels) given by "value".
  • Optional tokens?
    • None
  • Can contain nested codes?
    • Yes.
{$STYLE=value text}
Displays "text" in the style given by "value", where value is one of the following:
  • BOLD - causes "text" to be displayed as bold text.
  • ITALIC - causes "text" to be displayed as italic text.
  • UNDER - causes "text" to be underlined.
  • PLAIN - causes "text" to be displayed as plain text (the default).
  • Optional tokens?
    • None
  • Can contain nested codes?
    • Yes.
{$SUB=subscript}
Formats the "subscript" text as a subscript.
  • Optional tokens?
    • None
  • Can contain nested codes?
    • Yes.
{$anything else}
Any other sequence of characters is considered to be a numerical format string. A format string of the form {$variable=expression} is considered to be a numerical assignment statement, while a format string of the form {$expression} or {$expression:value} are considered to be numerical substitution strings.

[Home][Index][Previous][Next]
copyright © 1998 by Jerry L. Stanbrough - all rights reserved.
last update July 31, 1998 by JL Stanbrough (jstanbro@venus.net)