Font Formatting Tags
In addition to the Font Formatting Blocks,
Sage also offers several Font Formatting Tags.
Use [b]…[end]
for bold text:
The most [b]important[end] consideration is this...
The above produces this…
The most important consideration is this...
The most important consideration is this...
Use [i]…[end]
for italic text:
The most [i]important[end] consideration is this...
The above produces this…
The most important consideration is this...
The most important consideration is this...
Use [u]…[end]
for underlined text:
The most [u]important[end] consideration is this...
The above produces this…
The most important consideration is this...
The most important consideration is this...
Use [s]…[end]
for strikeout text:
The most [s]important[end] trivial consideration is this...
The above produces this…
The mostimportant trivial consideration is this...
The most
Use [m]…[end]
for monospace text (in a shaded background):
Use the [m]Writeln[end] function to produce output...
The above produces this…
Use the Writeln function to produce output...
Use the Writeln function to produce output...
Use [tt]…[end]
for monspace (without the shaded background):
The most [tt]important[end] consideration is this...
The above produces this…
The most
The most
important
consideration is this...
Use [kw]…[end]
to format as a keyword:
You should consider using a [kw]while[end] loop...
The above produces this…
You should consider using a while loop...
You should consider using a while loop...
Use [kbd]…[end]
for computer keycaps:
[kbd][⇧] Shift[end]+[kbd]F7[end]
and [kbd][⌥] Alt[end]+[kbd]X[end]
and [kbd]^ Ctrl[end]+[kbd]Q[end]
[kbd][&crarr] Enter[end]
and [kbd]Tab [↹][end]
and [kbd][⌫] Backspace[end]
and [kbd][⇪] Caps Lock[end]
The above produces this…
⇧ Shift+F7 and ⌥ Alt+X and ^ Ctrl+Q ↵ Enter and Tab ↹ and ⌫ Backspace and ⇪ Caps Lock
Use [kbd/ ...] for common keycaps with associated
symbols:
Sage's Help Insight, ^ Ctrl+Space,
offers suggestions from the above table.
You can also use [kbd/ ...] for longer key sequences.
For example, instead of…
[kbd/ Shift] + [kbd/ Ctrl] + [kbd]F11[end]
You can do this…
[kbd/ Shift + Ctrl + F11]
Both of the above examples produce the same HTML…
⇧ Shift + ^ Ctrl + F11
The following characters serve as punctuation:
Press ⌥ Alt+, or ⇧ Shift+Q, X.
Along similar lines, you need to quote
square brackets, single-quotes, and double-quotes.
Unlike other tags, [kbd/] honors all spaces.
For example, in a [pre] block,
these two are visibly different:
[kbd/ Shift + F11]
[kbd/ Shift + F11]
Leading and trailing whitespace is ignored, however.
⇧ Shift+F7 and ⌥ Alt+X and ^ Ctrl+Q ↵ Enter and Tab ↹ and ⌫ Backspace and ⇪ Caps Lock
Name | Produces | Short For |
---|---|---|
[kbd/ Alt] | ⌥ Alt | [kbd][⌥] Alt[end] |
[kbd/ Backspace] | ⌫ Backspace | [kbd][⌫] Backspace[end] |
[kbd/ CapsLock] | ⇪ Caps Lock | [kbd][⇪] Caps Lock[end] |
[kbd/ Cntrl] | ^ Cntrl | [kbd]^ Cntrl[end] |
[kbd/ Command] | ⌘ Command | [kbd][⌘] Command[end] |
[kbd/ Control] | ^ Control | [kbd]^ Control[end] |
[kbd/ Ctrl] | ^ Ctrl | [kbd]^ Ctrl[end] |
[kbd/ Del] | ⌦ Del | [kbd][⌦] Del[end] |
[kbd/ Delete] | ⌦ Delete | [kbd][⌦] Delete[end] |
[kbd/ Down] | ↓ | [kbd][&darr][end] |
[kbd/ Enter] | ↵ Enter | [kbd][&crarr] Enter[end] |
[kbd/ Left] | ← | [kbd][&larr][end] |
[kbd/ Return] | ↵ Return | [kbd][&crarr] Return[end] |
[kbd/ Right] | → | [kbd][&rarr][end] |
[kbd/ Shift] | ⇧ Shift | [kbd][⇧] Shift[end] |
[kbd/ Tab] | Tab ↹ | [kbd][↹] Tab[end] |
[kbd/ Up] | ↑ | [kbd][&uarr][end] |
[kbd/ Windows] | ⊞ Windows | [kbd][⊞] Windows[end] |
⇧ Shift + ^ Ctrl + F11
- +
- ,
- _ (denotes a non-breaking space)
- whitespace
Press ⌥ Alt+, or ⇧ Shift+Q, X.
Use [hl]…[end]
to highlight text:
The most [hl]important[end] consideration is this...
The above produces this…
The most important consideration is this...
The most important consideration is this...
Use [abbr]…[end]
to make a tool-tip explaining the meaning of a word or phrase:
[abbr "This is an example"]Example[end]
(hover the mouse over the word)
The above produces this…
Example (hover the mouse over the word)
If you find it awkward to place the fly-over hint first,
followed by the actual visible text,
use this alternative notation…
[abbr]Example[note]This is another example[end]
(hover the mouse over the word)
The above produces this…
Example (hover the mouse over the word)
Although the text after [note]
cannot contain formatting (bold, italics, links, etc),
it may contain character entities,
for example…
To prove that a number is
[abbr]transcendental[note]not the root of a non-zero [\]
polynomial of finite degree with rational coefficients, [\]
such as [&pi] and e[end], [...]
The above produces this…
To prove that a number is transcendental, …
Above, we're using [&pi] in the fly-over hint,
which isn't possible using the earlier syntax.
Also, note the use of [\] tags –
without these, we would have the following…
To prove that a number is transcendental, …
This oddness stems from the fact that, in HTML,
the fly-over hint for an abbr tag is placed in an
HTML attribute, where line breaks are significant.
Example (hover the mouse over the word)
Example (hover the mouse over the word)
To prove that a number is transcendental, …
To prove that a number is transcendental, …
Use [^]…[end]
or [sup]…[end]
for superscript:
X[^]e[end]
The above produces…
Xe
Use [v]…[end]
or [sub]…[end]
for subscript:
X[v]e[end]
The above produces…
Xe
Xe
Xe
Use [+1]…[end],
[+2]…[end],
or [+3]…[end]
to increase font size:
0 [+1]+1[end] [+2]+2[end] [+3]+3[end]
The above produces…
0
Use [-1]…[end],
[-2]…[end],
or [-3]…[end]
to decrease font size:
0 [-1]-1[end] [-2]-2[end] [-3]-3[end]
The above produces…
0
Note that Font Size tags are additive:
a [+2] tag is equivalent to
a [+1] tag that is nested in
another [+1] tag.
Similarly,
a [-1] tag is equivalent to
a [+2] tag that is nested in
a [-3] tag.
0
+1
+2
+3
0
-1
-2
-3
There are two advantages to using these formatting tags,
compared to formatting blocks:
- You can start and/or end formatting in the middle of a word,
as in:
If not [i]im[end]moral, at least [i]a[end]moral.
The above example produces:
If not immoral, at least amoral. - Within a font formatting tag, the corresponding font
formatting character is ignored. For example:
The default password is: "[b]a* b* c*[end]"
The above example produces:
Without using the [m] tag, the above example would require several instances of the pipe character: The default password is: "*a|* b|* c|**"
The default password is: "a* b* c*"
In general (for the [b], [i], [u],
and [m] tags), you should use
Font Formatting Blocks instead,
except where one of the above two issues comes into play.
⏱ Last Modified: 10/24 9:45:52 am