cws
Greetings Guest
home > library > journal > view_article
« Back to Articles » Journal
CWS Markup
1▲ 1 ▼ 0
This public article was written by Admin Sheep, and last updated on 14 Feb 2016, 22:33.

[comments] [history] Menu
1. First line of buttons
2. Second line of buttons
3. This is a title
4. Third row of buttons
5. Tags not listed
6. Gloss tags

CWS uses it's own form of markup called CWS Markup (we will call this CWSM in this article). It is similar to, and functions mostly like HTML, but there are a few custom tags to keep in line with the CWS style. Below is a reference of tags, and what they do. This page will not cover every possible option with the CWSM, but will cover the basics of the purpose, and the syntax of each tag.
[top]First line of buttons

<b> (Bold)
The 'b' tag is used to bold text. For example:

This is a sentence with a <b>bold</b> word.
Will produce:
This is a sentence with a bold word.

<i> (Italic)
The 'i' tag is used to italic text. For example:
This is a sentence with a <i>italic</i> word.
Will produce:
This is a sentence with a italic word.

<u> (Underline)
The 'u' tag is used to underline text. For example:

This is a sentence with a <u>underline</u> word.
Will produce:
This is a sentence with a underline word.

<s> (Strikethrough)
The 's' tag is used to strikethrough text. For example:

This is a sentence with a <s>strikethrough</s> word.
Will produce:
This is a sentence with a strikethrough word.

<a> (URL/Link)
The 'a' tag is used to create a web link. For example:

This is a sentence with a <a=http://www.google.com>Link to google</a>.
Will produce:
This is a sentence with a Link to google.

<img> (Image)
The 'url' tag is used to add an image. For example:

<img>http://i.imgur.com/kAnRQf6.png</img>
Will produce:

<big> (Big)
The 'big' tag is used to enlarge text. For example:

This is a sentence with a <big>big</big> word.
Will produce:
This is a sentence with a big word.

<small> (Small)
The 'u' tag is used to reduce text size. For example:

This is a sentence with a <small>small</small> word.
Will produce:
This is a sentence with a small word.

[top]Second line of buttons

<title> (Title banner)
The 'title' tag is used to create the title divider. If you use these tags, a menu will be created at the top of your page (articles only) that will have clickable links to jump to each title. For example:
<title>This is a title</title>
Will produce:
[top]This is a title

<code> (Highlighted word)
The 'code' tag is used to highlight certain things. For example:

This is a sentence with a <code>code</code> word.
Will produce:
This is a sentence with a code word.

<quote> (Blockquote box)
The 'quote' tag is used to create an indented blockquote. For example:

<quote>This is a blockquote</quote>
Will produce:
This is a blockquote

<lang>
The 'lang' tag around the three-letter language code, will produce a link to that language, and the language's flag.

<lang>NXS</lang>
Will produce:  Nithalos

<syntax> This tag around labelled bracket notation for syntax will produce a syntax tree. Please use this page for testing the trees.
<syntax>[S [NP [P I]][VP [V love] [NP [P my][N conlang]]]]</syntax>

Will produce:


The answer tag has its own dedicated article here.

Gloss tags discussed in their own section below.

<table>, <tr>, <th>, <td> (Tables)
The table, tr, th, and td tags are used to create tables. The 'table' tag starts and finishes the table, the 'tr' tag defines a row in the table and the 'th' and 'td' tags are the cells within the rows. 'Th' is used for headings - so the background will be darker and the text bolded. 'Td' is for regaular cells. Using the following code:

<table> <tr> <th>Col 1</th> <th>Col 2</th> </tr> <tr> <td>Col 1, Row 2</td> <td>Col 2, Row 2</td> </tr> <tr> <td>Col 1, Row 3</td> <td>Col 2, Row 3</td> </tr> </table>


Will produce:
Col 1Col 2
Col 1, Row 2Col 2, Row 2
Col 1, Row 3Col 2, Row 3

<ul>, <ol>, <li> (Lists)
These tags are used to create lists. 'Ul' and 'ol' are the wrappers for the lists, and 'li' is each bullet point within the list. 'ul' is an unordered list (so just bullet points), and 'ol' is an ordered list (numbered from 1 to however many points). Using this code:

<ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul>

Will produce:

  • Item 1
  • Item 2
  • Item 3
And using this code:
<ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol>

Will produce:

  1. Item 1
  2. Item 2
  3. Item 3

