SiSU source documents are plaintext (UTF-8) 2 files
All paragraphs are separated by an empty line.
Markup is comprised of:
at the top of a document, the document header made up of semantic meta-data about the document and if desired additional processing instructions (such an instruction to automatically number headings from a particular level down)
followed by the prepared substantive text of which the most important single characteristic is the markup of different heading levels, which define the primary outline of the document structure. Markup of substantive text includes:
heading levels defines document structure
text basic attributes, italics, bold etc.
grouped text (objects), which are to be treated differently, such as code blocks or poems.
footnotes/endnotes
linked text and images
paragraph actions, such as indent, bulleted, numbered-lists, etc.
Some interactive help on markup is available, by typing sisu and selecting markup or sisu --help markup
There is of course this document, which provides a cursory overview of sisu markup and the respective output produced: <http://www.jus.uio.no/sisu/sisu_markup/>
With SiSU installed sample skins may be found in: /usr/share/doc/sisu/sisu_markup_samples/dfsg (or equivalent directory) and if sisu-markup-samples is installed also under: /usr/share/doc/sisu/sisu_markup_samples/non-free
2. Markup of Headers
Headers consist of semantic meta-data about a document, which can be used by any output module of the program; and may in addition include extra processing instructions.
Note: the first line of a document may include information on the markup version used in the form of a comment. Comments are a percentage mark at the start of a paragraph (and as the first character in a line of text) followed by a space and the comment:
% this would be a comment
2.1 Sample Header
This current document has a header similar to this one (without the comments):
% SiSU 0.57
@title: SiSU
@subtitle: Markup
@creator: Ralph Amissah
@rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3
% comment: in this @level header num_top=1 starts automatic heading numbering at heading level 1 (numbering continues 3 levels down); the new and break instructions are used by the LaTeX/pdf and odf output to determine where to put page breaks (that are not used by html output or say sql database population).
@skin: skin_sisu_manual
% skins modify the appearance of a document and are placed in a sub-directory under ./_sisu/skin ~/.sisu/skin or /etc/sisu/skin. A skin may affect single documents that request them, all documents in a directory, or be site-wide. (A document is affected by a single skin)
@bold: /Gnu|Debian|Ruby|SiSU/
@links: { SiSU Manual }http://www.jus.uio.no/sisu/sisu_manual/
{ Book Samples and Markup Examples }http://www.jus.uio.no/sisu/SiSU/examples.html
{ SiSU @ Wikipedia }http://en.wikipedia.org/wiki/SiSU
{ SiSU @ Freshmeat }http://freshmeat.net/projects/sisu/
{ SiSU @ Ruby Application Archive }http://raa.ruby-lang.org/project/sisu/
{ SiSU @ Debian }http://packages.qa.debian.org/s/sisu.html
{ SiSU Download }http://www.jus.uio.no/sisu/SiSU/download.html
{ SiSU Changelog }http://www.jus.uio.no/sisu/SiSU/changelog.html
2.2 Available Headers
Header tags appear at the beginning of a document and provide meta information on the document (such as the Dublin Core), or information as to how the document as a whole is to be processed. All header instructions take either the form @headername: or 0~headername. All Dublin Core meta tags are available
@indentifier: information or instructions
where the "identifier" is a tag recognised by the program, and the "information" or "instructions" belong to the tag/indentifier specified
Note: a header where used should only be used once; all headers apart from @title: are optional; the @structure: header is used to describe document structure, and can be useful to know.
This is a sample header
% SiSU 0.38 [declared file-type identifier with markup version]
@title: [title text] This is the title of the document and used as such, this header is the only one that is mandatory
@subtitle: The Subtitle if any
@creator: [or @author:] Name of Author
@subject: (whatever your subject)
@description:
@publisher:
@contributor:
@translator: [or @translated_by:]
@illustrator: [or @illustrated_by:]
@prepared_by: [or @digitized_by:]
@date: 2000-08-27 [ also @date.created: @date.issued: @date.available: @date.valid: @date.modified: ]
@type: article
@format:
@identifier:
@source:
@language: [or @language.document:] [country code for language if available, or language, English, en is the default setting] (en - English, fr - French, de - German, it - Italian, es - Spanish, pt - Portuguese, sv - Swedish, da - Danish, fi - Finnish, no - Norwegian, is - Icelandic, nl - Dutch, et - Estonian, hu - Hungarian, pl - Polish, ro - Romanian, ru - Russian, el - Greek, uk - Ukranian, tr - Turkish, sk - Slovak, sl - Slovenian, hr - Croatian, cs - Czech, bg - Bul garian ) [however, encodings are not available for all of the languages listed.]
[@language.original: original language in which the work was published]
@rights: Copyright (c) Name of Right Holder, all rights reserved, or as granted: public domain, copyleft, creative commons variant, etc.
@owner:
@keywords: text document generation processing management latex pdf structured xml citation [your keywords here, used for example by rss feeds, and in sql searches]
@abstract: [paper abstract, placed after table of contents]
@comment: [...]
@catalogue: loc=[Library of Congress classification]; dewey=[Dewey classification]; isbn=[ISBN]; pg=[Project Gutenberg text number]
@classify_loc: [Library of Congress classification]
@classify_dewey: [Dewey classification]
@classify_isbn: [ISBN]
@classify_pg: [Project Gutenberg text number]
@prefix: [prefix is placed just after table of contents]
@prefix_a: [prefix is placed just before table of contents - not implemented]
@prefix_b:
@rcs: $Id: sisu_markup.sst,v 1.2 2007/09/08 17:12:47 ralph Exp $ [used by rcs or cvs to embed version (revision control) information into document, rcs or cvs can usefully provide a history of updates to a document ]
@structure: PART; CHAPTER; SECTION; ARTICLE; none; none; optional, document structure can be defined by words to match or regular expression (the regular expression is assumed to start at the beginning of a line of text i.e. ^) default markers :A~ to :C~ and 1~ to 6~ can be used within text instead, without this header tag, and may be used to supplement the instructions provided in this header tag if provided (@structure: is a synonym for @toc:)
@level: newpage=3; breakpage=4 [paragraph level, used by latex to breakpages, the page is optional eg. in newpage]
@markup: information on the markup used, e.g. new=1,2,3; break=4; num_top=4 [or newpage=1,2,3; breakpage=4; num_top=4] newpage and breakpage, heading level, used by LaTeX to breakpages. breakpage: starts on a new page in single column text and on a new column in double column text; newpage: starts on a new page for both single and double column texts. num_top=4 [auto-number document, starting at level 4. the default is to provide 3 levels, as in 1 level 4, 1.1 level 5, 1.1.1 level 6, markup to be merged within level] num_extract [take numbering of headings provided (manually in marked up source document), and use for numbering of segments. Available where a clear numbering structure is provided within document, without the repetition of a number in a header.] [In 0.38 notation, you would map to the equivalent levels, the examples provided would map to the following new=A,B,C; break=1; num_top=1 [or newpage=A,B,C; breakpage=1; num_top=1] see headings]
@bold: [regular expression of words/phrases to be made bold]
@italics: [regular expression of words/phrases to italicise]
@vocabulary: name of taxonomy/vocabulary/wordlist to use against document
@skin: skin_doc_[name_of_desired_document_skin] skins change default settings related to the appearance of documents generated, such as the urls of the home site, and the icon/logo for the document or site.
@man: 8; name=sisu - documents: markup, structuring, publishing in multiple standard formats, and search; synopsis=sisu [-abcDdFHhIiMmNnopqRrSsTtUuVvwXxYyZz0-9] [filename/wildcard ] sisu [-Ddcv] [instruction] sisu [-CcFLSVvW] the man page category number (default 1) and special tags used in preparing man page headings
@links: { SiSU }http://www.jus.uio.no/sisu/; { FSF }http://www.fsf.org
@promo: sisu, ruby, search_libre_docs, open_society [places content in right pane in html, makes use of list.yml and promo.yml, commented out sample in document sample: free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst]
3. Markup of Substantive Text
3.1 Heading Levels
Heading levels are :A~ ,:B~ ,:C~ ,1~ ,2~ ,3~ ... :A - :C being part / section headings, followed by other heading levels, and 1 -6 being headings followed by substantive text or sub-headings. :A~ usually the title :A~? conditional level 1 heading (used where a stand-alone document may be imported into another)
:A~ [heading text] Top level heading [this usually has similar content to the title @title: ] NOTE: the heading levels described here are in 0.38 notation, see heading
:B~ [heading text] Second level heading [this is a heading level divider]
:C~ [heading text] Third level heading [this is a heading level divider]
1~ [heading text] Top level heading preceding substantive text of document or sub-heading 2, the heading level that would normally be marked 1. or 2. or 3. etc. in a document, and the level on which sisu by default would break html output into named segments, names are provided automatically if none are given (a number), otherwise takes the form 1~my_filename_for_this_segment
2~ [heading text] Second level heading preceding substantive text of document or sub-heading 3, the heading level that would normally be marked 1.1 or 1.2 or 1.3 or 2.1 etc. in a document.
3~ [heading text] Third level heading preceding substantive text of document, that would normally be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document
1~filename level 1 heading,
% the primary division such as Chapter that is followed by substantive text, and may be further subdivided (this is the level on which by default html segments are made)
3.2 Font Attributes
markup example:
normal text !{emphasis}! *{bold text}* _{underscore}_ /{italics}/ "{citation}" ^{superscript}^ ,{subscript}, +{inserted text}+
normal text
!{emphasis}!
*{bold text}*
_{underscore}_
/{italics}/
"{citation}"
^{superscript}^
,{subscript},
+{inserted text}+
-{strikethrough}-
resulting output:
normal text emphasisbold textunderscoreitalics citation superscriptsubscript inserted text strikethrough
normal text
emphasis
bold text
underscore
italics
citation
superscript
subscript
inserted text
strikethrough
3.3 Indentation and bullets
markup example:
ordinary paragraph
_1 indent paragraph one step
_2 indent paragraph two steps
_9 indent paragraph nine steps
resulting output:
ordinary paragraph
indent paragraph one step
indent paragraph two steps
indent paragraph nine steps
markup example:
_* bullet text
_1* bullet text, first indent
_2* bullet text, two step indent
resulting output:
bullet text
bullet text, first indent
bullet text, two step indent
Numbered List (not to be confused with headings/titles, (document structure))
markup example:
# numbered list numbered list 1., 2., 3, etc.
_# numbered list numbered list indented a., b., c., d., etc.
3.4 Footnotes / Endnotes
Footnotes and endnotes not distinguished in markup. They are automatically numbered. Depending on the output file format (html, odf, pdf etc.), the document output selected will have either footnotes or endnotes.
Alternative endnote pair notation for footnotes/endnotes:
% note the endnote marker "~^"
normal text~^ continues
^~ endnote text following the paragraph in which the marker occurs
the standard and pair notation cannot be mixed in the same document
3.5 Links
3.5.1 Naked URLs within text, dealing with urls
urls are found within text and marked up automatically. A url within text is automatically hyperlinked to itself and by default decorated with angled braces, unless they are contained within a code block (in which case they are passed as normal text), or escaped by a preceding underscore (in which case the decoration is omitted).
% maps to: { [text to link] }http://url.org ~{ http://url.org }~
% which produces hyper-linked text within a document/paragraph, with an endnote providing the url for the text location used in the hyperlink
text marker *~name
note at a heading level the same is automatically achieved by providing names to headings 1, 2 and 3 i.e. 2~[name] and 3~[name] or in the case of auto-heading numbering, without further intervention.
3.6 Grouped Text
3.6.1 Tables
Tables may be prepared in two either of two forms
markup example:
table{ c3; 40; 30; 30;
This is a table
this would become column two of row one
column three of row one is here
And here begins another row
column two of row two
column three of row two, and so on
}table
resulting output:
This is a table
this would become column two of row one
column three of row one is here
And here begins another row
column two of row two
column three of row two, and so on
a second form may be easier to work with in cases where there is not much information in each column
!_ Table 3.1: Contributors to Wikipedia, January 2001 - June 2005
{table~h 24; 12; 12; 12; 12; 12; 12;}
|Jan. 2001|Jan. 2002|Jan. 2003|Jan. 2004|July 2004|June 2006
Contributors* | 10| 472| 2,188| 9,653| 25,011| 48,721
Active contributors** | 9| 212| 846| 3,228| 8,442| 16,945
Very active contributors*** | 0| 31| 190| 692| 1,639| 3,016
No. of English language articles| 25| 16,000| 101,000| 190,000| 320,000| 630,000
No. of articles, all languages | 25| 19,000| 138,000| 490,000| 862,000|1,600,000
\* Contributed at least ten times; \** at least 5 times in last month; \*\** more than 100 times in last month.
resulting output:
Table 3.1: Contributors to Wikipedia, January 2001 - June 2005
Jan. 2001
Jan. 2002
Jan. 2003
Jan. 2004
July 2004
June 2006
Contributors*
10
472
2,188
9,653
25,011
48,721
Active contributors**
9
212
846
3,228
8,442
16,945
Very active contributors***
0
31
190
692
1,639
3,016
No. of English language articles
25
16,000
101,000
190,000
320,000
630,000
No. of articles, all languages
25
19,000
138,000
490,000
862,000
1,600,000
* Contributed at least ten times; ** at least 5 times in last month; *** more than 100 times in last month.
3.6.2 Poem
basic markup:
poem{
Your poem here
}poem
Each verse in a poem is given a separate object number.
markup example:
poem{
`Fury said to a
mouse, That he
met in the
house,
"Let us
both go to
law: I will
prosecute
YOU. --Come,
I'll take no
denial; We
must have a
trial: For
really this
morning I've
nothing
to do."
Said the
mouse to the
cur, "Such
a trial,
dear Sir,
With
no jury
or judge,
would be
wasting
our
breath."
"I'll be
judge, I'll
be jury,"
Said
cunning
old Fury:
"I'll
try the
whole
cause,
and
condemn
you
to
death."'
}poem
resulting output:
`Fury said to a mouse, That he met in the house, "Let us both go to law: I will prosecute YOU. --Come, I'll take no denial; We must have a trial: For really this morning I've nothing to do." Said the mouse to the cur, "Such a trial, dear Sir, With no jury or judge, would be wasting our breath." "I'll be judge, I'll be jury," Said cunning old Fury: "I'll try the whole cause, and condemn you to death."'
3.6.3 Group
basic markup:
group{
Your grouped text here
}group
A group is treated as an object and given a single object number.
markup example:
group{
`Fury said to a
mouse, That he
met in the
house,
"Let us
both go to
law: I will
prosecute
YOU. --Come,
I'll take no
denial; We
must have a
trial: For
really this
morning I've
nothing
to do."
Said the
mouse to the
cur, "Such
a trial,
dear Sir,
With
no jury
or judge,
would be
wasting
our
breath."
"I'll be
judge, I'll
be jury,"
Said
cunning
old Fury:
"I'll
try the
whole
cause,
and
condemn
you
to
death."'
}group
resulting output:
`Fury said to a mouse, That he met in the house, "Let us both go to law: I will prosecute YOU. --Come, I'll take no denial; We must have a trial: For really this morning I've nothing to do." Said the mouse to the cur, "Such a trial, dear Sir, With no jury or judge, would be wasting our breath." "I'll be judge, I'll be jury," Said cunning old Fury: "I'll try the whole cause, and condemn you to death."'
3.6.4 Code
Code tags are used to escape regular sisu markup, and have been used extensively within this document to provide examples of SiSU markup. You cannot however use code tags to escape code tags. They are however used in the same way as group or poem tags.
A code-block is treated as an object and given a single object number. [an option to number each line of code may be considered at some later time]
use of code tags instead of poem compared, resulting output:
`Fury said to a
mouse, That he
met in the
house,
"Let us
both go to
law: I will
prosecute
YOU. --Come,
I'll take no
denial; We
must have a
trial: For
really this
morning I've
nothing
to do."
Said the
mouse to the
cur, "Such
a trial,
dear Sir,
With
no jury
or judge,
would be
wasting
our
breath."
"I'll be
judge, I'll
be jury,"
Said
cunning
old Fury:
"I'll
try the
whole
cause,
and
condemn
you
to
death."'
3.7 Book index
To make an index append to paragraph the book index term relates to it, using an equal sign and curly braces.
Currently two levels are provided, a main term and if needed a sub-term. Sub-terms are separated from the main term by a colon.
Paragraph containing main term and sub-term.
={Main term:sub-term}
The index syntax starts on a new line, but there should not be an empty line between paragraph and index markup.
The structure of the resulting index would be:
Main term, 1
sub-term, 1
Several terms may relate to a paragraph, they are separated by a semicolon. If the term refers to more than one paragraph, indicate the number of paragraphs.
Paragraph containing main term, second term and sub-term.
={first term; second term: sub-term}
The structure of the resulting index would be:
First term, 1,
Second term, 1,
sub-term, 1
If multiple sub-terms appear under one paragraph, they are separated under the main term heading from each other by a pipe symbol.
Paragraph containing main term, second term and sub-term.
={Main term:sub-term+1|second sub-term
A paragraph that continues discussion of the first sub-term
The plus one in the example provided indicates the first sub-term spans one additional paragraph. The logical structure of the resulting index would be:
Main term, 1,
sub-term, 1-3,
second sub-term, 1,
4. Composite documents markup
It is possible to build a document by creating a master document that requires other documents. The documents required may be complete documents that could be generated independently, or they could be markup snippets, prepared so as to be easily available to be placed within another text. If the calling document is a master document (built from other documents), it should be named with the suffix .ssm Within this document you would provide information on the other documents that should be included within the text. These may be other documents that would be processed in a regular way, or markup bits prepared only for inclusion within a master document .sst regular markup file, or .ssi (insert/information) A secondary file of the composite document is built prior to processing with the same prefix and the suffix ._sst
basic markup for importing a document into a master document
<< filename1.sst
<< filename2.ssi
The form described above should be relied on. Within the Vim editor it results in the text thus linked becoming hyperlinked to the document it is calling in which is convenient for editing. Alternative markup for importation of documents under consideration, and occasionally supported have been.
<< filename.ssi
<<{filename.ssi}
% using textlink alternatives
<< |filename.ssi|@|^|
Markup Syntax History
5. Notes related to Files-types and Markup Syntax
0.38 is substantially current, depreciated 0.16 supported, though file names were changed at 0.37
sisu --query=[sisu version [0.38] or 'history]
provides a short history of changes to SiSU markup
0.57 (2007w34/4) SiSU 0.57 is the same as 0.42 with the introduction of some a shortcut to use the headers @title and @creator in the first heading [expanded using the contents of the headers @title: and @author:]
:A~ @title by @author
0.52 (2007w14/6) declared document type identifier at start of text/document:
SiSU 0.52
or, backward compatible using the comment marker:
% SiSU 0.38
variations include 'SiSU (text|master|insert) [version]' and 'sisu-[version]'
0.42 (2006w27/4) * (asterisk) type endnotes, used e.g. in relation to author
SiSU 0.42 is the same as 0.38 with the introduction of some additional endnote types,
Introduces some variations on endnotes, in particular the use of the asterisk
~{* for example for describing an author }~ and ~{** for describing a second author }~
* for example for describing an author
** for describing a second author
and
~[* my note ]~ or ~[+ another note ]~
which numerically increments an asterisk and plus respectively
*1 my note +1 another note
0.38 (2006w15/7) introduced new/alternative notation for headers, e.g. @title: (instead of 0~title), and accompanying document structure markup, :A,:B,:C,1,2,3 (maps to previous 1,2,3,4,5,6)
SiSU 0.38 introduced alternative experimental header and heading/structure markers,
@headername: and headers :A~ :B~ :C~ 1~ 2~ 3~
as the equivalent of:
0~headername and headers 1~ 2~ 3~ 4~ 5~ 6~
The internal document markup of SiSU 0.16 remains valid and standard Though note that SiSU 0.37 introduced a new file naming convention
SiSU has in effect two sets of levels to be considered, using 0.38 notation A-C headings/levels, pre-ordinary paragraphs /pre-substantive text, and 1-3 headings/levels, levels which are followed by ordinary text. This may be conceptualised as levels A,B,C, 1,2,3, and using such letter number notation, in effect: A must exist, optional B and C may follow in sequence (not strict) 1 must exist, optional 2 and 3 may follow in sequence i.e. there are two independent heading level sequences A,B,C and 1,2,3 (using the 0.16 standard notation 1,2,3 and 4,5,6) on the positive side: the 0.38 A,B,C,1,2,3 alternative makes explicit an aspect of structuring documents in SiSU that is not otherwise obvious to the newcomer (though it appears more complicated, is more in your face and likely to be understood fairly quickly); the substantive text follows levels 1,2,3 and it is 'nice' to do most work in those levels
0.22 (2005w35/3) image dimensions may be omitted if rmagick is available to be relied upon
0.20.4 (2005w33/4) header 0~links
0.16 (2005w25/2) substantial changes introduced to make markup cleaner, header 0~title type, and headings [1-6]~ introduced, also percentage sign (%) at start of a text line as comment marker
SiSU 0.16 (0.15 development branch) introduced the use of
the header 0~ and headings/structure 1~ 2~ 3~ 4~ 5~ 6~
in place of the 0.1 header, heading/structure notation
SiSU 0.1 headers and headings structure represented by header 0{~ and headings/structure 1{ 2{ 3{ 4{~ 5{ 6{
1. From sometime after SiSU 0.58 it should be possible to describe SiSU markup using SiSU, which though not an original design goal is useful.
2. files should be prepared using UTF-8 character encoding