Sage
Welcome to Sage
Volume (16%) Hide Volume
Topics
Escaping Special Characters
Sage uses the pipe character to escape special characters. For example, an open square bracket would normally begin a Sage tag, but not if preceded by a pipe:

a|[i] = |~x

The above example produces:


a[i] = ~x


Without the pipes, the open square bracket would begin a tag, and the tilde would begin underlining.

If you need a pipe, you will need to double them up, but only if the character following the pipe is one of these: * / ~ ` [.

Pipes in Font Formatting Tags

In a [b][end] block, it is not necessary to double up a pipe if an asterisk follows the pipe. This is because Sage is already in a bold block, so asterisk characters are not treated specially here.

For similar reasons, the / character is not special in an [i][end] block, the ~ character is not special in a [u][end] block, and the ` character is not special in an [m][end] block. For more information, see Font Formatting Tags.

Escaping Several Characters at Once

Occasionally, you may find the need to escape several special characters at the same time. In such cases, you may consider using the [plain][end] tag. All text within this tag is treated as plain text – no Sage markup (other than the [end] tag itself) is meaningful.

For example, instead of this…

The default password is: [tt]|*x:|~y-|`z+|[|/a[end]

You can simplify things like this…

The default password is: [tt][plain]*x:~y-`z+[/a[end][end]

Both of the above produce this…


The default password is:
*x:~y-`z+[/a


Special Handling of "[end]"

If you need the string [end] to appear in the plain text, modify the [plain] tag to specify a different terminating tag. For example…

The default password is: [tt][plain end=stop]*x:~y-`z+[/a[end]bc[stop][end]

The above produces…


The default password is:
*x:~y-`z+[/a[end]bc


Last Modified: 3/19 3:58:13 pm
In this article (top)  View article's Sage markup
3/19 3:58:13 pm