<nocws> (Non-parsing wrappers)
The 'nocws' tag prevents anything between them from being parsed as code. This is a workaround to being able to use grapheme notation such as <b> without it making everything bold. For example, using:

<nocws>This is a sentence with <b> in it that is not bold.</nocws>
Will produce:
This is a sentence with <b> in it that is not bold.

[top]Third row of buttons

The third row of buttons all pertain to changing the colour of text. The first two elements, the '▼' button and the colour chooser, work together. Use the colour chooser to pick a colour, then the ▼ will insert it. There are also a number of preset colours for you to choose from. The colours use hexidecimal format, that is: RRGGBB (R = Red, G = Green, B = Blue).

<colour=> (Colour)
The 'colour' tag is used to change the colour of text. For example:

This is a sentence with a <colour=FF0000>red</colour> word.
Will produce:
This is a sentence with a red word.

Please note that the tag is colour, NOT color.

[top]Tags not listed

(line-break)
This tag will simply add a couple of line breaks where they may not otherwise be used. You won't really need to use this, but it's there if you do.

<nomenu> (menu supression)
If you put this tag anywhere in your page (articles only), it will suppress the use of the menu that is automatically generated from the <title> tags.

<wip> (menu supression)
If you put this tag anywhere in your page (articles only), will show a banner at the beginning of the article with a message stating that the article is currently a work in progress (WIP), and that the reader should check back later for any changes.

<hover> (hover text)
Use this tag to make text that can be hovered over to produce alt text:

<hover>something|something else</hover> to produce: somethingsomething else.

<hide> (hidden area)
Use this tag to make text that can be hidden and displayed with the click of the button:

<hide=text for the bar>something|something else</hide> to produce:
▼ text for the bar
something|something else

Image positioning and <clearfloat>
You can do this by specifying either 'right' or 'left' as an option within the img tag. Example:
<img>http://example.com/image.png|200|left</img>

If you have a floating image and you want the text to go back after the image again (e.g this very paragraph you are reading), you can use the clearfloat tag, like so:
<img>http://example.com/image.png|200|left</img> Bla bla
<clearfloat>This text shows up after the image! Hooray!

You do not need to close the clearfloat tag :)

Note: you don't need to specify the size in order to use the float. If you are not specifying a size but you still want it to float, you can just put the side ('left' or 'right') straight after the image URL:
<img>http://example.com/image.png|right</img>

[top]Gloss tags

<gloss>
This tag is a one-use tag that is to be put around a gloss notation that will provide further information.

<gloss>FUT</gloss>
Will produce: FUTFuture (tense)
action occurring after the moment of speech


<gl>
This tag stands for gloss line. It is to be used similarly to the gloss tag above, but will parse an entire line. Anything that is not a numeral or in capital letters will be ignored.
<gl>1.SG food-ACC eat.PRS.OPT-NEG</gl>

Will produce:
1First person (person)
speaker, signer, etc; I
.SGSingular (number)
one countable entity
food-ACCAccusative (case)
TRANS direct object; patient
eat.PRSPresent Tense (tense).OPTOptative (mood)
'wish, hope'
-NEGNegative (polarity)
not


<gbl=x>
This tag stands for gloss block. This is used to format glosses to align each section with the English translation and whatever other information you wish to provide.

The x indicates the row number that you wish to use as the gloss. If this is not specified, it will assume the first line (=1). There are two other things to know about these. Firstly, you use the '|' character to separate each block. Within each block, you can either use a carriage return (by pressing enter or return), or '//' to separate each line.

<gbl=2>an//1.SG|tapran-u//food-ACC|tapri-yo-ya//eat.PRS-NEG-CONJ|tas//want</gbl>
Or using the other method:
<gbl=2>an 1.SG| tapran-u food-ACC| tapri-yo-ya eat.PRS-NEG-CONJ| tas want</gbl>

Will produce:
an
1First person (person)
speaker, signer, etc; I
.SGSingular (number)
one countable entity
tapran-u
food-ACCAccusative (case)
TRANS direct object; patient
tapri-yo-ya
eat.PRSPresent Tense (tense)-NEGNegative (polarity)
not
-CONJConjunction
links two arguments or clauses together
tas
want
Comments (0)
Edit history
on 14/02/16 22:33-41hashifixed error
on 14/02/16 22:32+343hashiadded hide tags
privacy | FAQs | rules | statistics | graphs | donate | api (indev)
Viewing CWS in: English | Time now is 27-Apr-17 11:04