19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

is, the identifier ends with a trailing underscore), then the principal portion to be rendered in an italic (or bold italic)<br />

version of the selected face. <strong>The</strong> bold and italic modifiers may be used only in combination with certain faces; the<br />

following are the allowed combinations:<br />

script<br />

bold script<br />

fraktur<br />

bold fraktur<br />

double-struck<br />

sans-serif<br />

bold sans-serif<br />

italic sans-serif<br />

bold italic sans-serif<br />

monospace<br />

If a combination can be properly rendered, then the principal portion is rendered but not any preceding portions or<br />

underscores. If a combination cannot be properly rendered, then the principal portion and all portions and underscores<br />

preceding it are rendered all in italics if possible, and otherwise all in some other default face.<br />

If the principal portion consists of a sequence of letters followed by a sequence of digits, then the letters are rendered<br />

in the chosen face and the digits are rendered as roman subscripts. Otherwise the entire principal portion is rendered<br />

in the chosen face. <strong>The</strong> remaining portions (excepting the last, if it is empty) are then processed according to the<br />

following rules:<br />

• If a portion is bar, then a bar is rendered above what has already been rendered, excluding superscripts and<br />

subscripts. For example, x_bar is rendered as ¯x , x17_bar is rendered as ¯x 17 , x_bar_bar is rendered<br />

as ¯x , and foo_bar is rendered as foo . (Contrast this last with foo_baz , which is rendered as foo baz .)<br />

• If a portion is vec, then a right-pointing arrow is rendered above what has already been rendered, excluding<br />

superscripts and subscripts. For example, v_vec is rendered as ⃗v , v17_vec is rendered as ⃗v 17 , and<br />

zoom_vec is rendered as −−−→ zoom .<br />

• If a portion is hat, then a hat is rendered above what has already been rendered, excluding superscripts and<br />

subscripts. For example, x17_hat is rendered as ˆx 17 .<br />

• If a portion is dot, then a dot is rendered above what has already been rendered, excluding superscripts and<br />

subscripts; but if the preceding portion was also dot, then the new dot is rendered appropriately relative to the<br />

previous dot(s). Up to four dots will be rendered side-by-side rather than vertically. For example, a_dot is rendered<br />

as ȧ , a_dot_dot is rendered as ä , a_dot_dot_dot is rendered as ... a , a_dot_dot_dot_dot<br />

is rendered as .... a . Also, a_vec_dot is rendered as ˙⃗v .<br />

• If a portion is star, then an asterisk * is rendered as a superscript. For example, a_star is rendered as a ∗ ,<br />

a_star_star is rendered asa ∗∗ , ZZ_star is rendered as Z ∗ .<br />

• If a portion is splat, then a number sign # is rendered as a superscript. For example, QQ_splat is rendered<br />

as Q # .<br />

• If a portion is prime, then a prime mark is rendered as a superscript.<br />

• A prime character is treated the same as prime, and a double prime character is treated the same as two consecutive<br />

prime portions. An apostrophe is treated the same as a prime character, but only if all characters following<br />

it in the identifier, if any, are also apostrophes. For example, a’ is rendered as a ′ , a13’ is rendered as a ′ 13 ,<br />

and a’’ is rendered as a ′′ , but don’t is rendered as don’t .<br />

• If a portion is super and another portion follows, then that other portion is rendered as a superscript in roman<br />

type, and enclosed in parentheses if it is all digits.<br />

344

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!