Articles » End user » Text Formatting
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:
+bStart bold text
-bEnd 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:
+iStart italic text
-iEnd 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:
+uStart underlined text
-uEnd 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:
+sStart striked text
-sEnd 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:
+eStart centered text
-eEnd 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:
+rStart right aligned text
-rEnd 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.
-rEnd right aligned text
Example:
A_1 + A_2 = A_3
Output:
A1 + A2 = A3

Quote

Syntax:
+qStart quote
-qEnd 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:
  1. a - lower case alpha
  2. A - upper case alpha
  3. i - lower case roman
  4. I - upper case roman
  5. disc
  6. square
  7. circle
  8. 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:
  1. Main list item 1
    1. Sub list item 1,1
    2. Sub list item 1,2
  2. Main list item 2
Some text
  1. 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
-hEnd 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&#176;C.
Output:
The water temperature is 21°C.