Author
Brian Jørgensen is a 9th semester, Software Engineering student at Aalborg University. He works as a freelance developer and on Fundanemt.
Website
E-mail
Text Formatting
by Brian Jørgensen, July 2005
The Fundanemt text editor is build around the philosophy that good writing flow is crucial for the writer to be able to concentrate on the content and not on the layout of the text. The writer can use some simple text formatting codes and thus do simple text formatting. This article will introduce the different codes.
Bold, Italic, Underlined and Striked Text
Bold text
Syntax:
| +b | Start bold text |
| -b | End bold text |
A single word can be made bold using the shorthand *word*.
Example:
This is an +bexample text-b with some *bold* words.
Output:
This is an example text with some bold words.
Italic text
Syntax:
| +i | Start italic text |
| -i | End italic text |
A single word can be made italic using the shorthand /word/.
Example:
This is an +iexample text-i with some /italic/ words.
Output:
This is an example text with some italic words.
Underlined text
Syntax:
| +u | Start underlined text |
| -u | End underlined text |
A single word can be made underlined using the shorthand _underlined_.
Example:
This is an +uexample text-u with some _underlined_ words.
Output:
This is an example text with some underlined words.
Note that the shorthand version can be used to make URLs into clickable hyperlinks. See the link syntax for a description of how to use this.
Striked text
Syntax:
| +s | Start striked text |
| -s | End striked text |
Example:
This is an +sexample text-s with +ssome striked-s words.
Output:
This is an example text with some striked words.
Placement of Text
Centered text
Syntax:
| +e | Start centered text |
| -e | End centered text |
Example:
Normal text
+eSome centered text-e
More normal text
Output:
Normal text
Some centered text
More normal text
Right aligned text
Syntax:
| +r | Start right aligned text |
| -r | End right aligned text |
Example:
Normal text
+rSome right aligned text-r
More normal text
Output:
Normal text
Some right aligned text
More normal text
Superscript
Superscript can only be used for numbers.
Syntax:
| ^ | Superscript a number between 0 and 9. |
Example:
a^2 + b^2 = c^2
Output:
a2 + b2 = c2
Subscript
Subscript can only be used for numbers.
Syntax:
| _ | Subscript a number between 0 and 9. |
| -r | End right aligned text |
Example:
A_1 + A_2 = A_3
Output:
A1 + A2 = A3
Quote
Syntax:
| +q | Start quote |
| -q | End quote |
Example:
I have just read a really good article about Fundanemt, the author mentions
+qFundanemt is a really cool CMS-q
I agree :-)
Output:
I have just read a really good article about Fundanemt, the author mentions
Fundanemt is a really cool CMS
I agree :-)
Lists - Numbered and Bulletins
Bulletin lists
Syntax:
* Create a list item
Example:
* Main list item 1
** Sub list item 1,1
** Sub list item 1,2
** Sub list item 1,3
* Main list item 2
* Main list item 3
Output:
- Main list item 1
- Sub list item 1,1
- Sub list item 1,2
- Sub list item 1,3
- Main list item 2
- Main list item 3
Numbered lists
Syntax:
| # | Create a list item |
| #[number] | Create a list item, starting from number. |
| #{type} | Create a list item of a special type. |
Supported list item types:
- a - lower case alpha
- A - upper case alpha
- i - lower case roman
- I - upper case roman
- disc
- square
- circle
- image=url_to_image
Example:
# Main list item 1
##{I} Sub list item 1,1
##{I} Sub list item 1,2
# Main list item 2
Some text
# Main list item 3
Output:
- Main list item 1
- Sub list item 1,1
- Sub list item 1,2
- Main list item 2
Some text
- Main list item 3
Links
Links can be inserted in different ways on a page, depending on your needs. If you need the link to open new window, frame or if the link should be an image, you have to use the link element.
Linking to external and internal pages, files and images located in fundanemt/files/ and fundanemt/site_graphics/ can be inserted directly in text elements.
Syntax:
{link title|link destination}
Link destination types:
The link destination can be of sevaral types.
- number - Link to internal page, number is the ID of the page.
- number#id - Link to element on internal page.
- img:// - URL is relative to fundanemt/site_graphics/
- file:// - URL is relative to fundanemt/files/
- External URL - anything that does not match one of the above will be linked to the written link destination directly.
Example:
{Internal page|12}
{Link to element on internal page|12#146}
{Image of me|img://articles/enduser/textformatting/listitem.gif}
{News RSS feed|file://rss-feeds/news.rss}
{E-mail address|mailto:mail@example.com}
{External page|http://qte.dk/}
Output:
Internal page
Link to element on internal page
Image of me
Latest article
E-mail address
External page
Comments - Hidden Text
Text comments can be placed inside a text element - maybe some text that are not ready for the public, comments on why some text have been written or internal literature references.
Syntax:
/* Start comment
*/ End comment
Example:
Normal text
/* A comment */
More normal text
/* Multi-line
comment */
Output:
Normal text
More normal text
Colored Text
Syntax:
| +<colorcode> | Start text coloring |
| -<colorcode> | End text coloring |
| +h<hexcode> | Start text coloring |
| -h | End text coloring |
Color codes:
red
green
blue
yellow
lightred
lightgreen
lightblue
lightyellow
darkred
darkgreen
darkblue
darkyellow
If you need to use a specific color, you can specify it as hex decimal.
Example:
This is an +redexample-red +bluetext-blue with some +h#c0c0c0colored-h words.
Output:
This is an example text with some colored words.
Special Characters
If a character is not available directly, it can be inserted using the following syntax.
Syntax:
&#code; Insert special character
Example:
The water temperature is 21°C.
Output:
The water temperature is 21°C.