Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Syntax justification elements


    1  New lines
       1.1  New lines result
       1.2  Examples
    2  br
       2.1  Example
    3  empty
       3.1  Example
    4  tab
       4.1  Example
    5  hr
       5.1  Example
    6  Justification
    7  Escaped characters
    8  Formatting text
       8.1  Font format
       8.2  Font family
       8.3  Font size
       8.4  Example
    9  See also

This article explains the XML tags which can be used to specify the articles justification.

New lines

In order for the next text to go into a new line, you can:
  • Add a br tag after the line
  • or add a blanck line

New lines result

The result will depend on the configuration file or command-line emptyLines property:
  • The "newline" value (the default): specifies that empty lines should be processed as new lines
  • The "break" value: specifies that empty lines should be processed as break

Examples

With the default value for the emptyLines property:
      First line.  

      Second line.
will result to:

First line.

Second line.

With the "break" value for the emptyLines property:
      First line.  

      Second line.
will result to:

First line.
Second line.

br

The "br" element allows to enter a line break.

Example

  first line of text
  <br/>
  second line of text
The result will be:
first line of text
second line of text

empty

The "empty" element allows to put an empty line before the next sentence.

Example

  first line of text
  <empty/>
  second line of text
The result will be:
first line of text

second line of text

Note that by default an empty line in the source will create an empty line in the wiki output. See new lines

tab

The "tab" element allows to enter a tab.

Example

  <tab/>the line of text
The result will be:
the line of text

hr

The "hr" element allows to enter a thematic break.

Example

  first line of text
  <hr/>
  second line of text
The result will be:
first line of text
second line of text

Justification

Main Article: Justification

By default the articles text is justified. However it is possible to configure if and were the justification is applied.

Escaped characters

Characters such as < and > can't be used in the XML file. It is possible to use HTML escaped characters for:
  • < escaped by &lt;
  • > escaped by &gt;
Furthermore, it is possible to escape characters by using the regular XML CDATA way for escaping characters or by using the "esc" element. See Escaping characters for more information.

Also, non UTF8 characters should be escaped by default (for example: &#A0;). However, it is possible to let the generator escape them for you. See Escaping non UTF8 characters for more information.

Formatting text

It is possible to set the color, the style (bold or italic), or the font size of text using one of the following tags:
  • "i": put the enclosed text in italic. Example: <i>text in italic</i>
  • "b": put the enclosed text in bold. Example: <b>text in bold</b>
  • "u": put the enclosed text in underlined text. Example: <u>text in underline</u>
  • "s": strikethrough the enclosed text. Example: <u>text in strikethrough</u>
  • "font": set the font size, color, and format of the enclosed text. The following attributes are:
    • "size": the text size, which can be a number value or an HTML font size name. See font size for more information
    • "color": the text color, using an HTML color name or RGB/RGBA specification
    • "background": the text background color, using an HTML color name or RGB/RGBA specification
    • "format": the text style, which can be "regular", "italic", "bold", "underline", "crossed" or "strikethrough", "sub" or "subscript" (for subscript), or "sup" or "superscript" (for superscript), or a combination of these tags. See also font format.
    • "face" or "family": the font family of the font
Text can be formatted in a lot of elements:

Font format

The "format" attribute specifies the the text style, which can be a combination of:
  • "regular"
  • "italic"
  • "bold"
  • "underline"
  • "crossed" or "strikethrough", or "linethrough" (for crossed text)
  • "sub" or "subscript" (for subscript)
  • "sup" or "superscript" (for superscript)
For example:
 This is a sentence with <font format="bold italic">a bold and italic text</font>
 This is a sentence with <font format="linethrough italic">a linethrough and italic text</font>
Result:
This is a sentence with a bold and italic text
This is a sentence with a linethrough and italic text

Font family

The "face" or "family" attribute specifies the font family of the font. Some of the font families allowed in html are:
  • Arial
  • Verdana
  • Helvetica
  • Tahoma
  • Trebuchet MS
  • Times New Roman
  • Georgia
  • Garamond
  • Courier New
  • Brush Script MT
Note that as specified in CSS, the attribute can hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font.

For example:
   <font family="Garamond, Arial" />my text</font>
Will use the "Garamond" family, and will fallback to "Arial" if the browser does not support the "Garamond" family.

Font size

The font size can be specified as a number or with one of the HTML font size names:
  • medium
  • xx-small
  • x-small
  • small
  • large
  • x-large
  • xx-large
  • smaller
  • larger

Example

  This is a sentence with <font color="red" format="bold">a bold text in red</font>
  This is another sentence with <font background="yellow">a text on yellow background</font>
  This is another sentence with <font color="blue" background="yellow">a blue text on yellow background</font>
  This is another sentence with <i>a text in italic</i>
  This is another sentence with <font format="bold italic">a bold and italic text</font>
Result:
This is a sentence with a bold text in red
This is another sentence with a text on yellow background
This is another sentence with a blue text on yellow background
This is another sentence with a text in italic
This is another sentence with a bold and italic text

See also


Categories: syntax

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.