Log in


Forgot your password?
New user?
 
     
 
 
 
You are here: Home Help Using Structured Text
Document Actions

Using Structured Text

Structured Text is a simple markup language which allows you to develop your pages exactly like the best Web pages.

A guide to structured text (STX)

Documents and comments on this site can be created using structured text (or STX), a simple mark up language that will be rendered as HTML. Structured text is also used in wikis.

Basic text formatting

  • Italicized text

    Enter this :

         *italics*
      

    to get this:

    italics

  • Underlined text

    Enter this :

         _underline_
      

    to get this:

    underline

  • Boldfaced text

    Enter this :

         **boldface**
      

    to get this:

    boldface

Headers and paragraphs

  • Text headers

    Enter this:

        My header
    
          If you enter a single line paragraph (e.g. like
          the one above and then indent the first line of
          the next paragraph, the text in the one-line 
          paragraph will be transformed into a header.
    
          Note that the second paragraph in the section
          also has its first line indented.
    
          Be sure to leave a blank line between paragraphs.
          This paragraph's first line is indented, too.
      

To get this:

My header

If you enter a single line paragraph (e.g. like the one above and then indent the first line of the next paragraph, the text in the one-line paragraph will be transformed into a header.

Note that the second paragraph in the section also has its first line indented.

Be sure to leave a blank line between paragraphs. This paragraph's first line is indented, too.

  • Inlined preformatted text

    Enter this:

           Some ordinary text here.  Some 'preformatted
           text here'.
           More ordinary text.
      

    to get this:

    Some ordinary text here. Some preformatted text here. More ordinary text.

Lists

  • Bulleted lists

    Enter this:

          * First item
    
          * Second item.  Note that there is a blank line 
          between each list item.
    
             * Make lists within lists by using extra
             indentation 
    
             * Second indented item.
    
          * Third item in the main list.
      

    to get this:

    • First item
    • Second item. Note that there is a blank line between each list item.
      • Make lists within lists by using extra indentation
      • Second indented item.
    • Third item in the main list.
  • Numbered lists

    Enter this:

            1 First item
    
            2 Second item.  Again, note that there is a
            blank line between each list item.
    
            3 Third item in the main list.
      

    to get this:

    1. First item
    2. Second item. Again, note that there is a blank line between each list item.
    3. Third item in the main list.

    Note that numbered lists cannot be embedded in bulleted lists.

    • Definition lists

      Enter this:

              First item -- More information about the first
              item.
      
              Second item -- More information about the second 
              item.
      
              Third item -- More information about the third 
              item.
          

      to get this:

      First item
      More information about the first item.
      Second item
      More information about the second item.
      Third item
      More information about the third item.

See also Blocking STX Formatting, below.

Links

  • Links

    Enter this:

           "A link to the TAFE VC":http://www.tafevc.com.au
      

    to get this:

    A link to TAFE VC

    Enter this:

           http://www.tafevc.com.au
      

    to get this:

    http://www.tafevc.com.au

  • Email addresses

    Enter this:

           "address@example.com.au":mailto:address@example.com.au
      

    to get this:

    address@example.com.au

  • References

    Enter this:

           I am going to refer to a footnote here [1].
    
           Later in the text I will have a footnotes
           section.
    
           .. [1] My footnote.
      

    to get this:

    I am going to refer to a footnote here [1].

    Later in the text I will have a footnotes section.

[1] My footnote.

Note that the footnote must be placed all the way flush left.

See also Blocking STX Formatting and Misc, below.

Images

  • Images

    Enter this:

          "small flower":img:flower.jpg
      

    to get this: 

     

    You can use an arbitrary URL for the image, e.g.:

         "Water Lillies":img:/Waterlilies.jpg
      

    to get this:

    Note image names should be one word, with no spaces, and that using "_" or "-" in the name will break the mark up. For example, using "image_name" will not work because the "_" is reserved for underlining.

Tables

  • Tables

    Enter this:

           |------------------------------------|
           | Fruit     | Nut        | Mammal    |
           |====================================|
           | Apple     | Peanut     | Squirrel  |
           |------------------------------------|
           | Orange    | Macadamia  | Woodchuck |
           |------------------------------------|
           | Banana    | Walnut     | Dolphin   |
           |------------------------------------|
           | This spans 2 columns!  | Cat       |
           |------------------------------------|
           | Pear      | This spans 2 columns!  |
           |------------------------------------|
           | This spans 3 columns!              |
           |------------------------------------|
      

    to get this:

    Fruit

    Nut

    Mammal

    Apple

    Peanut

    Kangaroo

    Orange

    Macadamia

    Emu

    Banana

    Walnut

    Dolphin

    This spans 2 columns!

    Cat

    Pear

    This spans 2 columns!

    This spans 3 columns!

    Note that, in e-Portfolio Documents and News Items, tables made with the above STX mark up will look nicer than they do here on a wiki page, thanks to the magic of Custom Style Sheets (CSS).

Blocking STX Formatting

To prevent text being processed as structured text:

  • Use single quotes (not always effective, especially for long passages)
  • In a wiki, to prevent a word with mixed upper and lowercase being rendered as a WikiName, place an exclamation point directly in front of it
  • For code snippets:
      Lead into a freestanding block of text with a double
      colon *and*, after a line space, 
      start the code block with a space or indent::
    
       This is *italics* in STX.
      

Here in e-Portfolio, this puts the code inside a blue box, and changes the font face. The above passage looks like this:

Lead into a freestanding block of text with a double colon and, after a line space, start the code block with a space or indent:

  This is *italics* in STX.

Each new line of code must be preceeded by a white space. Close the code block by starting a new paragraph flush left.

Misc

  • Double hyphens (dashes)

    Because a double hypen, with a space on either side, is used to make definition lists, be careful when making a dash! If you want to use the double hypen for a dash, you must place it--like this--directly next to the surrounding words, without any spaces. But, that makes for awkward line breaks in HTML pages.

    Because of this, many people use a single hyphen, which is OK. Or, use — — the HTML code for an m-dash (preferred).

  • Creating clean text blocks

    When working in STX, you can let the text autowrap. But STX is very fussy about indenting, since much of the formatting is based on indenting. It's not called structured text for nothing! =}

    Creating clean text blocks with hard returns, and indenting on the right and left, helps clarify the hierarchical structure of the page. It makes it easier to see where you are within the page hierarchy when writing and editing.

    Use an external text editor designed for writing code, such as BBEdit (Mac), to assist. They support hierarchical indenting, prefixing/suffixing lines with text or white space, and hard wrapping to specified widths. (A character width of about 55 works well.) Then copy/paste back into the STX editing window.

  • On-page TOC

    A TOC is a "table of contents" or, informally on a web page,a linked list of section headings.

    The footnotes mark up can be used for making on-page TOC, as long as you don't mind your section headings being inside brackets. Because the linked-to reference (anchor name or id) must be placed flush left, this can only be used for linking to top level section headings.

  • Relative URLs in e-Portfolio

    To link to a page within the Electronic Culture site, you can use relative URLs only in the following way:

    • For links to items inside the same folder (same level or below in the site hierarchy): start with item name, or the path down from current folder:
           "View the Structured Text used to create this
            page":UsingStructuredTextSource
      
    • For name anchors (links within the same page), you must include the current page name in link to the name anchor.
    • Otherwise, you must use the full path name starting from the site root: /ECulture/ down to the item.


View the Structured Text used to create this page

©© 2003 laura trippi and/or the author(s), Simon Fraser University B.C USA

     
 
« May 2012 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31