aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG28
-rw-r--r--data/doc/sisu/html/sisu.1.html318
-rw-r--r--data/doc/sisu/on_markup.txt136
-rw-r--r--data/sisu/image/bullet_08.pngbin0 -> 223 bytes
-rw-r--r--data/sisu/image/bullet_09.pngbin0 -> 230 bytes
-rw-r--r--data/sisu/image/bullet_10.pngbin0 -> 270 bytes
-rw-r--r--data/sisu/image/bullet_11.pngbin0 -> 277 bytes
-rw-r--r--data/sisu/image/bullet_12.pngbin0 -> 295 bytes
-rw-r--r--lib/sisu/v0/css.rb2
-rw-r--r--lib/sisu/v0/dal.rb105
-rw-r--r--lib/sisu/v0/dal_doc_str_code.rb37
-rw-r--r--lib/sisu/v0/dal_doc_str_tables.rb6
-rw-r--r--lib/sisu/v0/dal_syntax.rb4
-rw-r--r--lib/sisu/v0/html.rb30
-rw-r--r--lib/sisu/v0/html_scroll.rb3
-rw-r--r--lib/sisu/v0/html_segments.rb2
-rw-r--r--lib/sisu/v0/html_tune.rb104
-rw-r--r--lib/sisu/v0/odf.rb14
-rw-r--r--lib/sisu/v0/param.rb9
-rw-r--r--lib/sisu/v0/shared_html_lite.rb18
-rw-r--r--lib/sisu/v0/shared_xml.rb4
-rw-r--r--lib/sisu/v0/texpdf.rb10
-rw-r--r--man/man1/sisu.115
23 files changed, 451 insertions, 394 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 03c016d8..fb8310f4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,16 +1,30 @@
-* See homepage at: http://www.jus.uio.no/sisu
-* & http://www.jus.uio.no/sisu/SiSU/download
-* & http://www.jus.uio.no/sisu/SiSU/changelog
-
+* See homepage at: http://www.jus.uio.no/sisu * & http://www.jus.uio.no/sisu/SiSU/download * & http://www.jus.uio.no/sisu/SiSU/changelog
Reverse Chronological:
%% STABLE MANIFEST
+%% sisu_0.58.0.orig.tar.gz (2007-09-03:36/1)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.58.0.orig.tar.gz
+ sisu_0.58.0.orig.tar.gz
+ sisu_0.58.0-1.dsc
+ sisu_0.58.0-1.diff.gz
+
+* code block, exclude from most markup, should make it possible (eventually) to
+ describe sisu markup using sisu, which was not an initial goal, but useful
+ nonetheless.
+ * pdf, some issues with some line-wraps, changed code-block fontsize to tiny,
+ (consider footnotesize also should prefer use of ttfamily (texttt))
+
+* html css, odf, xml, use black bullets instead of red, and introduce
+ black_bullet images in sizes 8px to 12px default used 9px
+
+* man page update on sources of markup examples
+
%% sisu_0.57.0.orig.tar.gz (2007-08-22:34/3)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.57.0.orig.tar.gz
- sisu_0.57.0.orig.tar.gz
- sisu_0.57.0-1.dsc
- sisu_0.57.0-1.diff.gz
+ 1f730ef349606c02cd90c8cd7cb6b790 1274006 sisu_0.57.0.orig.tar.gz
+ a15133ca987525273886116797ba271b 606 sisu_0.57.0-1.dsc
+ 7cc5aaebbf3b9954b0d3dd138e825f87 142479 sisu_0.57.0-1.diff.gz
* markup addition, headings, shortcut for top level title (and author)
:A~ @title @author (also available for level 2 (or 3) author) [version bump]
diff --git a/data/doc/sisu/html/sisu.1.html b/data/doc/sisu/html/sisu.1.html
index ff71161d..a5bbc0fc 100644
--- a/data/doc/sisu/html/sisu.1.html
+++ b/data/doc/sisu/html/sisu.1.html
@@ -10,7 +10,7 @@
<h2><a name='sect0' href='#toc0'>Name</a></h2>
<b>SiSU</b> - Structured information, Serialized Units - a document
-publishing system
+publishing system
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>sisu</b> <b>[</b> <i>-AabcDdEeFHhIMmNnopqRrSsTtUuVvwXxYyZz0-9</i>
<b>] [</b> <i>filename/</i> wildcard <b>]</b> <p>
@@ -18,7 +18,7 @@ publishing system
<b>sisu</b> <b>[</b> <i>-CcFLSVvW</i>
<b>]</b> <p>
Note: commands should be issued from within the directory that contains
-the marked up files, cd to markup directory.
+the marked up files, cd to markup directory.
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<b>SiSU</b> SiSU is a
document publishing system, that from a simple single marked-up document,
@@ -27,7 +27,7 @@ pdf, xhtml, XML, info, and SQL (PostgreSQL and SQLite), which share numbered
text objects ("object citation numbering") and the same document structure
information. For more see: <i>&lt;<a href='http://www.jus.uio.no/sisu'>http://www.jus.uio.no/sisu</a>
&gt;</i> <p>
-
+
<h2><a name='sect3' href='#toc3'>Summary of man page</a></h2>
<dl>
@@ -367,7 +367,7 @@ removes specified data to postgresql db (rb.dbi) [ <i>-d</i> --remove sqlite equ
<dd></dd>
</dl>
</blockquote>
-
+
<h2><a name='sect7' href='#toc7'>Shortcuts,
Shorthand for multiple flags</a></h2>
@@ -398,28 +398,34 @@ default action run when no options are give, i.e. on &rsquo;sisu [filename]&rsqu
<p>
add <i>-v</i> for verbose mode and <i>-c</i> for color, e.g. <i>sisu</i> -2vc [filename or wildcard]
<p>
-consider <i>-u</i> for appended url info or <i>-v</i> for verbose output
+consider <i>-u</i> for appended url info or <i>-v</i> for verbose output
<h2><a name='sect8' href='#toc8'>Document Markup</a></h2>
<b>SiSU
Markup</b> an incomplete summary. <p>
<b>Note:</b> files should be marked up for SiSU using
<i>UTF-8</i> encoding. <p>
Some interactive help on markup is available, by typing <i>sisu</i>
-and selecting <i>markup</i> or <i>sisu</i> --help markup
+and selecting <i>markup</i> or <i>sisu</i> --help markup
<dl>
-<dt>Sample markup files can be used
-as examples: </dt>
-<dd><i>&lt;<a href='http://www.jus.uio.no/sisu/sample'>http://www.jus.uio.no/sisu/sample</a>
+<dt>Online markup examples together
+with the respective outputs produced are available from: </dt>
+<dd><i>&lt;<a href='http://www.jus.uio.no/sisu/SiSU/2.html'>http://www.jus.uio.no/sisu/SiSU/2.html</a>
+&gt;</i>
+</dd>
+
+<dt>or from the document: </dt>
+<dd><i>&lt;<a href='http://www.jus.uio.no/sisu/sisu_examples/'>http://www.jus.uio.no/sisu/sisu_examples/</a>
&gt;</i> </dd>
-<dt>actual marked up plaintext
-files ready for use: </dt>
-<dd><i>&lt;<a href='http://www.jus.uio.no/sisu/sample/markup'>http://www.jus.uio.no/sisu/sample/markup</a>
+<dt>The following
+document gives a cursory overview of sisu markup and the respective output
+produced: </dt>
+<dd><i>&lt;<a href='http://www.jus.uio.no/sisu/sisu_markup/'>http://www.jus.uio.no/sisu/sisu_markup/</a>
&gt;</i> </dd>
-<dt>as html with
-syntax highlighting for viewing: </dt>
+<dt>Some example marked up files
+are available as html with syntax highlighting for viewing: </dt>
<dd><i>&lt;<a href='http://www.jus.uio.no/sisu/sample/syntax'>http://www.jus.uio.no/sisu/sample/syntax</a>
&gt;</i>
</dd>
@@ -451,7 +457,7 @@ which by default html segments are made) <p>
<i>,{</i> subscript
<i>},</i> <p>
<i>+{</i> inserted text <i>}+</i> <p>
-<i>-{</i> strikethrough <i>}-</i>
+<i>-{</i> strikethrough <i>}-</i>
<h2><a name='sect10' href='#toc10'>Footnotes/Endnotes</a></h2>
<p>
<i>~{</i> a footnote
@@ -466,7 +472,7 @@ alternative endnote pair notation:
<p>
<i>~^</i> endnote marker <p>
<i>^~</i> endnote text following the paragraph in which the marker
-occurs
+occurs
<h2><a name='sect11' href='#toc11'>Line Operations (marker placed at start of line)</a></h2>
<p>
<i>!_</i> bold line <p>
@@ -478,7 +484,7 @@ indent paragraph one level <p>
<i>#</i> number paragraph (see headers for numbering document headings)
<p>
<i>_#</i> number paragraph level 2 (see headers for numbering document headings)
-
+
<h2><a name='sect12' href='#toc12'>Links</a></h2>
<p>
<i>{</i> link name <i>}<a href='http://url.org'>http://url.org</i></a>
@@ -520,7 +526,7 @@ if a server host name has been provided/configured, will provide a list
of available output types that would be generated using the shortcut command
and the markup file provided, i.e. output generated using the command (as
configured): "sisu -3sS markup_source_filename.sst", using server host, directory
-stub, filename to compose the link.
+stub, filename to compose the link.
<h2><a name='sect13' href='#toc13'>Adding a fixed names in html</a></h2>
<p>
<i>*~[name]</i>
@@ -528,7 +534,7 @@ manual location marker/tagging at present only in html to produce &lt;a name="[n
(use sparingly) <blockquote>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. </blockquote>
-
+
<h2><a name='sect14' href='#toc14'>Escape object
citation numbering</a></h2>
<p>
@@ -537,7 +543,7 @@ citation numbering</a></h2>
<p>
<i>-#</i> unnumbered paragraph, delete when not required (place marker at end of
paragraph) [used in dummy headings, eg. for segmented html] <p>
-
+
<h2><a name='sect15' href='#toc15'>Page breaks
(LaTeX/pdf)</a></h2>
<p>
@@ -549,69 +555,69 @@ which breaks a page, starting a new page in single column text and a new
column in double column text <p>
<i>&lt;:pn&gt;</i> page new, which starts a new page, in
both single and double column text (leaving an empty column in double column
-text if necessary).
+text if necessary).
<h2><a name='sect16' href='#toc16'>Comment line</a></h2>
<p>
<i>%</i> ignored by sisu in processing if placed
at beginning of line <p>
<i>%%</i> ignored by sisu in processing if placed at beginning
-of line, used for folding by vim folds
+of line, used for folding by vim folds
<h2><a name='sect17' href='#toc17'>Special characters</a></h2>
special characters
can be escaped with a backslash <i>{</i> } &lt; &gt; are contextual special characters,
(in combination with other characters). <i>~</i> - _ / % ^ and occasionally <i>!</i> # +
, are special characters in particular circumstances, see the syntax chart.
-[note that SiSU is not optimised for technical writing]
+[note that SiSU is not optimised for technical writing]
<h2><a name='sect18' href='#toc18'>Tables</a></h2>
<p>
<i>table{</i> [number
-of columns] [column width %];[column width %]
+of columns] [column width %];[column width %]
<p> [table content, line breaks
are important see example below]<br>
-
-<p> <i>}table</i>
+
+<p> <i>}table</i>
<p> sample table:<br>
-
-<p> <i>table{~h</i> c3; 26; 32; 32;
+
+<p> <i>table{~h</i> c3; 26; 32; 32;
<p> This is a table, column1<br>
this would become row one of column two<br>
column three of row one is here<br>
-
+
<p> column one row 2<br>
column two of row two<br>
column three of row two, and so on<br>
-
+
<p> column one row three<br>
and so on<br>
here<br>
-
-<p> <i>}table</i>
-<p> whole table gets an object citation number
-<p>
+
+<p> <i>}table</i>
+<p> whole table gets an object citation number
+<p>
<h2><a name='sect19' href='#toc19'>Other Grouped or
Pre-formatted Text</a></h2>
-<i>poem{</i>
+<i>poem{</i>
<p> [Text here]<br>
-
+
<p> [Text here]<br>
-
-<p> <i>}poem</i>
-<p> each verse is given an object citation number
+
+<p> <i>}poem</i>
+<p> each verse is given an object citation number
<p> ----<br>
-
-<p> <i>group{</i>
+
+<p> <i>group{</i>
<p> [Text here]<br>
-
-<p> <i>}group</i>
-<p> whole group gets an object citation number
+
+<p> <i>}group</i>
+<p> whole group gets an object citation number
<p> ----<br>
-
-<p> <i>code{</i>
+
+<p> <i>code{</i>
<p> [Text here]<br>
-
-<p> <i>}code</i>
-<p> whole group gets an object citation number
-<p>
+
+<p> <i>}code</i>
+<p> whole group gets an object citation number
+<p>
<h2><a name='sect20' href='#toc20'>Composite Documents</a></h2>
<p>
It
@@ -628,32 +634,32 @@ file, or <i>.ssi</i> (insert/information) <i>.sst</i> A secondary file of the co
document is built prior to processing with the same prefix and the suffix
<i>._sst</i> and <i>._sst</i> There are a number of alternative syntaxes for requiring
external documents in order to permit use of ascii hypertext linking available
-in the vim editor. They are as follows:
-<p>
+in the vim editor. They are as follows:
+<p>
<dl>
<dt>basic markup for importing a document
</dt>
<dd>
-<p> <i>r{</i> filename <i>}</i>
-<p> <i>{</i> filename.si <i>}require</i>
-<p> <i>&lt;&lt;</i> { filename.si <i>}</i> #for vim folds
+<p> <i>r{</i> filename <i>}</i>
+<p> <i>{</i> filename.si <i>}require</i>
+<p> <i>&lt;&lt;</i> { filename.si <i>}</i> #for vim folds
<p>
</dd>
<dt>importing a document with textlink syntax </dt>
<dd>
-<p> <i>|filename.si|@|^|require</i>
+<p> <i>|filename.si|@|^|require</i>
<p> <i>&lt;&lt;</i> |filename.si|@|^|
-<p>#for vim folds
+<p>#for vim folds
<p> </dd>
<dt>importing a document with thlnk syntax </dt>
<dd>
<p> <i>&lt;url:filename.si&gt;require</i>
-<p> <i>&lt;&lt;</i> &lt;url:filename.si&gt; #for vim folds
+<p> <i>&lt;&lt;</i> &lt;url:filename.si&gt; #for vim folds
<p> </dd>
<dt>remote documents may be called with the
@@ -668,64 +674,64 @@ thlnk syntax (or regular sisu syntax), e.g. </dt>
<h2><a name='sect21' href='#toc21'>Document Headers</a></h2>
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.
+information as to how the document as a whole is to be processed.
<p> All header
instructions may take either form: <i>@headername:</i> [introduced in 0.38] or
-<p><i>0~headername</i> All Dublin Core meta tags are available
+<p><i>0~headername</i> All Dublin Core meta tags are available
<p> <i>@indentifier:</i> information
-or instructions [introduced in 0.38]
-<p> or
+or instructions [introduced in 0.38]
+<p> or
<p> <i>0~indentifier</i> information or instructions,
-old equivalent, depreciated
+old equivalent, depreciated
<p> where the "identifier" is a tag recognised
by the program, and the "information" or "instructions" belong to the tag/indentifier
-specified.
+specified.
<p> Note: a header where used should only be used once; all headers
apart from @title: (0~title) are optional; the @structure: (0~toc) header
-is used to describe document structure, and can be useful to know.
+is used to describe document structure, and can be useful to know.
<p> @structure:
-PART; CHAPTER; SECTION; ARTICLE; none; none;
+PART; CHAPTER; SECTION; ARTICLE; none; none;
<p> 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 i.e. ^)
+to start at the beginning of a line of text i.e. ^)
<p> For help see one of
the following (and markup samples):<br>
-
+
<p> * interactive help - type &rsquo;sisu --help headers&rsquo;<br>
-
+
<p> * marked up text samples<br>
-
+
<p> * the SiSU_Markup.txt file provided with the program<br>
-
+
<p> * an outline of headers is provided below --&gt;<br>
-
+
<h2><a name='sect22' href='#toc22'>Outline of header options</a></h2>
<i>%</i> SiSU 0.38 [declared file-type identifier with
-markup version]
+markup version]
<p> <i>@title:</i> My Title - This is now the Title of the Document
-<p>and used as such
-<p> <i>@subtitle:</i> The Subtitle if any
+<p>and used as such
+<p> <i>@subtitle:</i> The Subtitle if any
<p> <i>@creator:</i> [or ~author]
-<p>Ralph Amissah
-<p> <i>@subject:</i> (whatever your subject)
-<p> <i>@description:</i>
+<p>Ralph Amissah
+<p> <i>@subject:</i> (whatever your subject)
+<p> <i>@description:</i>
<p> <i>@publisher:</i>
-<p> <i>@contributor:</i>
-<p> <i>@translator:</i> [or ~translated_by]
+<p> <i>@contributor:</i>
+<p> <i>@translator:</i> [or ~translated_by]
<p> <i>@illustrator:</i> [or ~illustrated_by]
-<p> <i>@prepared_by:</i> [or ~digitized_by]
+<p> <i>@prepared_by:</i> [or ~digitized_by]
<p> <i>@date:</i> 2000-08-27 [ also @date.created:
-@date.issued: @date.available: @date.valid: @date.modified: ]
+@date.issued: @date.available: @date.valid: @date.modified: ]
<p> <i>@type:</i> article
-<p> <i>@format:</i>
-<p> <i>@identifier:</i>
-<p> <i>@source:</i>
+<p> <i>@format:</i>
+<p> <i>@identifier:</i>
+<p> <i>@source:</i>
<p> <i>@language:</i> [or @language.document:] language
in which current version of document is published. Some country settings
result in processing adjustments, e.g. in LaTeX hyphenation, some country
@@ -735,48 +741,48 @@ es - Spanish, pt - Portuguese, sv - Swedish, da - Danish, fi - Finnish, no -
Norwegian, is - Icelandic, nl - Dutch, ee - Estonian, hu - Hungarian, pl - Polish,
ro - Romanian, ru - Russian, gl - Greek, uk - Ukranian, tr - Turkish, si - Slovene,
sk - Slovak, hr - Croatian, cs - Czech, bg - Bulgarian ) [however, encodings
-are not available for all of the languages listed.]
+are not available for all of the languages listed.]
<p> <i>@language.original:</i>
-<p>original language in which the work was published
+<p>original language in which the work was published
<p> <i>@papersize:</i> (A4|US_letter|book_B5|book_A5|US_legal)
-<p> <i>@relation:</i>
-<p> <i>@coverage:</i>
+<p> <i>@relation:</i>
+<p> <i>@coverage:</i>
<p> <i>@rights:</i> copyright, all rights reserved, public
-domain, copyleft, creative commons variant, etc.
-<p> <i>@owner:</i>
+domain, copyleft, creative commons variant, etc.
+<p> <i>@owner:</i>
<p> <i>@keywords:</i> text
document generation processing management LaTeX pdf structured XML citation
[your keywords here, used for example by rss feeds, and in sql sear ches]
-<p> <i>@abstract:</i> [paper abstract, placed after table of contents]
+<p> <i>@abstract:</i> [paper abstract, placed after table of contents]
<p> <i>@comment:</i>
-[...]
+[...]
<p> <i>@catalogue:</i> loc=[Library of Congress classification]; dewey=[Dewey
-classification]; isbn=[ISBN]; pg=[Project Gutenberg text number]
+classification]; isbn=[ISBN]; pg=[Project Gutenberg text number]
<p> <i>@classify_loc:</i>
-<p>Library of Congress classification
+<p>Library of Congress classification
<p> <i>@classify_dewey:</i> Dewey classification
-<p> <i>@classify_isbn:</i> ISBN
-<p> <i>@classify_pg:</i> Project Gutenberg text number
+<p> <i>@classify_isbn:</i> ISBN
+<p> <i>@classify_pg:</i> Project Gutenberg text number
<p> <i>@prefix_a:</i>
-[prefix is placed just before table of contents - not implemented]
+[prefix is placed just before table of contents - not implemented]
<p> <i>@prefix_b:</i>
-or @prefix: [prefix is placed just after table of contents]
+or @prefix: [prefix is placed just after table of contents]
<p> <i>@rcs:</i> $Id$
[or <i>@cvs:</i> 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 ]
+a document ]
<p> <i>@structure:</i> 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 i.e. ^) default markers :A~ to :C~ and 1~ to 6~ can be used
within text instead, without this header ta g, and may be used to supplement
the instructions provided in this header tag if provided (@structure: is
-a synonym for @toc:)
+a synonym for @toc:)
<p> <i>@markup:</i> information on the markup used, e.g. <i>new=1,2,3;</i>
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
@@ -790,18 +796,18 @@ 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]
+see headings]
<p> <i>@bold:</i> [regular expression of words/phrases to be made bold]
-<p> <i>@italics:</i> [regular expression of words/phrases to italicise]
+<p> <i>@italics:</i> [regular expression of words/phrases to italicise]
<p> <i>@vocabulary:</i>
-<p>name of taxonomy/vocabulary/wordlist to use against document
+<p>name of taxonomy/vocabulary/wordlist to use against document
<p> <i>@skin:</i> skin_doc_[name_of_desired_document_skin]
<p> <i>@links:</i> { SiSU }<a href='http://www.jus.uio.no/sisu/'>http://www.jus.uio.no/sisu/</a>
{ FSF }<a href='http://www.fsf.org'>http://www.fsf.org</a>
-
+
<p> <i>@promo:</i>
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
@@ -810,33 +816,33 @@ sample: free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_willia
<p> <i>:A~</i> 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
-<p> <i>:B~</i> Second level heading [this is a heading level divider]
+<p> <i>:B~</i> Second level heading [this is a heading level divider]
<p> <i>:C~</i> Third
-level heading [this is a heading level divider]
+level heading [this is a heading level divider]
<p> <i>1~</i> 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
-<p>form 1~my_filename_for_this_segment
+<p>form 1~my_filename_for_this_segment
<p> <i>2~</i> 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.
+normally be marked 1.1 or 1.2 or 1.3 or 2.1 etc. in a document.
<p> <i>3~</i> 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
+marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document
<p> NOTE: headers and heading
levels used in the description provided refer to 0.38 markup (a conversion
script provided in sisu-examples, modify.rb makes conversion between 0.37
-and 0.38 markup simple)
-<p> For some help on document structure try
+and 0.38 markup simple)
+<p> For some help on document structure try
<p> <i>sisu</i> --help
-<p>headings
-<p> and view sample markup documents provided
-<p>
-<p>
+<p>headings
+<p> and view sample markup documents provided
+<p>
+<p>
<h2><a name='sect23' href='#toc23'>Configuration
Files</a></h2>
<p>
@@ -855,20 +861,20 @@ Configuration determines the output and processing directories
and the database access details. <p>
A sample sisurc.yml may be found in /etc/sisu/sisurc.yml
-<p>
+<p>
<h2><a name='sect24' href='#toc24'>More HELP on Markup and headers</a></h2>
type: sisu ~<br>
sisu --help<br>
-
+
<p> markup help is available on:<br>
document wide instructions: headers (document structure)<br>
general text markup: headings; endnotes; tables<br>
-
+
<p> A markup table and sample marked-up files (also in html with syntax highlighting)
-are available at:
+are available at:
<p> <i>&lt;<a href='http://www.jus.uio.no/sisu/sample'>http://www.jus.uio.no/sisu/sample</a>
-&gt;</i>
-<p>
+&gt;</i>
+<p>
<h2><a name='sect25' href='#toc25'>DIRECTORY STRUCTURE
&amp; Document Output</a></h2>
@@ -893,7 +899,7 @@ is not writable to <i>/tmp/sisu_processing</i> </dd>
<p>
Output is written to sub-directories
within <i>/var/www/</i> if it exists and is writable, and otherwise to <i>~/sisu_output</i>
-
+
<h2><a name='sect27' href='#toc27'>Markup Document Directories and File Mapping</a></h2>
<dl>
@@ -935,7 +941,7 @@ text <p>
<i>doc.html</i> full length scrollable document <p>
<i>toc.html</i> index for segmented
text <p>
-html segments, as many as there may be...
+html segments, as many as there may be...
<dl>
<dt><i>portrait.pdf</i> </dt>
@@ -1021,7 +1027,7 @@ the directory <i>~/ebook</i> <p>
would be placed in tables
within the database <p>
<blockquote><i>SiSU_ebook</i> </blockquote>
-
+
<h2><a name='sect30' href='#toc30'>SKINS - document, directory and site skins</a></h2>
<p>
Skins
@@ -1054,7 +1060,7 @@ may be found in /etc/sisu/skin/doc and /usr/share/doc/sisu/sisu_markup_samples/d
(or equivalent directory) <p>
Samples of list.yml and promo.yml may be found
in /usr/share/doc/sisu/sisu_markup_samples/dfsg/_sisu/skin/yml (or equivalent
-directory)
+directory)
<h2><a name='sect31' href='#toc31'>Document Naming Convention</a></h2>
<p>
SiSU documents are named with the
@@ -1075,14 +1081,14 @@ created when a composite file is constructed, and when a url is provided,
it is saved locally for processing, as a secondary processing file. Secondary
files may be clobbered by SiSU at will, and are not a way of storing information.
-<p> <i>.sxs.xml</i> simple xml sax, sisu markup representation
+<p> <i>.sxs.xml</i> simple xml sax, sisu markup representation
<p> <i>.sxd.xml</i> simple xml dom,
-<p>sisu markup representation
+<p>sisu markup representation
<p> <i>.sxn.xml</i> simple xml node, sisu markup representation
<p> <i>.sxs.xml.sst</i> or <i>.sxd.xml.sst</i> or <i>.sxn.xml.sst</i> auto-converted from a simple xml markup
-representation (sxs, sxd, sxn)
+representation (sxs, sxd, sxn)
<h2><a name='sect32' href='#toc32'>Remote Operations</a></h2>
<p>
These may be of three
@@ -1111,7 +1117,7 @@ an identical filename to another, e.g. local file, that is to be processed
in the same directory. So far this has not been found to happen in practice...
Alternative solutions are under consideration, but it is desired that filenames
be human assigned, and meaningful, so hash keys of contents for filenames
-are not amongst the options considered.
+are not amongst the options considered.
<h2><a name='sect33' href='#toc33'>Note</a></h2>
<p>
For basic use only a fraction
@@ -1123,8 +1129,8 @@ to in the text <i>&lt;<a href='http://www.jus.uio.no/sisu/SiSU'>http://www.jus.u
&gt;</i> The flags to generate html
and pdf for use locally would be sisu -mHp [name of file to be processed]
This does assume an ok install and setup of SiSU and the associated software
-it uses.
-<p>
+it uses.
+<p>
<h2><a name='sect34' href='#toc34'>Processing Examples</a></h2>
<p>
To initialise a new directory <b>sisu</b> <i>-C</i> <p>
@@ -1172,7 +1178,7 @@ it may be necessary
to first run <b>sisu</b> <i>-Dv</i> createdb <p>
import all marked up files first time into
a database: <b>sisu</b> <i>-Dv</i> import * <p>
-<i>-c</i> toggles color
+<i>-c</i> toggles color
<h2><a name='sect35' href='#toc35'>Interactive Help Options</a></h2>
<p>
SiSU
@@ -1211,69 +1217,69 @@ tables of contents)
external_programs, dublincore, termsheet, search, features,
external_programs, license, exit
</pre>
-<p>
+<p>
<h2><a name='sect36' href='#toc36'>SiSU VERSION CONVERSION</a></h2>
<p>
<i>sisu</i> --to-current [filename/wildcard] converts from
-0.37 markup to current markup (0.38)
+0.37 markup to current markup (0.38)
<p> <i>sisu</i> --to-38 [filename/wildcard] converts
-<p>from 0.37 markup to 0.38
+<p>from 0.37 markup to 0.38
<p> <i>sisu</i> --to-37 [filename/wildcard] converts from 0.38
-<p>markup to 0.37
+<p>markup to 0.37
<p> <i>sisu</i> --convert-36to37 [filename/wildcard] re-names file from
-<p>pre-0.36 convention to 0.37
+<p>pre-0.36 convention to 0.37
<p> <i>sisu</i> --convert-footnotes [filename/wildcard] converts
-<p>footnotes to preferred embedded footnote markup style
+<p>footnotes to preferred embedded footnote markup style
<p> <i>sisu</i> --convert-footnotes-force
[filename/wildcard] converts footnotes to preferred embedded footnote markup
style, even if there is a mismatch of footnote numbers. WARNING: there is
a problem with the source document and it is necessary to manually check
-where each footnotes actually should be.
+where each footnotes actually should be.
<p> convert from sst to simple xml
-representations (sax, dom and node):
+representations (sax, dom and node):
<p> <i>sisu</i> --to-sax [filename/wildcard] or
-<i>sisu</i> --to-sxs [filename/wildcard]
+<i>sisu</i> --to-sxs [filename/wildcard]
<p> <i>sisu</i> --to-dom [filename/wildcard] or <i>sisu</i>
---to-sxd [filename/wildcard]
+--to-sxd [filename/wildcard]
<p> <i>sisu</i> --to-node [filename/wildcard] or <i>sisu</i> --to-sxn
-[filename/wildcard]
+[filename/wildcard]
<p> convert to sst from simple xml representations (sax,
-dom and node):
+dom and node):
<p> <i>sisu</i> --from-xml2sst [filename/wildcard [.sxs.xml,.sxd.xml,sxn.xml]]
-<p> or the same:
+<p> or the same:
<p> <i>sisu</i> --from-sxml [filename/wildcard [.sxs.xml,.sxd.xml,sxn.xml]]
<p> <i>sisu</i> --from-kdi [kdissert filename] attempts to convert a kdissert file (.kdi)
-<p>to sisu markup
+<p>to sisu markup
<p> <i>sisu</i> --identify [filename/wildcard] attempts to identify
-<p>the markup version of the file
+<p>the markup version of the file
<p> <i>sisu</i> --query=[version number] and <i>sisu</i> --query=history
-<p>provides a brief summary of changes to SiSU markup
-<p>
+<p>provides a brief summary of changes to SiSU markup
+<p>
<h2><a name='sect37' href='#toc37'>Sample Markup Documents</a></h2>
<p>
<p>
Sample markup documents are provided in sisu-examples and are available
-online.
-<p>
+online.
+<p>
<h2><a name='sect38' href='#toc38'>Home Page</a></h2>
<p>
<i>&lt;<a href='http://www.jus.uio.no/sisu'>http://www.jus.uio.no/sisu</a>
-&gt;</i>
-<p>
+&gt;</i>
+<p>
<h2><a name='sect39' href='#toc39'>Author</a></h2>
Ralph Amissah <i>&lt;ralph@amissah.com&gt;</i>
-or <i>&lt;ralph.amissah@gmail.com&gt;</i>
-<p>
+or <i>&lt;ralph.amissah@gmail.com&gt;</i>
+<p>
<h2><a name='sect40' href='#toc40'>See Also</a></h2>
<a href='http:~/bin/man2html?sisu:8'><b>sisu(8)</a>
,</b> <a href='http:~/bin/man2html?sisu_webrick:1'><b>sisu_webrick(1)</a>
diff --git a/data/doc/sisu/on_markup.txt b/data/doc/sisu/on_markup.txt
index 72aee93b..c86df967 100644
--- a/data/doc/sisu/on_markup.txt
+++ b/data/doc/sisu/on_markup.txt
@@ -1,11 +1,11 @@
SiSU Markup Standard
* Copyright Ralph Amissah
-* version 0.16.0
+* version 0.38.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
+ * data/sisu-examples/sample/document_samples_sisu_markup
+ * /usr/share/sisu-examples/sample/document_samples_sisu_markup
* http://www.jus.uio.no/sisu/sample/markup
* http://www.jus.uio.no/sisu/sample/syntax
* book samples
@@ -16,7 +16,7 @@ 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
+sisu-examples/sample/document_samples_sisu_markup
or online at
SiSU Markup syntax
@@ -24,9 +24,9 @@ SiSU Markup syntax
sisu
Data text markup (alternative to available html subset)
- 1~ heading/title [levels 1 to 6 available]
+:A~ heading/title [levels :A~ to :C~ available]
- 4~filename heading [segmentation level]
+1~filename heading [segmentation level, levels 1~ to 3~ available ]
!{emphasis}!
@@ -49,22 +49,24 @@ sisu
------------------------------------------
Indentation and bullets
- _1 indent paragraph one level
+_1 indent paragraph one level
- _2 indent paragraph two steps
+_2 indent paragraph two steps
- _2 indent paragraph two steps
+ ...
- _* bullet text
+_9 indent paragraph nine steps
- _1* bullet text, first indent
+_* 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 1., 2., 3, etc.
- _# numbered list numbered list indented a., b., c., d., etc.
+_# numbered list numbered list indented a., b., c., d., etc.
------------------------------------------
Endnotes
@@ -75,7 +77,7 @@ sisu
alternative endnote pair notation
~^ endnote marker
- ^~ endnote text following the paragraph in which the marker occurs
+^~ endnote text following the paragraph in which the marker occurs
------------------------------------------
Links
@@ -95,12 +97,12 @@ sisu
{ 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]
@@ -118,7 +120,7 @@ sisu
------------------------------------------
- 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...
+ 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...
------------------------------------------
@@ -181,82 +183,74 @@ 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
+All header instructions take the form @tagname: All Dublin Core meta tags are available
+@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
+@title: My Title - This is now the Title of the Document and used as such
-0~subject Document production and management (or whatever your subject)
+@subtitle: The Subtitle if any
-0~description
+@creator: [or ~author] Ralph Amissah
-0~publisher
+@subject: Document production and management (or whatever your subject)
-0~contributor
+@description:
-0~date 2000-08-27
- [ also 0~date.created 0~date.issued 0~date.available 0~date.valid 0~date.modified ]
+@publisher:
-0~type article
+@contributor:
-0~format
+@date: 2000-08-27
+ [ also @date:.created @date:.issued @date:.available @date:.valid @date:.modified ]
-0~identifier
+@type: article
-0~source
+@format:
-0~language (en|us|fr|de|es|se|dk|fi|no)
+@identifier:
-0~relation
+@source:
-0~coverage
+@language: (en|us|fr|de|es|se|dk|fi|no)
-0~rights copyright, all rights reserved, public domain, copyleft, creative commons variant, etc.
+@relation:
-0~owner
+@coverage:
-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]
+@rights: copyright, all rights reserved, public domain, copyleft, creative commons variant, etc.
-0~abstract [paper abstract, placed after table of contents]
+@owner:
-0~comment [...]
+@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~classify_loc [Library of Congress classification]
+@abstract: [paper abstract, placed after table of contents]
-0~classify_dewey [Dewey classification system]
+@comment: [...]
-0~classify_isbn [ISBN]
+@prefix_a: [prefix is placed just before table of contents - not implemented]
-0~classify_pg [Project Gutenberg text number]
+@prefix_b: or @prefix: [prefix is placed just after table of contents]
-0~prefix_a [prefix is placed just before table of contents - not implemented]
+@cvs: $Id$ [used by cvs to embed versioning (revision control) information into document, cvs can usefully provide a history of updates to a document (though I no longer use it for programming, preferring darcs and arch/tla cvs performs this function for documents quite well) ]
-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;
+@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]
+@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]
+@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
+@vocabulary: name of taxonomy/vocabulary/wordlist to use against document
-0~skin skin_doc_[name_of_desired_document_skin]
+@skin: skin_doc_[name_of_desired_document_skin]
-0~links http://google.com; Google;
+@links: http://google.com; Google;
-1~ Top level heading [this is usually the same as the title 0~title ]
+1~ Top level heading [this is usually the same as the title @title: ]
2~ Second level heading [this is a heading level divider]
@@ -270,25 +264,25 @@ default markers 1~ to 6~ can be used within text instead, without this header ta
SAMPLE DOCUMENT
-For sample marked up documents see the directory
+For sample marked up documents see the directory
markup_samples
-0~title Working Sample Document
+@title: Working Sample Document
-0~subtitle Demonstrating markup
+@subtitle: Demonstrating markup
-0~creator Ralph Amissah
+@creator: Ralph Amissah
-0~date
+@date:
-0~markup num_top=4
+@markup: num_top=4
-0~links
+@links:
1~ A Sample Document
-
-2~ just for fun
-
+
+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.
@@ -297,13 +291,13 @@ Ordinary Text follows here. The Title would be a Chapter or Article depending on
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.
+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
+_1 for an outline of sisu markup type: sisu ~ markup
The example ends here.
@@ -313,7 +307,7 @@ 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,
+basic markup for importing a document into another,
[note placement is at start of the line, no spaces despite presentation below]
r{ filename }
diff --git a/data/sisu/image/bullet_08.png b/data/sisu/image/bullet_08.png
new file mode 100644
index 00000000..9e81da10
--- /dev/null
+++ b/data/sisu/image/bullet_08.png
Binary files differ
diff --git a/data/sisu/image/bullet_09.png b/data/sisu/image/bullet_09.png
new file mode 100644
index 00000000..08c76edc
--- /dev/null
+++ b/data/sisu/image/bullet_09.png
Binary files differ
diff --git a/data/sisu/image/bullet_10.png b/data/sisu/image/bullet_10.png
new file mode 100644
index 00000000..87ed61fd
--- /dev/null
+++ b/data/sisu/image/bullet_10.png
Binary files differ
diff --git a/data/sisu/image/bullet_11.png b/data/sisu/image/bullet_11.png
new file mode 100644
index 00000000..8ef22aee
--- /dev/null
+++ b/data/sisu/image/bullet_11.png
Binary files differ
diff --git a/data/sisu/image/bullet_12.png b/data/sisu/image/bullet_12.png
new file mode 100644
index 00000000..ebb62725
--- /dev/null
+++ b/data/sisu/image/bullet_12.png
Binary files differ
diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb
index d1e6832a..f5aabf7f 100644
--- a/lib/sisu/v0/css.rb
+++ b/lib/sisu/v0/css.rb
@@ -433,7 +433,7 @@ WOK
list-style: none;
}
li {
- background: url(../image/bullet_red.png) no-repeat 0px 6px;
+ background: url(../image/bullet_09.png) no-repeat 0px 6px;
/* list-style-type: disc; */
padding-left: 20px;
display: block;
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index 2e5075d4..c2c92485 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -241,13 +241,15 @@ module SiSU_DAL
para.gsub!(/\\trademark\b|\\tm\b/,'&#174;')
#non_utf8(para)
para=para + "\n"
- case para
- when /\^~/ # endnotes
- #% Note must do this first (earlier loop) and then enter gathered data into ~^\d+
- sub_para=para.dup
- @@endnote_array << sub_para.gsub!(/\n/,'').gsub!(/\^~\s+(.+)\s*/, %{~\{#{endnote_no} \\1 \}~}).strip
- endnote_no+=1
- para=nil if para =~/\^~ .+/ #removes 'binary' endnote now in endnote array for later insertion
+ unless para =~/^<:code>/
+ case para
+ when /\^~/ # endnotes
+ #% Note must do this first (earlier loop) and then enter gathered data into ~^\d+
+ sub_para=para.dup
+ @@endnote_array << sub_para.gsub!(/\n/,'').gsub!(/\^~\s+(.+)\s*/, %{~\{#{endnote_no} \\1 \}~}).strip
+ endnote_no+=1
+ para=nil if para =~/\^~ .+/ #removes 'binary' endnote now in endnote array for later insertion
+ end
end
@tuned_file << para unless para.nil?
end
@@ -770,20 +772,22 @@ module SiSU_DAL
if @md.mod.inspect =~/--no-dagger|--no-annotate/
para.gsub!(/~\[[+]\s.+?\]~/,'')
end
- case para
- # auto-numbered endnotes <!e!> <!e_!> -->
- when /~\{\s+.+?\}~|~\[[*+]\s+.+?\]~/
- para.gsub!(/\s*(\}~|\]~)/,' \1') # required 2003w31
- word_mode=para.scan(/\S+/)
- word_mode=endnote_call_number(word_mode)
- para=word_mode.join(' ')
- endnote_ref+=1
- when /~\^(?:\s|$)|<:e>/
- #%Note inserts endnotes previously gathered from /^(<!e[:_]!>|[-~]\{{3})/ (in earlier loop)
- word_mode=para.scan(/\S+/)
- word_mode=endnote_call_number(word_mode)
- para=word_mode.join(' ')
- endnote_ref+=1
+ unless para =~/^<:code>/
+ case para
+ # auto-numbered endnotes <!e!> <!e_!> -->
+ when /~\{\s+.+?\}~|~\[[*+]\s+.+?\]~/
+ para.gsub!(/\s*(\}~|\]~)/,' \1') # required 2003w31
+ word_mode=para.scan(/\S+/)
+ word_mode=endnote_call_number(word_mode)
+ para=word_mode.join(' ')
+ endnote_ref+=1
+ when /~\^(?:\s|$)|<:e>/
+ #%Note inserts endnotes previously gathered from /^(<!e[:_]!>|[-~]\{{3})/ (in earlier loop)
+ word_mode=para.scan(/\S+/)
+ word_mode=endnote_call_number(word_mode)
+ para=word_mode.join(' ')
+ endnote_ref+=1
+ end
end
@tuned_file << para
end
@@ -791,23 +795,25 @@ module SiSU_DAL
end
def endnote_call_number(data)
data.each do |word|
- case word
- when /~\{/
- unless word =~/~\{[*+]+/
- word.gsub!(/~\{/,"~\{#{@@endnote_counter} ")
+ unless data =~/^<:code>/
+ case word
+ when /~\{/
+ unless word =~/~\{[*+]+/
+ word.gsub!(/~\{/,"~\{#{@@endnote_counter} ")
+ @@endnote_counter+=1
+ end
+ when /~\[/
+ if word =~/~\[[+]/
+ word.gsub!(/~\[[+]/,"~\[\+#{@@endnote_counter_dag} ")
+ @@endnote_counter_dag+=1
+ else
+ word.gsub!(/~\[[*]?/,"~\[\*#{@@endnote_counter_asterisk} ")
+ @@endnote_counter_asterisk+=1
+ end
+ when /~\^|<:e>/
+ word.gsub!(/~\^|<:e>/,"#{@@endnote_array[@@endnote_counter-1]}")
@@endnote_counter+=1
end
- when /~\[/
- if word =~/~\[[+]/
- word.gsub!(/~\[[+]/,"~\[\+#{@@endnote_counter_dag} ")
- @@endnote_counter_dag+=1
- else
- word.gsub!(/~\[[*]?/,"~\[\*#{@@endnote_counter_asterisk} ")
- @@endnote_counter_asterisk+=1
- end
- when /~\^|<:e>/
- word.gsub!(/~\^|<:e>/,"#{@@endnote_array[@@endnote_counter-1]}")
- @@endnote_counter+=1
end
end
end
@@ -973,19 +979,22 @@ module SiSU_DAL
digest_all=hash_class.hexdigest(para) # print "#{hash_class.name}: "; puts digest_all #length==32 or 64
stripped=strip_clean_of_markup(para)
digest_strip=hash_class.hexdigest(stripped)
- case para
- when /~\{[\d*+]+\s+.+?\}~|~\[[*+]\d+\s+.+?\]~/
- en_and_para,en_and_para_digest=[],[]
- para.gsub!(/\s*(\}~|\]~)/,' \1') #watch
- para_plus_en=para.scan(/.*?~\{.+?\}~|.*?~\[.+?\]~/)
- para_tail=if para =~/(?:.*?~\{.+?\}~|.*?~\[.+?\]~)+([\s\S]+)/
- /(?:.*?~\{.+?\}~|.*?~\[.+?\]~)+(.+?<~\d+;(?:\w|[0-6]:)\d+;\w\d+>)/.match(para)[1]
- else ''
+ unless para =~/<:code>/
+ case para
+ when /~\{[\d*+]+\s+.+?\}~|~\[[*+]\d+\s+.+?\]~/
+ en_and_para,en_and_para_digest=[],[]
+ para.gsub!(/\s*(\}~|\]~)/,' \1') #watch
+ para_plus_en=para.scan(/.*?~\{.+?\}~|.*?~\[.+?\]~/)
+ para_tail=if para =~/(?:.*?~\{.+?\}~|.*?~\[.+?\]~)+([\s\S]+)/
+ /(?:.*?~\{.+?\}~|.*?~\[.+?\]~)+(.+?<~\d+;(?:\w|[0-6]:)\d+;\w\d+>)/.match(para)[1]
+ else ''
+ end
+ para_plus_en << para_tail
+ en_and_para_digest << endnote_digest(para_plus_en)
+ para_new=en_and_para_digest.join(' ')
+ @tuned << para_new + '<' + digest_strip + ':' + digest_all + '>' unless para.nil?
+ else @tuned << para + '<' + digest_strip + ':' + digest_all + '>' unless para.nil?
end
- para_plus_en << para_tail
- en_and_para_digest << endnote_digest(para_plus_en)
- para_new=en_and_para_digest.join(' ')
- @tuned << para_new + '<' + digest_strip + ':' + digest_all + '>' unless para.nil?
else @tuned << para + '<' + digest_strip + ':' + digest_all + '>' unless para.nil?
end
@tuned.join
diff --git a/lib/sisu/v0/dal_doc_str_code.rb b/lib/sisu/v0/dal_doc_str_code.rb
index 18ac03d8..52aa4a40 100644
--- a/lib/sisu/v0/dal_doc_str_code.rb
+++ b/lib/sisu/v0/dal_doc_str_code.rb
@@ -77,15 +77,15 @@ module SiSU_document_structure_code
@verse_count=0
data.each do |para|
para.gsub!(/(<:(?:code|verse|alt|group)>)\s/,'\1') #double check
- para.gsub!(/(?:\n\s*\n)+/m,"\n")
+ para.gsub!(/(?:\n\s*\n)+/m,"\n") unless @@flag['code']
if para =~/^code\{/
@@flag['code']=true
@@counter=1
para.gsub!(/^code\{.*/,'<:code>')
- elsif para =~/^(?:poem)\{/
+ elsif para =~/^(?:poem)\{/ and not @@flag['code']
@@flag['poem']=true
para.gsub!(/^(poem)\{.*/,'<:verse>')
- elsif para =~/^(?:alt|group)\{/ #group not tested, stub 2005
+ elsif para =~/^(?:alt|group)\{/ and not @@flag['code'] #group not tested, stub 2005
@@flag['group']=true
para.gsub!(/^(alt|group)\{.*/,'<:\1>')
end
@@ -94,22 +94,27 @@ module SiSU_document_structure_code
para.gsub!(/^\}code.*/,'<:code-end>')
@@flag['code']=false
end
- if @@flag['code'] #or para =~/<:code-end>/ #and para =~/\S/
- sub_array=para.dup
+ if @@flag['code'] or para =~/<:code-end>/ #and para =~/\S/
+ sub_array=if para !~/<:code(?:-end)?>/; para.dup + '<:br>'
+ else para.dup
+ end
@line_mode=sub_array.scan(/.+/)
+ #@line_mode=[]
+ #sub_array.scan(/.+/) {|w| @line_mode << w + '<:br>' if w =~/[\Ss]+/}
SiSU_document_structure_code::Code.new(@md,@line_mode).code_lines('code')
para=@line_mode.join
end
- elsif @@flag['poem'] or @@flag['group']
+ elsif ( @@flag['poem'] or @@flag['group'] ) and not @@flag['code']
if @@flag['poem'] and para =~/^\}(?:poem)/
para.gsub!(/^\}(poem).*/,"\n<:verse-end>")
@@flag['poem']=false
- elsif @@flag['group'] and para =~/^\}(?:alt|group)/
+ elsif ( @@flag['group'] and para =~/^\}(?:alt|group)/ ) and not @@flag['code']
para.gsub!(/^\}(alt|group).*/,'<:\1-end>')
@@flag['group']=false
end
if @@flag['poem'] or @@flag['group'] and para =~/\S/ \
- and para !~/<:(verse|code|alt|group)(-end)?>/
+ and para !~/<:(verse|code|alt|group)(-end)?>/ \
+ and not @@flag['code']
sub_array=para.dup
@line_mode=sub_array.scan(/.+/)
type=if @@flag['poem']; 'poem'
@@ -130,10 +135,11 @@ module SiSU_document_structure_code
elsif para =~/<:(?:code|alt|group|verse)-end>/
@verse_count=0
@tuned_group << para
- if para =~/<:group-end>/
- tuned_file << @tuned_group.join("\n")
- else
- tuned_file << @tuned_group.join
+ tuned_file <<= if para =~/<:group-end>/
+ @tuned_group.join("\n")
+ else @tuned_group=@tuned_group.join
+ @tuned_group.gsub!(/<:br><:br>(<:code-end>)/,'\1')
+ @tuned_group
end
@tuned_group=[]
else tuned_file << para
@@ -144,17 +150,18 @@ module SiSU_document_structure_code
def code_lines(type='')
data=@data
data.each do |line|
- if line =~/\S/ and line !~/^(?:alt|code|group|poem)\{|^\}(?:alt|code|group|poem)|<:(?:code|verse|alt|group).+/
+ if line =~/\S/ and line !~/^code\{|^\}code|<:code.+/
line.gsub!(/\s\s/,'&nbsp;&nbsp;')
line.gsub!(/^/,'<:codeline>') if type=='code' # try sort for texpdf special case
if line =~/https?:\/\/\S+$/
line.gsub!(/$/,' <:br>')
- else
- line.gsub!(/$/,'<:br>') #unless type=='code'
+ else line.gsub!(/$/,'<:br>') #unless type=='code'
end
if @@flag['code']; @@counter+=1
else
end
+ elsif line =~/^\s*$/
+ line.gsub!(/$/,' <:br>')
end
end
end
diff --git a/lib/sisu/v0/dal_doc_str_tables.rb b/lib/sisu/v0/dal_doc_str_tables.rb
index 2c128570..e0d019bb 100644
--- a/lib/sisu/v0/dal_doc_str_tables.rb
+++ b/lib/sisu/v0/dal_doc_str_tables.rb
@@ -131,13 +131,13 @@ module SiSU_document_structure_tables
if para =~/^\{(?:t|table)(?:~h)?(?:\sc\d+;)?[\d; ]*\}/
@tuned_file << table_visual(para)
@tuned_file=@tuned_file.flatten
- elsif @@flag['table_to'] or para[/table\{(?:~h)?/]
+ elsif @@flag['table_to'] or para[/^table\{(?:~h)?/]
if para[/table\{(?:~h)?\s+c(\d+;.+)/]
instructions=$1
@@column=instructions.split(/;\s*/)
@@columns=@@column[0]
- para.gsub!(/table\{~h\s+(c\d+?;.+?)$/,'<!Th¡ \1!>')
- para.gsub!(/table\{\s+(c\d+?;.+?)$/,'<!T¡ \1!>')
+ para.gsub!(/^table\{~h\s+(c\d+?;.+?)$/,'<!Th¡ \1!>')
+ para.gsub!(/^table\{\s+(c\d+?;.+?)$/,'<!T¡ \1!>')
@@flag['table_to']=true
end
if @@flag['table_to'] and para =~/\}table/
diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb
index 703d9f1b..292f7343 100644
--- a/lib/sisu/v0/dal_syntax.rb
+++ b/lib/sisu/v0/dal_syntax.rb
@@ -191,7 +191,7 @@ module Syntax
# # #numbered (list) level 1
# _# #numbered (list) level 2
line=line.dup
- if line !~/^0~|<:codeline>|<:code-end>/
+ unless line =~/^0~|<:codeline>|<:code-end>/
#special characters: ~ { } < > - _ / also used : ^ ! #
line_array=[]
line.gsub!(/^%{1,4} .+/mi,'') #remove comments
@@ -288,7 +288,7 @@ module Syntax
else #code blocks
line.gsub!(/(^|\s)(https?:\/\/\S+)/,'\1_\2') #line.gsub!(/(^|\s)(http:\/\/\S+)/,"\\1\\\\\\2") #escape urls
line.gsub!(/(^|\s)<(https?:\/\/\S+)>([\s,.]|$)/,'\1\2\3') #clean/unescape urls with decoration, re-apply decoration later
- line.gsub!(/<:codeline>/,"\n")
+ line.gsub!(/<:codeline>/,"\n&nbsp;&nbsp;") #temporary fix, prefer: #line.gsub!(/<:codeline>/,"\n")
end
line
end
diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb
index 0798e604..2894fa27 100644
--- a/lib/sisu/v0/html.rb
+++ b/lib/sisu/v0/html.rb
@@ -271,20 +271,22 @@ module SiSU_HTML
@scr_endnotes << format_head_scroll.title_endnote
@data.each do |para|
pg=para.dup
- if pg =~/~[{\[][\d*+]+ <a name="_[\d*+]+"/
- endnote_array=[]
- if pg=~/~\{[\d*+].+?\}\~/m
- endnote_array << pg.scan(/~\{[\d*+]+(.+?)\}\~/m)
- end
- if pg=~/~\[[\d*]+\s.+?\]\~/m
- endnote_array << pg.scan(/~\[[\d*]+(.+?)\]\~/m)
- end
- if pg=~/~\[[\d+]+\s.+?\]\~/m
- endnote_array << pg.scan(/~\[[\d+]+(.+?)\]\~/m)
- end
- endnote_array.flatten.each do |note|
- format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,note)
- @scr_endnotes << format_scroll.endnote_body
+ unless pg =~/^<:code>/
+ if pg =~/~[{\[][\d*+]+ <a name="_[\d*+]+"/ and not pg =~/^<:code>/
+ endnote_array=[]
+ if pg=~/~\{[\d*+].+?\}\~/m
+ endnote_array << pg.scan(/~\{[\d*+]+(.+?)\}\~/m)
+ end
+ if pg=~/~\[[\d*]+\s.+?\]\~/m
+ endnote_array << pg.scan(/~\[[\d*]+(.+?)\]\~/m)
+ end
+ if pg=~/~\[[\d+]+\s.+?\]\~/m
+ endnote_array << pg.scan(/~\[[\d+]+(.+?)\]\~/m)
+ end
+ endnote_array.flatten.each do |note|
+ format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,note)
+ @scr_endnotes << format_scroll.endnote_body
+ end
end
end
end
diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb
index b2cfb497..629cfc0c 100644
--- a/lib/sisu/v0/html_scroll.rb
+++ b/lib/sisu/v0/html_scroll.rb
@@ -88,7 +88,8 @@ module SiSU_HTML_scroll
end
@rcdc=true if @rcdc==false and (para =~/^\d~metadata/ or para =~/^1~\s+Document Information/)
if para !~/(^0~|<ENDNOTES>|<EOF>)/
- para.gsub!(/~[{\[].+?[}\]]~\s+/m,' ')
+ unless para =~/^<:code>/; para.gsub!(/~[{\[].+?[}\]]~\s+/m,' ')
+ end
if para =~/.+?<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/
paranum=para[/.+?<~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/,1]
@p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum)
diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb
index 44ab9033..a7e81624 100644
--- a/lib/sisu/v0/html_segments.rb
+++ b/lib/sisu/v0/html_segments.rb
@@ -425,7 +425,7 @@ module SiSU_HTML_seg
@@seg_subtoc_array << para
end
if @md.flag_auto_endnotes
- if para =~/~[{\[][\d*+]+ <a name="_[\d*+]+"/ # endnote-
+ if para =~/~[{\[][\d*+]+ <a name="_[\d*+]+"/ and not para =~/^<:code>/ # endnote-
endnote_array=[]
if para=~/~\{.+?\}\~/m
endnote_array << para.scan(/~\{.+?\}\~/m)
diff --git a/lib/sisu/v0/html_tune.rb b/lib/sisu/v0/html_tune.rb
index 7f91641e..7c829831 100644
--- a/lib/sisu/v0/html_tune.rb
+++ b/lib/sisu/v0/html_tune.rb
@@ -289,49 +289,51 @@ module SiSU_Tune
para.gsub!(/<:p[bn]>/,'')
para.gsub!(/<(p|br)>/,'<\1 />')
para.gsub!(/<:br>/,'<br />')
- if para =~/<::\s+/ #watch
- para.gsub!(/<::\s+(\S+?)\s+!>/,
- %{<img src="#{@env.url.images}/c_\\1.png" alt="\\1" width="14" height="14" align="bottom" border="0">})
- end
- if para =~/<:image\s+/
- para.gsub!(/<:image\s+(http\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+>/,
- %{<a href="\\1"><img src="#{@env.url.images_local}/\\2" \\3 \\4 naturalsizeflag="0" align="bottom" border="0"></a>})
- para.gsub!(/<:image\s+(http\S+)\s+(\S+)\s+>/,
- %{<a href="\\1"><img src="#{@env.url.images_local}/\\2" naturalsizeflag="0" align="bottom" border="0"></a>})
- para.gsub!(/<:image\s+(\S+)\s+(\S+)\s+(\S+)\s+>/,
- %{<img src="#{@env.url.images_local}/\\1" \\2 \\3 naturalsizeflag="0" align="bottom" border="0">})
- para.gsub!(/<:image\s+(\S+)\s+>/,
- %{<img src="#{@env.url.images_local}/\\1" naturalsizeflag="0" align="bottom" border="0">})
- end
- if para =~/\{.+?\}((?:http|ftp)\S+|image)/
- @word_mode=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/)
- word_mode=urls(@word_mode)
- words=word_mode.join(' ')
- para.gsub!(/.+/,words)
- end
- if (para !~/^0~/)
- para.gsub!(/\\copyright/i,%{<sup>&copy;</sup>})
- if (para !~/\<:ad\s+\.\.\//)
- para.gsub!(/\<:ad\s+(\S+)?\s+(\S+\.png)\s+(.+)?\;\s+(.+)?\;\s*!\>/,
- %{\n<center><a href="http:\/\/\\1" target="external"><img src="#{@env.url.images_local}/\\2" alt="\\3"></a></center>\n})
- else
- para.gsub!(/\<:ad\s+(\S+)?\s+(\S+\.png)\s+(.+)?\;\s+(.+)?\;\s*\>/,
- %{\n<center><a href="\\1" target="_top"><img src="#{@env.url.images_local}/\\2" alt="\\3"></a></center>\n})
+ unless para =~/^<:code>/
+ if para =~/<::\s+/ #watch
+ para.gsub!(/<::\s+(\S+?)\s+!>/,
+ %{<img src="#{@env.url.images}/c_\\1.png" alt="\\1" width="14" height="14" align="bottom" border="0">})
+ end
+ if para =~/<:image\s+/
+ para.gsub!(/<:image\s+(http\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+>/,
+ %{<a href="\\1"><img src="#{@env.url.images_local}/\\2" \\3 \\4 naturalsizeflag="0" align="bottom" border="0"></a>})
+ para.gsub!(/<:image\s+(http\S+)\s+(\S+)\s+>/,
+ %{<a href="\\1"><img src="#{@env.url.images_local}/\\2" naturalsizeflag="0" align="bottom" border="0"></a>})
+ para.gsub!(/<:image\s+(\S+)\s+(\S+)\s+(\S+)\s+>/,
+ %{<img src="#{@env.url.images_local}/\\1" \\2 \\3 naturalsizeflag="0" align="bottom" border="0">})
+ para.gsub!(/<:image\s+(\S+)\s+>/,
+ %{<img src="#{@env.url.images_local}/\\1" naturalsizeflag="0" align="bottom" border="0">})
end
- para.gsub!(/!pick/, %{<img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_choice}" alt="stellar">})
- para.gsub!(/!new/, %{&nbsp;<img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_new}" alt="new">})
- para.gsub!(/<:h(.{1,7}?)>/,'<a href="#h\1">\1</a>')
- para.gsub!(/<:to(\d{1,7}?)>/,'<a href="#to\1">to&nbsp;{&nbsp;\1&nbsp;}</a> ')
- if (para =~/\b\S+\@\S+?\.\S+/ and para !~/(\"\S+\@\S+?\.\S+\"|>\S+\@\S+?\.\S+?<)/)
- para.gsub!(/\b(\S+\@\S+?\.\S+)(\s)/,'&lt;<a href="mailto:\1">\1</a>&gt;\2')
+ if para =~/\{.+?\}((?:http|ftp)\S+|image)/
+ @word_mode=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/)
+ word_mode=urls(@word_mode)
+ words=word_mode.join(' ')
+ para.gsub!(/.+/,words)
end
- para.gsub!(/\b[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'<a href="\1" target="_top">\1</a>\2') #http ftp matches escaped, no decoration
- para.gsub!(/((?:^|\s)[}])((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1<a href="\2" target="_top">\2</a>\3') #special case \{ e.g. \}http://url
- para.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/,%{\\1#{@url_brace.xml_open}<a href="\\2" target="_top">\\2</a>#{@url_brace.xml_close}\\3}) #http ftp matches with decoration
- if (para =~/..\/\S+/ and para !~/(\"..\/\S+?\"|>\s*..\/\S+<)/)
- para.gsub!(/(\.\.\/\S+)/,'<a href="\1">\1</a>')
+ if (para !~/^0~|^<:code>/)
+ para.gsub!(/\\copyright/i,%{<sup>&copy;</sup>})
+ if (para !~/\<:ad\s+\.\.\//)
+ para.gsub!(/\<:ad\s+(\S+)?\s+(\S+\.png)\s+(.+)?\;\s+(.+)?\;\s*!\>/,
+ %{\n<center><a href="http:\/\/\\1" target="external"><img src="#{@env.url.images_local}/\\2" alt="\\3"></a></center>\n})
+ else
+ para.gsub!(/\<:ad\s+(\S+)?\s+(\S+\.png)\s+(.+)?\;\s+(.+)?\;\s*\>/,
+ %{\n<center><a href="\\1" target="_top"><img src="#{@env.url.images_local}/\\2" alt="\\3"></a></center>\n})
+ end
+ para.gsub!(/!pick/, %{<img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_choice}" alt="stellar">})
+ para.gsub!(/!new/, %{&nbsp;<img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_new}" alt="new">})
+ para.gsub!(/<:h(.{1,7}?)>/,'<a href="#h\1">\1</a>')
+ para.gsub!(/<:to(\d{1,7}?)>/,'<a href="#to\1">to&nbsp;{&nbsp;\1&nbsp;}</a> ')
+ if (para =~/\b\S+\@\S+?\.\S+/ and para !~/(\"\S+\@\S+?\.\S+\"|>\S+\@\S+?\.\S+?<)/)
+ para.gsub!(/\b(\S+\@\S+?\.\S+)(\s)/,'&lt;<a href="mailto:\1">\1</a>&gt;\2')
+ end
+ para.gsub!(/\b[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'<a href="\1" target="_top">\1</a>\2') #http ftp matches escaped, no decoration
+ para.gsub!(/((?:^|\s)[}])((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1<a href="\2" target="_top">\2</a>\3') #special case \{ e.g. \}http://url
+ para.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/,%{\\1#{@url_brace.xml_open}<a href="\\2" target="_top">\\2</a>#{@url_brace.xml_close}\\3}) #http ftp matches with decoration
+ if (para =~/..\/\S+/ and para !~/(\"..\/\S+?\"|>\s*..\/\S+<)/)
+ para.gsub!(/(\.\.\/\S+)/,'<a href="\1">\1</a>')
+ end
+ para.gsub!(/<a href="\.\.\//,%{<a href="#{@vz.url_site}/})
end
- para.gsub!(/<a href="\.\.\//,%{<a href="#{@vz.url_site}/})
end
@tuned_file << para
end
@@ -340,17 +342,19 @@ module SiSU_Tune
data=@data
@tuned_file=[]
data.each do |para|
- para.gsub!(/(~[{])(\d+) (.+?) <#@dp>([}]~)/,
- '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
- '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2.</sup></a> \3 \4') #endnote- note- (careful may have switched)
- para.gsub!(/(~\[)([*+]\d+) (.+?) <#@dp>(\]~)/,
- '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
- '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2.</sup></a> \3 \4') #endnote- note- (careful may have switched)
- para.gsub!(/(~\{)([*+]+) (.+?) <#@dp>(\}~)/,
- '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
- '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2</sup></a> \3 \4') #endnote- note- (careful may have switched)
- @tuned_file << para
+ unless para =~/^<:code>/
+ para.gsub!(/(~[{])(\d+) (.+?) <#@dp>([}]~)/,
+ '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
+ '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2.</sup></a> \3 \4') #endnote- note- (careful may have switched)
+ para.gsub!(/(~\[)([*+]\d+) (.+?) <#@dp>(\]~)/,
+ '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
+ '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2.</sup></a> \3 \4') #endnote- note- (careful may have switched)
+ para.gsub!(/(~\{)([*+]+) (.+?) <#@dp>(\}~)/,
+ '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
+ '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2</sup></a> \3 \4') #endnote- note- (careful may have switched)
end
+ @tuned_file << para
+ end
end
def output
data=@data
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb
index 11d14bf2..16cea2f4 100644
--- a/lib/sisu/v0/odf.rb
+++ b/lib/sisu/v0/odf.rb
@@ -378,6 +378,7 @@ module SiSU_ODF
parray=[]
para.split(/<:?br(?: \/)?>/).each do |parablock|
parablock=group_clean(parablock)
+ parablock.gsub!(/^\s*$/,'<br />')
parablock.gsub!(/\b[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,
%{<text:a xlink:type="simple" xlink:href="\\1">\\1</text:a>\\2}) #http ftp matches escaped, no decoration
parray << %{<text:p text:style-name="P5">#{parablock}</text:p>} if parablock =~/\S+/
@@ -398,8 +399,11 @@ module SiSU_ODF
lv=nil if lv == 0
#extract_endnotes(para)
#para=fontface(para)
- para=if para =~/\{\s*\S+?\.(?:png|jpg|gif)\s.+?\}(?:(?:https?|ftp):\S+|image)/; image(para)
- elsif para =~/\{.+?\}(?:(?:https?|ftp):\S+|image)/; text_link(para)
+ para=unless para=~/^<:code>/
+ para=if para =~/\{\s*\S+?\.(?:png|jpg|gif)\s.+?\}(?:(?:https?|ftp):\S+|image)/; image(para)
+ elsif para =~/\{.+?\}(?:(?:https?|ftp):\S+|image)/; text_link(para)
+ else para
+ end
else para
end
para=footnote(para)
@@ -446,8 +450,8 @@ module SiSU_ODF
(4..6).each { |x| @odf_contents_close[x]='' }
odf_tail #($1,$2)
fix=[]
- bullet=image_src('bullet_red.png')
- cp("#{bullet}/bullet_red.png","#{@env.path.odf}/Pictures/.") #if image_src('bullet_red.png')
+ bullet=image_src('bullet_09.png')
+ cp("#{bullet}/bullet_09.png","#{@env.path.odf}/Pictures/.") #if image_src('bullet_09.png')
data.each do |para|
#p para if para =~safe_characters and @md.cmd =~/V/ #KEEP
#para.gsub!(/&lt;(~\d+;(?:\w|[0-6]:)\d+;\w\d+)&gt;&lt;(#@dp:#@dp)&gt;/,'<\1><\2>')
@@ -465,7 +469,7 @@ module SiSU_ODF
para=para_array.join(' ')
para=para.strip
end
- para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1<draw:frame draw:style-name="gr1" text:anchor-type="as-char" svg:width="0.22cm" svg:height="0.22cm" draw:z-index="2"><draw:image xlink:href="Pictures/bullet_red.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></draw:frame> ') # bullet_red.png
+ para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1<draw:frame draw:style-name="gr1" text:anchor-type="as-char" svg:width="0.22cm" svg:height="0.22cm" draw:z-index="2"><draw:image xlink:href="Pictures/bullet_09.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></draw:frame> ') # bullet_09.png
#para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1<text:span text:style-name="T6">●</text:span> ') #bullet
#para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1● ') # bullet utf8, make smaller if used
#para.gsub!(/^_\*\s+/,'<text:span text:style-name="T6">●</text:span> ') #bullet
diff --git a/lib/sisu/v0/param.rb b/lib/sisu/v0/param.rb
index 9462d8d2..690163d4 100644
--- a/lib/sisu/v0/param.rb
+++ b/lib/sisu/v0/param.rb
@@ -178,7 +178,6 @@ module SiSU_Param
@sfx=nil
@flag_pdf=true #watch
@flag_auto_heading_num=false
-#watch
if @fns =~ /[_-]?sst$/ #watch
@env_out_root=@env.path.output
@dir_out="#{@env.path.output}/#@fnb"
@@ -235,13 +234,19 @@ module SiSU_Param
tell=SiSU_Screen::Ansi.new(@cmd,'SiSU filetype indicator not provided')
tell.warn unless @cmd =~/q/
end
+ @code_flag=false
fns_array.each do |par| #% Scan document
para=par.gsub(/\n/,' ')
if para !~/^\%+\s/ and para =~/<![abcdeghijklmnopqrstuvwxyz]/i # <!f not included
raise "Old markup style in file #@fns, current version #{@sisu_version[:project]} #{@sisu_version[:version]} #{@sisu_version[:date_stamp]} #{@sisu_version[:date]}:\n\t\t#{para}\n\n"
end
+ @code_flag=case par
+ when /^code\{\s*$/; true
+ when /^\}code\s*$/; false
+ else @code_flag
+ end
regx_header=/^(?:0~|@\S+?:[+-]?\s)/
- if para =~regx_header #or para=~/^(?:1|:?A)~/
+ if para =~regx_header and not @code_flag #or para=~/^(?:1|:?A)~/
case para
when /^(?:0~ocn|@ocn:)\s+(.+?)$/m; @ocn=$1 #% processing
when /^(?:0~title|@title:)\s+(.+?)$/m #% metainfo DC
diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb
index 1218aa79..1046b6c4 100644
--- a/lib/sisu/v0/shared_html_lite.rb
+++ b/lib/sisu/v0/shared_html_lite.rb
@@ -125,15 +125,17 @@ module SiSU_Format_Shared
@words
end
def markup(para)
- if para =~/\{.+?\}((?:http|ftp)\S+|image)/
- wm=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/)
- word_mode=urls(wm)
- words=word_mode.join(' ')
- para.gsub!(/.+/,words)
+ unless para =~/^<:code>/
+ if para =~/\{.+?\}((?:http|ftp)\S+|image)/
+ wm=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/)
+ word_mode=urls(wm)
+ words=word_mode.join(' ')
+ para.gsub!(/.+/,words)
+ end
+ para.gsub!(/\b[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'<a href="\1" target="_top">\1</a>\2') #http ftp matches escaped, no decoration
+ para.gsub!(/((?:^|\s)[}])((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1<a href="\2" target="_top">\2</a>\3') #special case \{ e.g. \}http://url
+ para.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/,%{\\1#{@url_brace.xml_open}<a href="\\2" target="_top">\\2</a>#{@url_brace.xml_close}\\3}) #http ftp matches with decoration
end
- para.gsub!(/\b[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'<a href="\1" target="_top">\1</a>\2') #http ftp matches escaped, no decoration
- para.gsub!(/((?:^|\s)[}])((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1<a href="\2" target="_top">\2</a>\3') #special case \{ e.g. \}http://url
- para.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/,%{\\1#{@url_brace.xml_open}<a href="\\2" target="_top">\\2</a>#{@url_brace.xml_close}\\3}) #http ftp matches with decoration
para
end
def paragraph
diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb
index c54ab42d..4e77e995 100644
--- a/lib/sisu/v0/shared_xml.rb
+++ b/lib/sisu/v0/shared_xml.rb
@@ -352,8 +352,8 @@ module SiSU_XML_munge
para.gsub!(/<+[-~]#>+/,'')
para.gsub!(/<0;\w\d+;[um]\d+><#@dp:#@dp>/,'')
#embeds a red-bullet image -->
- #para.gsub!(/^(<:i[1-9]>\s*_\*)\s+/,'\1 <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_red.png" width="12" height="12" alt="*" /> ')
- #para.gsub!(/^_\*\s+/,'<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_red.png" width="12" height="12" alt="*" /> ')
+ #para.gsub!(/^(<:i[1-9]>\s*_\*)\s+/,'\1 <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_09.png" width="12" height="12" alt="*" /> ')
+ #para.gsub!(/^_\*\s+/,'<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_09.png" width="12" height="12" alt="*" /> ')
para.gsub!(/(^|\s)\{\s*(\S+?\.(?:jpg|png|gif))\s+(\d+)x(\d+)(\s+[^}]+)?\}(https?:\/\/\S+)/,%{\\1<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\2" width="\\3" height="\\4" />[\\2] \\5})
para.gsub!(/(^|\s)\{\s*(\S+?\.(?:jpg|png|gif))(\s+[^}]+)?\}(https?:\/\/\S+)/,%{\\1<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\2"/>\\2})
para.gsub!(/(^|\s)\{([^}]+)\}(https?:\/\/[^"><]+?)([,.:;"><]?(?=\s|$))/,
diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb
index 22c2681d..8bd5b6f2 100644
--- a/lib/sisu/v0/texpdf.rb
+++ b/lib/sisu/v0/texpdf.rb
@@ -432,7 +432,10 @@ WOK
if para =~/<:(code|alt|verse|group)>/
@lineone=case para
when /<:(alt|verse|group)>/; para
- when /<:code>/; "#{@tex.paraskip_small} \\begin{footnotesize} \\begin{ttfamily} " + para
+ when /<:code>/; "#{@tex.paraskip_small} \\begin{tiny} " + para
+ #when /<:code>/; "#{@tex.paraskip_small} \\begin{footnotesize} " + para
+ ##when /<:code>/; "#{@tex.paraskip_small} \\begin{texttt} " + para
+ #when /<:code>/; "#{@tex.paraskip_small} \\begin{small} \\begin{ttfamily} " + para
else 'error' #should never occur
end
end
@@ -462,7 +465,10 @@ WOK
#@lineone.gsub!(/(.#{@@tilde}\S*\s*|<:\S+>|<!.*?!>|<!>)/,' ')
insert=[]
if para =~/<:code-end>/
- insert << y + @lineone << @group_collect << ' \end{ttfamily} \end{footnotesize}' << " #{@tex.paraskip_normal}"
+ insert << y + @lineone << @group_collect << ' \end{tiny}' << " #{@tex.paraskip_normal}"
+ #insert << y + @lineone << @group_collect << ' \end{footnotesize}' << " #{@tex.paraskip_normal}"
+ #insert << y + @lineone << @group_collect << ' \end{texttt}' << " #{@tex.paraskip_normal}"
+ #insert << y + @lineone << @group_collect << ' \end{ttfamily} \end{small}' << " #{@tex.paraskip_normal}"
else insert << y + @lineone << @group_collect
end
@@flag_group,@@flag_code=false,false
diff --git a/man/man1/sisu.1 b/man/man1/sisu.1
index 9166f37f..129d3af8 100644
--- a/man/man1/sisu.1
+++ b/man/man1/sisu.1
@@ -9,7 +9,7 @@
.\" /[^\\][-']
.\" :%s/\([^\\]\)\([-']\)/\1\\\2/c
.\" |sisu.1|@|^|<url:sisu.1>
-.TH "sisu" "1" "July 31, 2007" "version 0.55" "USER COMMANDS and basic Markup"
+.TH "sisu" "1" "September 3, 2007" "version 0.58" "USER COMMANDS and basic Markup"
.SH "NAME"
.B SiSU
\- Structured information, Serialized Units \- a document publishing system
@@ -518,13 +518,16 @@ and selecting
or
.I sisu \-\-help markup
.TP
-Sample markup files can be used as examples:
-.I <http://www.jus.uio.no/sisu/sample>
+Online markup examples together with the respective outputs produced are available from:
+.I <http://www.jus.uio.no/sisu/SiSU/2.html>
+.TP
+or from the document:
+.I <http://www.jus.uio.no/sisu/sisu_examples/>
.TP
-actual marked up plaintext files ready for use:
-.I <http://www.jus.uio.no/sisu/sample/markup>
+The following document gives a cursory overview of sisu markup and the respective output produced:
+.I <http://www.jus.uio.no/sisu/sisu_markup/>
.TP
-as html with syntax highlighting for viewing:
+Some example marked up files are available as html with syntax highlighting for viewing:
.I <http://www.jus.uio.no/sisu/sample/syntax>
.TP
an alternative presentation of markup syntax: