aboutsummaryrefslogtreecommitdiffhomepage
path: root/data/doc/sisu/on_markup.txt
blob: 72aee93b8b7c3655c3c34ad2dd644124ac64df66 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
SiSU Markup Standard
* Copyright Ralph Amissah
* version 0.16.0
* homepage: http://www.jus.uio.no/sisu
* manpages 'man sisu'
* markup examples
  * data/sisu-markup-samples/document_samples_sisu_markup
  * /usr/share/sisu-markup-samples/document_samples_sisu_markup
  * http://www.jus.uio.no/sisu/sample/markup
  * http://www.jus.uio.no/sisu/sample/syntax
* book samples
  * http://www.jus.uio.no/sisu/sisu_examples/1#books
  * http://www.jus.uio.no/sisu/SiSU/2#books

The man pages 'man sisu' are likely to be more up to date than this document,
please consult them.

Examples of marked up documents are also provided, under the directory branch 
data/sisu-markup-samples
or online at

SiSU Markup syntax

sisu
  Data text markup (alternative to available html subset)

  1~ heading/title               [levels 1 to 6 available]

  4~filename heading             [segmentation level]

  !{emphasis}!

  *{bold text}*

  _{underscore}_

  /{italics}/

  "{citation}"

  ^{superscript}^

  ,{subscript},

  +{inserted text}+

  -{strikethrough}-

  ------------------------------------------
  Indentation and bullets

  _1                             indent paragraph one level

  _2                             indent paragraph two steps

  _2                             indent paragraph two steps

  _*                             bullet text

  _1*                            bullet text, first indent

  ------------------------------------------
  Numbered List (not to be confused with headings/titles, (document structure))

  # numbered list                numbered list 1., 2., 3, etc.

  _# numbered list               numbered list indented a., b., c., d., etc.

  ------------------------------------------
  Endnotes

  ~{ endnote }~                  endnote~{ self contained endnote marker & endnote in one }~

  ---
  alternative endnote pair notation

  ~^                             endnote marker
  ^~ endnote text following the paragraph in which the marker occurs

  ------------------------------------------
  Links

    A url within text is automatically hyperlinked to itself, ie raw urls within text are automatically marked up.

    http://url.org               would be hyperlinked to itself

    { [text to link] }http://url.org

    { image.png }http://url.org

    { image.png }image    { tux.png 64x80 }image                        width x height

  Linked image

    { SiSU Geek Writer }http://www.jus.uio.no/sisu/                     url example

    { tux.png 64x80 "a better way" }http://www.jus.uio.no/sisu/     image example with all options
  
  shortcut - hyper-linked text with endnote providing the url information

    {~^ [text to link] }http://url.org         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
    
    manual location marker/tagging at present only in html to produce <a name="[name]"> (use sparingly)

    *~[name]

    note at a heading level the same is automatically achieved by providing names to headings 5 and 6 i.e. 5~[name] and 6~[name] or in the case of auto-heading numbering, without further intervention.

  ------------------------------------------

  ~#    unnumbered paragraph (place marker at end of paragraph)

  -#    unnumbered paragraph, delete when not required (place marker at end of paragraph) [used in dummy headings, eg. for segmented html]

  ------------------------------------------
  %     add a comment to text, that will be removed prior to processing (place marker at beginning of line)

  ------------------------------------------

  There are some things to be aware of <br> may be used, but urls occuring before or after a break must have a space. The vim syntax highlighter catches most of the rules... 

  ------------------------------------------

  More HELP on Markup markup help is available on:

    document wide instructions: headers (document structure)

    general text markup: headings; endnotes; tables

  configuration and customisation

    document or site wide customisation: customise; skin

TABLES


table{ [number of columns] [column width %];[column width %]

[table content, line breaks are important see example below]

}table
----
This is a sample table:
-----------------------

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

PREFORMATTED TEXT

poem{

  [Text here]

}poem
----

group{

  [Text here]

}group
----

code{

  [Text here]

}code

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 0~ . All Dublin Core meta tags are available
0~indentifier information
where the "identifier" is a tag recognised by the program, and the "information" or "instructions" belong to the tag/indentifier specified
The { form was introduced to take advantage of vim folds, and its use is reserved primarily for document structural instructions: namely header and heading tags (also a footnote/endnote option).
This is a sample header (Dublin Core in fuschia, other information headers in cyan, markup instructions in red):

0~title My Title - This is now the Title of the Document and used as such

0~subtitle The Subtitle if any

0~creator [or ~author] Ralph Amissah

0~subject Document production and management (or whatever your subject)

0~description 

0~publisher 

0~contributor 

0~date 2000-08-27
  [ also 0~date.created 0~date.issued 0~date.available 0~date.valid 0~date.modified ]

0~type article

0~format

0~identifier

0~source

0~language (en|us|fr|de|es|se|dk|fi|no)

0~relation

0~coverage

0~rights copyright, all rights reserved, public domain, copyleft, creative commons variant, etc.

0~owner

0~keywords text document generation processing management latex pdf structured xml citation [your keywords here, used for example by rss feeds, and in sql searches]

0~abstract [paper abstract, placed after table of contents]

0~comment [...]

0~classify_loc [Library of Congress classification]

0~classify_dewey [Dewey classification system]

0~classify_isbn [ISBN]

0~classify_pg [Project Gutenberg text number]

0~prefix_a [prefix is placed just before table of contents - not implemented]

0~prefix_b or 0~prefix [prefix is placed just after table of contents]

0~rcs $Id$ [or 0~cvs 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 ]

0~toc PART; CHAPTER; SECTION; ARTICLE; none; none;
optional, where document structure can be defined by a match words or regular expression (the regular expression is assumed to start at the beginning of a line of text)
default markers 1~ to 6~ can be used within text instead, without this header tag, and may be used to suppliment the instructions provided in this header tag if provided

0~level newpage=3; breakpage=4 [paragraph level, used by latex to breakpages, the page is optional eg. in newpage] 

0~markup num_top=4 [various markup instructions, eg: num_top=4 headings tobe numbered, starting at heading 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]

0~vocabulary name of taxonomy/vocabulary/wordlist to use against document

0~skin skin_doc_[name_of_desired_document_skin]

0~links http://google.com; Google;

1~ Top level heading [this is usually the same as the title 0~title ]

2~ Second level heading [this is a heading level divider]

3~ Third level heading [this is a heading level divider]

4~ Top level heading preceeding substantive text of document or sub-heading 5, the heading level that would normally be marked 1. or 2. or 3. etc. in a document

5~ Second level heading preceeding substantive text of document or sub-heading 6, the heading level that would normally be marked 1.1 or 1.2 or 1.3 or 2.1 etc in a document

6~ Third level heading preceeding 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

SAMPLE DOCUMENT

For sample marked up documents see the directory 
  markup_samples

0~title Working Sample Document

0~subtitle Demonstrating markup

0~creator Ralph Amissah

0~date 

0~markup num_top=4 

0~links 

1~ A Sample Document
  
2~ just for fun 
    
4~ This is Chapter One or Article One

Ordinary Text follows here. The Title would be a Chapter or Article depending on the type of document you were working to produce.

4~ This would be Chapter Two or Article Two

And so on.

Assuming sisu is configured properly so it has been instructed where to put the work files and ouput files, you would generate this text once saved, with the suffix .s3 if saved as example.s3, by typing sisu -mhwxp example.s3 while in the directory in which the file is saved. 

_1 -m initial processing, -h html (css based), -w wordmap for html, -x xml, -p pdf output, generated via latex, there are of course additional options

_1 for a listing type: sisu ~ commands

_1 for an outline of sisu markup type: sisu ~ markup 

The example ends here.

-------------------

Composite Documents

It  is  possible  to build a document by requiring other documents.  The documents required may complete documents that could be  gener ated  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 mainly from other doc uments), by convention it should be named with the suffix .r1 , .r2 ,  or .r3 .s1 , .s2 , or .s3 , and if markup snippets .si. A tempo rary file of the composite document is built  prior  to  processing with the same prefix and the suffix .t1 , .t2 , or .t3

basic markup for importing a document into another, 
[note placement is at start of the line, no spaces despite presentation below]

  r{ filename }

  { filename.si }require

  << { filename.si } #for vim folds

importing a document with textlink syntax

  |filename.si|@|^|require

  << |filename.si|@|^| #for vim folds


importing a document with thlnk syntax

  <url:filename.si>require

  << <url:filename.si> #for vim folds


remote  documents  may  be called with the thlnk syntax (or regular
sisu syntax), e.g.

   << <url:http://www.url.com/filename.si>