aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-05-12 23:23:10 -0400
committerRalph Amissah <ralph@amissah.com>2014-05-12 23:23:10 -0400
commit54c4f8c8e4a952ea48a0c9969ff333eb7a514dcf (patch)
tree82facf3c312f7147e3a162cd2743c00f9d3061f7
parentdebian/changelog (5.3.4-1) (diff)
parentdocumentation, notes, update (diff)
Merge tag 'sisu_5.3.5' into debian/sid
SiSU 5.3.5
-rw-r--r--.gitignore4
-rw-r--r--README128
-rw-r--r--bin/sisu6
-rw-r--r--data/doc/sisu/CHANGELOG_v530
-rw-r--r--data/doc/sisu/CHANGELOG_v675
-rw-r--r--data/doc/sisu/markup-samples/manual/en/sisu_commands.sst14
-rw-r--r--data/doc/sisu/markup-samples/manual/en/sisu_markup.sst88
-rw-r--r--data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim4
-rw-r--r--data/sisu/v5/v/version.yml6
-rw-r--r--data/sisu/v6/v/version.yml6
-rw-r--r--lib/sisu/v5/ao_syntax.rb2
-rw-r--r--lib/sisu/v5/composite.rb11
-rw-r--r--lib/sisu/v5/constants.rb8
-rw-r--r--lib/sisu/v5/digests.rb170
-rw-r--r--lib/sisu/v5/html_format.rb2
-rw-r--r--lib/sisu/v5/html_minitoc.rb3
-rw-r--r--lib/sisu/v5/param.rb8
-rw-r--r--lib/sisu/v5/shared_metadata.rb11
-rw-r--r--lib/sisu/v6/ao_doc_objects.rb38
-rw-r--r--lib/sisu/v6/ao_doc_str.rb168
-rw-r--r--lib/sisu/v6/ao_hash_digest.rb24
-rw-r--r--lib/sisu/v6/ao_images.rb8
-rw-r--r--lib/sisu/v6/ao_numbering.rb2
-rw-r--r--lib/sisu/v6/ao_syntax.rb2
-rw-r--r--lib/sisu/v6/composite.rb18
-rw-r--r--lib/sisu/v6/constants.rb8
-rw-r--r--lib/sisu/v6/db_columns.rb4
-rw-r--r--lib/sisu/v6/digests.rb228
-rw-r--r--lib/sisu/v6/html_format.rb2
-rw-r--r--lib/sisu/v6/html_minitoc.rb3
-rw-r--r--lib/sisu/v6/hub.rb226
-rw-r--r--lib/sisu/v6/manifest.rb14
-rw-r--r--lib/sisu/v6/options.rb18
-rw-r--r--lib/sisu/v6/param.rb49
-rw-r--r--lib/sisu/v6/qrcode.rb17
-rw-r--r--lib/sisu/v6/shared_markup_alt.rb20
-rw-r--r--lib/sisu/v6/shared_metadata.rb22
-rw-r--r--lib/sisu/v6/sysenv.rb163
-rw-r--r--lib/sisu/v6/texpdf.rb38
-rw-r--r--lib/sisu/v6/texpdf_format.rb417
-rw-r--r--lib/sisu/v6/txt_plain.rb5
-rw-r--r--lib/sisu/v6/urls.rb2
-rw-r--r--lib/sisu/v6/xml_docbook5.rb7
-rw-r--r--lib/sisu/v6/xml_fictionbook2.rb9
-rw-r--r--lib/sisu/v6/xml_odf_odt.rb7
-rw-r--r--man/man1/sisu.1448
-rw-r--r--rbuild6
-rw-r--r--sisu.org2114
48 files changed, 3664 insertions, 999 deletions
diff --git a/.gitignore b/.gitignore
index 6d13f762..34ee93ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,5 @@
# git ls-files --others --exclude-from=.git/info/exclude
-# Lines that start with '#' are comments.
-# For a project mostly in C, the following would be a good set of
-# exclude patterns (uncomment them if you want to use them):
*~
+\#*
*.gem
*.gemspec
diff --git a/README b/README
index 2fbe3bf8..ffa05093 100644
--- a/README
+++ b/README
@@ -113,6 +113,7 @@ ruby setup.rb setup
#[as root:]
ruby setup.rb install
+
further information:
<http://i.loveruby.net/en/projects/setup/>
<http://i.loveruby.net/en/projects/setup/doc/usage.html>
@@ -628,6 +629,12 @@ copies sisu output files to remote host using scp. This requires that
sisurc.yml has been provided with information on hostname and username, and
that you have your "keys" and ssh agent in place. Also see --rsync. Alias -r
+*--sha256*
+set hash digest where used to sha256
+
+*--sha512*
+set hash digest where used to sha512
+
*--sqlite --[instruction] [filename]*
database type set to /SQLite/, this produces one of two possible databases,
without additional database related instructions it produces a discreet
@@ -731,12 +738,12 @@ on its own, provides *SiSU* version information
*-v [filename/wildcard]*
see --verbose
-*--v3 [filename/wildcard]*
-invokes the sisu v3 document parser/generator. You may run sisu3 instead.
+*--v5 [filename/wildcard]*
+invokes the sisu v5 document parser/generator. You may run sisu5 instead. This
+is the current default and is normally omitted.
-*--v4 [filename/wildcard]*
-invokes the sisu v4 document parser/generator. This is the default and is
-normally omitted.
+*--v6 [filename/wildcard]*
+invokes the sisu v6 document parser/generator. You may run sisu6 instead.
*--verbose [filename/wildcard]*
provides verbose output of what is being generated, where output is placed (and
@@ -942,6 +949,75 @@ or if for a particular version:
sisu --query-0.38
+MARKUP RULES, DOCUMENT STRUCTURE AND METADATA REQUIREMENTS
+..........................................................
+
+minimal content/structure requirement:
+
+[metadata]
+
+A~ (level A [title])
+1~ (at least one level 1 [segment/(chapter)])
+
+
+structure rules (document heirarchy, heading levels):
+
+there are two sets of heading levels ABCD (title & parts if any) and 123
+(segment & subsegments if any)
+
+sisu has the fllowing levels:
+
+A~ [title] .
+ required (== 1) followed by B~ or 1~
+B~ [part] *
+ followed by C~ or 1~
+C~ [subpart] *
+ followed by D~ or 1~
+D~ [subsubpart] *
+ followed by 1~
+1~ [segment (chapter)] +
+ required (>= 1) followed by text or 2~
+text *
+ followed by more text or 1~, 2~
+ or relevant part *()
+2~ [subsegment] *
+ followed by text or 3~
+text *
+ followed by more text or 1~, 2~ or 3~
+ or relevant part, see *()
+3~ [subsubsegment] *
+ followed by text
+text *
+ followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+*(B~ if none other used;
+ if C~ is last used: C~ or B~;
+ if D~ is used: D~, C~ or B~)
+
+
+* level A~ is the tile and is mandatory
+* there can only be one level A~
+* heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially
+ (alphabetically),
+* heading levels A~ B~ C~ D~ are followed by other heading levels rather
+ than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+* there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond
+ to the Chapter level)
+* additional heading levels 1~ 2~ 3~ are optional and there may be several
+ of each
+* heading levels 1~ 2~ 3~ are followed by text (which may be followed by
+ the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+
+
MARKUP EXAMPLES
...............
@@ -2005,9 +2081,9 @@ Page breaks are only relevant and honored in some output formats. A page break
or a new page may be inserted manually using the following markup on a line on
its own:
-page new =\= or ╋ breaks the page, starts a new page.
+page new =\= breaks the page, starts a new page.
-page break -\- or ┼ breaks a column, starts a new column, if using columns,
+page break -\- breaks a column, starts a new column, if using columns,
else breaks the page, starts a new page.
page break line across page -..- draws a dividing line, dividing paragraphs
@@ -2016,19 +2092,11 @@ page break:
-\\-
-or
-
-<:pb>
-
page (break) new:
=\\=
-or
-
-<:pn>
-
page (break) line across page (dividing paragraphs):
@@ -2185,8 +2253,8 @@ Configure substitution in _sisu/sisu_document_make
Creator: Ralph Amissah
- Rights: Copyright (C) Ralph Amissah 2014;\\ License: GPL 3 (part of SiSU
- documentation)
+ Rights: Copyright: Copyright (C) Ralph Amissah 2014 \\ License: GPL 3
+ (part of SiSU documentation)
Subject: ebook, epublishing, electronic book, electronic publishing,
electronic document, electronic citation, data structure,
@@ -2207,31 +2275,21 @@ Configure substitution in _sisu/sisu_document_make
Filetype: SiSU text insert 5.0,
Source digest: SHA256(README.ssm.sst)=
- e9ee6379dcf3a05c2b0ae19f091f7e2b1579d7b8a683996a8c53eb57249497c4
+ e6badfab7c24f0b217e1ab3b2d8cebb70a7fa9f1a8af9f907f029aa19fca3e74
- Generated by: Generated by: SiSU 6.0.4 of 2014w06/5 (2014-02-14)
+ Generated by: Generated by: SiSU 6.0.5 of 2014w15/3 (2014-04-16)
- Ruby version: ruby 2.1.0p0 (2013-12-25) [i386-linux-gnu]
+ Ruby version: ruby 2.1.1p76 (2014-02-24) [i386-linux-gnu]
- Document (ao) last generated: 2014-02-14 00:05:38 -0500
+ Document (ao) last generated: 2014-05-08 16:40:57 -0400
==============================================================================
plaintext (plain text):
- http://niu/manual/en/txt/README.txt
-
-Other versions of this document:
-
-manifest:
- http://niu/manual/en/manifest/README.html
-
-at:
- http://niu/manual
-
-
+ README
-* Generated by: SiSU 6.0.4 of 2014w06/5 (2014-02-14)
-* Ruby version: ruby 2.1.0p0 (2013-12-25) [i386-linux-gnu]
-* Last Generated on: 2014-02-14 00:05:39 -0500
+* Generated by: SiSU 6.0.5 of 2014w15/3 (2014-04-16)
+* Ruby version: ruby 2.1.1p76 (2014-02-24) [i386-linux-gnu]
+* Last Generated on: 2014-05-08 16:40:59 -0400
* SiSU http://www.sisudoc.org/
diff --git a/bin/sisu b/bin/sisu
index ff3cf258..c53438f3 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -21,7 +21,7 @@ class Orient
self
end
def sisu_called_from_directory
- Dir.pwd
+ @@sisu_called_from_directory ||= Dir.pwd
end
def sisu_run_from
if processing.called_as == processing.file_full_path \
@@ -221,8 +221,6 @@ class Orient
Dir.chdir(markup_dir)
$sisu_document_markup_directory_base_fixed_path=Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
SiSU::HubMaster.new(argv_sub)
- Dir.chdir(sisu_called_from_directory)
- system("cd #{sisu_called_from_directory}")
elsif markup_dir =~/https?:/
markup_file.each do |mf|
(FileTest.file?(mf)) \
@@ -234,6 +232,8 @@ class Orient
SiSU::HubMaster.new(argv_sub)
else p "Error directory specified #{markup_dir} not found"
end
+ Dir.chdir(sisu_called_from_directory)
+ system("cd #{sisu_called_from_directory}")
end
else
$sisu_document_markup_directory=Dir.pwd.gsub(/\/$/,'')
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index 04a836fb..8126efab 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -31,6 +31,36 @@ v2 branch is removed; it is available in sisu =< 3.3.2
%% Reverse Chronological:
+%% 5.3.5.orig.tar.xz (2014-05-12:19/1)
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.5
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.5-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.5.orig.tar.xz
+ sisu_5.3.5.orig.tar.xz
+ sisu_5.3.5-1.dsc
+
+* sisu, ensure return to start dir
+
+* ao_syntax, address possible manual use of url delimiters「」
+
+* composite, fix includes, provide extra newline after inserted comment
+ (Closes: #744360) "includes do not work properly"
+
+* composite (inserts), missing includes doesn't give an error, fix
+ (Closes: #744379) see sisu.org for comment
+
+* param, metadata add 'Copyright:' tag to output related to copyright
+ (Closes: #744381) syntax: inconsistency \:copyright: and \:license:
+
+* metadata, pdf, remove link to manifest page where --no-manifest is used
+ (Closes: #744378)
+
+* constants, db table sizes synced with v6, not needed by v5 but keeps tables
+ compatible
+
+* digests, cleaning
+
+* added sisu.org emacs:evil:org mode notes related to sisu development
+
%% 5.3.4.orig.tar.xz (2014-02-14:06/5)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.4
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.4-1
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index 922c84fd..a103a9ed 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -21,6 +21,81 @@ v2 branch is removed; it is available in sisu =< 3.3.2
%% Reverse Chronological:
+%% 6.0.5.orig.tar.xz (2014-05-12:19/1)
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.5
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.5-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.5.orig.tar.xz
+ sisu_6.0.5.orig.tar.xz
+ sisu_6.0.5-1.dsc
+
+* sisu, ensure return to start dir
+
+* ao, document structure check, stop processing on major error
+ (with error message & text at location of failure)
+
+* ao_syntax, address possible manual use of url delimiters「」
+
+* ao, heading with no ocn, distinguish ~# from -#
+ * ~# is general & means no ocn (for any object to which it is applied)
+ * -# is relevant only for 1~ dummy headings & instructs that they should be
+ removed from output where possible, applied so far to pdf, odt & plaintext
+
+* composite, fix includes, provide extra newline after inserted comment
+ (Closes: #744360) "includes do not work properly"
+
+* composite (inserts), missing includes doesn't give an error, fix
+ (Closes: #744379) see sisu.org for comment
+
+* param, metadata add 'Copyright:' tag to output related to copyright
+ (Closes: #744381) syntax: inconsistency \:copyright: and \:license:
+
+* param, remove trailing semicolon after :copyright:
+ (Closes: #744358)
+
+* metadata, pdf, remove link to manifest page where --no-manifest is used
+ (Closes: #744378)
+
+* digests, digests sha512 option implemented
+ * options sha512 sha256 md5
+ * command line --sha512
+ * rcconf.yml ['defsault']['digest'] = sha512
+ (Closes: #744402)
+
+* texpdf, (internal coding)
+ * use symbols to identify page orientation
+ * renaming related to fontface
+
+* texpdf, pdf colored hyperlinks configurable (cli & sisurc.yml)
+ --pdf-hyperlinks-color │
+ --pdf-hyperlinks-no-color or --pdf-hyperlinks-monochrome │
+ default:
+ pdf_hyperlinks: 'color' │
+ (other options switch hyperlink color off 'no-color' 'color-off' 'monochrome') │
+ (Closes: #744391) no color on a4 portrait │
+
+* texpdf, headings and table of contents
+
+* texpdf, pdf default font size configurable (cli & sisurc.yml) (no fractions)
+ --pdf-fontsize-12 --pdf-fontsize-8
+ default:
+ texpdf_fontsize: 12
+ (Closes: #744405)
+
+* texpdf, for urls switch to sans serif (small fontsize),
+ instead of typewriter, latex default
+ (Closes: #744353)
+
+* texpdf, mailto markup links set for normal text objects
+ (Closes: #744357) but testing required
+
+* texpdf, urls in creator cause breakage
+ (Closes: #744541)
+
+* texpdf, & in heading breaks toc, now & is removed from toc not heading,
+ broken
+
+* added sisu.org emacs:evil:org mode notes related to sisu development
+
%% 6.0.4.orig.tar.xz (2014-02-14:06/5)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.4
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.4-1
diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst b/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst
index c1a0788a..356f38e1 100644
--- a/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst
+++ b/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst
@@ -321,6 +321,12 @@ generate examples of (naive) cgi search form for SQLite or PgSQL depends on your
!_ --scp [filename/wildcard] \\
copies sisu output files to remote host using scp. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Also see --rsync. Alias -r
+!_ --sha256 \\
+set hash digest where used to sha256
+
+!_ --sha512 \\
+set hash digest where used to sha512
+
!_ --sqlite --[instruction] [filename] \\
database type set to SQLite, this produces one of two possible databases, without additional database related instructions it produces a discreet SQLite file for the document processed; with additional instructions it produces a common SQLite database of all processed documents that (come from the same document preparation directory and as a result) share the same output directory base path (possible instructions include: --createdb; --create; --dropall; --import [filename]; --update [filename]; --remove [filename]); see database section below. Alias -d
@@ -384,11 +390,11 @@ on its own, provides SiSU version information
!_ -v [filename/wildcard] \\
see --verbose
-!_ --v3 [filename/wildcard] \\
-invokes the sisu v3 document parser/generator. You may run sisu3 instead.
+!_ --v5 [filename/wildcard] \\
+invokes the sisu v5 document parser/generator. You may run sisu5 instead. This is the current default and is normally omitted.
-!_ --v4 [filename/wildcard] \\
-invokes the sisu v4 document parser/generator. This is the default and is normally omitted.
+!_ --v6 [filename/wildcard] \\
+invokes the sisu v6 document parser/generator. You may run sisu6 instead.
!_ --verbose [filename/wildcard] \\
provides verbose output of what is being generated, where output is placed (and error messages if any), as with -u flag provides a url mapping of files created for each of the processing flag requests. Alias -v
diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
index fbd6d1f4..e3eefbac 100644
--- a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
+++ b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
@@ -65,6 +65,82 @@ or if for a particular version:
_1 sisu --query-0.38
+2~ Markup Rules, document structure and metadata requirements
+
+minimal content/structure requirement:
+
+[metadata]
+
+@title:
+
+@creator:
+
+[levels]
+
+``` code
+A~ (level A [title])
+1~ (at least one level 1 [segment/(chapter)])
+```
+
+structure rules (document heirarchy, heading levels):
+
+there are two sets of heading levels ABCD (title & parts if any) and 123 (segment & subsegments if any)
+
+sisu has the fllowing levels:
+
+``` code
+A~ [title] .
+ required (== 1) followed by B~ or 1~
+B~ [part] *
+ followed by C~ or 1~
+C~ [subpart] *
+ followed by D~ or 1~
+D~ [subsubpart] *
+ followed by 1~
+1~ [segment (chapter)] +
+ required (>= 1) followed by text or 2~
+text *
+ followed by more text or 1~, 2~
+ or relevant part *()
+2~ [subsegment] *
+ followed by text or 3~
+text *
+ followed by more text or 1~, 2~ or 3~
+ or relevant part, see *()
+3~ [subsubsegment] *
+ followed by text
+text *
+ followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+*(B~ if none other used;
+ if C~ is last used: C~ or B~;
+ if D~ is used: D~, C~ or B~)
+```
+
+``` code
+* level A~ is the tile and is mandatory
+* there can only be one level A~
+* heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially
+ (alphabetically),
+* heading levels A~ B~ C~ D~ are followed by other heading levels rather
+ than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+* there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond
+ to the Chapter level)
+* additional heading levels 1~ 2~ 3~ are optional and there may be several
+ of each
+* heading levels 1~ 2~ 3~ are followed by text (which may be followed by
+ the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+```
+
2~ Markup Examples
3~ Online
@@ -1168,9 +1244,9 @@ To draw a dividing line dividing paragraphs, see the section on page breaks.
Page breaks are only relevant and honored in some output formats. A page break or a new page may be inserted manually using the following markup on a line on its own:
-page new =\\= or <:pn> breaks the page, starts a new page.
+page new =\\= (or <:pn>) breaks the page, starts a new page.
-page break -\\- or <:pb> breaks a column, starts a new column, if using columns, else breaks the page, starts a new page.
+page break -\\- (or <:pb>) breaks a column, starts a new column, if using columns, else breaks the page, starts a new page.
page break line across page -..- draws a dividing line, dividing paragraphs
@@ -1180,10 +1256,6 @@ code{
-\\-
-or
-
-<:pb>
-
}code
page (break) new:
@@ -1192,10 +1264,6 @@ code{
=\\=
-or
-
-<:pn>
-
}code
page (break) line across page (dividing paragraphs):
diff --git a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
index bee822db..d88720f4 100644
--- a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
+++ b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
@@ -30,9 +30,7 @@ if !exists("sisu_no_identifiers")
syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}"
syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+"
syn match sisu_link " \*\~\S\+"
- syn match sisu_action "^<:insert\d\+>"
- syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^._-]\+\.ss[it]$"
- syn match sisu_require contains=@NoSpell "^<<{[a-zA-Z0-9^._-]\+\.ss[it]}$"
+ syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$"
syn match sisu_structure "^:A\~$"
"% "Document Sub Headers:
diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml
index 077b7e41..cbe3f4e0 100644
--- a/data/sisu/v5/v/version.yml
+++ b/data/sisu/v5/v/version.yml
@@ -1,5 +1,5 @@
---
:project: SiSU
-:version: 5.3.4
-:date_stamp: 2014w06/5
-:date: "2014-02-14"
+:version: 5.3.5
+:date_stamp: 2014w19/1
+:date: "2014-05-12"
diff --git a/data/sisu/v6/v/version.yml b/data/sisu/v6/v/version.yml
index 4c93b69d..8ce3ad41 100644
--- a/data/sisu/v6/v/version.yml
+++ b/data/sisu/v6/v/version.yml
@@ -1,5 +1,5 @@
---
:project: SiSU
-:version: 6.0.4
-:date_stamp: 2014w06/5
-:date: "2014-02-14"
+:version: 6.0.5
+:date_stamp: 2014w19/1
+:date: "2014-05-12"
diff --git a/lib/sisu/v5/ao_syntax.rb b/lib/sisu/v5/ao_syntax.rb
index cdcb3883..8ff90ae0 100644
--- a/lib/sisu/v5/ao_syntax.rb
+++ b/lib/sisu/v5/ao_syntax.rb
@@ -333,7 +333,7 @@ module SiSU_AO_Syntax
dob
end
def fontface(dob)
- leader=/^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|[、。]|\>/
+ leader=/^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|[、。「」]|\>/
dob=fontface_lines(dob,leader)
dob.obj=dob.obj.gsub(/(#{leader})\*\{(.+?)\}\*/m,
"\\1#{@emph[:o]}\\2#{@emph[:c]}"). #emphasis
diff --git a/lib/sisu/v5/composite.rb b/lib/sisu/v5/composite.rb
index 9e7ccb5c..adc88e52 100644
--- a/lib/sisu/v5/composite.rb
+++ b/lib/sisu/v5/composite.rb
@@ -132,7 +132,7 @@ module SiSU_Assemble
def insertion(fni,insert_array)
file={ prepared: [], images: [] }
rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
- file[:prepared] << "\n% |#{fni}|@|^|>>ok\n"
+ file[:prepared] << "\n% |#{fni}|@|^|>>ok\n\n"
@code_flag=false
insert_array.each do |i|
@code_flag=if i =~/^code\{/ then true
@@ -141,11 +141,11 @@ module SiSU_Assemble
end
if not @code_flag \
and i !~/^%+\s/
- i=i.gsub(/^([123]|:?[ABC])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax)
+ i=i.gsub(/^([123]|:?[ABCD])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax)
if i =~/^@\S+?:/
i=i.gsub(/\n/m,"\n% ").
gsub(/\n%\s+$/m,'').
- gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers
+ gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers
end
end
file[:prepared] << i
@@ -171,6 +171,7 @@ module SiSU_Assemble
or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \
or para =~/^r\{(.+?)\}/ #depreciated
loadfile=$1.strip
+ src_ssm=@opt.fns.sub(/\.ssm\.sst/,'.ssm')
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
@@ -200,7 +201,7 @@ module SiSU_Assemble
file[:prepared]
else
cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
- STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
para
end
else tuned_file << para
@@ -255,7 +256,7 @@ module SiSU_Assemble
@ssm << loadfile
else
cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
- STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
para
end
end
diff --git a/lib/sisu/v5/constants.rb b/lib/sisu/v5/constants.rb
index a9be54f0..748051b6 100644
--- a/lib/sisu/v5/constants.rb
+++ b/lib/sisu/v5/constants.rb
@@ -260,8 +260,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_is[:version_dir]}a_",
- name_prefix_db: "sisu_#{SiSU_is[:version_dir]}a_",
+ name_prefix: "SiSU#{SiSU_is[:version_dir]}b_",
+ name_prefix_db: "sisu_#{SiSU_is[:version_dir]}b_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
@@ -276,7 +276,7 @@ Db={
col_library: 30,
col_small: 16,
col_filename: 256,
- col_digest: 64,
+ col_digest: 128,
col_filesize: 10,
col_info_note: 2500,
}
@@ -353,7 +353,7 @@ check:
♩ ♭  ✠  ▭ ▬ ▪
【】〖〗◢ ◣ ◀ ▶ ◘ ◙
《》「」
- ‹ › ∗ 
+ ‹ › ∗  ∴ ∷
'〔lv1〕','〔lv2〕','〔lv3〕','〔lv4〕','〔lv5〕','〔lv6〕','〔lv7〕','〔lv8〕','〔lv9〕'
'〔 Ѳ1〕','〔 Ѳ2〕','〔 Ѳ3〕','〔 Ѳ4〕','〔 Ѳ5〕','〔Ѳ6〕','〔Ѳ7〕','〔Ѳ8〕','〔Ѳ9〕'
◁▷
diff --git a/lib/sisu/v5/digests.rb b/lib/sisu/v5/digests.rb
index 7099b646..b3dd40bd 100644
--- a/lib/sisu/v5/digests.rb
+++ b/lib/sisu/v5/digests.rb
@@ -71,7 +71,7 @@ module SiSU_DigestView
@fnb=@opt.fnb
@@endnotes_para=[]
@@dg=nil
- @dg=@@dg ||=SiSU_Env::InfoEnv.new.digest.type
+ @dg=@@dg ||=SiSU_Env::InfoEnv.new.digest(opt).type
@particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt)
end
def read
@@ -91,13 +91,13 @@ module SiSU_DigestView
if @opt.act[:verbose_plus][:set]==:on \
or @opt.act[:maintenance][:set]==:on
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],@opt.fns,"file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}").flow
- end
- end
- if SiSU_Env::SystemCall.new.openssl
- SiSU_DigestView::Source::Scroll.new(@particulars).songsheet
- else
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('*EXITED* hash digests will not run without openssl')
end
+ end
+ if SiSU_Env::SystemCall.new.openssl
+ SiSU_DigestView::Source::Scroll.new(@particulars).songsheet
+ else
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('*EXITED* hash digests will not run without openssl')
+ end
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -114,8 +114,8 @@ module SiSU_DigestView
@particulars=particulars
@data,@env,@md=@particulars.ao_array,@particulars.env,@particulars.md
SiSU_Env::FileOp.new(@md).mkdir
- @@dg ||=@env.digest.type
- @@dl ||=@env.digest.length
+ @@dg ||=@env.digest(@md.opt).type
+ @@dl ||=@env.digest(@md.opt).length
@dg,@dl=@@dg,@@dl
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
@language=l[:n]
@@ -158,135 +158,6 @@ module SiSU_DigestView
txt=txt.gsub(/([()])/,"\\\\\\1")
end
def message_digest
- data=@data
- sys=SiSU_Env::SystemCall.new
- @p=[]
- @g,@v,@r='','',''
- data.each do |para|
- x=nil
- y,para_endnotes=[],[]
- if para =~/#{Mx[:id_o]}~(\d+);(?:(?:\w|[0-6]:)\d+);(?:\w\d+)#{Mx[:id_c]}#{Mx[:id_o]}([0-9a-f]{#{@dl}}):([0-9a-f]{#{@dl}})#{Mx[:id_c]}/
- ocn,d_clean,d_all=$1,$2,$3
- @ocn=ocn unless ocn.to_i==0
- para=para.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'<b>\1</b>').
- gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'<i>\1</i>').
- gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'<u>\1</u>')
- if para=~/#{Mx[:en_a_o]}[\d*+]+.+?#{Mx[:id_o]}[0-9a-f]{#{@dl}}#{Mx[:id_c]}#{Mx[:en_a_c]}/
- para_endnotes << para.scan(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})([\d*+]+).+?#{Mx[:id_o]}([0-9a-f]{#{@dl}})#{Mx[:id_c]}(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/)
- end
- images=[]
- if para !~/^%+\s/ \
- and para =~/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+\.(png|jpg|gif))\s.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/
- images=para.scan(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+\.(?:png|jpg|gif))\s.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/).flatten
- else nil
- end
- x=case para
- when /^#{Mx[:meta_o]}title#{Mx[:meta_c]}/
- "\n" << ' '*0 << '@' << ' '*9
- when /^#{Mx[:meta_o]}subtitle#{Mx[:meta_c]}/
- "\n" << ' '*1 << '@' << ' '*8
- when /^#{Mx[:lv_o]}1:/ #fix Mx[:lv_o]
- "\n" << ' '*2 << ':A ' << ' '*6 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}2:/ #fix Mx[:lv_o]
- "\n" << ' '*3 << ':B ' << ' '*5 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}3:/ #fix Mx[:lv_o]
- "\n" << ' '*4 << ':C ' << ' '*4 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}4:/ #fix Mx[:lv_o]
- "\n" << ' '*5 << '1' << ' '*4 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}5:/ #fix Mx[:lv_o]
- "\n" << ' '*6 << '2' << ' '*3 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}6:/ #fix Mx[:lv_o]
- "\n" << ' '*7 << '3' << ' '*2 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- else
- if para =~/MD5\(\S+?\.sst\)=\s*<u>([0-9a-f]{#{@dl}})<\/u>/ #watch
- @n,@s=/MD5\((\S+?\.sst)\)=\s*<u>([0-9a-f]{#{@dl}})<\/u>/.match(para)[1,2]
- end
- x=unless ocn =~ /^0$/
- if images \
- and images.length > 0 # then get path of image & produce digest
- @image_name,@image_dgst,@img=[],[],[]
- images.each do |i|
- image_source=if FileTest.file?("#{@env.path.image_source_include_local}/#{i}")
- @env.path.image_source_include_local
- elsif FileTest.file?("#{@env.path.image_source_include_remote}/#{i}")
- @env.path.image_source_include_remote
- elsif FileTest.file?("#{@env.path.image_source_include}/#{i}")
- @env.path.image_source_include
- else
- SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],"ERROR - image:", %{"#{i}" missing}, "search locations: #{@env.path.image_source_include_local}, #{@env.path.image_source_include_remote} and #{@env.path.image_source_include}").error2 unless @md.opt.act[:quiet][:set]==:on
- nil
- end
- @img << /\S+\.(png|jpg|gif)/.match(i)[1]
- not_found_msg='image not found'
- if image_source
- para_image = image_source + '/' + i
- @image_name << i
- @image_dgst << (@dg =~/^sha(?:2|256)$/) \
- ? sys.sha256(para_image)
- : sys.md5(para_image)
- else
- @image_name << ' '*16 + i + ' [image missing]'
- @image_dgst << ''
- @image_dgst[1]=not_found_msg + ' '*(32-not_found_msg.length)
- end
- end
- line= "\n" + ' '*9 + ' - ' + ocn + ' '*(10-ocn.length) + d_clean + ' ' + d_all + "\n"
- line_image=[]
- c=0
- @image_name.each do |ok|
- line_image << %{ #{@img[c]} #{@image_dgst[c][1]} #{@image_name[c]}}
- c +=1
- end
- line=line + line_image.join("\n")
- else "\n" + ' '*9 + ' - ' + ocn + ' '*(10-ocn.length) + d_clean + ' ' + d_all
- end
- else
- prefix=''
- metad=[@tr.full_title,@tr.author,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Generated by: ','Ruby version: ']
- metad.each do |n|
- m=rgx_txt(n)
- if m=~/\S+/ \
- and para=~/^#{m}:/
- x,o=0,18
- while x < 2; o = o + 2
- x=o - n.length
- end
- space=' '*x
- prefix="#{n.downcase}#{space}"
- break
- else prefix=' '*9
- end
- end
- m_title=rgx_txt(@tr.full_title)
- m_author=rgx_txt(@tr.author)
- m_sourcefile_digest=rgx_txt(@tr.sourcefile_digest)
- m_sisu_version=rgx_txt(@tr.sisu_version)
- m_last_generated=rgx_txt(@tr.last_generated)
- m_ruby_version=rgx_txt(@tr.ruby_version)
- case para
- when /#{m_title}: /
- @t=/#{m_title}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_author}: /
- @c=/#{m_author}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_sourcefile_digest}.+?<u>/ #watch
- dgst_extra="\n" << ' '*21 << 'source' << ' '*4 << @md.dgst[1] << ' '*34 << @md.fns
- when /#{m_sisu_version}: /
- @v=/#{m_sisu_version}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_last_generated}: /
- @g=/#{m_last_generated}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_ruby_version}: /
- @r=/#{m_ruby_version}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- end
- dgst_extra ||=''
- "\n" << prefix << ' - ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all << dgst_extra << "\n"
- end
- end
- para_endnotes[0].each { |e| y << "\n" + ' '*(28-e[0].length) + "[#{e[0].to_s}] #{e[1].to_s}" } if para_endnotes[0]
- if y; digests(x,y)
- else digests(x)
- end
- end
- end
manifest="#{@env.url.root}/#{@md.fnb}/sisu_manifest.html"
a=%{ocn digest clean (no markup/notes),#{@sp*33}digest all (includes markup & endnotes)\n}
description("#{@md.title.full}\n")
@@ -340,18 +211,20 @@ module SiSU_DigestView
data.each do |t_o|
if t_o.is==:heading
x=case t_o.ln
- when 1 then l[1] +=1 #fix Mx[:lv_o]
+ when 1 then l[0] +=1 #fix Mx[:lv_o]
' '*0 << ':A'
- when 2 then l[2] +=1 #fix Mx[:lv_o]
+ when 1 then l[1] +=1 #fix Mx[:lv_o]
' '*1 << ':B'
- when 3 then l[3] +=1 #fix Mx[:lv_o]
+ when 2 then l[2] +=1 #fix Mx[:lv_o]
' '*2 << ':C'
+ when 3 then l[3] +=1 #fix Mx[:lv_o]
+ ' '*3 << ':D'
when 4 then l[4] +=1 #fix Mx[:lv_o]
- ' '*3 << '1'
+ ' '*4 << '1'
when 5 then l[5] +=1 #fix Mx[:lv_o]
- ' '*4 << '2'
+ ' '*5 << '2'
when 6 then l[6] +=1 #fix Mx[:lv_o]
- ' '*5 << '3'
+ ' '*6 << '3'
else nil
end
end
@@ -363,9 +236,10 @@ module SiSU_DigestView
ao_structure_summary("document structure[*]\n")
[0,1,2,3,4,5,6].each do |y|
v=case y
- when 1 then ':A'
- when 2 then ':B'
- when 3 then ':C'
+ when 0 then ':A'
+ when 1 then ':B'
+ when 2 then ':C'
+ when 3 then ':D'
when 4 then '1 '
when 5 then '2 '
when 6 then '3 '
@@ -374,7 +248,7 @@ module SiSU_DigestView
end
ao_structure_summary("objects (ocn) = #{ocn}\n")
ao_structure_summary("endnotes = #{endnotes}\n")
- ao_structure_summary(" [*] number of headers (@) and of each heading level (:A to :C and 1 to 3)\n")
+ ao_structure_summary(" [*] number of headers (@) and of each heading level (:A to :D and 1 to 3)\n")
end
def supplementary
if defined? @md.sc_number \
diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb
index e244bbb8..058a8f34 100644
--- a/lib/sisu/v5/html_format.rb
+++ b/lib/sisu/v5/html_format.rb
@@ -217,7 +217,7 @@ module SiSU_HTML_Format
@env=SiSU_Env::InfoEnv.new(md.fns)
@file=SiSU_Env::FileOp.new(md)
@o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
- @make=SiSU_Env::ProcessingSettings.new(@md)
+ @make=SiSU_Env::ProcessingSettings.new(md)
end
def home
%{<td align="center" bgcolor=#{@vz.color_band2}>
diff --git a/lib/sisu/v5/html_minitoc.rb b/lib/sisu/v5/html_minitoc.rb
index 5366b127..8b802a81 100644
--- a/lib/sisu/v5/html_minitoc.rb
+++ b/lib/sisu/v5/html_minitoc.rb
@@ -143,7 +143,8 @@
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
- toc_mini=if txt.name =~/^meta/ and txt.obj=~/Document Information/
+ toc_mini=if txt.name =~/^meta/ \
+ and txt.obj=~/Document Information/
format_toc.mini_tail
else format_toc.mini_lev1
end
diff --git a/lib/sisu/v5/param.rb b/lib/sisu/v5/param.rb
index ba75bfb0..adc9350f 100644
--- a/lib/sisu/v5/param.rb
+++ b/lib/sisu/v5/param.rb
@@ -568,7 +568,7 @@ module SiSU_Param
and copyright.text \
and not copyright.text.empty?
v=sep(copyright.text)
- s +=copyright.text + v
+ s +='Copyright: ' + copyright.text + v
end
if defined? copyright.translation \
and copyright.translation \
@@ -1311,7 +1311,7 @@ module SiSU_Param
if @en[:note] > 0 \
and @en[:sum] > 0
if @en[:sum] > 0
- else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:unless][:set]==:on
+ else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:quiet][:set]==:on
end
end
if @en[:mark] != @en[:note] \
@@ -1328,7 +1328,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@title=Md.new('Text Insert',@opt,@env).title
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:quiet][:set]==:on
end
end
if @author !~/[\S]/
@@ -1336,7 +1336,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:quiet][:set]==:on
end
end
@struct={}
diff --git a/lib/sisu/v5/shared_metadata.rb b/lib/sisu/v5/shared_metadata.rb
index b7ba2f1f..da396040 100644
--- a/lib/sisu/v5/shared_metadata.rb
+++ b/lib/sisu/v5/shared_metadata.rb
@@ -886,6 +886,8 @@ WOK
def initialize(md)
@md=md
@br="\\\\\n"
+ @make=SiSU_Env::ProcessingSettings.new(md)
+ @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
end
def meta_para(tag,inf,sc=true)
inf=((inf.is_a?(String) && sc) ? spec_char(inf) : inf)
@@ -906,9 +908,12 @@ WOK
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
language=l[:n]
tr=SiSU_Translate::Source.new(@md,language)
- tag="Document Manifest @"
- inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
- meta << meta_para(tag,inf)
+ if @make.build.links_to_manifest? \
+ and not @o_str.dump_or_redirect?
+ tag="Document Manifest @"
+ inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
+ meta << meta_para(tag,inf)
+ end
if defined? @md.title.full \
and @md.title.full=~/\S+/
tag,inf=tr.full_title,@md.title.full
diff --git a/lib/sisu/v6/ao_doc_objects.rb b/lib/sisu/v6/ao_doc_objects.rb
index 15e949c4..9555ab5e 100644
--- a/lib/sisu/v6/ao_doc_objects.rb
+++ b/lib/sisu/v6/ao_doc_objects.rb
@@ -94,16 +94,16 @@ module SiSU_AO_DocumentStructure
tag= h[:tag] || ((defined? o.tag) ? o.tag : nil) #String, metadata type/tag
obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
@of,@is,@tag,@obj,@digest,@tmp=of,is,tag,obj,digest,tmp
self
end
end
class ObjectHeading
- attr_accessor :obj,:is,:tags,:of,:lv,:ln,:lc,:toc_,:name,:idx,:ocn,:odv,:osp,:node,:parent,:ocn_,:note_,:autonum_,:digest,:tmp
+ attr_accessor :obj,:is,:tags,:of,:lv,:ln,:lc,:use_,:name,:idx,:ocn,:odv,:osp,:node,:parent,:ocn_,:note_,:autonum_,:digest,:tmp
def initialize
@of=:para
- @is=@obj=@lv=@ln=@lc=@toc_=@name=@idx=@size=@ocn=@odv=@osp=@node=@parent=@ocn_=@note_=@autonum_=@digest=@tmp=nil
+ @is=@obj=@lv=@ln=@lc=@use_=@name=@idx=@size=@ocn=@odv=@osp=@node=@parent=@ocn_=@note_=@autonum_=@digest=@tmp=nil
@tags=[]
end
def heading_ln(lv)
@@ -156,7 +156,15 @@ module SiSU_AO_DocumentStructure
lv= h[:lv] || ((defined? o.lv) ? o.lv : nil) #Alpha-numeric, document structure as used in markup, A-D then 1-6
ln= h[:ln] || ((defined? o.ln) ? o.ln : nil) #Integer, document structure level, for convenience in processing 1-9
lc= h[:lc] || ((defined? o.lc) ? o.lc : nil) #Integer, document structure collapsed level, convenience (collapse sisu's dual level document structure for markup with simple linear structure)
- toc_= h[:toc_] || ((defined? o.toc_) ? o.toc_ : false) #Bool, do not include in toc, (relevant to headings)
+ use_=if lv \
+ and lv == '1'
+ h[:use_] || ((defined? o.use_) ? o.use_ : :ok)
+ elsif not lv.empty? \
+ and lv =~ /[A-D2-3]/
+ :ok
+ else
+ h[:use_] || ((defined? o.use_) ? o.use_ : :ok)
+ end
ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
@@ -164,9 +172,9 @@ module SiSU_AO_DocumentStructure
else h[:autonum_]
end
note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@lv,@ln,@lc,@name,@tags,@obj,@idx,@ocn,@odv,@osp,@node,@parent,@toc_,@ocn_,@note_,@autonum_,@digest,@tmp=of,is,lv,ln,lc,name,tags,obj,idx,ocn,odv,osp,node,parent,toc_,ocn_,note_,autonum_,digest,tmp
+ @of,@is,@lv,@ln,@lc,@name,@tags,@obj,@idx,@ocn,@odv,@osp,@node,@parent,@use_,@ocn_,@note_,@autonum_,@digest,@tmp=of,is,lv,ln,lc,name,tags,obj,idx,ocn,odv,osp,node,parent,use_,ocn_,note_,autonum_,digest,tmp
self
end
def heading_insert(h,o=nil)
@@ -201,7 +209,7 @@ module SiSU_AO_DocumentStructure
ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,hang,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp
self
@@ -225,7 +233,7 @@ module SiSU_AO_DocumentStructure
ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,hang,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp
self
@@ -254,7 +262,7 @@ module SiSU_AO_DocumentStructure
else h[:ocn_]
end
num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,number_,note_,ocn_,num,digest,tmp
self
@@ -274,7 +282,7 @@ module SiSU_AO_DocumentStructure
else h[:ocn_]
end
num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
self
@@ -294,7 +302,7 @@ module SiSU_AO_DocumentStructure
else h[:ocn_]
end
num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
self
@@ -314,7 +322,7 @@ module SiSU_AO_DocumentStructure
else h[:ocn_]
end
num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
self
@@ -333,7 +341,7 @@ module SiSU_AO_DocumentStructure
else h[:ocn_]
end
num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
@h=nil
@@ -365,7 +373,7 @@ module SiSU_AO_DocumentStructure
else h[:ocn_]
end
num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@cols,@widths,@obj,@idx,@ocn,@odv,@osp,@parent,@head_,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,cols,widths,obj,idx,ocn,odv,osp,parent,head_,note_,ocn_,num,digest,tmp
self
@@ -393,7 +401,7 @@ module SiSU_AO_DocumentStructure
ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@size,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,size,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
self
diff --git a/lib/sisu/v6/ao_doc_str.rb b/lib/sisu/v6/ao_doc_str.rb
index d8c012fd..d060d89c 100644
--- a/lib/sisu/v6/ao_doc_str.rb
+++ b/lib/sisu/v6/ao_doc_str.rb
@@ -234,10 +234,10 @@ module SiSU_AO_DocumentStructureExtract
@@flag[:ocn]=:on
{flag: :ocn_on}
when /[~]/
- @@flag[:ocn]=:off_headings_substantive
- {flag: :ocn_off, mod: :headings_substantive}
- when /[-]/
- @@flag[:ocn]=:off_headings_exclude
+ @@flag[:ocn]=:ocn_off_headings_keep
+ {flag: :ocn_off, mod: :headings_keep}
+ when /[-]/ #of particular relevance with level 1~ which is required to precede substantive text & used e.g. in html segmented text
+ @@flag[:ocn]=:ocn_off_headings_dummy_lev1
{flag: :ocn_off, mod: :headings_exclude}
else
@@flag[:ocn]=:on
@@ -286,12 +286,14 @@ module SiSU_AO_DocumentStructureExtract
obj=$1
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
- if @@flag[:ocn]==:off_headings_exclude \
- or @@flag[:ocn]==:off_headings_substantive
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
- if @@flag[:ocn]==:off_headings_exclude
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ and t_o =~/^1\~\S*\s+/m
obj << ' -#'
- elsif @@flag[:ocn]==:off_headings_substantive
+ elsif @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
obj << ' ~#'
end
end
@@ -302,12 +304,14 @@ module SiSU_AO_DocumentStructureExtract
name,obj=$1,$2
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
- if @@flag[:ocn]==:off_headings_exclude \
- or @@flag[:ocn]==:off_headings_substantive
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
- if @@flag[:ocn]==:off_headings_exclude
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ and t_o =~/^1\~\S*\s+/m
obj << ' -#'
- elsif @@flag[:ocn]==:off_headings_substantive
+ elsif @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
obj << ' ~#'
end
end
@@ -318,12 +322,14 @@ module SiSU_AO_DocumentStructureExtract
name,obj=$1,$2
note=endnote_test?(obj)
obj,tags=extract_tags(obj,name)
- if @@flag[:ocn]==:off_headings_exclude \
- or @@flag[:ocn]==:off_headings_substantive
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
- if @@flag[:ocn]==:off_headings_exclude
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ and t_o =~/^1\~\S*\s+/m
obj << ' -#'
- elsif @@flag[:ocn]==:off_headings_substantive
+ elsif @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
obj << ' ~#'
end
end
@@ -345,8 +351,8 @@ module SiSU_AO_DocumentStructureExtract
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
unless obj=~/\A\s*\Z/m
- if @@flag[:ocn]==:off_headings_exclude \
- or @@flag[:ocn]==:off_headings_substantive
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
obj << ' ~#'
end
@@ -368,8 +374,8 @@ module SiSU_AO_DocumentStructureExtract
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
unless obj=~/\A\s*\Z/m
- if @@flag[:ocn]==:off_headings_exclude \
- or @@flag[:ocn]==:off_headings_substantive
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
obj << ' ~#'
end
@@ -391,8 +397,8 @@ module SiSU_AO_DocumentStructureExtract
image=image_test(t_o)
note=endnote_test?(t_o)
obj,tags=extract_tags(t_o)
- if @@flag[:ocn]==:off_headings_exclude \
- or @@flag[:ocn]==:off_headings_substantive
+ if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ or @@flag[:ocn]==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
obj << ' ~#'
end
@@ -847,18 +853,43 @@ module SiSU_AO_DocumentStructureExtract
if status==:error
node_ln=/^([0-6])/.match(node)[1].to_i
node_parent_ln=/^([0-6])/.match(node_parent)[1].to_i
- puts %{current level: #{structure_info.lv[node_ln]} (possible parent levels: #{structure_info.possible_parents(structure_info.lv[node_ln])})
+ STDERR.puts %{current level: #{structure_info.lv[node_ln]} (possible parent levels: #{structure_info.possible_parents(structure_info.lv[node_ln])})
parent level: #{structure_info.lv[node_parent_ln]} (possible child levels: #{structure_info.possible_children(structure_info.lv[node_parent_ln])})
--- }
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ $process_document = :skip
end
end
end
def warning_incorrect_parent_level_or_level(txt)
- puts %{warning,
-#{txt}
-has incorrect level and/or parent level}
+ puts %{ERROR. There is an error in markup of heading levels either here or in the parent heading.
+The current header reads:
+"#{txt}"
+has incorrect level and/or parent level
+--}
+ end
+ def required_headers_present?
+ unless (defined? @md.title \
+ and @md.title.full)
+ STDERR.puts %{required header missing:
+
+@title:
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
+}
+ $process_document = :skip
+ end
+ unless (defined? @md.creator.author \
+ and @md.creator.author)
+ STDERR.puts %{required header missing:
+
+@creator:
+ :author: anonymous?
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
+}
+ $process_document = :skip
+ end
end
def ocn #and auto segment numbering increment
+ required_headers_present?
data=@data
@o_array=[]
node=ocn=ocn_dv=ocn_sp=ocnh=ocnh0=ocnh1=ocnh2=ocnh3=ocnh4=ocnh5=ocnh6=ocno=ocnp=ocnt=ocnc=ocng=ocni=ocnu=0 # h heading, o other, t table, g group, i image
@@ -866,6 +897,7 @@ has incorrect level and/or parent level}
parent=node1=node2=node3=node4=node5=node6=nil
node0='0:0;0'
@collapsed_lv0=0
+ @lev_occurences={ a: 0, b: 0, c: 0, d: 0, l1: 0, l2: 0, l3: 0 }
data.each do |dob|
h={}
if (dob.obj !~ regex_exclude_ocn_and_node || dob.is==:code) \
@@ -875,7 +907,7 @@ has incorrect level and/or parent level}
&& dob.ocn_
#dob.ln now is determined, and set earlier, check how best to remove this -->
if dob.is==:heading
- ln=case dob.lv
+ @ln=ln=case dob.lv
when 'A' then 0
when 'B' then 1
when 'C' then 2
@@ -905,11 +937,13 @@ has incorrect level and/or parent level}
end
if ln==0 \
or ln=~@md.lv0
+ @lev_occurences[:a] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh0+=1 #heading
node0="0:#{ocnh0};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node0="0:0;0"
end
@@ -919,11 +953,13 @@ has incorrect level and/or parent level}
node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT'
elsif ln==1 \
or ln=~@md.lv1
+ @lev_occurences[:b] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh1+=1 #heading
node1="1:#{ocnh1};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node1="1:0;0"
end
@@ -932,6 +968,7 @@ has incorrect level and/or parent level}
@collapsed_lv1=@collapsed_lv0+1
node0
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node0,node0,:error)
node0
end
@@ -939,11 +976,13 @@ has incorrect level and/or parent level}
node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX
elsif ln==2 \
or ln=~@md.lv2
+ @lev_occurences[:c] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh2+=1
node2="2:#{ocnh2};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node2="2:0;0"
end
@@ -952,6 +991,7 @@ has incorrect level and/or parent level}
@collapsed_lv2=@collapsed_lv1+1
node1
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node2,node0,:error)
node0
end
@@ -959,11 +999,13 @@ has incorrect level and/or parent level}
node,ocn_sp=node2,"h#{ocnh}"
elsif ln==3 \
or ln=~@md.lv3
+ @lev_occurences[:d] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh3+=1
node3="3:#{ocnh3};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node3="3:0;0"
end
@@ -988,6 +1030,7 @@ or this level should be level :B~ rather than #{dob.lv}}
node,ocn_sp=node3,"h#{ocnh}"
elsif ln==4 \
or ln=~@md.lv4
+ @lev_occurences[:l1] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh4+=1
@@ -1021,6 +1064,7 @@ or this level should be level :B~ rather than #{dob.lv}}
node,ocn_sp=node4,"h#{ocnh}"
elsif ln==5 \
or ln=~@md.lv5
+ @lev_occurences[:l2] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh5+=1
@@ -1049,6 +1093,7 @@ or this level should be level :B~ rather than #{dob.lv}}
@collapsed_lv5=@collapsed_lv1+1
node1
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node5,node0,:error)
node0
end
@@ -1056,6 +1101,7 @@ or this level should be level :B~ rather than #{dob.lv}}
node,ocn_sp=node5,"h#{ocnh}"
elsif ln==6 \
or ln=~@md.lv6
+ @lev_occurences[:l3] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh6+=1
@@ -1092,6 +1138,7 @@ or this level should be 5~ rather #{dob.lv}" #level 6
@collapsed_lv6=@collapsed_lv1+1
node1
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node6,node0,:error)
node0
end
@@ -1099,6 +1146,29 @@ or this level should be 5~ rather #{dob.lv}" #level 6
node,ocn_sp=node6,"h#{ocnh}"
end
else
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]}
+}
+ end
+ unless @ln >= 4
+ lev=case @ln
+ when 0 then 'A'
+ when 1 then 'B'
+ when 2 then 'C'
+ when 3 then 'D'
+ when 4 then '1'
+ when 5 then '2'
+ when 6 then '3'
+ when 7 then '4'
+ when 8 then '5'
+ when 9 then '6'
+ end
+ STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
+ $process_document = :skip
+ break
+ end
if not dob.obj =~/~#|-#/
ocn_flag=true
else
@@ -1129,9 +1199,15 @@ or this level should be 5~ rather #{dob.lv}" #level 6
dob.ln,dob.node,dob.ocn,dob.ocn_,dob.odv,dob.osp,dob.parent,dob.lc=ln,node,ocn,ocn_flag,ocn_dv,ocn_sp,parent,collapsed_level
else
ocnu+=1
- dob.obj=dob.obj.gsub(/#{Mx[:fa_o]}[~-]##{Mx[:fa_c]}/,'') if dob.obj
- ocn_dv,ocn_sp="u#{ocnu}","u#{ocnu}"
- dob.ln,dob.node,dob.ocn,dob.ocn_,dob.odv,dob.osp,dob.parent,dob.lc=ln,node,nil,ocn_flag,ocn_dv,ocn_sp,parent,collapsed_level
+ heading_use=:ok
+ if dob.obj=~/#{Mx[:pa_non_object_no_heading]}/
+ dob.obj=dob.obj.gsub(/#{Mx[:pa_non_object_no_heading]}/,'')
+ heading_use=:ok
+ elsif dob.obj=~/#{Mx[:pa_non_object_dummy_heading]}/
+ dob.obj=dob.obj.gsub(/#{Mx[:pa_non_object_dummy_heading]}/,'')
+ heading_use=:dummy
+ end
+ dob.ln,dob.node,dob.ocn,dob.ocn_,dob.use_,dob.odv,dob.osp,dob.parent,dob.lc=ln,node,nil,ocn_flag,heading_use,ocn_dv,ocn_sp,parent,collapsed_level
end
else
if dob.of !=:meta \
@@ -1148,24 +1224,6 @@ or this level should be 5~ rather #{dob.lv}" #level 6
end
end
h
- elsif dob.obj=~/#{Mx[:pa_non_object_no_heading]}/
- dob.obj=dob.obj.gsub(/#{Mx[:pa_non_object_no_heading]}/,'')
- if dob.is==:para
- h={ obj: dob.obj, ocn_: false, ocn: nil, hang: dob.hang, indent: dob.indent, bullet_: dob.bullet_, tags: dob.tags, parent: dob.parent }
- dob=SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h,dob)
- elsif dob.is==:heading
- h={ obj: dob.obj, ocn_: false, ocn: nil, toc_: true, parent: dob.parent }
- dob=SiSU_AO_DocumentStructure::ObjectHeading.new.heading(h,dob)
- end
- elsif dob.obj=~/#{Mx[:pa_non_object_dummy_heading]}/
- dob.obj=dob.obj.gsub(/#{Mx[:pa_non_object_dummy_heading]}/,'')
- if dob.is==:para
- h={ obj: dob.obj, ocn_: false, ocn: nil, hang: dob.hang, indent: dob.indent, bullet_: dob.bullet_, tags: dob.tags, parent: dob.parent }
- dob=SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h,dob)
- elsif dob.is==:heading
- h={ obj: dob.obj, ocn_: false, ocn: nil, toc_: false, parent: dob.parent }
- dob=SiSU_AO_DocumentStructure::ObjectHeading.new.heading(h,dob)
- end
else dob
end
if dob.is==:code \
@@ -1177,6 +1235,18 @@ or this level should be 5~ rather #{dob.lv}" #level 6
end
@o_array << dob
end
+ unless @lev_occurences[:a] == 1
+ STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
+There must be one level A~ (no more and no less)
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ $process_document = :skip
+ end
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
+There must be at least one level 1~ (and as many as required)
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ $process_document = :skip
+ end
@o_array
end
end
diff --git a/lib/sisu/v6/ao_hash_digest.rb b/lib/sisu/v6/ao_hash_digest.rb
index ce45b9e4..257902f4 100644
--- a/lib/sisu/v6/ao_hash_digest.rb
+++ b/lib/sisu/v6/ao_hash_digest.rb
@@ -65,7 +65,7 @@ module SiSU_AO_Hash
class ObjectDigest
def initialize(md,data,env=nil)
@md,@data,@env=md,data,env
- @env ||=SiSU_Env::InfoEnv.new(@md.fns)
+ @env ||=SiSU_Env::InfoEnv.new(@md.fns,@md)
end
def object_digest
# 1. clean/stripped text without any markup, paragraph, headings etc. without endnotes
@@ -74,11 +74,11 @@ module SiSU_AO_Hash
# [digests should not include other digests]
data=@data.compact
@tuned_file=[]
- sha_ =(@env.digest.type=='sha256' ? true : false)
+ sha_ =@env.digest(@md.opt).type
begin
sha_ ? (require 'digest/sha2') : (require 'digest/md5')
rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error((sha_ ? 'digest/sha2' : 'digest/md5') + ' NOT FOUND')
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error(sha_ + ' NOT FOUND')
end
data.each do |t_o|
unless t_o.obj.is_a?(Array)
@@ -88,11 +88,16 @@ module SiSU_AO_Hash
&& t_o.of !=:comment \
&& t_o.of !=:layout) \
&& t_o.ocn.is_a?(Fixnum)
- if sha_
+ case sha_
+ when :sha512
+ for hash_class in [ Digest::SHA512 ]
+ @tuned_file << stamped(t_o,hash_class)
+ end
+ when :sha256
for hash_class in [ Digest::SHA256 ]
@tuned_file << stamped(t_o,hash_class)
end
- else
+ when :md5
for hash_class in [ Digest::MD5 ]
@tuned_file << stamped(t_o,hash_class)
end
@@ -111,10 +116,15 @@ module SiSU_AO_Hash
if en_plus =~/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/
t_o_txt,en_open,en_txt,en_close=/(.*?)(#{Mx[:en_a_o]}|#{Mx[:en_b_o]})(.+?)(#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m.match(en_plus)[1..4]
stripped_en=SiSU_TextRepresentation::Alter.new(en_txt).strip_clean_of_markup
- digest_en_strip=if @env.digest.type =~/sha256/
+ digest_en_strip=case @env.digest(@md.opt).type
+ when :sha512
+ Digest::SHA512.hexdigest(stripped_en)
+ when :sha256
Digest::SHA256.hexdigest(stripped_en)
- else
+ when :md5
Digest::MD5.hexdigest(stripped_en)
+ else
+ Digest::SHA256.hexdigest(stripped_en)
end
t_o_txt + en_open + en_txt + Mx[:id_o] + digest_en_strip + Mx[:id_c] + en_close
else STDERR.puts "Error Exception - problem encountered with:\n#{en_plus}" #arbitrary exception, tidy up
diff --git a/lib/sisu/v6/ao_images.rb b/lib/sisu/v6/ao_images.rb
index 05bc8e63..030dbd19 100644
--- a/lib/sisu/v6/ao_images.rb
+++ b/lib/sisu/v6/ao_images.rb
@@ -66,7 +66,7 @@ module SiSU_AO_Images
require 'RMagick'
include Magick
rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('RMagic NOT FOUND')
+ #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('RMagic NOT FOUND')
end
def initialize(md,data)
@md,@data=md,data
@@ -83,8 +83,7 @@ module SiSU_AO_Images
@rmgk=false
end
else
- if (@md.opt.act[:verbose][:set]==:on \
- || @md.opt.act[:verbose_plus][:set]==:on \
+ if (@md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],'*WARN* use of RMagick is not enabled in sisurc.yml').warn
end
@@ -111,8 +110,7 @@ module SiSU_AO_Images
img=Magick::ImageList.new("#{image_path}/#{image}")
img_col,img_row=img.columns,img.rows
else
- if (@md.opt.act[:verbose][:set]==:on \
- || @md.opt.act[:verbose_plus][:set]==:on \
+ if (@md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],'*WARN* RMagick not present, will attempt to use imagemagick (identify) directly').warn
end
diff --git a/lib/sisu/v6/ao_numbering.rb b/lib/sisu/v6/ao_numbering.rb
index acb2351a..e04befb0 100644
--- a/lib/sisu/v6/ao_numbering.rb
+++ b/lib/sisu/v6/ao_numbering.rb
@@ -167,7 +167,7 @@ module SiSU_AO_Numbering
@subnumber=0 if dob.ln==no1
end
if dob.ln.to_s =~/^[0-6]/ \
- and not dob.toc_ \
+ and not dob.use_ ==:dummy \
and dob.obj !~/#{Mx[:fa_o]}(?:~#|-#)#{Mx[:fa_c]}/ # <-- fix
if dob.ln==no1
t_no1+=1; t_no2=0; t_no3=0
diff --git a/lib/sisu/v6/ao_syntax.rb b/lib/sisu/v6/ao_syntax.rb
index e3777f50..8a13e406 100644
--- a/lib/sisu/v6/ao_syntax.rb
+++ b/lib/sisu/v6/ao_syntax.rb
@@ -333,7 +333,7 @@ module SiSU_AO_Syntax
dob
end
def fontface(dob)
- leader=/^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|[、。]|\>/
+ leader=/^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|[、。「‹«¿¡]|\>/
dob=fontface_lines(dob,leader)
dob.obj=dob.obj.gsub(/(#{leader})\*\{(.+?)\}\*/m,
"\\1#{@emph[:o]}\\2#{@emph[:c]}"). #emphasis
diff --git a/lib/sisu/v6/composite.rb b/lib/sisu/v6/composite.rb
index ebbd14f6..2afff1bf 100644
--- a/lib/sisu/v6/composite.rb
+++ b/lib/sisu/v6/composite.rb
@@ -132,7 +132,7 @@ module SiSU_Assemble
def insertion(fni,insert_array)
file={ prepared: [], images: [] }
rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
- file[:prepared] << "\n% |#{fni}|@|^|>>ok\n"
+ file[:prepared] << "\n% |#{fni}|@|^|>>ok\n\n"
@code_flag=false
insert_array.each do |i|
@code_flag=if i =~/^code\{/ then true
@@ -141,11 +141,11 @@ module SiSU_Assemble
end
if not @code_flag \
and i !~/^%+\s/
- i=i.gsub(/^([123]|:?[ABC])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax)
+ i=i.gsub(/^([123]|:?[ABCD])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax)
if i =~/^@\S+?:/
i=i.gsub(/\n/m,"\n% ").
gsub(/\n%\s+$/m,'').
- gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers
+ gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers
end
end
file[:prepared] << i
@@ -166,11 +166,9 @@ module SiSU_Assemble
tuned_file,imagedir=[],[]
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Composite Document',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").grey_title_hi unless @opt.act[:quiet][:set]==:on
data.each do |para|
- if para =~/^<<\s+(\S+?\.ss[it])$/ \
- or para =~/^<<\{(\S+?\.ss[it])\}$/ \
- or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \
- or para =~/^r\{(.+?)\}/ #depreciated
+ if para =~/^<<\s+(\S+?\.ss[it])$/
loadfile=$1.strip
+ src_ssm=@opt.fns.sub(/\.ssm\.sst/,'.ssm')
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
@@ -200,7 +198,8 @@ module SiSU_Assemble
file[:prepared]
else
cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
- STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts %{SKIPPED processing file: [#{@opt.lng}] "#{@opt.fns}" it requires an invalid or non-existent file: "#{loadfile}"}
+ $process_document = :skip; break #remove this line to continue processing documents that have missing include files
para
end
else tuned_file << para
@@ -255,7 +254,8 @@ module SiSU_Assemble
@ssm << loadfile
else
cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
- STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts %{SKIPPED processing file: [#{@opt.lng}] "#{@opt.fns}" it requires an invalid or non-existent file: "#{loadfile}"}
+ $process_document = :skip; break #remove this line to continue processing documents that have missing include files
para
end
end
diff --git a/lib/sisu/v6/constants.rb b/lib/sisu/v6/constants.rb
index e70a2f98..be60431e 100644
--- a/lib/sisu/v6/constants.rb
+++ b/lib/sisu/v6/constants.rb
@@ -260,8 +260,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_is[:version_dir]}a_",
- name_prefix_db: "sisu_#{SiSU_is[:version_dir]}a_",
+ name_prefix: "SiSU#{SiSU_is[:version_dir]}b_",
+ name_prefix_db: "sisu_#{SiSU_is[:version_dir]}b_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
@@ -276,7 +276,7 @@ Db={
col_library: 30,
col_small: 16,
col_filename: 256,
- col_digest: 64,
+ col_digest: 128,
col_filesize: 10,
col_info_note: 2500,
}
@@ -353,7 +353,7 @@ check:
♩ ♭  ✠  ▭ ▬ ▪
【】〖〗◢ ◣ ◀ ▶ ◘ ◙
《》「」
- ‹ › ∗ 
+ ‹ › ∗  ∴ ∷
'〔lv1〕','〔lv2〕','〔lv3〕','〔lv4〕','〔lv5〕','〔lv6〕','〔lv7〕','〔lv8〕','〔lv9〕'
'〔 Ѳ1〕','〔 Ѳ2〕','〔 Ѳ3〕','〔 Ѳ4〕','〔 Ѳ5〕','〔Ѳ6〕','〔Ѳ7〕','〔Ѳ8〕','〔Ѳ9〕'
◁▷
diff --git a/lib/sisu/v6/db_columns.rb b/lib/sisu/v6/db_columns.rb
index 1b21cf96..8dd14ddb 100644
--- a/lib/sisu/v6/db_columns.rb
+++ b/lib/sisu/v6/db_columns.rb
@@ -1843,7 +1843,7 @@ module SiSU_DbColumns
end
def src_fingerprint
def name
- 'src_fingerprint' #hash/digest, sha256 or md5
+ 'src_fingerprint' #hash/digest, sha512, sha256 or md5
end
def create_column
"#{name} VARCHAR(#{Db[:col_digest]}) NULL,"
@@ -1851,7 +1851,7 @@ module SiSU_DbColumns
end
def column_comment
%{COMMENT ON COLUMN metadata_and_text.#{name}
- IS 'sisu markup source text fingerprint, hash digest sha256 (or md5)';}
+ IS 'sisu markup source text fingerprint, hash digest sha512, sha256 or md5';}
end
def tuple
if defined? @md.dgst \
diff --git a/lib/sisu/v6/digests.rb b/lib/sisu/v6/digests.rb
index e708e4e9..24ddc32e 100644
--- a/lib/sisu/v6/digests.rb
+++ b/lib/sisu/v6/digests.rb
@@ -71,7 +71,7 @@ module SiSU_DigestView
@fnb=@opt.fnb
@@endnotes_para=[]
@@dg=nil
- @dg=@@dg ||=SiSU_Env::InfoEnv.new.digest.type
+ @dg=@@dg ||=SiSU_Env::InfoEnv.new.digest(opt).type
@particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt)
end
def read
@@ -91,13 +91,13 @@ module SiSU_DigestView
if @opt.act[:verbose_plus][:set]==:on \
or @opt.act[:maintenance][:set]==:on
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],@opt.fns,"file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}").flow
- end
- end
- if SiSU_Env::SystemCall.new.openssl
- SiSU_DigestView::Source::Scroll.new(@particulars).songsheet
- else
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('*EXITED* hash digests will not run without openssl')
end
+ end
+ if SiSU_Env::SystemCall.new.openssl
+ SiSU_DigestView::Source::Scroll.new(@particulars).songsheet
+ else
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('*EXITED* hash digests will not run without openssl')
+ end
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -108,14 +108,19 @@ module SiSU_DigestView
private
class Scroll <Source
@@dl=nil
- @@ds={}
- @@description,@@ds[:digests],@@ds[:tree],@@ds[:summary],@@sc_info=[],[],[],[],[]
- def initialize(particulars) #data='',md='')
+ @@ds={
+ digests_clean: [],
+ digests_with_markup: [],
+ tree: [],
+ summary: [],
+ }
+ @@description,@@sc_info=[],[]
+ def initialize(particulars)
@particulars=particulars
@data,@env,@md=@particulars.ao_array,@particulars.env,@particulars.md
SiSU_Env::FileOp.new(@md).mkdir
- @@dg ||=@env.digest.type
- @@dl ||=@env.digest.length
+ @@dg ||=@env.digest(@md.opt).type
+ @@dl ||=@env.digest(@md.opt).length
@dg,@dl=@@dg,@@dl
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
@language=l[:n]
@@ -123,7 +128,7 @@ module SiSU_DigestView
@sp=' '
end
def songsheet
- @@description,@@ds[:digests],@@ds[:tree],@@ds[:summary],@@sc_info=[],[],[],[],[]
+ @@description,@@ds[:digests_clean],@@ds[:digests_with_markup],@@ds[:tree],@@ds[:summary],@@sc_info=[],[],[],[],[],[]
message_digest
ao_structure
supplementary
@@ -133,9 +138,13 @@ module SiSU_DigestView
puts f + e.to_s if @md.opt.act[:verbose_plus][:set]==:on
@@description << f << e
end
- def digests(f,e='')
+ def digests_clean(f,e='')
puts f if @md.opt.act[:verbose_plus][:set]==:on
- @@ds[:digests] << f + "\n"
+ @@ds[:digests_clean] << f + "\n"
+ end
+ def digests_with_markup(f)
+ puts f if @md.opt.act[:verbose_plus][:set]==:on
+ @@ds[:digests_with_markup] << f + "\n"
end
def ao_structure_tree(f,e='')
puts f + e.to_s if @md.opt.act[:verbose_plus][:set]==:on
@@ -152,143 +161,15 @@ module SiSU_DigestView
def output
file=SiSU_Env::FileOp.new(@md)
filename_digest=file.write_file.hash_digest
- filename_digest << @@description.join << @@ds[:digests].join << @@ds[:tree].join << @@ds[:summary].join << @@sc_info.join
+ filename_digest << @@description.join << @@ds[:digests_clean].join << @@ds[:digests_with_markup].join << @@ds[:tree].join << @@ds[:summary].join << @@sc_info.join
end
def rgx_txt(txt)
txt=txt.gsub(/([()])/,"\\\\\\1")
end
def message_digest
- data=@data
- sys=SiSU_Env::SystemCall.new
@p=[]
@g,@v,@r='','',''
- data.each do |para|
- x=nil
- y,para_endnotes=[],[]
- if para =~/#{Mx[:id_o]}~(\d+);(?:(?:\w|[0-6]:)\d+);(?:\w\d+)#{Mx[:id_c]}#{Mx[:id_o]}([0-9a-f]{#{@dl}}):([0-9a-f]{#{@dl}})#{Mx[:id_c]}/
- ocn,d_clean,d_all=$1,$2,$3
- @ocn=ocn unless ocn.to_i==0
- para=para.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'<b>\1</b>').
- gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'<i>\1</i>').
- gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'<u>\1</u>')
- if para=~/#{Mx[:en_a_o]}[\d*+]+.+?#{Mx[:id_o]}[0-9a-f]{#{@dl}}#{Mx[:id_c]}#{Mx[:en_a_c]}/
- para_endnotes << para.scan(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})([\d*+]+).+?#{Mx[:id_o]}([0-9a-f]{#{@dl}})#{Mx[:id_c]}(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/)
- end
- images=[]
- if para !~/^%+\s/ \
- and para =~/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+\.(png|jpg|gif))\s.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/
- images=para.scan(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+\.(?:png|jpg|gif))\s.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/).flatten
- else nil
- end
- x=case para
- when /^#{Mx[:meta_o]}title#{Mx[:meta_c]}/
- "\n" << ' '*0 << '@' << ' '*9
- when /^#{Mx[:meta_o]}subtitle#{Mx[:meta_c]}/
- "\n" << ' '*1 << '@' << ' '*8
- when /^#{Mx[:lv_o]}1:/ #fix Mx[:lv_o]
- "\n" << ' '*2 << ':A ' << ' '*6 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}2:/ #fix Mx[:lv_o]
- "\n" << ' '*3 << ':B ' << ' '*5 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}3:/ #fix Mx[:lv_o]
- "\n" << ' '*4 << ':C ' << ' '*4 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}4:/ #fix Mx[:lv_o]
- "\n" << ' '*5 << '1' << ' '*4 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}5:/ #fix Mx[:lv_o]
- "\n" << ' '*6 << '2' << ' '*3 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- when /^#{Mx[:lv_o]}6:/ #fix Mx[:lv_o]
- "\n" << ' '*7 << '3' << ' '*2 << '- ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all
- else
- if para =~/MD5\(\S+?\.sst\)=\s*<u>([0-9a-f]{#{@dl}})<\/u>/ #watch
- @n,@s=/MD5\((\S+?\.sst)\)=\s*<u>([0-9a-f]{#{@dl}})<\/u>/.match(para)[1,2]
- end
- x=unless ocn =~ /^0$/
- if images \
- and images.length > 0 # then get path of image & produce digest
- @image_name,@image_dgst,@img=[],[],[]
- images.each do |i|
- image_source=if FileTest.file?("#{@env.path.image_source_include_local}/#{i}")
- @env.path.image_source_include_local
- elsif FileTest.file?("#{@env.path.image_source_include_remote}/#{i}")
- @env.path.image_source_include_remote
- elsif FileTest.file?("#{@env.path.image_source_include}/#{i}")
- @env.path.image_source_include
- else
- SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],"ERROR - image:", %{"#{i}" missing}, "search locations: #{@env.path.image_source_include_local}, #{@env.path.image_source_include_remote} and #{@env.path.image_source_include}").error2 unless @md.opt.act[:quiet][:set]==:on
- nil
- end
- @img << /\S+\.(png|jpg|gif)/.match(i)[1]
- not_found_msg='image not found'
- if image_source
- para_image = image_source + '/' + i
- @image_name << i
- @image_dgst << (@dg =~/^sha(?:2|256)$/) \
- ? sys.sha256(para_image)
- : sys.md5(para_image)
- else
- @image_name << ' '*16 + i + ' [image missing]'
- @image_dgst << ''
- @image_dgst[1]=not_found_msg + ' '*(32-not_found_msg.length)
- end
- end
- line= "\n" + ' '*9 + ' - ' + ocn + ' '*(10-ocn.length) + d_clean + ' ' + d_all + "\n"
- line_image=[]
- c=0
- @image_name.each do |ok|
- line_image << %{ #{@img[c]} #{@image_dgst[c][1]} #{@image_name[c]}}
- c +=1
- end
- line=line + line_image.join("\n")
- else "\n" + ' '*9 + ' - ' + ocn + ' '*(10-ocn.length) + d_clean + ' ' + d_all
- end
- else
- prefix=''
- metad=[@tr.full_title,@tr.author,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Generated by: ','Ruby version: ']
- metad.each do |n|
- m=rgx_txt(n)
- if m=~/\S+/ \
- and para=~/^#{m}:/
- x,o=0,18
- while x < 2; o = o + 2
- x=o - n.length
- end
- space=' '*x
- prefix="#{n.downcase}#{space}"
- break
- else prefix=' '*9
- end
- end
- m_title=rgx_txt(@tr.full_title)
- m_author=rgx_txt(@tr.author)
- m_sourcefile_digest=rgx_txt(@tr.sourcefile_digest)
- m_sisu_version=rgx_txt(@tr.sisu_version)
- m_last_generated=rgx_txt(@tr.last_generated)
- m_ruby_version=rgx_txt(@tr.ruby_version)
- case para
- when /#{m_title}: /
- @t=/#{m_title}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_author}: /
- @c=/#{m_author}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_sourcefile_digest}.+?<u>/ #watch
- dgst_extra="\n" << ' '*21 << 'source' << ' '*4 << @md.dgst[1] << ' '*34 << @md.fns
- when /#{m_sisu_version}: /
- @v=/#{m_sisu_version}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_last_generated}: /
- @g=/#{m_last_generated}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- when /#{m_ruby_version}: /
- @r=/#{m_ruby_version}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
- end
- dgst_extra ||=''
- "\n" << prefix << ' - ' << ocn << ' '*(10-ocn.length) << d_clean << ' ' << d_all << dgst_extra << "\n"
- end
- end
- para_endnotes[0].each { |e| y << "\n" + ' '*(28-e[0].length) + "[#{e[0].to_s}] #{e[1].to_s}" } if para_endnotes[0]
- if y; digests(x,y)
- else digests(x)
- end
- end
- end
manifest="#{@env.url.root}/#{@md.fnb}/sisu_manifest.html"
- a=%{ocn digest clean (no markup/notes),#{@sp*33}digest all (includes markup & endnotes)\n}
description("#{@md.title.full}\n")
description("#{@md.author}\n")
description("#{@md.fns}\n")
@@ -300,39 +181,51 @@ module SiSU_DigestView
description("Sourcefile digest: #{@md.dgst[1]}\n")
description(" source filename: #{@md.fns}\n")
description("available outputs: #{manifest}\n")
- #description(" time generated: #{@g}\n")
- #description(" SiSU version used: #{@v}\n")
- #description(" Ruby version used: #{@r}\n")
description("------------\n")
description("Document Digests\n")
- description(a)
end
def ao_structure
+ a=%{\nocn digests (#{@dg}) clean text (stripped markup)}
+ digests_clean(a)
data=@data
endnotes=nil
data.each do |t_o|
dgst=SiSU_TextRepresentation::ModifiedTextPlusHashDigest.new(@md,t_o).composite.dgst
if dgst
if t_o.is==:heading
- digests("#{@sp*0}#{dgst[:ocn]}#{@sp*(8-dgst[:ocn].to_s.length)}#{dgst[:dgst_stripped_txt]} #{dgst[:dgst_markedup_txt]} #{dgst[:is]} #{t_o.lv}")
+ digests_clean("#{@sp*0}#{dgst[:ocn]}#{@sp*(8-dgst[:ocn].to_s.length)}#{dgst[:dgst_stripped_txt]} #{dgst[:is]} #{t_o.lv}")
elsif t_o.is==:heading_insert
- digests("#{@sp*0}[#{dgst[:ocn]}]#{@sp*(6-dgst[:ocn].to_s.length)}#{dgst[:dgst_stripped_txt]} #{dgst[:dgst_markedup_txt]} #{dgst[:is]} #{t_o.lv}")
+ digests_clean("#{@sp*0}[#{dgst[:ocn]}]#{@sp*(6-dgst[:ocn].to_s.length)}#{dgst[:dgst_stripped_txt]} #{dgst[:is]} #{t_o.lv}")
else
- digests("#{@sp*0}#{dgst[:ocn]}#{@sp*(8-dgst[:ocn].to_s.length)}#{dgst[:dgst_stripped_txt]} #{dgst[:dgst_markedup_txt]} #{dgst[:is]}")
+ digests_clean("#{@sp*0}#{dgst[:ocn]}#{@sp*(8-dgst[:ocn].to_s.length)}#{dgst[:dgst_stripped_txt]} #{dgst[:is]}")
if dgst[:images]
dgst[:images].each do |img|
- digests("#{@sp*8}#{img[:img_dgst]}#{@sp*66}#{img[:img_type]} #{img[:img_name]}")
+ digests_clean("#{@sp*8}#{img[:img_dgst]}#{@sp*66}#{img[:img_type]} #{img[:img_name]}")
end
end
end
if dgst[:endnotes]
dgst[:endnotes].each do |en|
- digests("#{@sp*8}#{en[:note_dgst]}#{@sp*66}note [#{en[:note_number]}]")
+ digests_clean("#{@sp*8}#{en[:note_dgst]} note [#{en[:note_number]}]")
endnotes=en[:note_number]
end
end
end
end
+ b=%{\nocn object (#{@dg}) digests (object includes its markup & endnotes (if any))}
+ digests_with_markup(b)
+ data.each do |t_o|
+ dgst=SiSU_TextRepresentation::ModifiedTextPlusHashDigest.new(@md,t_o).composite.dgst
+ if dgst
+ if t_o.is==:heading
+ digests_with_markup("#{@sp*0}#{dgst[:ocn]}#{@sp*(8-dgst[:ocn].to_s.length)}#{dgst[:dgst_markedup_txt]} #{dgst[:is]} #{t_o.lv}")
+ elsif t_o.is==:heading_insert
+ digests_with_markup("#{@sp*0}[#{dgst[:ocn]}]#{@sp*(6-dgst[:ocn].to_s.length)}#{dgst[:dgst_markedup_txt]} #{dgst[:is]} #{t_o.lv}")
+ else
+ digests_with_markup("#{@sp*0}#{dgst[:ocn]}#{@sp*(8-dgst[:ocn].to_s.length)}#{dgst[:dgst_markedup_txt]} #{dgst[:is]}")
+ end
+ end
+ end
l=Hash.new(0)
ocn=nil
ao_structure_tree("------------\n")
@@ -340,18 +233,20 @@ module SiSU_DigestView
data.each do |t_o|
if t_o.is==:heading
x=case t_o.ln
- when 1 then l[1] +=1 #fix Mx[:lv_o]
+ when 0 then l[0] +=1
' '*0 << ':A'
- when 2 then l[2] +=1 #fix Mx[:lv_o]
+ when 1 then l[1] +=1
' '*1 << ':B'
- when 3 then l[3] +=1 #fix Mx[:lv_o]
+ when 2 then l[2] +=1
' '*2 << ':C'
- when 4 then l[4] +=1 #fix Mx[:lv_o]
- ' '*3 << '1'
- when 5 then l[5] +=1 #fix Mx[:lv_o]
- ' '*4 << '2'
- when 6 then l[6] +=1 #fix Mx[:lv_o]
- ' '*5 << '3'
+ when 3 then l[3] +=1
+ ' '*3 << ':D'
+ when 4 then l[4] +=1
+ ' '*4 << '1'
+ when 5 then l[5] +=1
+ ' '*5 << '2'
+ when 6 then l[6] +=1
+ ' '*6 << '3'
else nil
end
end
@@ -363,9 +258,10 @@ module SiSU_DigestView
ao_structure_summary("document structure[*]\n")
[0,1,2,3,4,5,6].each do |y|
v=case y
- when 1 then ':A'
- when 2 then ':B'
- when 3 then ':C'
+ when 0 then ':A'
+ when 1 then ':B'
+ when 2 then ':C'
+ when 3 then ':D'
when 4 then '1 '
when 5 then '2 '
when 6 then '3 '
@@ -374,7 +270,7 @@ module SiSU_DigestView
end
ao_structure_summary("objects (ocn) = #{ocn}\n")
ao_structure_summary("endnotes = #{endnotes}\n")
- ao_structure_summary(" [*] number of headers (@) and of each heading level (:A to :C and 1 to 3)\n")
+ ao_structure_summary(" [*] number of headers (@) and of each heading level (:A to :D and 1 to 3)\n")
end
def supplementary
if defined? @md.sc_number \
diff --git a/lib/sisu/v6/html_format.rb b/lib/sisu/v6/html_format.rb
index de5a7144..2f7b030e 100644
--- a/lib/sisu/v6/html_format.rb
+++ b/lib/sisu/v6/html_format.rb
@@ -217,7 +217,7 @@ module SiSU_HTML_Format
@env=SiSU_Env::InfoEnv.new(md.fns)
@file=SiSU_Env::FileOp.new(md)
@o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
- @make=SiSU_Env::ProcessingSettings.new(@md)
+ @make=SiSU_Env::ProcessingSettings.new(md)
end
def home
%{<td align="center" bgcolor=#{@vz.color_band2}>
diff --git a/lib/sisu/v6/html_minitoc.rb b/lib/sisu/v6/html_minitoc.rb
index 13045b0d..b36188ec 100644
--- a/lib/sisu/v6/html_minitoc.rb
+++ b/lib/sisu/v6/html_minitoc.rb
@@ -143,7 +143,8 @@
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
- toc_mini=if txt.name =~/^meta/ and txt.obj=~/Document Information/
+ toc_mini=if txt.name =~/^meta/ \
+ and txt.obj=~/Document Information/
format_toc.mini_tail
else format_toc.mini_lev1
end
diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/v6/hub.rb
index 35e9140d..736fa8bc 100644
--- a/lib/sisu/v6/hub.rb
+++ b/lib/sisu/v6/hub.rb
@@ -264,12 +264,26 @@ module SiSU
@msg,@msgs='',nil
@tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") }
end
+ def remove_skipped_files_if_any_from_processing_files_array
+ if @remove_faulty_markup_files_array.length > 0
+ @opt.files = (@opt.files - @remove_faulty_markup_files_array)
+ end
+ end
+ def print_error_message_if_files_skipped
+ if @remove_faulty_markup_files_array.length > 0
+ puts '---'
+ STDERR.puts 'ERROR with file(s), did not process: ' + @remove_faulty_markup_files_array.join(',')
+ end
+ end
def do_loops
+ @remove_faulty_markup_files_array=[]
if @opt.act[:zap][:set]==:on #% --zap, -Z
do_loop_files_on_given_option_pre
end
do_each_file_loop_options
+ remove_skipped_files_if_any_from_processing_files_array
do_loop_files_on_given_option_post
+ print_error_message_if_files_skipped
end
def do_each_file_loop_options
@opt.files.each_with_index do |fno,i|
@@ -290,6 +304,7 @@ module SiSU
end
@env=SiSU_Env::InfoEnv.new(@opt.fns)
if @opt.act[:ao][:set]==:on #% --ao --dal, -m
+ $process_document = :ok
unless @opt.act[:po4a][:set]==:on # --po4a, -P
if @opt.fno =~ /\.ssm$/
require_relative 'composite' # composite.rb #pre-processing
@@ -299,112 +314,117 @@ module SiSU
SiSU_AO::Source.new(@opt).read
end
end
- if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q
- require_relative 'qrcode' # qrcode.rb
- SiSU_QRcode::Source.new(@opt).read
- end
- if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
- require_relative 'digests' # digests.rb
- SiSU_DigestView::Source.new(@opt).read
- end
- if @opt.act[:txt][:set]==:on #% --txt, -t -a
- require_relative 'txt_plain' # txt_plain.rb
- SiSU_Txt_Plain::Source.new(@opt).read
- end
- if @opt.act[:txt_textile][:set]==:on #% --textile
- require_relative 'txt_textile' # txt_textile.rb
- SiSU_Txt_Textile::Source.new(@opt).read
- end
- if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc
- require_relative 'txt_asciidoc' # txt_asciidoc.rb
- SiSU_Txt_AsciiDoc::Source.new(@opt).read
- end
- if @opt.act[:txt_markdown][:set]==:on #% --markdown
- require_relative 'txt_markdown' # txt_markdown.rb
- SiSU_Txt_Markdown::Source.new(@opt).read
- end
- if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
- require_relative 'txt_rst' # txt_rst.rb
- SiSU_Txt_rST::Source.new(@opt).read
- end
- if @opt.act[:html][:set]==:on #% --html, -h -H
- require_relative 'html' # html.rb
- SiSU_HTML::Source.new(@opt).read
- else
- if @opt.act[:html_seg][:set]==:on #% --html-seg (-h -H)
- require_relative 'html' # html.rb
- SiSU_HTML::Source.new(@opt).read
+ if $process_document == :ok
+ if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q
+ require_relative 'qrcode' # qrcode.rb
+ SiSU_QRcode::Source.new(@opt).read
+ end
+ if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
+ require_relative 'digests' # digests.rb
+ SiSU_DigestView::Source.new(@opt).read
end
- if @opt.act[:html_scroll][:set]==:on #% --html-scroll (-h -H)
- require_relative 'html' # html.rb
+ if @opt.act[:txt][:set]==:on #% --txt, -t -a
+ require_relative 'txt_plain' # txt_plain.rb
+ SiSU_Txt_Plain::Source.new(@opt).read
+ end
+ if @opt.act[:txt_textile][:set]==:on #% --textile
+ require_relative 'txt_textile' # txt_textile.rb
+ SiSU_Txt_Textile::Source.new(@opt).read
+ end
+ if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc
+ require_relative 'txt_asciidoc' # txt_asciidoc.rb
+ SiSU_Txt_AsciiDoc::Source.new(@opt).read
+ end
+ if @opt.act[:txt_markdown][:set]==:on #% --markdown
+ require_relative 'txt_markdown' # txt_markdown.rb
+ SiSU_Txt_Markdown::Source.new(@opt).read
+ end
+ if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
+ require_relative 'txt_rst' # txt_rst.rb
+ SiSU_Txt_rST::Source.new(@opt).read
+ end
+ if @opt.act[:html][:set]==:on #% --html, -h -H
+ require_relative 'html' # html.rb
SiSU_HTML::Source.new(@opt).read
+ else
+ if @opt.act[:html_seg][:set]==:on #% --html-seg (-h -H)
+ require_relative 'html' # html.rb
+ SiSU_HTML::Source.new(@opt).read
+ end
+ if @opt.act[:html_scroll][:set]==:on #% --html-scroll (-h -H)
+ require_relative 'html' # html.rb
+ SiSU_HTML::Source.new(@opt).read
+ end
end
- end
- if @opt.act[:concordance][:set]==:on #% --concordance, -w
- require_relative 'concordance' # concordance.rb
- SiSU_Concordance::Source.new(@opt).read
- end
- if @opt.act[:epub][:set]==:on #% --epub, -e
- require_relative 'xhtml_epub2' # xhtml_epub2.rb
- SiSU_XHTML_EPUB2::Source.new(@opt).read
- end
- if @opt.act[:odt][:set]==:on #% --odt, -o opendocument
- require_relative 'xml_odf_odt' # xml_odf_odt.rb
- SiSU_XML_ODF_ODT::Source.new(@opt).read
- end
- if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
- require_relative 'xhtml' # xhtml.rb
- SiSU_XHTML::Source.new(@opt).read
- end
- if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
- require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb
- SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read
- end
- if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
- require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb
- SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read
- end
- if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook
- require_relative 'xml_docbook5' # xml_docbook5.rb
- SiSU_XML_Docbook_Book::Source.new(@opt).read
- end
- if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
- require_relative 'xml_fictionbook2' # xml_fictionbook2.rb
- SiSU_XML_Fictionbook::Source.new(@opt).read
- end
- if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type
- require_relative 'xml_sax' # xml_sax.rb
- SiSU_XML_SAX::Source.new(@opt).read
- end
- if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type
- require_relative 'xml_dom' # xml_dom.rb
- SiSU_XML_DOM::Source.new(@opt).read
- end
- if @opt.act[:pdf][:set]==:on \
- or @opt.act[:pdf_p][:set]==:on \
- or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf
- require_relative 'texpdf' # texpdf.rb
- SiSU_TeX::Source.new(@opt).read
- end
- if @opt.act[:manpage][:set]==:on #% --manpage, -i
- require_relative 'manpage' # manpage.rb
- SiSU_Manpage::Source.new(@opt).read
- end
- if @opt.act[:texinfo][:set]==:on #% --texinfo, -I
- require_relative 'texinfo' # texinfo.rb
- SiSU_TexInfo::Source.new(@opt).read
- end
- if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d DB sqlite
- require_relative 'dbi_discrete' # dbi_discrete.rb
- SiSU_DBI_Discrete::SQL.new(@opt).build
- end
- if @opt.act[:manifest][:set]==:on #% --manifest, -y
- require_relative 'manifest' # manifest.rb
- ((@opt.act[:sisupod][:set]==:on \
- || @opt.act[:share_source][:set]==:on) \
- && @opt.files.length < 2 ) \
- ? nil
- : SiSU_Manifest::Source.new(@opt).read
+ if @opt.act[:concordance][:set]==:on #% --concordance, -w
+ require_relative 'concordance' # concordance.rb
+ SiSU_Concordance::Source.new(@opt).read
+ end
+ if @opt.act[:epub][:set]==:on #% --epub, -e
+ require_relative 'xhtml_epub2' # xhtml_epub2.rb
+ SiSU_XHTML_EPUB2::Source.new(@opt).read
+ end
+ if @opt.act[:odt][:set]==:on #% --odt, -o opendocument
+ require_relative 'xml_odf_odt' # xml_odf_odt.rb
+ SiSU_XML_ODF_ODT::Source.new(@opt).read
+ end
+ if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
+ require_relative 'xhtml' # xhtml.rb
+ SiSU_XHTML::Source.new(@opt).read
+ end
+ if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
+ require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb
+ SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read
+ end
+ if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
+ require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb
+ SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read
+ end
+ if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook
+ require_relative 'xml_docbook5' # xml_docbook5.rb
+ SiSU_XML_Docbook_Book::Source.new(@opt).read
+ end
+ if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
+ require_relative 'xml_fictionbook2' # xml_fictionbook2.rb
+ SiSU_XML_Fictionbook::Source.new(@opt).read
+ end
+ if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type
+ require_relative 'xml_sax' # xml_sax.rb
+ SiSU_XML_SAX::Source.new(@opt).read
+ end
+ if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type
+ require_relative 'xml_dom' # xml_dom.rb
+ SiSU_XML_DOM::Source.new(@opt).read
+ end
+ if @opt.act[:pdf][:set]==:on \
+ or @opt.act[:pdf_p][:set]==:on \
+ or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf
+ require_relative 'texpdf' # texpdf.rb
+ SiSU_TeX::Source.new(@opt).read
+ end
+ if @opt.act[:manpage][:set]==:on #% --manpage, -i
+ require_relative 'manpage' # manpage.rb
+ SiSU_Manpage::Source.new(@opt).read
+ end
+ if @opt.act[:texinfo][:set]==:on #% --texinfo, -I
+ require_relative 'texinfo' # texinfo.rb
+ SiSU_TexInfo::Source.new(@opt).read
+ end
+ if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d DB sqlite
+ require_relative 'dbi_discrete' # dbi_discrete.rb
+ SiSU_DBI_Discrete::SQL.new(@opt).build
+ end
+ if @opt.act[:manifest][:set]==:on #% --manifest, -y
+ require_relative 'manifest' # manifest.rb
+ ((@opt.act[:sisupod][:set]==:on \
+ || @opt.act[:share_source][:set]==:on) \
+ && @opt.files.length < 2 ) \
+ ? nil
+ : SiSU_Manifest::Source.new(@opt).read
+ end
+ else
+ @remove_faulty_markup_files_array << fno
+ $process_document=:ok
end
end
end
diff --git a/lib/sisu/v6/manifest.rb b/lib/sisu/v6/manifest.rb
index 1d6bc6a9..27b90eda 100644
--- a/lib/sisu/v6/manifest.rb
+++ b/lib/sisu/v6/manifest.rb
@@ -123,7 +123,7 @@ module SiSU_Manifest
? './image'
: %{#{@f.path_rel_links.html_scroll_2}_sisu/image_sys}
@base_path=@f.output_path.manifest.dir
- @@dg ||=SiSU_Env::InfoEnv.new.digest.type
+ @@dg ||=SiSU_Env::InfoEnv.new(md.fns,md).digest(md.opt).type
@dg=@@dg
l=SiSU_Env::StandardiseLanguage.new(md.opt.lng).language
@language=l[:n]
@@ -165,9 +165,15 @@ module SiSU_Manifest
end
def summarize_sources(id,file,pth,rel,url)
sys=SiSU_Env::SystemCall.new
- dgst=(@dg =~/^sha(?:2|256)$/) \
- ? sys.sha256("#{pth}/#{file}")
- : sys.md5("#{pth}/#{file}")
+ dgst=case @dg
+ when :sha512
+ sys.sha512("#{pth}/#{file}")
+ when :sha256
+ sys.sha256("#{pth}/#{file}")
+ when :md5
+ sys.md5("#{pth}/#{file}")
+ else
+ end
if (@md.opt.act[:verbose][:set]==:on \
|| @md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
diff --git a/lib/sisu/v6/options.rb b/lib/sisu/v6/options.rb
index aacfcbe6..d7719ea4 100644
--- a/lib/sisu/v6/options.rb
+++ b/lib/sisu/v6/options.rb
@@ -968,6 +968,24 @@ module SiSU_Commandline
|| mod.inspect =~/"--hash-digests"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:pdf_font_size]=if mod.inspect =~/"--(?:pdf-)?font-?size[=-](\d{1,2})(?:pt)?"/
+ $1
+ else :na
+ end
+ act[:pdf_hyperlink_colors]=if mod.inspect =~/"--pdf-hyperlinks-(?:mono(?:chrome)?|no-color)"/
+ :mono
+ elsif mod.inspect =~/"--pdf-hyperlinks-color"/
+ :color
+ else :na
+ end
+ act[:hash_digest_algo]=if mod.inspect =~/"--hash-(?:sha)?512"/
+ :sha512
+ elsif mod.inspect =~/"--hash-(?:sha)?256"/
+ :sha256
+ elsif mod.inspect =~/"--hash-md5"/
+ :md5
+ else :na
+ end
act[:sample_search_form]=(cmd =~/F/ \
|| mod.inspect =~/"--sample-search-form"/) \
? { bool: true, set: :on }
diff --git a/lib/sisu/v6/param.rb b/lib/sisu/v6/param.rb
index e3eaebae..19769027 100644
--- a/lib/sisu/v6/param.rb
+++ b/lib/sisu/v6/param.rb
@@ -500,12 +500,9 @@ module SiSU_Param
@h=build_hash(a)
def copyright
def text #you may wish to expand to take from all
- s=if @h['copyright']
- @h['copyright']
- elsif @h['text']
- @h['text']
- elsif @h['main']
- @h['main']
+ s=if @h['copyright'] then @h['copyright']
+ elsif @h['text'] then @h['text']
+ elsif @h['main'] then @h['main']
else
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING Document Copyright missing; provide @rights: :copyright:').warn unless @opt.act[:quiet][:set]==:on
''
@@ -558,7 +555,7 @@ module SiSU_Param
validate_length(s,l,n)
end
def sep(str)
- (str =~/https?:\/\/\S+$/) ? ' ;' : ';'
+ ' \\\\ '
end
def all
s=if @h['all'] then @h['all']
@@ -568,42 +565,42 @@ module SiSU_Param
and copyright.text \
and not copyright.text.empty?
v=sep(copyright.text)
- s +=copyright.text + v
+ s +='Copyright: ' + copyright.text + v
end
if defined? copyright.translation \
and copyright.translation \
and not copyright.translation.empty?
v=sep(copyright.translation)
- s +='\\\\ translation ' + copyright.translation + v
+ s +='translation: ' + copyright.translation + v
end
if defined? copyright.illustrations \
and copyright.illustrations \
and not copyright.illustrations.empty?
v=sep(copyright.illustrations)
- s +='\\\\ illustrations ' + copyright.illustrations + v
+ s +='illustrations: ' + copyright.illustrations + v
end
if defined? copyright.photographs \
and copyright.photographs \
and not copyright.photographs.empty?
v=sep(copyright.photographs)
- s +='\\\\ photographs ' + copyright.photographs + v
+ s +='photographs: ' + copyright.photographs + v
end
if defined? copyright.digitization \
and copyright.digitization \
and not copyright.digitization.empty?
v=sep(copyright.digitization)
- s +='\\\\ digitization ' + copyright.digitization + v
+ s +='digitization: ' + copyright.digitization + v
end
if defined? copyright.audio \
and copyright.audio \
and not copyright.audio.empty?
v=sep(copyright.audio)
- s +='\\\\ audio ' + copyright.audio + v
+ s +='audio: ' + copyright.audio + v
end
if defined? copyright.license \
and copyright.license \
and not copyright.license.empty?
- s +='\\\\ License: ' + copyright.license
+ s +='License: ' + copyright.license
end
if s.empty?
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING Document Rights information missing; provide @rights: :copyright:').warn unless @opt.act[:quiet][:set]==:on
@@ -611,7 +608,7 @@ module SiSU_Param
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
end
- s
+ s=s.gsub(/ [\\]+\s+$/,'')
end
s
end
@@ -1118,7 +1115,8 @@ module SiSU_Param
&& @creator.author.is_a?(String)) \
? " #{@creator.author}"
: ''
- title=%{"#{@title.full.gsub(/(<p>|<p \/>|<br>|<br \/>)/,'')}",}
+ title=@title.full.gsub(/\s*(?:<p>|<p \/>|<br>|<br \/>)\s*/,' ').
+ gsub(/~\{.+?\}~/,'')
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Parameters',%{#{title}#{creator}}).txt_grey if @opt.act[:verbose][:set]==:on
end
if not @book_idx \
@@ -1281,14 +1279,23 @@ module SiSU_Param
if @sys.openssl !=false \
and FileTest.file?(@env.source_file_with_path)
@dgst=[]
- if @env.digest.type =~/sha256/
+ case @env.digest(@opt).type
+ when :sha512
+ dgst=@sys.sha512(@env.source_file_with_path)
+ @dgst=dgst[1].length==128 ? dgst : nil
+ puts 'check document (sha512) digest' if not @dgst
+ when :sha256
dgst=@sys.sha256(@env.source_file_with_path)
@dgst=dgst[1].length==64 ? dgst : nil
puts 'check document (sha256) digest' if not @dgst
- else
+ when :md5
dgst=@sys.md5(@env.source_file_with_path)
@dgst=dgst[1].length==32 ? dgst : nil
puts 'check document (md5) digest' if not @dgst
+ else
+ dgst=@sys.sha256(@env.source_file_with_path)
+ @dgst=dgst[1].length==64 ? dgst : nil
+ puts 'check document (sha256) digest' if not @dgst
end
elsif not FileTest.file?(@env.source_file_with_path)
#puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia)
@@ -1311,7 +1318,7 @@ module SiSU_Param
if @en[:note] > 0 \
and @en[:sum] > 0
if @en[:sum] > 0
- else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:unless][:set]==:on
+ else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:quiet][:set]==:on
end
end
if @en[:mark] != @en[:note] \
@@ -1328,7 +1335,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@title=Md.new('Text Insert',@opt,@env).title
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:quiet][:set]==:on
end
end
if @author !~/[\S]/
@@ -1336,7 +1343,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:quiet][:set]==:on
end
end
@struct={}
diff --git a/lib/sisu/v6/qrcode.rb b/lib/sisu/v6/qrcode.rb
index 067d3d64..73feaf3f 100644
--- a/lib/sisu/v6/qrcode.rb
+++ b/lib/sisu/v6/qrcode.rb
@@ -80,7 +80,7 @@ module SiSU_QRcode
end
def read
begin
- @env=SiSU_Env::InfoEnv.new(@opt.fns)
+ @env=SiSU_Env::InfoEnv.new(@opt.fns,@opt)
@md=SiSU_Param::Parameters.new(@opt).get
xbrowser=@env.program.web_browser
browser=@env.program.console_web_browser
@@ -111,12 +111,12 @@ module SiSU_QRcode
def initialize(md)
@manifest={ txt: [], txt_title: [] }
@md,@fns=md,md.fns
- @env=SiSU_Env::InfoEnv.new(@md.fns)
+ @env=SiSU_Env::InfoEnv.new(@md.fns,@md.opt)
@fnb=@md.fnb
@base_url="#{@env.url.root}/#{@fnb}"
@f=SiSU_Env::FileOp.new(@md)
@base_path=@f.output_path.manifest.dir
- @@dg ||=SiSU_Env::InfoEnv.new.digest.type
+ @@dg ||=SiSU_Env::InfoEnv.new.digest(@md.opt).type
@dg=@@dg
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
@language=l[:n]
@@ -167,9 +167,14 @@ WOK
end
def summarize_sources(id,file,pth,rel,url)
sys=SiSU_Env::SystemCall.new
- dgst=(@dg =~/^sha(?:2|256)$/) \
- ? (sys.sha256("#{pth}/#{file}"))
- : (sys.md5("#{pth}/#{file}"))
+ dgst=case @dg
+ when :sha512
+ (sys.sha516("#{pth}/#{file}")) #check
+ when :md5
+ (sys.md5("#{pth}/#{file}"))
+ else
+ (sys.sha256("#{pth}/#{file}"))
+ end
if (@md.opt.act[:verbose][:set]==:on \
|| @md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
diff --git a/lib/sisu/v6/shared_markup_alt.rb b/lib/sisu/v6/shared_markup_alt.rb
index 4971dde0..3bf3c7e4 100644
--- a/lib/sisu/v6/shared_markup_alt.rb
+++ b/lib/sisu/v6/shared_markup_alt.rb
@@ -207,20 +207,32 @@ module SiSU_TextRepresentation
@t_o,@s=x,x.obj.dup
end
@env ||=SiSU_Env::InfoEnv.new(@md.fns)
- @sha_ =((@env.digest.type =='sha256') ? true : false)
+ @sha_ = @env.digest(@md.opt).type
begin
- @sha_ ? (require 'digest/sha2') : (require 'digest/md5')
+ case @sha_
+ when :sha512
+ require 'digest/sha2'
+ when :sha256
+ require 'digest/sha2'
+ when :md5
+ require 'digest/md5'
+ end
rescue LoadError
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error((@sha_ ? 'digest/sha2' : 'digest/md5') + ' NOT FOUND')
end
end
def digest(txt)
d=nil
- if @sha_
+ case @sha_
+ when :sha512
+ for hash_class in [ Digest::SHA512 ]
+ d=hash_class.hexdigest(txt)
+ end
+ when :sha256
for hash_class in [ Digest::SHA256 ]
d=hash_class.hexdigest(txt)
end
- else
+ when :md5
for hash_class in [ Digest::MD5 ]
d=hash_class.hexdigest(txt)
end
diff --git a/lib/sisu/v6/shared_metadata.rb b/lib/sisu/v6/shared_metadata.rb
index 546eb788..1fa57fa7 100644
--- a/lib/sisu/v6/shared_metadata.rb
+++ b/lib/sisu/v6/shared_metadata.rb
@@ -735,6 +735,13 @@ module SiSU_Metadata
end
@s
end
+ def br
+ if @s \
+ and @s.is_a?(String)
+ @s=@s.gsub(/(?:#{Mx[:br_line]}|\\\\)+/,'<br />')
+ end
+ @s
+ end
def utf8
if @s \
and @s.is_a?(String)
@@ -752,6 +759,7 @@ module SiSU_Metadata
def xml_sax
def meta_para
inf_xml=char_enc(@inf).utf8
+ inf_xml=char_enc(inf_xml).br
<<WOK
<metadata>
#{Ax[:tab]}<meta>#{@tag.capitalize}:</meta>
@@ -769,6 +777,7 @@ WOK
def xml_dom
def meta_para
inf_xml=char_enc(@inf).utf8
+ inf_xml=char_enc(inf_xml).br
<<WOK
#{Ax[:tab]}<header>
#{Ax[:tab]*2}<meta>#{@tag.capitalize}:</meta>
@@ -786,6 +795,7 @@ WOK
def xhtml_scroll
def meta_para
inf_xml=char_enc(@inf).utf8
+ inf_xml=char_enc(inf_xml).br
<<WOK
#{Ax[:tab]}<metadata>
#{Ax[:tab]}<meta>#{@tag.capitalize}:</meta>
@@ -805,6 +815,7 @@ WOK
def meta_para
inf_xml=char_enc(@inf).amp
inf_xml=char_enc(inf_xml).utf8
+ inf_xml=char_enc(inf_xml).br
%{<p class="norm">
<b>#{@tag}</b>: #{inf_xml}
</p>}
@@ -886,6 +897,8 @@ WOK
def initialize(md)
@md=md
@br="\\\\\n"
+ @make=SiSU_Env::ProcessingSettings.new(md)
+ @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
end
def meta_para(tag,inf,sc=true)
inf=((inf.is_a?(String) && sc) ? spec_char(inf) : inf)
@@ -906,9 +919,12 @@ WOK
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
language=l[:n]
tr=SiSU_Translate::Source.new(@md,language)
- tag="Document Manifest @"
- inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
- meta << meta_para(tag,inf)
+ if @make.build.links_to_manifest? \
+ and not @o_str.dump_or_redirect?
+ tag="Document Manifest @"
+ inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
+ meta << meta_para(tag,inf)
+ end
if defined? @md.title.full \
and @md.title.full=~/\S+/
tag,inf=tr.full_title,@md.title.full
diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb
index ece3ca79..8c819d9b 100644
--- a/lib/sisu/v6/sysenv.rb
+++ b/lib/sisu/v6/sysenv.rb
@@ -214,7 +214,7 @@ module SiSU_Env
MULTILINGUAL => false,
BUNDLE => false,
CONCORD_MAX => 260000,
- DIGEST => 'sha256',
+ DIGEST => :sha256,
WEBSERV_HOST_CGI => 'http://localhost',
WEBSERV_PORT_CGI => 8081, #8111,8123,8081
POSTGRESQL_USER => @@user, #'ralph', # change user !!!
@@ -806,6 +806,19 @@ module SiSU_Env
false
end
end
+ def sha512(filename) #sha dgst
+ program='openssl'
+ program_ref="\n\t\tsha digest requested"
+ if program_found?(program)
+ pwd=Dir.pwd
+ Dir.chdir(File.dirname(filename))
+ dgst=%x{openssl dgst -sha512 #{File.basename(filename)}}.strip #use file name without file path
+ Dir.chdir(pwd)
+ dgst.scan(/\S+/)
+ else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{program} is not installed #{program_ref}")
+ false
+ end
+ end
def psql #psql
program='psql'
program_ref="\n\t\tpsql requested"
@@ -1861,59 +1874,123 @@ WOK
file=@fns.gsub(/\.ssm(?:\.sst)?/,'.ssm.sst')
"#{source_file_path}/#{file}"
end
+ def texpdf_hyperlinks(cli)
+ @cli=cli
+ @hyplnks=if cli != :na
+ cli
+ elsif (defined? @rc['default']['pdf_hyperlinks']) \
+ && (@rc['default']['pdf_hyperlinks']=~/color/)
+ :color
+ elsif (defined? @rc['default']['pdf_hyperlinks']) \
+ && (@rc['default']['pdf_hyperlinks']=~/(?:no-color|color-off|mono(?:chrome)?)/)
+ :mono
+ else :na
+ end
+ def landscape
+ if @cli != :na
+ @cli
+ elsif (defined? @rc['default']['pdf_hyperlinks_landscape']) \
+ && (@rc['default']['pdf_hyperlinks_landscape']=~/color/)
+ :color
+ elsif (defined? @rc['default']['pdf_hyperlinks_landscape']) \
+ && (@rc['default']['pdf_hyperlinks_landscape']=~/(?:no-color|color-off|mono(?:chrome)?)/)
+ :mono
+ elsif @hyplnks != :na
+ @hyplnks
+ else :na
+ end
+ end
+ def portrait
+ if @cli != :na
+ @cli
+ elsif (defined? @rc['default']['pdf_hyperlinks_portrait']) \
+ && (@rc['default']['pdf_hyperlinks_portrait']=~/color/)
+ :color
+ elsif (defined? @rc['default']['pdf_hyperlinks_portrait']) \
+ && (@rc['default']['pdf_hyperlinks_portrait']=~/(?:no-color|color-off|mono(?:chrome)?)/)
+ :mono
+ elsif @hyplnks != :na
+ @hyprlnks
+ else :na
+ end
+ end
+ self
+ end
def font
+ def size(pt=nil)
+ if pt && pt != :na
+ pt
+ elsif defined? @rc['default']['fontsize'] \
+ && @rc['default']['fontsize']=~/\d{1,2}/
+ @rc['default']['fontsize']
+ else :na
+ end
+ end
def texpdf
# you may wish to check selected font against available fonts:
# fc-list :outline -f "%{family}\n"
# fc-list :lang=ja
def main
- (defined? @rc['default']['texpdf_font']) \
- && (@rc['default']['texpdf_font']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font']
+ (defined? @rc['default']['texpdf_fontface']) \
+ && (@rc['default']['texpdf_fontface']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface']
: 'Liberation Sans'
end
def sans # not used
- (defined? @rc['default']['texpdf_font_sans']) \
- && (@rc['default']['texpdf_font_sans']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_sans']
+ (defined? @rc['default']['texpdf_fontface_sans']) \
+ && (@rc['default']['texpdf_fontface_sans']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface_sans']
: 'Liberation Sans'
end
def serif # not used
- (defined? @rc['default']['texpdf_font_serif']) \
+ (defined? @rc['default']['texpdf_fontface_serif']) \
&& (@rc['default']['texpdf_font_serif']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_serif']
+ ? @rc['default']['texpdf_fontface_serif']
: 'Liberation Serif'
end
def mono
- (defined? @rc['default']['texpdf_font_mono']) \
- && (@rc['default']['texpdf_font_mono']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_mono']
+ (defined? @rc['default']['texpdf_fontface_mono']) \
+ && (@rc['default']['texpdf_fontface_mono']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface_mono']
: 'Liberation Mono'
end
def cjk
- (defined? @rc['default']['texpdf_font_cjk']) \
- && (@rc['default']['texpdf_font_cjk']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_cjk']
+ (defined? @rc['default']['texpdf_fontface_cjk']) \
+ && (@rc['default']['texpdf_fontface_cjk']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface_cjk']
: 'IPAGothic' # 'IPAGothic' # 'IPAMincho' # 'TakaoMincho' # 'VL Gothic'
end
def cjk_zh
- (defined? @rc['default']['texpdf_font_cjk_zh']) \
- && (@rc['default']['texpdf_font_cjk_zh']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_cjk_zh']
+ (defined? @rc['default']['texpdf_fontface_cjk_zh']) \
+ && (@rc['default']['texpdf_fontface_cjk_zh']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface_cjk_zh']
: 'IPAGothic'
end
def cjk_ja
- (defined? @rc['default']['texpdf_font_cjk_ja']) \
- && (@rc['default']['texpdf_font_cjk_ja']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_cjk_ja']
+ (defined? @rc['default']['texpdf_fontface_cjk_ja']) \
+ && (@rc['default']['texpdf_fontface_cjk_ja']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface_cjk_ja']
: 'IPAGothic'
end
def cjk_ko
- (defined? @rc['default']['texpdf_font_cjk_ko']) \
- && (@rc['default']['texpdf_font_cjk_ko']=~/\S{3,}/) \
- ? @rc['default']['texpdf_font_cjk_ko']
+ (defined? @rc['default']['texpdf_fontface_cjk_ko']) \
+ && (@rc['default']['texpdf_fontface_cjk_ko']=~/\S{3,}/) \
+ ? @rc['default']['texpdf_fontface_cjk_ko']
: 'IPAGothic'
end
+ def size(pt=nil)
+ if pt && pt != :na
+ pt
+ elsif (defined? @rc['default']['texpdf_fontsize']) \
+ && (@rc['default']['texpdf_fontsize']=~/\d{1,2}/)
+ @rc['default']['texpdf_fontsize']
+ elsif (defined? @rc['default']['fontsize']) \
+ && (@rc['default']['fontsize']=~/\d{1,2}/)
+ @rc['default']['fontsize']
+ else
+ :na
+ end
+ end
self
end
self
@@ -2715,27 +2792,41 @@ WOK
end
self
end
- def digest
+ def digest_conf?
+ if defined? @rc['default']['digest'] \
+ and @rc['default']['digest'] != nil
+ case @rc['default']['digest']
+ when /^sha(?:5|512)?$/ then :sha512
+ when /^sha(?:2|256)?$/ then :sha256
+ when /^md5$/ then :md5
+ else :sha256
+ end
+ else :sha256
+ end
+ end
+ def digest(opt=nil)
+ @opt=opt
def type
- if defined? @rc['default']['digest'] \
- and @rc['default']['digest'] != nil
- case @rc['default']['digest']
- when /^sha(?:2|256)?$/ then 'sha256'
- when /^md5$/ then 'md5'
- else 'sha256'
+ if @opt
+ case @opt.act[:hash_digest_algo]
+ when :sha512 then :sha512
+ when :sha256 then :sha256
+ when :md5 then :md5
+ else digest_conf?
end
- else 'sha256'
+ else digest_conf?
end
end
def length
- case digest.type
- when /sha256/ then 64
- when /md5/ then 32
+ case digest(@opt).type
+ when :sha512 then 128
+ when :sha256 then 64
+ when :md5 then 32
else 64
end
end
def pattern
- "[0-9a-f]{#{digest.length}}" #/[0-9a-f]{#{digest.length}}/
+ "[0-9a-f]{#{digest(@opt).length}}" #/[0-9a-f]{#{digest.length}}/
end
self
end
diff --git a/lib/sisu/v6/texpdf.rb b/lib/sisu/v6/texpdf.rb
index 97961701..5654e6df 100644
--- a/lib/sisu/v6/texpdf.rb
+++ b/lib/sisu/v6/texpdf.rb
@@ -594,20 +594,26 @@ module SiSU_TeX
case dob.is
when :heading
case dob.ln
- when 1..3
- tst.heading_major
+ when 0
+ tst.title_level_A
+ when 1
+ tst.section_heading_level_B
+ when 2
+ tst.section_heading_level_C
+ when 3
+ tst.section_heading_level_D
when 4
- tst.level4
+ tst.heading_level_1
when 5
- tst.level5
+ tst.heading_level_2
when 6
- tst.level6
+ tst.heading_level_3
else dob
end
when :heading_insert
br="\n\\\\\n"
if dob.name=='book_index'
- h=tst.heading_major
+ h=tst.section_heading_level_B
heading="\\clearpage\n" + h.tmp
idx_arr=[]
idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_raw(@md.opt).raw_idx
@@ -628,10 +634,10 @@ module SiSU_TeX
dob.tmp={ l: l, p: p }
elsif dob.ln==2 \
and dob.obj=~/Metadata\b/
- tst.heading_major
+ tst.section_heading_level_B
elsif dob.ln==4 \
and dob.obj=~/Metadata\b/
- h=tst.level4
+ h=tst.heading_level_1
metadata=SiSU_Metadata::TeX_Metadata.new(@md).metadata_tex
dob.tmp=h.tmp + ' ' + '\begin{scriptsize}' + metadata.join(br) + '\end{scriptsize}'
else dob.tmp='' # dob.tmp={ l: '', p: '' }
@@ -746,12 +752,12 @@ module SiSU_TeX
title=@md.title.full.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') #no line splitting in heading neither html nor latex
@md.papersize_array.each do |ps|
if @md.opt.act[:pdf_p][:set]==:on
- txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'portrait' }
+ txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: :portrait }
orient_portrait=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj)
@@tex_head[ps][:p]=orient_portrait.document_head_with_orientation(@codeblock_box)
end
if @md.opt.act[:pdf_l][:set]==:on
- txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'landscape' }
+ txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: :landscape }
orient_landscape=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj)
@@tex_head[ps][:l]=orient_landscape.document_head_with_orientation(@codeblock_box)
end
@@ -843,30 +849,30 @@ module SiSU_TeX
\\renewcommand{\\contentsname}{#{@translate.contents}}
\\tableofcontents
WOK
- toc_pb={ l: @tex_ml.newpage('landscape'), p: @tex_ml.newpage('portrait') }
+ toc_pb={ l: @tex_ml.newpage(:landscape), p: @tex_ml.newpage(:portrait) }
else
toc=''
toc_pb={ l: '', p: '' }
end
if @md.opt.act[:pdf_l][:set]==:on
x[:l] =<<-WOK
-#{@tex_ml.newpage('landscape')}
+#{@tex_ml.newpage(:landscape)}
\\pagestyle{fancy}
#{toc}#{toc_pb[:l]}
\\pagenumbering{arabic}
#{@tex_ml.paraskip_normal}
-#{@tex_ml.newpage('landscape')}
+#{@tex_ml.newpage(:landscape)}
WOK
end
if @md.opt.act[:pdf_p][:set]==:on
x[:p] =<<-WOK
-#{@tex_ml.newpage('portrait')}
+#{@tex_ml.newpage(:portrait)}
\\pagestyle{fancy}
#{toc}#{toc_pb[:p]}
-#{@tex_ml.newpage('portrait')}
+#{@tex_ml.newpage(:portrait)}
\\pagenumbering{arabic}
#{@tex_ml.paraskip_normal}
-#{@tex_ml.newpage('portrait')}
+#{@tex_ml.newpage(:portrait)}
WOK
end
@tex_file << x
diff --git a/lib/sisu/v6/texpdf_format.rb b/lib/sisu/v6/texpdf_format.rb
index 97007d17..ce027718 100644
--- a/lib/sisu/v6/texpdf_format.rb
+++ b/lib/sisu/v6/texpdf_format.rb
@@ -69,8 +69,8 @@ module SiSU_TeX_Pdf
@brace_url=SiSU_Viz::Defaults.new.url_decoration
end
def bare_urls
- @dob.obj=@dob.obj.gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,
- "#{@brace_url.tex_open}\\1</a>#{@brace_url.tex_close}")
+ @dob.obj=@dob.obj.gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@[a-zA-Z0-9_-]+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,
+ "#{@brace_url.tex_open}\\begin{scriptsize}\\email{\\1}#{@brace_url.tex_close}")
@dob.tmp=@dob.tmp.gsub(/(^|[^\\])_/m,'\1\_'). #watch may not work
gsub(/(^|[^#{Mx[:lnk_c]}])#{Mx[:url_o]}_?(?:\\?_)?(\S+?)#{Mx[:url_c]}/m,
"\\1#{@brace_url.tex_open}\\begin{scriptsize}\\url{\\2}\\end{scriptsize}#{@brace_url.tex_close}")
@@ -219,95 +219,110 @@ module SiSU_TeX_Pdf
else ''
end
end
- def heading_major
+ def remove_footnotes(cont_ln)
+ cont_ln=if cont_ln =~/\\[Ff]ootnote/m
+ cont_ln.gsub(/\s*\\[Ff]ootnote\[\d+\]\{%\s+.+?\}\s*/m,' ').
+ gsub(/\s*\\[Ff]ootnote[A]\{[*+]+\d*\}\{%\S+.+?\}\s*/m,' ')
+ else cont_ln
+ end
+ end
+ def title_level_A
dob=@dob
- title=@md.title.full
dob.tmp=dob.tmp.strip if dob.tmp
dob.tmp=dob.tmp.gsub(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2').
gsub(/#{Mx[:url_o]}|#{Mx[:url_c]}/,'')
cont_ln=dob.tmp.dup
cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2').
gsub(@@tex_pattern_margin_number,'')
- clearp=(dob.lv =~/B/ && dob.obj =='Metadata') ? "\\clearpage\n" : ''
- if dob.tmp =~/\\[Ff]ootnote/ #and dob =~/^[1-6]#{Tex[:tilde]}/ # removing footnotes from headings!
- cont_ln=cont_ln.gsub(/\s*\\footnote\[\d+\]\{%\n .+? \}\s*/,' ').
- gsub(/\s*\\Footnote[A]\{[*+]+\d*\}\{%\n .+? \}\s*/,' ')
- end
+ cont_ln=remove_footnotes(cont_ln)
+ cont_ln=cont_ln.gsub(/\{[\\]+(&)\}/,'\\1')
+ titleset=''
dob.tmp=dob.tmp.gsub(/^(.*)\n?$/m,
- "#{clearp}\\part*{\\1}
-\\addcontentsline{toc}{section}{#{cont_ln}}
-\\markboth{#{title}}\n")
+ "#{titleset}\\part*{\\1}
+\\markboth{#{@md.title.full}}\n")
dob
end
- def level4
- dob=@dob
+ def section_heading_level(dob)
dob.tmp=dob.tmp.strip if dob.tmp
dob.tmp=dob.tmp.gsub(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2').
gsub(/#{Mx[:url_o]}|#{Mx[:url_c]}/,'')
cont_ln=dob.tmp.dup
cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2').
- gsub(@@tex_pattern_margin_number,'').
- gsub(/#{Tex[:backslash]*2}/,"#{Tex[:backslash]*4}"). # added w42
- gsub(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,''). #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
- gsub(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
- title=@md.title.full
- if dob.name =~/endnotes/
- dob.tmp=dob.tmp.gsub(/.+/m,'')
- end
- if dob.tmp =~/\\footnote/ #and dob =~/^[1-6]#{Tex[:tilde]}/ # removing footnotes from headings!
- cont_ln=cont_ln.gsub(/\s*\\footnote\[\d+\]\{%\n .+? \}\s*/,' ').
- gsub(/\s*\\Footnote[A]\{[*+]+\d*\}\{%\n .+? \}\s*/,' ')
- end
- dob.tmp=dob.tmp.gsub(/^(.*)?\n?$/m,"\\subsubsection*{\\1}
-\\addcontentsline{toc}{subsection}{#{cont_ln}}
-\\markright{#{title}}")
+ gsub(@@tex_pattern_margin_number,'')
+ cont_ln=remove_footnotes(cont_ln)
+ cont_ln=cont_ln.gsub(/\{[\\]+(&)\}/,'\\1')
+ dob.tmp=dob.tmp.gsub(/^(.*)\n?$/m,
+ "\\clearpage
+\\part*{\\1}
+\\addcontentsline{toc}{part}{#{cont_ln}}
+\\markboth{#{@md.title.full}}\n")
dob
end
- def level5
- dob=@dob
- # there is a problem here with creation of headers does not do what you would want it to header starts with a * and is not in bold work on \\@txt*, same for next section 2002w46
- dob.tmp=dob.tmp.strip if dob.tmp
- dob.tmp=dob.tmp.gsub(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2').
- gsub(/#{Mx[:url_o]}|#{Mx[:url_c]}/,'')
- cont_ln=dob.tmp.dup
- cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2').
- gsub(@@tex_pattern_margin_number,'').
- gsub(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,''). #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
- gsub(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,''). #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
- gsub(/\\\&/,' and ') #revisit: tmp bugfix 200507, substitutes & with 'and' in toc, needed e.g. for AT&T, see ffa
- if dob.tmp =~/\\footnote/ #and dob =~/^[1-6]#{Tex[:tilde]}/ # removing footnotes from headings!
- cont_ln=cont_ln.gsub(/\s*\\footnote\[\d+\]\{%\n .+? \}\s*/,' ').
- gsub(/\s*\\Footnote[A]\{[*+]+\d*\}\{%\n .+? \}\s*/,' ')
- end
- dob.tmp=dob.tmp.gsub(/^(.*)?\n?$/m,
- "\\subsubsection*{\\1}
-\\addcontentsline{toc}{subsubsection}{#{cont_ln} \\\\
-}")
+ def heading_dev_null(dob)
+ dob.tmp,dob.obj='',''
dob
end
- def level6
- dob=@dob
- # there is a problem here with creation of headers does not do what you would want it to header starts with a * and is not in bold work on \\sub@txt*, same for previous section 2002w46
+ def heading_sublevels(dob)
+ if dob.lv=='1'
+ sect='section'
+ tocadd=%{\\addcontentsline{toc}{section}}
+ pre=''
+ post=''
+ headadd=%{\n\\markright{#{@md.title.full}}}
+ elsif dob.lv=='2'
+ sect='subsection'
+ tocadd=%{\\addcontentsline{toc}{subsection}}
+ pre=''
+ post=" \\\\\n"
+ headadd=''
+ elsif dob.lv=='3'
+ sect='subsubsection'
+ tocadd=%{\\addcontentsline{toc}{subsubsection}}
+ pre='' #pre='~~~~'
+ post=" \\\\\n"
+ headadd=''
+ end
dob.tmp=dob.tmp.strip if dob.tmp
dob.tmp=dob.tmp.gsub(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2').
gsub(/#{Mx[:url_o]}|#{Mx[:url_c]}/,'')
cont_ln=dob.tmp.dup
cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2').
gsub(@@tex_pattern_margin_number,'').
+ gsub(/#{Tex[:backslash]*2}/,"#{Tex[:backslash]*4}"). # added w42
gsub(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,''). #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
gsub(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
- if dob.tmp =~/\\footnote/ #and dob =~/^[1-6]#{Tex[:tilde]}/ # removing footnotes from headings!
- cont_ln=cont_ln.gsub(/\s*\\footnote\[\d+\]\{%\n .+? \}\s*/,' ').
- gsub(/\s*\\Footnote[A]\{[*+]+\d*\}\{%\n .+? \}\s*/,' ')
+ if dob.name =~/endnotes/
+ dob.tmp=dob.tmp.gsub(/.+/m,'')
end
+ cont_ln=remove_footnotes(cont_ln)
+ cont_ln=cont_ln.gsub(/\{[\\]+(&)\}/,'\\1')
dob.tmp=dob.tmp.gsub(/^(.*)?\n?$/m,
- "\\subsubsection*{\\1}
-\\addcontentsline{toc}{subsubsection}{~~~~#{cont_ln} \\\\
-}")
- #dob.tmp.gsub(/^(.*)?\n?$/m,
- # '\subsubsection*{\1}')
+ "\\#{sect}*{\\1}
+#{tocadd}{#{pre}#{cont_ln}#{post}}#{headadd}")
dob
end
+ def section_heading_level_B
+ section_heading_level(@dob)
+ end
+ def section_heading_level_C
+ section_heading_level(@dob)
+ end
+ def section_heading_level_D
+ section_heading_level(@dob)
+ end
+ def heading_level_1
+ if not @dob.use_ == :dummy
+ heading_sublevels(@dob)
+ else
+ heading_dev_null(@dob)
+ end
+ end
+ def heading_level_2
+ heading_sublevels(@dob)
+ end
+ def heading_level_3
+ heading_sublevels(@dob)
+ end
def hang
case @dob.indent
when /0/
@@ -771,50 +786,50 @@ module SiSU_TeX_Pdf
{ mainlang: mainlang, otherlang: otherlang }
end
def tex_head_encode
- texpdf_font=if defined? @md.make.texpdf_font.main \
- and not @md.make.texpdf_font.main.nil? \
- and @md.make.texpdf_font.main=~/\S{3,}/
- @md.make.texpdf_font.main
+ texpdf_fontface=if defined? @md.make.texpdf_fontface.main \
+ and not @md.make.texpdf_fontface.main.nil? \
+ and @md.make.texpdf_fontface.main=~/\S{3,}/
+ @md.make.texpdf_fontface.main
else @env.font.texpdf.main
end
- texpdf_font_sans=if defined? @md.make.texpdf_font.sans \
- and not @md.make.texpdf_font.sans.nil? \
- and @md.make.texpdf_font.sans=~/\S{3,}/ # not used
- @md.make.texpdf_font.sans
+ texpdf_fontface_sans=if defined? @md.make.texpdf_fontface.sans \
+ and not @md.make.texpdf_fontface.sans.nil? \
+ and @md.make.texpdf_fontface.sans=~/\S{3,}/ # not used
+ @md.make.texpdf_fontface.sans
else @env.font.texpdf.sans
end
- texpdf_font_serif=if defined? @md.make.texpdf_font.serif \
- and not @md.make.texpdf_font.serif.nil? \
- and @md.make.texpdf_font.serif=~/\S{3,}/ # not used
- @md.make.texpdf_font.serif
+ texpdf_fontface_serif=if defined? @md.make.texpdf_fontface.serif \
+ and not @md.make.texpdf_fontface.serif.nil? \
+ and @md.make.texpdf_fontface.serif=~/\S{3,}/ # not used
+ @md.make.texpdf_fontface.serif
else @env.font.texpdf.serif
end
- texpdf_font_mono=if defined? @md.make.texpdf_font.mono \
- and not @md.make.texpdf_font.mono.nil? \
- and @md.make.texpdf_font.mono=~/\S{3,}/
- @md.make.texpdf_font.mono
+ texpdf_fontface_mono=if defined? @md.make.texpdf_fontface.mono \
+ and not @md.make.texpdf_fontface.mono.nil? \
+ and @md.make.texpdf_fontface.mono=~/\S{3,}/
+ @md.make.texpdf_fontface.mono
else @env.font.texpdf.mono
end
- texpdf_font_cjk=if @md.opt.lng =~/zh/ \
- and defined? @md.make.texpdf_font.cjk_zh \
- and not @md.make.texpdf_font.cjk_zh.nil? \
- and @md.make.texpdf_font.cjk_zh=~/\S{3,}/
- @md.make.texpdf_font.cjk_zh
+ texpdf_fontface_cjk=if @md.opt.lng =~/zh/ \
+ and defined? @md.make.texpdf_fontface.cjk_zh \
+ and not @md.make.texpdf_fontface.cjk_zh.nil? \
+ and @md.make.texpdf_fontface.cjk_zh=~/\S{3,}/
+ @md.make.texpdf_fontface.cjk_zh
elsif @md.opt.lng =~/ja/ \
- and defined? @md.make.texpdf_font.cjk_ja \
- and not @md.make.texpdf_font.cjk_ja.nil? \
- and @md.make.texpdf_font.cjk_ja=~/\S{3,}/
- @md.make.texpdf_font.cjk_ja
+ and defined? @md.make.texpdf_fontface.cjk_ja \
+ and not @md.make.texpdf_fontface.cjk_ja.nil? \
+ and @md.make.texpdf_fontface.cjk_ja=~/\S{3,}/
+ @md.make.texpdf_fontface.cjk_ja
elsif @md.opt.lng =~/ko/ \
- and defined? @md.make.texpdf_font.cjk_ko \
- and not @md.make.texpdf_font.cjk_ko.nil? \
- and @md.make.texpdf_font.cjk_ko=~/\S{3,}/
- @md.make.texpdf_font.cjk_ko
+ and defined? @md.make.texpdf_fontface.cjk_ko \
+ and not @md.make.texpdf_fontface.cjk_ko.nil? \
+ and @md.make.texpdf_fontface.cjk_ko=~/\S{3,}/
+ @md.make.texpdf_fontface.cjk_ko
elsif @md.opt.lng =~/(?:zh|ja|ko)/ \
- and defined? @md.make.texpdf_font.cjk \
- and not @md.make.texpdf_font.cjk.nil? \
- and @md.make.texpdf_font.cjk=~/\S{3,}/
- @md.make.texpdf_font.cjk
+ and defined? @md.make.texpdf_fontface.cjk \
+ and not @md.make.texpdf_fontface.cjk.nil? \
+ and @md.make.texpdf_fontface.cjk=~/\S{3,}/
+ @md.make.texpdf_fontface.cjk
else
case @md.opt.lng
when /zh/ then @env.font.texpdf.cjk_zh
@@ -832,22 +847,22 @@ module SiSU_TeX_Pdf
<<-WOK
\\usepackage{ucs, fontspec, xltxtra, xunicode, xeCJK}
\\setmainCJKlanguage{#{tex_head_lang[:mainlang]}}
-\\setCJKmainfont{#{texpdf_font_cjk}}
+\\setCJKmainfont{#{texpdf_fontface_cjk}}
\\XeTeXlinebreaklocale "#{tex_head_lang[:mainlang]}"
\\XeTeXlinebreakskip = 0pt plus 1pt
\\setotherlanguage{#{tex_head_lang[:otherlang]}}
-\\setmainfont{#{texpdf_font}}
-\\setmonofont[Scale=0.85]{#{texpdf_font_mono}}
+\\setmainfont{#{texpdf_fontface}}
+\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
WOK
else
<<-WOK
\\usepackage{polyglossia, ucs, fontspec, xltxtra, xunicode}
\\setmainlanguage{#{tex_head_lang[:mainlang]}}
\\setotherlanguage{#{tex_head_lang[:otherlang]}}
-\\setmainfont{#{texpdf_font}}
-\\setmonofont[Scale=0.85]{#{texpdf_font_mono}}
-% \\setsansfont{#{texpdf_font_sans}}
-% \\setromanfont{#{texpdf_font_serif}}
+\\setmainfont{#{texpdf_fontface}}
+\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
+% \\setsansfont{#{texpdf_fontface_sans}}
+% \\setromanfont{#{texpdf_fontface_serif}}
WOK
end
when /pdf/
@@ -919,60 +934,79 @@ module SiSU_TeX_Pdf
end
def tex_head_paper_dimensions
d={}
+ fontsize_set=if defined? @env.font.texpdf.size(@md.opt.act[:pdf_font_size]) \
+ and not @env.font.texpdf.size(@md.opt.act[:pdf_font_size]).nil?
+ @env.font.texpdf.size(@md.opt.act[:pdf_font_size])
+ else :na
+ end
case @layout
- when /portrait/
- d[:papertype],d[:fontsize]='a4paper','11pt'
+ when :portrait
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a4paper',fontsize
d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='0mm','0mm','-12pt'
d[:headheight],d[:headsep],d[:columnsep]='12pt','35pt',''
d[:marginparsep],d[:marginparwidth]='4mm','8mm'
case @ps #@md.papersize
when /a4/i #European default, SiSU default
- d[:papertype],d[:fontsize]='a4paper','12pt'
+ fontsize=(fontsize_set==:na) ? '12pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a4paper',fontsize
d[:textheight],d[:textwidth]=@tx.a4.portrait.h,@tx.a4.portrait.w
when /letter/i #U.S. default
- d[:papertype],d[:fontsize]='letterpaper','12pt'
+ fontsize=(fontsize_set==:na) ? '12pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='letterpaper',fontsize
d[:textheight],d[:textwidth]=@tx.letter.portrait.h,@tx.letter.portrait.w
when /legal/i #U.S. alternative
- d[:papertype],d[:fontsize]='legalpaper','12pt'
+ fontsize=(fontsize_set==:na) ? '12pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='legalpaper',fontsize
d[:textheight],d[:textwidth]=@tx.legal.portrait.h,@tx.legal.portrait.w
when /book|b5/i #book default - larger
- d[:papertype],d[:fontsize]='b5paper','11pt'
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='b5paper',fontsize
d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='-4mm','-4mm','-36pt'
d[:headheight],d[:headsep],d[:columnsep]='12pt','20pt',''
d[:textheight],d[:textwidth]=@tx.b5.portrait.h,@tx.b5.portrait.w
when /a5/i
- d[:papertype],d[:fontsize]='a5paper','11pt'
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a5paper',fontsize
d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='-4mm','-4mm','-36pt'
d[:headheight],d[:headsep],d[:columnsep]='11pt','12pt',''
d[:marginparsep],d[:marginparwidth]='4mm','6mm'
d[:textheight],d[:textwidth]=@tx.a5.portrait.h,@tx.a5.portrait.w
else #default currently A4
- d[:papertype],d[:fontsize]='a4paper','12pt'
+ fontsize=(fontsize_set==:na) ? '12pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a4paper',fontsize
d[:textheight],d[:textwidth]=@tx.a4.portrait.h,@tx.a4.portrait.w
end
- when /landscape/
- d[:papertype],d[:fontsize]='a4paper','11pt'
+ when :landscape
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a4paper',fontsize
d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='6mm','6mm','-12mm'
d[:headheight],d[:headsep],d[:columnsep]='12pt','20pt','40pt'
d[:marginparsep],d[:marginparwidth]='4mm','8mm'
case @ps #@md.papersize
when /a4/i #European default, SiSU default
- d[:papertype],d[:fontsize]='a4paper','11pt'
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a4paper',fontsize
d[:textheight],d[:textwidth]=@tx.a4.landscape.h,@tx.a4.landscape.w
when /letter/i #U.S. default
- d[:papertype],d[:fontsize]='letterpaper','11pt'
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='letterpaper',fontsize
d[:textheight],d[:textwidth]=@tx.letter.landscape.h,@tx.letter.landscape.w
when /legal/i #U.S. alternative
- d[:papertype],d[:fontsize],d[:columnsep]='legalpaper','11pt','48pt'
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize],d[:columnsep]='legalpaper',fontsize,'48pt'
d[:textheight],d[:textwidth]=@tx.legal.landscape.h,@tx.legal.landscape.w
when /book|b5/i #book default - larger
- d[:papertype],d[:fontsize],d[:columnsep]='b5paper','11pt','35pt'
+ fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize],d[:columnsep]='b5paper',fontsize,'35pt'
d[:textheight],d[:textwidth]=@tx.b5.landscape.h,@tx.b5.landscape.w
when /a5/i
- d[:papertype],d[:fontsize],d[:columnsep]='a5paper','10pt','32pt'
+ fontsize=(fontsize_set==:na) ? '10pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize],d[:columnsep]='a5paper',fontsize,'32pt'
d[:textheight],d[:textwidth]=@tx.a5.landscape.h,@tx.a5.landscape.w
else #default currently A4
- d[:papertype],d[:fontsize]='a4paper','12pt'
+ fontsize=(fontsize_set==:na) ? '12pt' : (fontsize_set + 'pt')
+ d[:papertype],d[:fontsize]='a4paper',fontsize
d[:textheight],d[:textwidth]=@tx.a4.landscape.h,@tx.a4.landscape.w
end
end
@@ -980,37 +1014,63 @@ module SiSU_TeX_Pdf
end
def tex_head_paper
case @layout
- when /portrait/
+ when :portrait
tex_head_paper_portrait(tex_head_paper_dimensions)
- when /landscape/
+ when :landscape
tex_head_paper_landscape(tex_head_paper_dimensions)
end
end
- def tex_head_pdftex_dvi
- color=case @layout
- when /portrait/
+ def hyperlinks_monochrome
<<-WOK
colorlinks=true,
urlcolor=myblack,
filecolor=myblack,
linkcolor=myblack,
- WOK
- when /landscape/
+ WOK
+ end
+ def hyperlinks_colored
<<-WOK
colorlinks=true,
urlcolor=myblue, % \\href{...}{...} external url
- filecolor=mygreen, % \\href{...} local file
+ filecolor=mygreen, % \\href{...} local file
linkcolor=myred, % \\href{...} and \\pageref{...}
- WOK
+ WOK
+ end
+ def hyperlinks_color?
+ case @layout
+ when :portrait then hyperlinks_monochrome
+ if @env.texpdf_hyperlinks(@md.opt.act[:pdf_hyperlink_colors]).portrait != :na
+ case @env.texpdf_hyperlinks(@md.opt.act[:pdf_hyperlink_colors]).portrait
+ when :color then hyperlinks_colored
+ when :mono then hyperlinks_monochrome
+ else p __LINE__.to_s + ':error'
+ end
+ else hyperlinks_monochrome
+ end
+ when :landscape
+ if @env.texpdf_hyperlinks(@md.opt.act[:pdf_hyperlink_colors]).landscape != :na
+ case @env.texpdf_hyperlinks(@md.opt.act[:pdf_hyperlink_colors]).landscape
+ when :color then hyperlinks_colored
+ when :mono then hyperlinks_monochrome
+ else p __LINE__.to_s + ':error'
+ end
+ else hyperlinks_colored
+ end
+ end
+ end
+ def tex_head_pdftex
+ author=if defined? @md.creator.author \
+ and @md.creator.author=~/\S+/
+ SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.creator.author).special_characters_safe_no_urls
+ else ''
end
- if @layout =~/portrait|landscape/
<<-WOK
\\usepackage{alltt}
\\usepackage{thumbpdf}
\\usepackage[#{@tex2pdf},
- #{color.strip}
+ #{hyperlinks_color?.strip}
pdftitle={#{@txt}},
- pdfauthor={#{@author}},
+ pdfauthor={#{author}},
pdfsubject={#{@subject}},
pdfkeywords={#{@keywords}},
pageanchor=true,
@@ -1042,30 +1102,9 @@ module SiSU_TeX_Pdf
\\definecolor{myblue}{rgb}{0,0,0.5}
\\definecolor{mywhite}{rgb}{1,1,1}
\\usepackage{url}
+\\urlstyle{sf}
%\\usepackage{breakurl}
WOK
- elsif @txt =~/dvi/
- <<-WOK
-\\usepackage{alltt}
- #{color.strip}
- pageanchor=true,
- plainpages=true,
- pagebackref,
- bookmarks=true,
- bookmarksopen=true,
- plainpages=false,
-]
-{hyperref}
-\\usepackage[usenames]{color}
-\\definecolor{myblack}{rgb}{0,0,0}
-\\definecolor{myred}{rgb}{0.75,0,0}
-\\definecolor{mygreen}{rgb}{0,0.5,0}
-\\definecolor{myblue}{rgb}{0,0,0.5}
-\\definecolor{mywhite}{rgb}{1,1,1}
-\\usepackage{url}
-%\\usepackage{breakurl}
- WOK
- end
end
def tex_head_codeblock(codeblock_box_type)
codeblock_box=if codeblock_box_type=='listings'
@@ -1103,7 +1142,7 @@ module SiSU_TeX_Pdf
<<-WOK
#{tex_head_paper}
#{tex_head_encode}
-#{tex_head_pdftex_dvi}
+#{tex_head_pdftex}
#{tex_head_misc}
#{tex_head_codeblock(codeblock_box_type)}
\\setcounter{secnumdepth}{2}
@@ -1188,16 +1227,16 @@ module SiSU_TeX_Pdf
@brace_url=SiSU_Viz::Defaults.new.url_decoration
@tex2pdf=@@tex3pdf ||=SiSU_Env::SystemCall.new.tex2pdf_engine
end
- def xetex_code_listings(str,is=:default) # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list
+ def xetex_code_listings(str,is=:default) # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list
word=str.scan(/\S+|\n/) #unless line =~/^(?:@\S|%+\s)/
para_array=[]
str=if word
word.each do |w| # _ - / # | : ! ^ ~
w=w.gsub(/#{Mx[:gl_o]}#lt#{Mx[:gl_c]}/,'<').gsub(/#{Mx[:gl_o]}#gt#{Mx[:gl_c]}/,'>').
gsub(/[\\]?~/,'~').
- gsub(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,"\n"). #watch
- gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'~'). #126 usual
- gsub(/\\?\||#{Mx[:gl_o]}#124#{Mx[:gl_c]}/,'|') #unless is=='code' #unless w=~/<~\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+>/ # | SiSU not really special sisu character but done, also LaTeX
+ gsub(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,"\n"). #watch
+ gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'~'). #126 usual
+ gsub(/\\?\||#{Mx[:gl_o]}#124#{Mx[:gl_c]}/,'|') #unless is=='code' #unless w=~/<~\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+>/ # | SiSU not really special sisu character but done, also LaTeX
para_array << w
end
str=para_array.join(' ')
@@ -1210,30 +1249,30 @@ module SiSU_TeX_Pdf
gsub(/#{Mx[:br_eof]}/,'').
gsub(/#{Mx[:br_endnotes]}/,'').
#problem sequence ->
- gsub(/&(?:lt|#060);/,'<'). # < SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#(?:gt|062)#{Mx[:gl_c]}/,'>'). # > SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{'). # { SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}'). # } SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'~'). # ~ SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#'). # # SiSU special character also LaTeX
+ gsub(/&(?:lt|#060);/,'<'). # < SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#(?:gt|062)#{Mx[:gl_c]}/,'>'). # > SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{'). # { SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}'). # } SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'~'). # ~ SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#'). # SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!'). # ! SiSU not really special sisu character but done, also LaTeX
#gsub(/(^|\s)\*\s/,'\1\asterisk '). # * should you wish to escape astrisk e.g. describing \*{bold}*
- gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*'). # * should you wish to escape astrisk e.g. describing \*{bold}*
+ gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*'). # * should you wish to escape astrisk e.g. describing \*{bold}*
gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-'). # - SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#043#{Mx[:gl_c]}/,'+'). # + SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#044#{Mx[:gl_c]}/,','). # + SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#038#{Mx[:gl_c]}/,'&'). #unless @txt=~/<:code>/ # / SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/'). # / SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#092#{Mx[:gl_c]}/,'\\'). # \ SiSU special character also LaTeX
- gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_'). # _ SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#038#{Mx[:gl_c]}/,'&'). #unless @txt=~/<:code>/ # / SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/'). # / SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#092#{Mx[:gl_c]}/,'\\'). # \ SiSU special character also LaTeX
+ gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_'). # _ SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#124#{Mx[:gl_c]}/,'|'). # | SiSU not really special sisu character but done, also LaTeX
gsub(/#{Mx[:gl_o]}#058#{Mx[:gl_c]}/,':'). # : SiSU not really special sisu character but done, also LaTeX
- gsub(/#{Mx[:gl_o]}#094#{Mx[:gl_c]}|\^/,'^'). # ^ SiSU not really special sisu character but done, also LaTeX
+ gsub(/#{Mx[:gl_o]}#094#{Mx[:gl_c]}|\^/,'^'). # ^ SiSU not really special sisu character but done, also LaTeX
##watch placement, problem sequence ^
gsub(/<sup><font face=symbol>&atild;<\/font><\/sup>/,' ').
- gsub(/\\copy(right|mark)?/,'<=copymark>') # ok problem with superscript
+ gsub(/\\copy(right|mark)?/,'<=copymark>') # ok problem with superscript
end
- def xetex_special_characters_1(str,is=:default) # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list
+ def xetex_special_characters_1(str,is=:default) # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list
word=str.scan(/\S+|\n/) #unless line =~/^(?:@\S|%+\s)/
para_array=[]
str=if word
@@ -1245,9 +1284,9 @@ module SiSU_TeX_Pdf
end
w=w.gsub(/#{Mx[:gl_o]}#lt#{Mx[:gl_c]}/,'<').gsub(/#{Mx[:gl_o]}#gt#{Mx[:gl_c]}/,'>').
gsub(/[\\]?~/,'<=tilde>').
- gsub(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,' \newline '). #watch
- gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'<=tilde>'). #126 usual
- gsub(/\\?\||#{Mx[:gl_o]}#124#{Mx[:gl_c]}/,'\pipe') #unless is=='code' #unless w=~/<~\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+>/ # | SiSU not really special sisu character but done, also LaTeX
+ gsub(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,' \newline '). #watch
+ gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'<=tilde>'). #126 usual
+ gsub(/\\?\||#{Mx[:gl_o]}#124#{Mx[:gl_c]}/,'\pipe') #unless is=='code' #unless w=~/<~\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+>/ # | SiSU not really special sisu character but done, also LaTeX
if w !~/#{Mx[:rel_o]}/ \
and w !~/#{Mx[:gl_o]}#/
w=w.gsub(/\#/,'<=hash>')
@@ -1264,8 +1303,8 @@ module SiSU_TeX_Pdf
gsub(/#{Mx[:br_eof]}/,'').
gsub(/#{Mx[:br_endnotes]}/,'')
#problem sequence ->
- str=str.gsub(/&(?:nbsp);|#{Mx[:nbsp]}/,'\hardspace') unless is==:code # < SiSU special character also LaTeX
- str=str.gsub(/&(?:lt|#060);/,'\lt'). # < SiSU special character also LaTeX
+ str=str.gsub(/&(?:nbsp);|#{Mx[:nbsp]}/,'\hardspace') unless is==:code # < SiSU special character also LaTeX
+ str=str.gsub(/&(?:lt|#060);/,'\lt'). # < SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#(?:gt|062)#{Mx[:gl_c]}/,'\gt'). # > SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'\curlyopen'). # { SiSU special character also LaTeX
gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'\curlyclose'). # } SiSU special character also LaTeX
@@ -1315,14 +1354,17 @@ module SiSU_TeX_Pdf
gsub(/§/u,'\S'). #latex: space between next character not preserved? #str.gsub(/§ /,'\S ')
gsub(/£/u,'\pounds').
gsub(/<a href=".+?">/,' ').
- gsub(/<\/a>/,' ').
- gsub(/((?:^|\s)#{Mx[:lnk_c]})#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
- '\1\begin{scriptsize}\url{\2}\end{scriptsize}\3'). #special case \{ e.g. \}http://url
- gsub(/#{Mx[:url_o]}\\_(\S+?)#{Mx[:url_c]}/,
- '\begin{scriptsize}\url{\1}\end{scriptsize}'). #special case \{ e.g. \}http://url
- gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,
- '\begin{scriptsize}\\url{\1}\end{scriptsize}') #specially escaped url no decoration
- unless is==:code
+ gsub(/<\/a>/,' ')
+ unless is==:no_urls
+ str=str.gsub(/((?:^|\s)#{Mx[:lnk_c]})#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
+ '\1\begin{scriptsize}\url{\2}\end{scriptsize}\3'). #special case \{ e.g. \}http://url
+ gsub(/#{Mx[:url_o]}\\_(\S+?)#{Mx[:url_c]}/,
+ '\begin{scriptsize}\url{\1}\end{scriptsize}'). #special case \{ e.g. \}http://url
+ gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,
+ '\begin{scriptsize}\\url{\1}\end{scriptsize}') #specially escaped url no decoration
+ end
+ if is !=:code \
+ and is !=:no_urls
str=str.gsub(/(^|#{Mx[:gl_c]}|\s)((?:https?|file|ftp):\/\/\S+?\.[^'"\s]+?)([;.,]?(?=\s|$))/,
"\\1#{@brace_url.tex_open}\\begin{scriptsize}\\url{\\2}\\end{scriptsize}#{@brace_url.tex_close}\\3") #url matching with decoration <url> positive lookahead, sequence issue with { linked }http://url cannot use \b at start
end
@@ -1412,6 +1454,13 @@ module SiSU_TeX_Pdf
str=special_characters_safe_close(str) unless str.nil?
@txt=str
end
+ def special_characters_safe_no_urls
+ str,is=@txt,:no_urls
+ str=xetex_special_characters_1(str,is) unless str.nil?
+ str=xetex_special_characters_2(str,is) unless str.nil? # remove this to start with, causes issues
+ str=special_characters_safe_close(str) unless str.nil?
+ @txt=str
+ end
def characters_code_listings #special characters - some substitutions are sequence sensitive, rearrange with care.
str,is=@txt,@is
str=xetex_code_listings(str,is) unless str.nil?
@@ -1484,11 +1533,11 @@ module SiSU_TeX_Pdf
#BOOK standard dimensions - 229x156
def newpage(orientation)
case orientation
- when /landscape/ # using longtable latex package
+ when :landscape # using longtable latex package
<<-WOK
\\clearpage
WOK
- when /portrait/
+ when :portrait
<<-WOK
\\newpage
WOK
diff --git a/lib/sisu/v6/txt_plain.rb b/lib/sisu/v6/txt_plain.rb
index 1aa08f0e..a56f5ac9 100644
--- a/lib/sisu/v6/txt_plain.rb
+++ b/lib/sisu/v6/txt_plain.rb
@@ -384,7 +384,10 @@ WOK
when 1 then wrapped.upcase << break_line << decorate.heading_underscore.l1*times + p_num << break_line*2
when 2 then wrapped.upcase << break_line << decorate.heading_underscore.l2*times + p_num << break_line*2
when 3 then wrapped.upcase << break_line << decorate.heading_underscore.l3*times + p_num << break_line*2
- when 4 then wrapped.upcase << break_line << decorate.heading_underscore.l4*times + p_num << break_line*2
+ when 4
+ unless dob.use_ == :dummy
+ wrapped.upcase << break_line << decorate.heading_underscore.l4*times + p_num << break_line*2
+ end
when 5 then wrapped.upcase << break_line << decorate.heading_underscore.l5*times + p_num << break_line*2
when 6 then wrapped.upcase << break_line << decorate.heading_underscore.l6*times + p_num << break_line*2
end
diff --git a/lib/sisu/v6/urls.rb b/lib/sisu/v6/urls.rb
index 5327a9bb..29671dca 100644
--- a/lib/sisu/v6/urls.rb
+++ b/lib/sisu/v6/urls.rb
@@ -107,7 +107,7 @@ module SiSU_Urls
'I --texinfo (Info file)'=>'info',
'i --manpage (manpage)'=>'manpage',
'm --ao (Document Abstraction)'=>'ao',
- 'N --hash-digests (Digests md5/sha256)'=>@fn[:digest],
+ 'N --hash-digests (Digests sha512/sha256/md5)'=>@fn[:digest],
'o --odt (ODF:ODT - Open Document)'=>@fn[:odf],
'p --pdf (PDF landscape)'=>@fn[:pdf_l],
'p --pdf (PDF portrait)'=>@fn[:pdf_p],
diff --git a/lib/sisu/v6/xml_docbook5.rb b/lib/sisu/v6/xml_docbook5.rb
index 84c2181c..f5dba87a 100644
--- a/lib/sisu/v6/xml_docbook5.rb
+++ b/lib/sisu/v6/xml_docbook5.rb
@@ -110,9 +110,10 @@ module SiSU_XML_Docbook_Book
class Scroll <Source
def initialize(data='',md='')
@data,@md=data,md
- @trans=SiSU_XML_Munge::Trans.new(@md)
+ @trans=SiSU_XML_Munge::Trans.new(md)
@particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(md.opt)
@env=@particulars.env
+ @make ||=SiSU_Env::ProcessingSettings.new(md)
end
def songsheet
@t='sisu'
@@ -198,7 +199,9 @@ module SiSU_XML_Docbook_Book
filename_docbook.puts head
data.each_with_index do |o,i|
if (defined? o.ocn and not o.ocn.nil?)
- ocn="\n#{Dx[:ocn_o]}#{o.ocn}#{Dx[:ocn_c]}"
+ ocn=(@make.build.ocn?) \
+ ? "\n#{Dx[:ocn_o]}#{o.ocn}#{Dx[:ocn_c]}"
+ : ''
id=%{ id="o#{o.ocn}" }
else
ocn,id='',''
diff --git a/lib/sisu/v6/xml_fictionbook2.rb b/lib/sisu/v6/xml_fictionbook2.rb
index 0498a7f0..d0ad4a7f 100644
--- a/lib/sisu/v6/xml_fictionbook2.rb
+++ b/lib/sisu/v6/xml_fictionbook2.rb
@@ -277,7 +277,7 @@ module SiSU_XML_Fictionbook
WOK
end
def output(o,comment='')
- puts o.lc == 0..6 \
+ puts o.lc == (0..6) \
? "#{space*o.lc}<#{o.lc}>[#{o.ocn}] #{o.ln} #{o.obj}</#{o.lc}>#{comment}"
: "<#{o.lc}>[#{o.ocn}] #{o.ln} #{o.obj}</#{o.lc}>#{comment}"
end
@@ -304,7 +304,12 @@ module SiSU_XML_Fictionbook
doc_position=:head
filename_fictionbook.puts head
data.each_with_index do |o,i|
- ocn=(defined? o.ocn and not o.ocn.nil?) ? "\n#{Dx[:ocn_o]}#{o.ocn}#{Dx[:ocn_c]}" : ''
+ ocn=if @make.build.ocn?
+ (defined? o.ocn and not o.ocn.nil?) \
+ ? "\n#{Dx[:ocn_o]}#{o.ocn}#{Dx[:ocn_c]}"
+ : ''
+ else ''
+ end
if o.is ==:heading
unless doc_position==:head
filename_fictionbook.puts structure_build_tag_close(o.lc,h)
diff --git a/lib/sisu/v6/xml_odf_odt.rb b/lib/sisu/v6/xml_odf_odt.rb
index 0457ad7d..0fe880c0 100644
--- a/lib/sisu/v6/xml_odf_odt.rb
+++ b/lib/sisu/v6/xml_odf_odt.rb
@@ -209,8 +209,11 @@ module SiSU_XML_ODF_ODT
end
end
@@docstart=false
- dob.tmp=dob.obj
- dob.obj=%{#{breakpage}<text:h text:style-name="H_#{dob.ln}" text:outline-level="#{dob.ln}">#{p_num[:set_ref]}#{set_bookmark_tag(dob)}#{dob.obj}#{p_num[:display]}</text:h>}
+ if dob.use_ != :dummy
+ dob.tmp=dob.obj
+ dob.obj=%{#{breakpage}<text:h text:style-name="H_#{dob.ln}" text:outline-level="#{dob.ln}">#{p_num[:set_ref]}#{set_bookmark_tag(dob)}#{dob.obj}#{p_num[:display]}</text:h>}
+ else dob.tmp,dob.obj='',''
+ end
dob
end
def toc(dob,p_num)
diff --git a/man/man1/sisu.1 b/man/man1/sisu.1
index c3229e00..3e85a9db 100644
--- a/man/man1/sisu.1
+++ b/man/man1/sisu.1
@@ -1,4 +1,4 @@
-.TH "sisu" "1" "2014-02-14" "6.0.4" "SiSU"
+.TH "sisu" "1" "2014-05-12" "6.0.5" "SiSU"
.br
.SH NAME
.br
@@ -97,6 +97,7 @@ Homepages:
.SH DESCRIPTION
+
.BR
.B SiSU
@@ -124,7 +125,6 @@ and
) , which share text object numbers ("object citation numbering") and the same
document structure information. For more see: <http://sisudoc.org> or
<http://www.jus.uio.no/sisu>
-
.SH DOCUMENT PROCESSING COMMAND FLAGS
.TP
@@ -534,6 +534,12 @@ copies sisu output files to remote host using scp. This requires that
sisurc.yml has been provided with information on hostname and username, and
that you have your "keys" and ssh agent in place. Also see --rsync. Alias -r
.TP
+.B --sha256
+set hash digest where used to sha256
+.TP
+.B --sha512
+set hash digest where used to sha512
+.TP
.B --sqlite --[instruction] [filename]
database type set to
.I SQLite,
@@ -647,12 +653,12 @@ version information
.B -v [filename/wildcard]
see --verbose
.TP
-.B --v3 [filename/wildcard]
-invokes the sisu v3 document parser/generator. You may run sisu3 instead.
+.B --v5 [filename/wildcard]
+invokes the sisu v5 document parser/generator. You may run sisu5 instead. This
+is the current default and is normally omitted.
.TP
-.B --v4 [filename/wildcard]
-invokes the sisu v4 document parser/generator. This is the default and is
-normally omitted.
+.B --v6 [filename/wildcard]
+invokes the sisu v6 document parser/generator. You may run sisu6 instead.
.TP
.B --verbose [filename/wildcard]
provides verbose output of what is being generated, where output is placed (and
@@ -734,10 +740,13 @@ strips output text of editor endnotes[^*2] denoted by asterisk sign
strips output text of editor endnotes[^+1] denoted by dagger/plus sign
.SH DATABASE COMMANDS
+
.BR
+
.B dbi - database interface
.BR
+
.B -D or --pgsql
set for
.I PostgreSQL
@@ -832,9 +841,9 @@ or wildcard]
.BR
consider -u for appended url info or -v for verbose output
-
.SH COMMAND LINE WITH FLAGS - BATCH PROCESSING
+
.BR
In the data directory run sisu -mh filename or wildcard eg. "sisu -h cisg.sst"
or "sisu -h *.{sst,ssm}" to produce html version of all documents.
@@ -843,17 +852,17 @@ or "sisu -h *.{sst,ssm}" to produce html version of all documents.
Running sisu (alone without any flags, filenames or wildcards) brings up the
interactive help, as does any sisu command that is not recognised. Enter to
escape.
-
.SH HELP
.SH SISU MANUAL
+
.BR
The most up to date information on sisu should be contained in the sisu_manual,
available at:
.BR
-<http://sisudoc.org/sisu/sisu_manual/>
+ <http://sisudoc.org/sisu/sisu_manual/>
.BR
The manual can be generated from source, found respectively, either within the
@@ -861,26 +870,26 @@ The manual can be generated from source, found respectively, either within the
tarball or installed locally at:
.BR
-\./data/doc/sisu/markup-samples/sisu_manual
+ ./data/doc/sisu/markup-samples/sisu_manual
.BR
-/usr/share/doc/sisu/markup-samples/sisu_manual
+ /usr/share/doc/sisu/markup-samples/sisu_manual
.BR
move to the respective directory and type e.g.:
.BR
-sisu sisu_manual.ssm
-
+ sisu sisu_manual.ssm
.SH SISU MAN PAGES
+
.BR
If
.B SiSU
is installed on your system usual man commands should be available, try:
.BR
-man sisu
+ man sisu
.BR
Most
@@ -918,13 +927,16 @@ An online version of the sisu man page is available here:
* sisu.1 <http://www.jus.uio.no/sisu/man/sisu.1.html> [^2]
.SH SISU BUILT-IN INTERACTIVE HELP, [DISCONTINUED]
+
.BR
This fell out of date and has been discontinued.
.SH INTRODUCTION TO SISU MARKUP[^3]
.SH SUMMARY
+
.BR
+
.B SiSU
source documents are
.I plaintext
@@ -962,10 +974,10 @@ primary outline of the document structure. Markup of substantive text includes:
* footnotes/endnotes
.BR
-* linked text and images
+ * linked text and images
.BR
-* paragraph actions, such as indent, bulleted, numbered-lists, etc.
+ * paragraph actions, such as indent, bulleted, numbered-lists, etc.
.BR
Some interactive help on markup is available, by typing sisu and selecting
@@ -975,23 +987,100 @@ markup or sisu --help markup
To check the markup in a file:
.BR
-sisu --identify [filename].sst
+ sisu --identify [filename].sst
.BR
For brief descriptive summary of markup history
.BR
-sisu --query-history
+ sisu --query-history
.BR
or if for a particular version:
.BR
-sisu --query-0.38
+ sisu --query-0.38
+.SH MARKUP RULES, DOCUMENT STRUCTURE AND METADATA REQUIREMENTS
+
+
+.BR
+minimal content/structure requirement:
+
+.BR
+[metadata]
+.nf
+A~ (level A [title])
+1~ (at least one level 1 [segment/(chapter)])
+.fi
+
+
+.BR
+structure rules (document heirarchy, heading levels):
+
+.BR
+there are two sets of heading levels ABCD (title & parts if any) and 123
+(segment & subsegments if any)
+
+.BR
+sisu has the fllowing levels:
+.nf
+A~ [title] .
+ required (== 1) followed by B~ or 1~
+B~ [part] *
+ followed by C~ or 1~
+C~ [subpart] *
+ followed by D~ or 1~
+D~ [subsubpart] *
+ followed by 1~
+1~ [segment (chapter)] +
+ required (>= 1) followed by text or 2~
+text *
+ followed by more text or 1~, 2~
+ or relevant part *()
+2~ [subsegment] *
+ followed by text or 3~
+text *
+ followed by more text or 1~, 2~ or 3~
+ or relevant part, see *()
+3~ [subsubsegment] *
+ followed by text
+text *
+ followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+*(B~ if none other used;
+ if C~ is last used: C~ or B~;
+ if D~ is used: D~, C~ or B~)
+.fi
+
+.nf
+* level A~ is the tile and is mandatory
+* there can only be one level A~
+* heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially
+ (alphabetically),
+* heading levels A~ B~ C~ D~ are followed by other heading levels rather
+ than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+* there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond
+ to the Chapter level)
+* additional heading levels 1~ 2~ 3~ are optional and there may be several
+ of each
+* heading levels 1~ 2~ 3~ are followed by text (which may be followed by
+ the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+.fi
+
.SH MARKUP EXAMPLES
.SH ONLINE
+
.BR
Online markup examples are available together with the respective outputs
produced from <http://www.jus.uio.no/sisu/SiSU/examples.html> or from
@@ -1005,16 +1094,15 @@ markup and the respective output produced:
.BR
an alternative presentation of markup syntax:
/usr/share/doc/sisu/on_markup.txt.gz
-
.SH INSTALLED
+
.BR
With
.B SiSU
installed sample skins may be found in: /usr/share/doc/sisu/markup-samples (or
equivalent directory) and if sisu -markup-samples is installed also under:
/usr/share/doc/sisu/markup-samples-non-free
-
.SH MARKUP OF HEADERS
@@ -1027,17 +1115,16 @@ 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:
-
.nf
% this would be a comment
.fi
.SH SAMPLE HEADER
+
.BR
This current document is loaded by a master document that has a header similar
to this one:
-
.nf
% SiSU master 4.0
@@ -1094,6 +1181,7 @@ to this one:
.SH AVAILABLE HEADERS
+
.BR
Header tags appear at the beginning of a document and provide meta information
on the document (such as the
@@ -1105,7 +1193,8 @@ by once space :subheadername: All
meta tags are available
.BR
-.B @indentifier:
+
+.B @identifier:
information or instructions
.BR
@@ -1119,7 +1208,6 @@ structure, and can be useful to know.
.BR
This is a sample header
-
.nf
% SiSU 2.0 [declared file-type identifier with markup version]
.fi
@@ -1210,6 +1298,7 @@ This is a sample header
.SH HEADING LEVELS
+
.BR
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
@@ -1217,19 +1306,23 @@ 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)
.BR
+
.B :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
.BR
+
.B :B~ [heading text]
Second level heading [this is a heading level divider]
.BR
+
.B :C~ [heading text]
Third level heading [this is a heading level divider]
.BR
+
.B 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,
@@ -1238,16 +1331,17 @@ segments, names are provided automatically if none are given (a number),
otherwise takes the form 1~my_filename_for_this_segment
.BR
+
.B 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.
.BR
+
.B 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
-
.nf
1~filename level 1 heading,
@@ -1256,7 +1350,9 @@ be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document
.SH FONT ATTRIBUTES
+
.BR
+
.B markup example:
.nf
normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}",
@@ -1285,7 +1381,9 @@ _{underscore}_
#{monospace}#
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1302,13 +1400,16 @@ monospace
normal text
.BR
+
.B emphasis
[note: can be configured to be represented by bold, italics or underscore]
.BR
+
.B bold text
.BR
+
.I italics
.BR
@@ -1331,10 +1432,11 @@ normal text
.BR
monospace
-
.SH INDENTATION AND BULLETS
+
.BR
+
.B markup example:
.nf
ordinary paragraph
@@ -1346,7 +1448,9 @@ _2 indent paragraph two steps
_9 indent paragraph nine steps
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1362,6 +1466,7 @@ ordinary paragraph
indent paragraph nine steps
.BR
+
.B markup example:
.nf
_* bullet text
@@ -1371,7 +1476,9 @@ _1* bullet text, first indent
_2* bullet text, two step indent
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1387,6 +1494,7 @@ _2* bullet text, two step indent
Numbered List (not to be confused with headings/titles, (document structure))
.BR
+
.B markup example:
.nf
# numbered list numbered list 1., 2., 3, etc.
@@ -1396,7 +1504,9 @@ _# numbered list numbered list indented a., b., c., d., etc.
.SH HANGING INDENTS
+
.BR
+
.B markup example:
.nf
_0_1 first line no indent,
@@ -1408,7 +1518,9 @@ rest of paragraph no indent
in each case level may be 0-9
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1436,15 +1548,16 @@ paragraph no indent first line indented, rest of paragraph no indent
in each case level may be 0-9
.BR
+
.B live-build
A collection of scripts used to build customized
.B Debian
-
Livesystems.
.I live-build
was formerly known as live-helper, and even earlier known as live-package.
.BR
+
.B live-build
A collection of scripts used to build customized
@@ -1452,40 +1565,46 @@ in each case level may be 0-9
Livesystems.
.I live-build
was formerly known as live-helper, and even earlier known as live-package.
-
.SH FOOTNOTES / ENDNOTES
+
.BR
Footnotes and endnotes are marked up at the location where they would be
indicated within a text. They are automatically numbered. The output type
determines whether footnotes or endnotes will be produced
.BR
-.B markup example:
+.B markup example:
.nf
~{ a footnote or endnote }~
.fi
+
.BR
+
.B resulting output:
.BR
[^5]
.BR
+
.B markup example:
.nf
normal text~{ self contained endnote marker & endnote in one }~ continues
.fi
+
.BR
+
.B resulting output:
.BR
normal text[^6] continues
.BR
+
.B markup example:
.nf
normal text ~{* unnumbered asterisk footnote/endnote, insert multiple asterisks if required }~ continues
@@ -1493,7 +1612,9 @@ normal text ~{* unnumbered asterisk footnote/endnote, insert multiple asterisks
normal text ~{** another unnumbered asterisk footnote/endnote }~ continues
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1503,15 +1624,17 @@ normal text [^*] continues
normal text [^**] continues
.BR
-.B markup example:
+.B markup example:
.nf
normal text ~[* editors notes, numbered asterisk footnote/endnote series ]~ continues
normal text ~[+ editors notes, numbered plus symbol footnote/endnote series ]~ continues
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1521,6 +1644,7 @@ normal text [^*3] continues
normal text [^+2] continues
.BR
+
.B Alternative endnote pair notation for footnotes/endnotes:
.nf
% note the endnote marker "~^"
@@ -1530,13 +1654,14 @@ normal text~^ continues
^~ endnote text following the paragraph in which the marker occurs
.fi
+
.BR
the standard and pair notation cannot be mixed in the same document
-
.SH LINKS
.SH NAKED URLS WITHIN TEXT, DEALING WITH URLS
+
.BR
urls found within text are marked up automatically. A url within text is
automatically hyperlinked to itself and by default decorated with angled
@@ -1545,12 +1670,15 @@ passed as normal text), or escaped by a preceding underscore (in which case the
decoration is omitted).
.BR
+
.B markup example:
.nf
normal text http://www.sisudoc.org/ continues
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1560,6 +1688,7 @@ normal text <http://www.sisudoc.org/> continues
An escaped url without decoration
.BR
+
.B markup example:
.nf
normal text _http://www.sisudoc.org/ continues
@@ -1567,7 +1696,9 @@ normal text _http://www.sisudoc.org/ continues
deb _http://www.jus.uio.no/sisu/archive unstable main non-free
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1581,6 +1712,7 @@ where a code block is used there is neither decoration nor hyperlinking, code
blocks are discussed later in this document
.BR
+
.B resulting output:
.nf
deb http://www.jus.uio.no/sisu/archive unstable main non-free
@@ -1589,16 +1721,20 @@ deb-src http://www.jus.uio.no/sisu/archive unstable main non-free
.SH LINKING TEXT
+
.BR
To link text or an image to a url the markup is as follows
.BR
+
.B markup example:
.nf
about { SiSU }http://url.org markup
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1609,12 +1745,15 @@ A shortcut notation is available so the url link may also be provided
automatically as a footnote
.BR
+
.B markup example:
.nf
about {~^ SiSU }http://url.org markup
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1624,12 +1763,15 @@ aboutSiSU <http://www.sisudoc.org/> [^7] markup
Internal document links to a tagged location, including an ocn
.BR
+
.B markup example:
.nf
about { text links }#link_text
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1639,22 +1781,26 @@ about ⌠text links⌡⌈link_text⌋
Shared document collection link
.BR
+
.B markup example:
.nf
about { SiSU book markup examples }:SiSU/examples.html
.fi
+
.BR
+
.B resulting output:
.BR
about ⌠
.B SiSU
book markup examples⌡⌈:SiSU/examples.html⌋
-
.SH LINKING IMAGES
+
.BR
+
.B markup example:
.nf
{ tux.png 64x80 }image
@@ -1668,7 +1814,9 @@ book markup examples⌡⌈:SiSU/examples.html⌋
{~^ ruby_logo.png "Ruby" }http://www.ruby-lang.org/en/
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1685,6 +1833,7 @@ and Ruby" <http://www.sisudoc.org/>
ruby_logo.png 70x90 "Ruby" <http://www.ruby-lang.org/en/> [^8]
.BR
+
.B linked url footnote shortcut
.nf
{~^ [text to link] }http://url.org
@@ -1698,6 +1847,7 @@ ruby_logo.png 70x90 "Ruby" <http://www.ruby-lang.org/en/> [^8]
text marker *~name
.fi
+
.BR
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
@@ -1705,7 +1855,9 @@ auto-heading numbering, without further intervention.
.SH LINK SHORTCUT FOR MULTIPLE VERSIONS OF A SISU DOCUMENT IN THE SAME DIRECTORY
TREE
+
.BR
+
.B markup example:
.nf
!_ /{"Viral Spiral"}/, David Bollier
@@ -1713,7 +1865,9 @@ TREE
{ "Viral Spiral", David Bollier [3sS]}viral_spiral.david_bollier.sst
.fi
+
.BR
+
.B
.I "Viral Spiral",
David Bollier
@@ -1737,10 +1891,12 @@ David Bollier
.SH TABLES
+
.BR
Tables may be prepared in two either of two forms
.BR
+
.B markup example:
.nf
table{ c3; 40; 30; 30;
@@ -1756,16 +1912,19 @@ column three of row two, and so on
}table
.fi
+
.BR
-.B resulting output:
+.B 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』
+
.BR
a second form may be easier to work with in cases where there is not much
information in each column
.BR
+
.B markup example:
[^10]
.nf
@@ -1782,20 +1941,25 @@ No. of articles, all languages | 25| 19,000| 138,000| 490,000| 862,0
* Contributed at least ten times; ** at least 5 times in last month; *** more than 100 times in last month.
.fi
+
.BR
+
.B resulting output:
.BR
+
.B 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』
+
.BR
* Contributed at least ten times; ** at least 5 times in last month; *** more
than 100 times in last month.
-
.SH POEM
+
.BR
+
.B basic markup:
.nf
poem{
@@ -1807,7 +1971,9 @@ poem{
Each verse in a poem is given an object number.
.fi
+
.BR
+
.B markup example:
.nf
poem{
@@ -1860,7 +2026,9 @@ poem{
}poem
.fi
+
.BR
+
.B resulting output:
`Fury said to a
mouse, That he
@@ -1907,9 +2075,12 @@ poem{
to
death."'
+
.SH GROUP
+
.BR
+
.B basic markup:
.nf
group{
@@ -1921,7 +2092,9 @@ group{
A group is treated as an object and given a single object number.
.fi
+
.BR
+
.B markup example:
.nf
group{
@@ -1974,7 +2147,9 @@ group{
}group
.fi
+
.BR
+
.B resulting output:
`Fury said to a
mouse, That he
@@ -2023,6 +2198,7 @@ group{
.SH CODE
+
.BR
Code tags code{ ... }code (used as with other group tags described above) are
used to escape regular sisu markup, and have been used extensively within this
@@ -2036,6 +2212,7 @@ 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]
.BR
+
.B use of code tags instead of poem compared, resulting output:
.nf
`Fury said to a
@@ -2084,12 +2261,12 @@ option to number each line of code may be considered at some later time]
death."'
.fi
+
.BR
From
.B SiSU
2.7.7 on you can number codeblocks by placing a hash after the opening code tag
code{# as demonstrated here:
-
.nf
1 | `Fury said to a
2 | mouse, That he
@@ -2141,11 +2318,11 @@ code{# as demonstrated here:
.SH LINE-BREAKS
+
.BR
To break a line within a "paragraph object", two backslashes \e\e
with a space before and a space or newline after them
may be used.
-
.nf
To break a line within a "paragraph object",
two backslashes \e\e with a space before
@@ -2153,6 +2330,7 @@ and a space or newline after them \e\e
may be used.
.fi
+
.BR
The html break br enclosed in angle brackets (though undocumented) is available
in versions prior to 3.0.13 and 2.9.7 (it remains available for the time being,
@@ -2162,16 +2340,17 @@ but is depreciated).
To draw a dividing line dividing paragraphs, see the section on page breaks.
.SH PAGE BREAKS
+
.BR
Page breaks are only relevant and honored in some output formats. A page break
or a new page may be inserted manually using the following markup on a line on
its own:
.BR
-page new =\e= or breaks the page, starts a new page.
+page new =\e= breaks the page, starts a new page.
.BR
-page break -\e- or breaks a column, starts a new column, if using columns,
+page break -\- breaks a column, starts a new column, if using columns,
else breaks the page, starts a new page.
.BR
@@ -2181,17 +2360,13 @@ page break line across page -..- draws a dividing line, dividing paragraphs
page break:
.nf
-\e\e-
-
-or
-<:pb>
.fi
+
.BR
page (break) new:
.nf
=\e\e=
-or
-<:pn>
.fi
@@ -2203,6 +2378,7 @@ page (break) line across page (dividing paragraphs):
.SH BOOK INDEX
+
.BR
To make an index append to paragraph the book index term relates to it, using
an equal sign and curly braces.
@@ -2215,27 +2391,28 @@ Sub-terms are separated from the main term by a colon.
={Main term:sub-term}
.fi
+
.BR
The index syntax starts on a new line, but there should not be an empty line
between paragraph and index markup.
.BR
The structure of the resulting index would be:
-
.nf
Main term, 1
sub-term, 1
.fi
+
.BR
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.
-
.nf
Paragraph containing main term, second term and sub-term.
={first term; second term: sub-term}
.fi
+
.BR
The structure of the resulting index would be:
.nf
@@ -2244,6 +2421,7 @@ The structure of the resulting index would be:
sub-term, 1
.fi
+
.BR
If multiple sub-terms appear under one paragraph, they are separated under the
main term heading from each other by a pipe symbol.
@@ -2257,6 +2435,7 @@ main term heading from each other by a pipe symbol.
A paragraph that continues discussion of the first sub-term
.fi
+
.BR
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:
@@ -2269,6 +2448,7 @@ additional paragraph. The logical structure of the resulting index would be:
.SH COMPOSITE DOCUMENTS MARKUP
+
.BR
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
@@ -2290,13 +2470,13 @@ to processing with the same prefix and the suffix
.BR
basic markup for importing a document into a master document
-
.nf
<< filename1.sst
<< filename2.ssi
.fi
+
.BR
The form described above should be relied on. Within the
.I Vim
@@ -2334,12 +2514,13 @@ the next debian will be
Configure substitution in _sisu/sisu_document_make
.SH SISU FILETYPES
+
.BR
+
.B SiSU
has
.I plaintext
and binary filetypes, and can process either type of document.
-
.SH .SST .SSM .SSI MARKED UP PLAIN TEXT
.TP
@@ -2356,28 +2537,30 @@ contents of which are like regular text except these are marked .ssi and are
not processed.
.BR
+
.B SiSU
processing can be done directly against a sisu documents; which may be located
locally or on a remote server for which a url is provided.
.BR
+
.B SiSU
source markup can be shared with the command:
.BR
sisu -s [filename]
-
.SH SISU TEXT - REGULAR FILES (.SST)
+
.BR
The most common form of document in
.B SiSU,
see the section on
.B SiSU
markup.
-
.SH SISU MASTER FILES (.SSM)
+
.BR
Composite documents which incorporate other
.B SiSU
@@ -2405,6 +2588,7 @@ Note: a secondary file of the composite document is built prior to processing
with the same prefix and the suffix ._sst [^11]
.SH SISU INSERT FILES (.SSI)
+
.BR
Inserts are documents prepared solely for the purpose of being incorporated
into one or more master documents. They resemble regular
@@ -2415,6 +2599,7 @@ processor. Making a file a .ssi file is a quick and convenient way of flagging
that it is not intended that the file should be processed on its own.
.SH SISUPOD, ZIPPED BINARY CONTAINER (SISUPOD.ZIP, .SSP)
+
.BR
A sisupod is a zipped
.B SiSU
@@ -2422,7 +2607,6 @@ text file or set of
.B SiSU
text files and any associated images that they contain (this will be extended
to include sound and multimedia-files)
-
.TP
.B SiSU
.I plaintext
@@ -2454,6 +2638,7 @@ Alternatively, make a pod of the contents of a whole directory:
sisu -S
.BR
+
.B SiSU
processing can be done directly against a sisupod; which may be located locally
or on a remote server for which a url is provided.
@@ -2463,14 +2648,15 @@ or on a remote server for which a url is provided.
.BR
<http://www.sisudoc.org/sisu/sisu_manual>
-
.SH CONFIGURATION
.SH CONFIGURATION FILES
.SH CONFIG.YML
+
.BR
+
.B SiSU
configration parameters are adjusted in the configuration file, which can be
used to override the defaults set. This includes such things as which directory
@@ -2483,6 +2669,7 @@ The
configuration file is a yaml file, which means indentation is significant.
.BR
+
.B SiSU
resource configuration is determined by looking at the following files if they
exist:
@@ -2520,9 +2707,9 @@ access details.
If
.B SiSU
is installed a sample sisurc.yml may be found in /etc/sisu/sisurc.yml
-
.SH SISU_DOCUMENT_MAKE
+
.BR
Most sisu document headers relate to metadata, the exception is the @make:
header which provides processing related information. The default contents of
@@ -2552,9 +2739,9 @@ The search order is as for resource configuration:
.BR
A sample sisu_document_make can be found in the _sisu/ directory under along
with the provided sisu markup samples.
-
.SH CSS - CASCADING STYLE SHEETS (FOR HTML, XHTML AND XML)
+
.BR
CSS files to modify the appearance of
.B SiSU
@@ -2572,18 +2759,22 @@ directory _sisu/css or equivalent will result in the default file of that name
being overwritten.
.BR
+
.I HTML:
html. css
.BR
+
.I XML
DOM: dom.css
.BR
+
.I XML
SAX: sax.css
.BR
+
.I XHTML:
xhtml. css
@@ -2593,16 +2784,17 @@ The default homepage may use homepage.css or html. css
.BR
Under consideration is to permit the placement of a CSS file with a different
name in directory _sisu/css directory or equivalent.[^12]
-
.SH ORGANISING CONTENT - DIRECTORY STRUCTURE AND MAPPING
+
.BR
+
.B SiSU
v3 has new options for the source directory tree, and output directory
structures of which there are 3 alternatives.
-
.SH DOCUMENT SOURCE DIRECTORY
+
.BR
The document source directory is the directory in which sisu processing
commands are given. It contains the sisu source files (.sst .ssm .ssi), or (for
@@ -2615,7 +2807,8 @@ supported by XeTeX polyglosia.
.SH GENERAL DIRECTORIES
.nf
-\./subject_name/
+ ./subject_name/
+
% files stored at this level e.g. sisu_manual.sst or
% for sisu v3 may be under language sub-directories
% e.g.
@@ -2637,6 +2830,7 @@ supported by XeTeX polyglosia.
.SH OUTPUT DIRECTORY ROOT
+
.BR
The output directory root can be set in the sisurc.yml file. Under the root,
subdirectories are made for each directory in which a document set resides. If
@@ -2662,13 +2856,12 @@ directory named after each institution, and these would be output to the same
output directory. Skins could be associated with each institution on a
directory basis and resulting documents will take on the appropriate different
appearance.
-
.SH ALTERNATIVE OUTPUT STRUCTURES
+
.BR
There are 3 possibile output structures described as being, by language, by
filetype or by filename, the selection is made in sisurc.yml
-
.nf
#% output_dir_structure_by: language; filetype; or filename
output_dir_structure_by: language #(language & filetype, preferred?)
@@ -2678,6 +2871,7 @@ output_dir_structure_by: language #(language & filetype, preferred?)
.SH BY LANGUAGE
+
.BR
The by language directory structure places output files
@@ -2690,7 +2884,6 @@ Its selection is configured in sisurc.yml
.BR
output_dir_structure_by: language
-
.nf
|-- en
|-- epub
@@ -2720,11 +2913,12 @@ output_dir_structure_by: language
`-- xsd
.fi
+
.BR
#by: language subject_dir/en/manifest/filename.html
-
.SH BY FILETYPE
+
.BR
The by filetype directory structure separates output files by filetype, all
html files in one directory pdfs in another and so on. Filenames are given a
@@ -2735,7 +2929,6 @@ Its selection is configured in sisurc.yml
.BR
output_dir_structure_by: filetype
-
.nf
|-- epub
|-- hashes
@@ -2764,11 +2957,12 @@ output_dir_structure_by: filetype
`-- xml
.fi
+
.BR
#by: filetype subject_dir/html/filename/manifest.en.html
-
.SH BY FILENAME
+
.BR
The by filename directory structure places most output of a particular file
(the different filetypes) in a common directory.
@@ -2778,7 +2972,6 @@ Its selection is configured in sisurc.yml
.BR
output_dir_structure_by: filename
-
.nf
|-- epub
|-- po4a
@@ -2800,9 +2993,9 @@ output_dir_structure_by: filename
`-- viral_spiral.david_bollier
.fi
+
.BR
#by: filename subject_dir/filename/manifest.en.html
-
.SH REMOTE DIRECTORIES
.nf
@@ -2859,7 +3052,9 @@ output_dir_structure_by: filename
.SH HOMEPAGES
+
.BR
+
.B SiSU
is about the ability to auto-generate documents. Home pages are regarded as
custom built items, and are not created by
@@ -2882,9 +3077,9 @@ option)
Document sets are contained in directories, usually organised by site or
subject. Each directory can/should have its own homepage. See the section on
directory structure and organisation of content.
-
.SH HOME PAGE AND OTHER CUSTOM BUILT PAGES IN A SUB-DIRECTORY
+
.BR
Custom built pages, including the home page index.html may be placed within the
configuration directory _sisu/home/ in any of the locations that is searched
@@ -2892,11 +3087,12 @@ for the configuration directory, namely ./_sisu ; ~/_sisu ; /etc/sisu From
there they are copied to the root of the output directory with the command:
.BR
-sisu -CC
+ sisu -CC
.SH MARKUP AND OUTPUT EXAMPLES
.SH MARKUP EXAMPLES
+
.BR
Current markup examples and document output samples are provided off
<http://sisudoc.org> or <http://www.jus.uio.no/sisu> and in the sisu
@@ -2906,9 +3102,9 @@ Current markup examples and document output samples are provided off
For some documents hardly any markup at all is required at all, other than a
header, and an indication that the levels to be taken into account by the
program in generating its output are.
-
.SH SISU MARKUP SAMPLES
+
.BR
A few additional sample books prepared as sisu markup samples, output formats
to be generated using
@@ -2925,116 +3121,138 @@ that the original substantive text remain unchanged, and sometimes that the
works be used only non-commercially.
.BR
+
.I Accelerando,
Charles Stross (2005)
accelerando.charles_stross.sst
.BR
+
.I Alice's Adventures in Wonderland,
Lewis Carroll (1865)
alices_adventures_in_wonderland.lewis_carroll.sst
.BR
+
.I CONTENT,
Cory Doctorow (2008)
content.cory_doctorow.sst
.BR
+
.I Democratizing Innovation,
Eric von Hippel (2005)
democratizing_innovation.eric_von_hippel.sst
.BR
+
.I Down and Out in the Magic Kingdom,
Cory Doctorow (2003)
down_and_out_in_the_magic_kingdom.cory_doctorow.sst
.BR
+
.I For the Win,
Cory Doctorow (2010)
for_the_win.cory_doctorow.sst
.BR
+
.I Free as in Freedom - Richard Stallman's Crusade for Free Software,
Sam Williams (2002)
free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst
.BR
+
.I Free as in Freedom 2.0 - Richard Stallman and the Free Software Revolution,
Sam Williams (2002), Richard M. Stallman (2010)
free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman.sst
.BR
+
.I Free Culture - How Big Media Uses Technology and the Law to Lock Down
Culture and Control Creativity,
Lawrence Lessig (2004)
free_culture.lawrence_lessig.sst
.BR
+
.I Free For All - How Linux and the Free Software Movement Undercut the High
Tech Titans,
Peter Wayner (2002)
free_for_all.peter_wayner.sst
.BR
+
.I GNU GENERAL PUBLIC LICENSE v2,
Free Software Foundation (1991)
gpl2.fsf.sst
.BR
+
.I GNU GENERAL PUBLIC LICENSE v3,
Free Software Foundation (2007)
gpl3.fsf.sst
.BR
+
.I Gulliver's Travels,
Jonathan Swift (1726 / 1735)
gullivers_travels.jonathan_swift.sst
.BR
+
.I Little Brother,
Cory Doctorow (2008)
little_brother.cory_doctorow.sst
.BR
+
.I The Cathederal and the Bazaar,
Eric Raymond (2000)
the_cathedral_and_the_bazaar.eric_s_raymond.sst
.BR
+
.I The Public Domain - Enclosing the Commons of the Mind,
James Boyle (2008)
the_public_domain.james_boyle.sst
.BR
+
.I The Wealth of Networks - How Social Production Transforms Markets and
Freedom,
Yochai Benkler (2006)
the_wealth_of_networks.yochai_benkler.sst
.BR
+
.I Through the Looking Glass,
Lewis Carroll (1871)
through_the_looking_glass.lewis_carroll.sst
.BR
+
.I Two Bits - The Cultural Significance of Free Software,
Christopher Kelty (2008)
two_bits.christopher_kelty.sst
.BR
+
.I UN Contracts for International Sale of Goods,
UN (1980)
un_contracts_international_sale_of_goods_convention_1980.sst
.BR
+
.I Viral Spiral,
David Bollier (2008)
viral_spiral.david_bollier.sst
-
.SH SISU SEARCH - INTRODUCTION
+
.BR
+
.B SiSU
output can easily and conveniently be indexed by a number of standalone
indexing tools, such as Lucene, Hyperestraier.
@@ -3044,24 +3262,25 @@ Because the document structure of sites created is clearly defined, and the
text
.I object citation system
is available hypothetically at least, for all forms of output, it is possible
-to search the sql database, and either read results from that database, or just
-as simply map the results to the html output, which has richer text markup.
+to search the sql database, and either read results from that database, or map
+the results to the html or other output, which has richer text markup.
.BR
-In addition to this
-.B SiSU
-has the ability to populate a relational sql type database with documents at an
-object level, with objects numbers that are shared across different output
-types, which make them searchable with that degree of granularity. Basically,
-your match criteria is met by these documents and at these locations within
-each document, which can be viewed within the database directly or in various
-output formats.
+.B SiSU
+can populate a relational sql type database with documents at an object level,
+including objects numbers that are shared across different output types. Making
+a document corpus searchable with that degree of granularity. Basically, your
+match criteria is met by these documents and at these locations within each
+document, which can be viewed within the database directly or in various output
+formats.
.SH SQL
.SH POPULATING SQL TYPE DATABASES
+
.BR
+
.B SiSU
feeds sisu markupd documents into sql type databases
.I PostgreSQL
@@ -3076,25 +3295,25 @@ should they so choose). All site texts/documents are (currently) streamed to
four tables:
.BR
-* one containing semantic (and other) headers, including, title, author,
+ * one containing semantic (and other) headers, including, title, author,
subject, (the
.I Dublin Core.
..);
.BR
-* another the substantive texts by individual "paragraph" (or object) - along
+ * another the substantive texts by individual "paragraph" (or object) - along
with structural information, each paragraph being identifiable by its
paragraph number (if it has one which almost all of them do), and the
substantive text of each paragraph quite naturally being searchable (both in
formatted and clean text versions for searching); and
.BR
-* a third containing endnotes cross-referenced back to the paragraph from
+ * a third containing endnotes cross-referenced back to the paragraph from
which they are referenced (both in formatted and clean text versions for
searching).
.BR
-* a fourth table with a one to one relation with the headers table contains
+ * a fourth table with a one to one relation with the headers table contains
full text versions of output, eg. pdf, html, xml, and
.I ascii.
@@ -3126,18 +3345,19 @@ database and have headings in which search content appears, or to search only
headings etc. (as the
.I Dublin Core
is incorporated it is easy to make use of that as well).
-
.SH POSTGRESQL
.SH NAME
+
.BR
+
.B SiSU
- Structured information, Serialized Units - a document publishing system,
postgresql dependency package
-
.SH DESCRIPTION
+
.BR
Information related to using postgresql with sisu (and related to the
sisu_postgresql dependency package, which is a dummy package to install
@@ -3146,16 +3366,17 @@ dependencies needed for
to populate a postgresql database, this being part of
.B SiSU
- man sisu) .
-
.SH SYNOPSIS
+
.BR
-sisu -D [instruction] [filename/wildcard if required]
+ sisu -D [instruction] [filename/wildcard if required]
.BR
-sisu -D --pg --[instruction] [filename/wildcard if required]
+ sisu -D --pg --[instruction] [filename/wildcard if required]
.SH COMMANDS
+
.BR
Mappings to two databases are provided by default, postgresql and sqlite, the
same commands are used within sisu to construct and populate databases however
@@ -3163,9 +3384,9 @@ same commands are used within sisu to construct and populate databases however
alternatively --sqlite or --pgsql may be used
.BR
+
.B -D or --pgsql
may be used interchangeably.
-
.SH CREATE AND DESTROY DATABASE
.TP
@@ -3173,50 +3394,44 @@ may be used interchangeably.
initial step, creates required relations (tables, indexes) in existing
(postgresql) database (a database should be created manually and given the same
name as working directory, as requested) (rb.dbi)
-
.TP
.B sisu -D --createdb
creates database where no database existed before
-
.TP
.B sisu -D --create
creates database tables where no database tables existed before
-
.TP
.B sisu -D --Dropall
destroys database (including all its content)! kills data and drops tables,
indexes and database associated with a given directory (and directories of the
same name).
-
.TP
.B sisu -D --recreate
destroys existing database and builds a new empty database structure
-
.SH IMPORT AND REMOVE DOCUMENTS
.TP
.B sisu -D --import -v [filename/wildcard]
populates database with the contents of the file. Imports documents(s)
specified to a postgresql database (at an object level).
-
.TP
.B sisu -D --update -v [filename/wildcard]
updates file contents in database
-
.TP
.B sisu -D --remove -v [filename/wildcard]
removes specified document from postgresql database.
-
.SH SQLITE
.SH NAME
+
.BR
+
.B SiSU
- Structured information, Serialized Units - a document publishing system.
-
.SH DESCRIPTION
+
.BR
Information related to using sqlite with sisu (and related to the sisu_sqlite
dependency package, which is a dummy package to install dependencies needed for
@@ -3224,17 +3439,17 @@ dependency package, which is a dummy package to install dependencies needed for
to populate an sqlite database, this being part of
.B SiSU
- man sisu) .
-
.SH SYNOPSIS
+
.BR
sisu -d [instruction] [filename/wildcard if required]
.BR
sisu -d --(sqlite|pg) --[instruction] [filename/wildcard if required]
-
.SH COMMANDS
+
.BR
Mappings to two databases are provided by default, postgresql and sqlite, the
same commands are used within sisu to construct and populate databases however
@@ -3242,9 +3457,9 @@ same commands are used within sisu to construct and populate databases however
alternatively --sqlite or --pgsql may be used
.BR
+
.B -d or --sqlite
may be used interchangeably.
-
.SH CREATE AND DESTROY DATABASE
.TP
@@ -3252,40 +3467,32 @@ may be used interchangeably.
initial step, creates required relations (tables, indexes) in existing (sqlite)
database (a database should be created manually and given the same name as
working directory, as requested) (rb.dbi)
-
.TP
.B sisu -d --createdb
creates database where no database existed before
-
.TP
.B sisu -d --create
creates database tables where no database tables existed before
-
.TP
.B sisu -d --dropall
destroys database (including all its content)! kills data and drops tables,
indexes and database associated with a given directory (and directories of the
same name).
-
.TP
.B sisu -d --recreate
destroys existing database and builds a new empty database structure
-
.SH IMPORT AND REMOVE DOCUMENTS
.TP
.B sisu -d --import -v [filename/wildcard]
populates database with the contents of the file. Imports documents(s)
specified to an sqlite database (at an object level).
-
.TP
.B sisu -d --update -v [filename/wildcard]
updates file contents in database
-
.TP
.B sisu -d --remove -v [filename/wildcard]
removes specified document from sqlite database.
-
.SH INTRODUCTION
.SH SETUP SEARCH FORM
@@ -3340,6 +3547,7 @@ A sample setup for nginx is provided that assumes data will be stored under
.SH SEARCH - DATABASE FRONTEND SAMPLE, UTILISING DATABASE AND SISU FEATURES,
INCLUDING OBJECT CITATION NUMBERING (BACKEND CURRENTLY POSTGRESQL)
+
.BR
Sample search frontend <http://search.sisudoc.org> [^15] A small database and
sample query front-end (search from) that makes use of the citation system, .I
@@ -3347,6 +3555,7 @@ object citation numbering
to demonstrates functionality.[^16]
.BR
+
.B SiSU
can provide information on which documents are matched and at what locations
within each document the matches are found. These results are relevant across
@@ -3369,7 +3578,6 @@ Note you may set results either for documents matched and object number
locations within each matched document meeting the search criteria; or display
the names of the documents matched along with the objects (paragraphs) that
meet the search criteria.[^17]
-
.TP
.B sisu -F --webserv-webrick
builds a cgi web search frontend for the database created
@@ -3386,11 +3594,13 @@ Postgresql
current db set: SiSU_sisu
port: 5432
dbi connect: DBI:Pg:database=SiSU_sisu;port=5432
+
sqlite
current db set: /home/ralph/sisu_www/sisu/sisu_sqlite.db
dbi connect DBI:SQLite:/home/ralph/sisu_www/sisu/sisu_sqlite.db
.fi
+
.BR
Note on databases built
@@ -3406,12 +3616,10 @@ used. [otherwise a manual mapping for the collection is necessary]
.B sisu -F
generates a sample search form, which must be copied to the web-server cgi
directory
-
.TP
.B sisu -F --webserv-webrick
generates a sample search form for use with the webrick server, which must be
copied to the web-server cgi directory
-
.TP
.B sisu -W
starts the webrick server which should be available wherever sisu is properly
@@ -3420,17 +3628,18 @@ installed
.BR
The generated search form must be copied manually to the webserver directory as
instructed
-
.SH SISU_WEBRICK
.SH NAME
+
.BR
+
.B SiSU
- Structured information, Serialized Units - a document publishing system
-
.SH SYNOPSIS
+
.BR
sisu_webrick [port]
@@ -3439,9 +3648,9 @@ or
.BR
sisu -W [port]
-
.SH DESCRIPTION
+
.BR
sisu_webrick is part of
.B SiSU
@@ -3457,18 +3666,18 @@ is in use and they exist).
The default port for sisu_webrick is set to 8081, this may be modified in the
yaml file: ~/.sisu/sisurc.yml a sample of which is provided as
/etc/sisu/sisurc.yml (or in the equivalent directory on your system).
-
.SH SUMMARY OF MAN PAGE
+
.BR
sisu_webrick, may be started on it's own with the command: sisu_webrick [port]
or using the sisu command with the -W flag: sisu -W [port]
.BR
where no port is given and settings are unchanged the default port is 8081
-
.SH DOCUMENT PROCESSING COMMAND FLAGS
+
.BR
sisu -W [port] starts
.B Ruby
@@ -3476,9 +3685,9 @@ Webrick web-server, serving
.B SiSU
output directories, on the port provided, or if no port is provided and the
defaults have not been changed in ~/.sisu/sisurc.yaml then on port 8081
-
.SH SUMMARY OF FEATURES
+
.BR
* sparse/minimal markup (clean utf-8 source texts). Documents are prepared in a
single
@@ -3650,6 +3859,7 @@ Syntax highlighting for
markup is available for a number of text editors.
.BR
+
.B SiSU
is less about document layout than about finding a way with little markup to be
able to construct an abstract representation of a document that makes it
diff --git a/rbuild b/rbuild
index 82ce763f..e5a776f1 100644
--- a/rbuild
+++ b/rbuild
@@ -37,8 +37,8 @@
#require 'mkmf'
#create_makefile("sisu")
#% manual settings, edit/update as required (note current default settings are obtained from sisu version yml file)
-SiSU_version_next_stable = '5.3.4'
-SiSU_version_next_unstable = '6.0.4'
+SiSU_version_next_stable = '5.3.5'
+SiSU_version_next_unstable = '6.0.5'
#% rake file
SiSU_version_generic_next_stable = '5.3.x'
SiSU_version_generic_next_unstable = '6.0.x'
@@ -377,7 +377,7 @@ end
end
def self.install(fn)
system(%{
- sudo gem install --no-rdoc --no-ri --verbose #{fn}.gem
+ sudo gem install --no-document --verbose #{fn}.gem
})
end
module Current
diff --git a/sisu.org b/sisu.org
new file mode 100644
index 00000000..0ddb2d2d
--- /dev/null
+++ b/sisu.org
@@ -0,0 +1,2114 @@
+#+PRIORITIES: A F E
+(emacs:evil mode gifts a "vim" of "alternative" powers! ;)
+
+* Markup :sisu:markup:
+
+** sisu
+
+#% structure - headings, levels
+ * headings (A-D, 1-3)
+ * inline
+ 'A~ ' NOTE title level
+ 'B~ ' NOTE optional
+ 'C~ ' NOTE optional
+ 'D~ ' NOTE optional
+ '1~ ' NOTE chapter level
+ '2~ ' NOTE optional
+ '3~ ' NOTE optional
+ '4~ ' NOTE optional :consider:
+ * node
+ * parent
+ * children
+
+#% font face NOTE open & close marks, inline within paragraph
+ * emphasize '*{ ... }*' NOTE configure whether bold italics or underscore, default bold
+ * bold '!{ ... }!'
+ * italics '/{ ... }/'
+ * underscore '_{ ... }_'
+ * superscript '^{ ... }^'
+ * subscript ',{ ... },'
+ * strike '-{ ... }-'
+ * add '+{ ... }+'
+ * monospace '#{ ... }#'
+#% para NOTE paragraph controls are at the start of a paragraph
+ * a para is a block of text separated from others by an empty line
+ * indent
+ * default, all '_1 ' up to '_9 '
+ * first line hang '_1_0 '
+ * first line indent further '_0_1 '
+ * bullet
+ [levels 1-6]
+ '_* '
+ '_1* '
+ '_2* '
+ * numbered list
+ [levels 1-3]
+ '# '
+
+#% blocks NOTE text blocks that are not to be treated in the way that ordinary paragraphs would be
+ * code
+ * [type of markup if any]
+ * poem
+ * group
+ * alt
+ * tables
+#% boxes
+ NOTE grouped text with code block type color & possibly default image, warning, tip, red, blue etc. decide [NB N/A not implemented]
+
+#% notes NOTE inline within paragraph at the location where the note reference is to occur
+ * footnotes '~{ ... }~'
+ * [bibliography] [NB N/A not implemented]
+
+#% links, linking
+ * links - external, web, url
+ * links - internal
+
+#% images [multimedia?]
+ * images
+ * [base64 inline] [N/A not implemented]
+
+#% object numbers
+ * ocn (object numbers)
+ automatically attributed to substantive objects, paragraphs, tables, blocks, verse (unless exclude marker provided)
+
+#% contents
+ * toc (table of contents)
+ autogenerated from structure/headings information
+ * index (book index)
+ built from hints in newline text following a paragraph and starting with ={} has identifying rules for main and subsidiary text
+
+#% breaks
+ * line break ' \\ ' inline
+ * page break, column break ' -\\- ' start of line, breaks a column, starts a new column, if using columns, else breaks the page, starts a new page.
+ * page break, page new ' =\\= ' start of line, breaks the page, starts a new page.
+ * horizontal '-..-' start of line, rule page (break) line across page (dividing paragraphs)
+
+#% book type index
+
+#% comment
+ * comment
+
+#% misc
+ * term & definition
+
+** proposals/additions
+
+*** TODO [#B] markup syntax code block, indicate syntax of code :feature:
+ ``` code:ruby
+
+*** TODO [#C] colored boxes round text :feature:ponder:
+ ``` box:red (select color of box)
+ ``` box:warn ``` box:tip (some default boxes? decide)
+ ``` box:red:"Warn" (select color and lead text of box, else instead
+ select color box & use regular single line bold markup ^!_ Warn$)
+
+*** TODO [#D] bibliography :feature:ponder:
+
+*** TODO speaker, as e.g. play (irc?) :feature:ponder:
+ ``` Ophelia:
+ ::Ophelia
+
+*** TODO [#F] time stamp (e.g. for irc, video text?):feature:ponder:
+ ``` 04:03
+ ``` 04:03 ... 07:12
+ ``` 04:03 + 03:09
+ ``` 12:04:03
+ ``` 12:04:03 ... 12:07:12
+ ``` 12:04:03 + 03:09
+ probably not worth the effort, as time stamp is an alternative
+ identifying number (to ocn, and ∴ sisu objects not ideal)
+
+*** TODO book index, alternative based on search within text
+
+** syntax hilighting
+
+*** vim
+data/sisu/conf/editor-syntax-etc/vim/
+data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
+
+*** emacs
+data/sisu/conf/editor-syntax-etc/emacs/
+data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
+
+* Document Abstraction :sisu:doc_abstr:
+
+** TODO [#D] XML middle layer?
+
+*** XMLda sisu
+ consder alternative sisu layer in XML
+
+*** TODO [#D] RelaxNG sisu
+
+* Output :sisu:output:
+
+** New outputs
+
+*** XML :xml:
+%% xml, docbook.txt fictionbook.txt xldl.txt lml.txt tei.txt emacs.txt
+<http://xml.silmaril.ie/>
+<http://www.xml.com/>
+<http://programming.oreilly.com/2012/08/shrinking-and-stretching-the-boundaries-of-markup.htmlhttp://programming.oreilly.com/2012/08/shrinking-and-stretching-the-boundaries-of-markup.html>
+
+<http://broadcast.oreilly.com/2012/03/xmls-dialect-problem.html>
+
+xml editor vim emacs
+<http://chimera.labs.oreilly.com/books/1234000000058/ch01.html#which_xml_editor_should_i_use>
+nXML plugin
+<http://blog.tommorris.org/post/2456183251/emacs-and-nxml-survival-guide>
+<http://johnbokma.com/mexit/2008/10/01/nxml-emacs-how-to.html>
+<http://www.emacswiki.org/cgi-bin/wiki/NxmlModeForXHTML>
+<http://www.xmlhack.com/read.php_item=2061>
+<http://infohost.nmt.edu/tcc/help/pubs/nxml/index.html>
+emacs.txt evil.txt
+
+<http://www.oreillynet.com/xml/blog/2005/10/smart_quotes_and_more_in_vim_a.html>
+<http://stackoverflow.com/questions/1430164/differences-between-emacs-and-vim>
+
+To validate a book.xml file using xmllint, run the following command:
+$ xmllint --postvalid --xinclude --noout book.xml
+
+The default location where xmllint will look for the catalog file is
+/etc/xml/catalog. Alternatively, you can set the environment variable
+XML_CATALOG_FILES to define another default location for catalog
+files. Once you’ve got the DTD and catalog set up locally, you can
+validate as before:
+$ xmllint --postvalid --xinclude --noout book.xml
+
+%% Docbook
+docbook.txt
+
+%% Fictionbook
+fictionbook.txt
+
+%% XLDL
+xldl.txt
+
+%% Literature Markup Language
+lml.txt
+
+%% Text Encoding Initiative
+tei.txt
+
+**** TODO [#B] docbook :feature:
+
+***** urls
+#% docbook book xml.txt
+<http://www.docbook.org>
+<http://www.sagehill.net/docbookxsl/index.html>
+<http://wiki.docbook.org/>
+<http://www.docbook.org/tdg5/en/html/>
+<http://www.docbook.org/tdg5/en/html/docbook.html>
+<http://www.docbook.org/tdg5/en/html/ch01.html>
+<http://www.docbook.org/tdg5/en/html/ch02.html>
+<http://www.sagehill.net/docbookxsl/index.html>
+
+<http://www.docbook.org/schemas/5x>
+<http://www.docbook.org/xml/5.0/>
+
+<http://infohost.nmt.edu/tcc/help/pubs/docbook5/web/index.html>
+
+<http://docbook.org/xml/5.0/rng/docbook.rng>
+<http://docbook.org/xml/5.0/rng/docbook.rnc>
+
+<http://www.cuddletech.com/blog/pivot/entry.php?id=509>
+
+***** rb file
+lib/sisu/v6/xml_docbook5.rb
+
+***** transformations :transform:markup_docbook:
+#% structure - headings, levels
+ [] sisu (A-C, 1-3)
+ [] collapsed (1-6) (decoration)
+ [] node (child, parent ...)
+
+#% font face
+ [] bold
+ [] italics
+ [] underscore
+ [] superscript
+ [] subscript
+ [] strike
+ [] add
+
+#% para
+ [] default
+ [] indent
+ [] default, all
+ [] first line hang or indent further
+ [] bullet
+
+#% blocks
+ <http://www.docbook.org/tdg5/en/html/literallayout.html>
+ [] code
+ [] [type of markup if any]
+ [] poem
+ [] group
+ [] alt
+ [] tables
+
+#% notes
+ [] footnotes
+ [] [bibliography?]
+
+#% links, linking
+ [] links - external, web, url
+ [] links - internal
+
+#% images [multimedia?]
+ [] images
+ [] [base 64]
+
+#% object numbers
+ [] ocn (object numbers)
+
+#% contents
+ [] toc (table of contents)
+ <http://www.docbook.org/tdg5/en/html/toc.html>
+ [] index (book index)
+
+#% misc
+
+**** TODO [#D] fictionbook :feature:
+
+***** urls
+#% fictionbook xml.txt
+<http://en.wikipedia.org/wiki/FictionBook>
+<http://fictionbook.org/index.php/Eng:FictionBook>
+<http://fictionbook.org/index.php/Eng:Articles>
+<http://fictionbook.org/index.php/Eng:Documentations>
+<http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1>
+<http://www.fictionbook.org/index.php/Eng:FictionBook>
+<http://fictionbook-lib.org/>
+<http://fictionbook-lib.org/browse.php>
+<http://wiki.mobileread.com/wiki/FB2>
+
+***** rb file
+lib/sisu/v6/xml_fictionbook2.rb
+
+***** transformations :transformations:markup_fictionbok: #%
+#% structure - headings, levels
+ [] sisu (A-C, 1-3)
+ [] collapsed (1-6) (decoration)
+ [] node (child, parent ...)
+
+#% font face
+ [] bold
+ [] italics
+ [] underscore
+ [] superscript
+ [] subscript
+ [] strike
+ [] add
+ [] monospace
+
+#% para
+ [] default
+ [] indent
+ [] default, all
+ [] first line hang or indent further
+ [] bullet
+
+#% blocks
+ [] code
+ [] [type of markup if any]
+ [] poem
+ [] group
+ [] alt
+ [] tables
+
+#% notes
+ [] footnotes
+ [] [bibliography?]
+
+#% links, linking
+ [] links - external, web, url
+ [] links - internal
+
+#% images [multimedia?]
+ [] images
+ [] [base 64]
+
+#% object numbers
+ [] ocn (object numbers)
+
+#% contents
+ [] toc (table of contents)
+ [] index (book index)
+
+#% breaks
+ [] line break
+ [] horizontal rule
+ [] column break
+ [] page break
+
+#% comment
+ [] comment
+
+#% misc
+
+<http://en.wikipedia.org/wiki/FictionBook>
+<http://fictionbook.org/index.php/Eng:FictionBook>
+<http://fictionbook.org/index.php/Eng:Articles>
+<http://fictionbook.org/index.php/Eng:Documentations>
+<http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1>
+<http://www.fictionbook.org/index.php/Eng:FictionBook>
+
+<http://www.fictionbook.org/index.php/%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_%D0%B2_FB2>
+
+<https://addons.mozilla.org/en-US/firefox/addon/fb2-reader/>
+
+**** TODO [#D] XLDL :feature:
+
+***** urls
+%% xml.txt xldl - novels, stories, poems
+Name: XLDL - an XML doctype for novels, stories, poems, playsName: XLDL - an XML doctype for novels, stories, poems, plays
+<http://www.ister.org/code/xldl/>
+<http://www.ister.org/code/xldl/doc/xldl.dtd.html>
+<line> <stanza>
+
+**** TODO [#E] Literature Markup Language - <LML /> :feature:
+
+***** urls
+%% Literature Markup Language - <LML />
+<http://hoffmann.bplaced.net/lml/>
+"It is assumed, that there are three quite different techniques to provide text,
+respectively three types of text, this is prose and poetry and code (for
+example source code of computer programs or from markup languages)."
+Suggestions and Ideas for Literature Markup Language - <LML /> 1.1
+<http://hoffmann.bplaced.net/lml/lml1.1.php>
+
+**** TODO [#E] TEI Lite (Text Encoding Initiative) :feature:
+
+***** urls
+%% TEI Lite (Text Encoding Initiative)
+<http://www.tei-c.org/Guidelines/Customization/Lite/>
+<http://www.tei-c.org/release/doc/tei-p5-exemplars/html/tei_lite.doc.html>
+
+*** Text :txt:
+
+sisu_markup.txt asciidoc.txt markdown.txt textile.txt rst.txt
+
+**** TODO [#D] asciidoc :feature:
+
+***** urls
+#% asciidoc
+<http://asciidoc.org/>
+<http://asciidoctor.org/>
+<http://www.methods.co.nz/asciidoc/>
+<http://en.wikipedia.org/wiki/AsciiDoc>
+
+cheatsheets
+<http://powerman.name/doc/asciidoc>
+<http://powerman.name/doc/asciidoc-index>
+
+<http://www.methods.co.nz/asciidoc/asciidoc.txt>
+<http://www.methods.co.nz/asciidoc/userguide.html>
+
+<http://www.methods.co.nz/asciidoc/asciidoc.css-embedded.html>
+<http://www.methods.co.nz/asciidoc/asciidoc.html>
+<http://www.methods.co.nz/asciidoc/chunked/index.html>
+
+***** rb file
+lib/sisu/v6/txt_asaciidoc.rb
+
+***** transformations :transformations:markup_asciidoc: #%
+#% structure - headings, levels
+ [] sisu (A-C, 1-3)
+ [] collapsed (1-4) (decoration)
+ [] inline
+ '== '
+ '=== '
+ '==== '
+ '===== '
+ ''
+ ''
+ [] underscore
+ '-'
+ '~'
+ '^'
+ '+'
+ '' ['.' proposed]
+ '' ['.' proposed]
+ [] node (child, parent ...)
+
+#% font face
+ [open & close marks]
+ [] bold
+ '*'
+ [] italics
+ '_'
+ [] underscore
+ ''
+ [] superscript
+ '^'
+ [] subscript
+ '~'
+ [] strike
+ '-'
+ [] add
+ [] monospace
+ '+'
+ '`' pass markup through unchanged, monospace code
+
+#% para
+ [] default
+ [] indent
+ [] default, all
+ [] first line hang or indent further
+ [] bullet
+ [levels 1-6]
+ '*'
+ '**'
+ '***'
+ '****'
+ '*****'
+ '*******'
+ [] numbered list
+ [levels 1-3]
+ '. ' number
+ '.. ' lower alpha
+ '... ' lower roman
+ '.... ' upper alpha
+ '..... ' upper roman
+
+#% blocks
+ [] code
+ [source,perl]
+ ----
+ code here
+ ----
+ [] [type of markup if any]
+ [] poem
+ [] group
+ ----
+ grouped text here, actually a listing block
+ ----
+ [] alt
+ [] tables
+
+#% notes
+ [] footnotes
+ [] [bibliography?]
+
+#% links, linking
+ [] links - external, web, url
+ http://google.com[Google Search]
+ [] links - internal
+
+#% images [multimedia?]
+ [] images
+ [] [base 64]
+
+#% object numbers
+ [] ocn (object numbers)
+
+#% contents
+ [] toc (table of contents)
+ [] index (book index)
+
+#% breaks
+ [] line break
+ "+\n"
+ forced +
+ line break
+ [] horizontal rule
+ [] column break
+ [] page break
+
+#% comment
+ [] comment
+ //
+
+#% misc
+
+ [] term & definition
+Term 1:: Definition 1
+Term 2:: Definition 2
+[horizontal]
+ Term 2.1;;
+ Definition 2.1
+ Term 2.2;;
+ Definition 2.2
+
+**** TODO [#E] markdown :feature:
+
+***** urls
+#% markdown
+<http://daringfireball.net/projects/markdown/>
+<http://daringfireball.net/projects/markdown/syntax>
+<http://daringfireball.net/projects/markdown/basics>
+<http://en.wikipedia.org/wiki/Markdown>
+<https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet>
+<http://whatismarkdown.com/>
+
+Markdown supports two styles of headers, Setext and atx
+Setext
+<http://docutils.sourceforge.net/mirror/setext.html>
+<http://en.wikipedia.org/wiki/Setext>
+atx
+<http://www.aaronsw.com/2002/atx/intro>
+
+<http://support.iawriter.com/help/kb/general-questions/markdown-syntax-reference-guide>
+<http://bywordapp.com/markdown/syntax.html>
+<http://stackoverflow.com/editing-help>
+
+<http://support.mashery.com/docs/customizing_your_portal/Markdown_Cheat_Sheet>
+<http://warpedvisions.org/projects/markdown-cheat-sheet.md>
+<http://nestacms.com/docs/creating-content/markdown-cheat-sheet>
+<https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet>
+
+<https://help.github.com/articles/github-flavored-markdown>
+<http://lifehacker.com/5943320/what-is-markdown-and-why-is-it-better-for-my-to+do-lists-and-notes>
+
+#% pandoc markdown
+<http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html>
+<http://johnmacfarlane.net/pandoc/README.html>
+<http://johnmacfarlane.net/pandoc/demo/example19/Pandoc_0027s-markdown.html>
+<http://johnmacfarlane.net/pandoc/>
+<http://johnmacfarlane.net/pandoc/epub.html>
+<http://johnmacfarlane.net/pandoc/faqs.html>
+
+#% multimarkdown
+<http://fletcher.github.io/peg-multimarkdown/>
+
+#% markdown pandoc v multimarkdown
+<https://github.com/jgm/pandoc/wiki/Pandoc-vs-Multimarkdown>
+
+#% rST v markdown
+<http://stackoverflow.com/questions/34276/markdown-versus-restructuredtext>
+
+***** rb file
+lib/sisu/v6/txt_markdown.rb
+
+***** transformations :transformations:markup_markdown: #%
+#% structure - headings, levels
+ [] sisu (A-C, 1-3)
+ [] collapsed (1-6) (decoration)
+ [inline 1-5]
+ '#'
+ '##'
+ '###'
+ '####'
+ '#####'
+ '######'
+ [underscore 1-5]
+ '='
+ '-'
+ #'~'
+ #'^'
+ #'+'
+ [] node (child, parent ...)
+
+#% font face
+ [open & close marks]
+ [] bold
+ '**'
+ [] italics
+ '*'
+ [] underscore
+ ''
+ [] superscript
+ ''
+ [] subscript
+ ''
+ [] strike
+ ''
+ [] add
+ [] monospace
+ '`'
+
+#% para
+ [] default
+ [] indent
+ [] default, all
+ [] first line hang or indent further
+ [] bullet
+ '*'
+ [] numbered list
+ '0.'
+
+#% blocks
+ [] code
+ ' ' #indent at least 4 spaces
+ [] [type of markup if any]
+ [] poem
+ [] group
+ [] alt
+ [] tables
+
+#% notes
+ [] footnotes
+ [] [bibliography?]
+
+#% links, linking
+ [] links - external, web, url
+ [] links - internal
+
+#% images [multimedia?]
+ [] images
+ [] [base 64]
+
+#% object numbers
+ [] ocn (object numbers)
+
+#% contents
+ [] toc (table of contents)
+ [] index (book index)
+
+#% breaks
+ [] line break
+ [] horizontal rule
+ (three or more asterisks hypens or underscores)
+ * * *
+ ***
+ *****
+ - - -
+ ___
+ [] column break
+ [] page break
+
+#% misc
+
+**** TODO [#F] rst :feature:
+
+***** urls
+#% rST
+<http://docutils.sourceforge.net/rst.html>
+<http://docutils.sourceforge.net/docs/user/rst/quickref.html>
+<http://docutils.sourceforge.net/docs/user/rst/quickstart.html>
+<http://en.wikipedia.org/wiki/ReStructuredText>
+<http://sphinx-doc.org/rest.html>
+
+<http://stackoverflow.com/questions/2746692/restructuredtext-tool-support>
+
+#% rST v markdown
+<http://stackoverflow.com/questions/34276/markdown-versus-restructuredtext>
+
+***** rb file
+lib/sisu/v6/txt_rst.rb
+
+***** transformations :transformations:markup_rst: #%
+#% structure - headings, levels
+ [] sisu (A-C, 1-3)
+ [] collapsed (1-6) (decoration)
+ [inline]
+ N/A
+ [underscore]
+ Titles are underlined (or over- and underlined) with a printing
+ nonalphanumeric 7-bit ASCII character. Recommended choices are
+ "= - ` : ' " ~ ^ _ * + # < >". The underline/overline must be at
+ least as long as the title text.
+ '='
+ '-'
+ '`'
+ ':'
+ "'"
+ '"'
+
+ [] node (child, parent ...)
+
+#% font face
+ [] bold
+ '**'
+ [] italics
+ '*'
+ [] underscore
+ '+'
+ [] superscript
+ '^'
+ [] subscript
+ [] strike
+ '-'
+ [] add
+ [] monospace
+ '``'
+
+#% para
+ [] default
+ [] indent
+ [] default, all
+ [] first line hang or indent further
+ [] bullet
+ "-", "*" or "+"
+ '-'
+ [] numbered list
+ '#.'
+
+#% blocks
+ [] code
+ [] [type of markup if any]
+ [] poem
+ [] group
+ [] alt
+ [] tables
+
+#% notes
+ [] footnotes
+ [binary]
+ Footnote references, like [5]_.
+ Note that footnotes may get
+ rearranged, e.g., to the bottom of
+ the "page".
+ .. [5] A numerical footnote.
+ --
+ Autonumbered footnotes are
+ possible, like using [#]_ and [#]_.
+ .. [#] This is the first one.
+ .. [#] This is the second one.
+
+ [] [bibliography?]
+
+#% links, linking
+ [] links - external, web, url
+ Typical result
+ External hyperlinks, like Python_.
+ .. _Python: <http://www.python.org/>
+ or
+ External hyperlinks, like `Python
+ <http://www.python.org/>`_.
+ [] links - internal
+ Internal crossreferences, like example_.
+ .. _example:
+
+ This is an example crossreference target.
+ --
+ Titles are targets, too
+ =======================
+ Implict references, like `Titles are
+ targets, too`_.
+
+#% images [multimedia?]
+ [] images
+ [] [base 64]
+
+#% object numbers
+ [] ocn (object numbers)
+
+#% contents
+ [] toc (table of contents)
+ [] index (book index)
+
+#% breaks
+ [] line break
+ [] horizontal rule
+ [] column break
+ [] page break
+
+#% misc
+
+**** TODO [#F] textile :feature:
+
+***** urls
+#% textile
+<http://en.wikipedia.org/wiki/Textile_(markup_language)>
+v2.4
+<http://www.txstyle.org/>
+v2
+<http://redcloth.org/hobix.com/textile/>
+
+***** rb file
+lib/sisu/v6/txt_textile.rb
+
+***** transformations :transformations:markup_textile: #%
+#% structure - headings, levels
+ [] sisu (A-C, 1-3)
+ [] collapsed (1-6) (decoration)
+ [inline]
+ h1(#id). An HTML first-level heading
+ h2. An HTML second-level heading
+ h3. An HTML third-level heading
+ h4. An HTML fourth-level heading
+ h5. An HTML fifth-level heading
+ h6. An HTML sixth-level heading
+ [underscore]
+ N/A
+
+ [] node (child, parent ...)
+
+#% font face
+ [] bold
+ *bold text*
+ [] italics
+ _italic text_
+ [] underscore
+ +underlined text+
+ [] superscript
+ ^TM^
+ [] subscript
+ ~subscript~
+ [] strike
+ -strikethrough text-
+ [] add
+
+#% para
+ [] default
+ [] indent
+ [] default, all
+ [] first line hang or indent further
+ [] bullet
+ * bulleted list
+ ** 2-level
+
+#% blocks
+ [] code
+ [] [type of markup if any]
+ [] poem
+ [] group
+ [] alt
+ [] tables
+ |Table | with two columns |
+ |and two | rows |
+
+#% notes
+ [] footnotes
+ Text with a link to some reference[1]
+ fn1. Footnote explanation
+ [] [bibliography?]
+
+#% links, linking
+ [] links - external, web, url
+ "(classname)link text(title tooltip)":link_address
+ "Link to Wikipedia":http://www.wikipedia.org
+ [] links - internal
+
+#% images [multimedia?]
+ [] images
+ !http://commons.wikimedia.org/wiki/Special:Filepath/Wikipedia-logo-en.png!
+ !imageurl(alt text)!
+ [] [base 64]
+
+#% object numbers
+ [] ocn (object numbers)
+
+#% contents
+ [] toc (table of contents)
+ [] index (book index)
+
+#% breaks
+ [] line break
+ [] horizontal rule
+ [] column break
+ [] page break
+
+#% misc
+ [] *_bold italic text_*
+ [] *-bold strikethrough text-*
+ [] *_-bold italic strikethrough text-_*
+ [] *+bold underlined text+*
+ [] *_+italic underlined text+_
+ [] *_+bold italic underlined text+_
+ [] *_-+bold italic strikethrough underlined text+-_*
+ %{font-size:18pt}font size%
+ %{color:red}text in red%
+ # Chapter 1
+
+#% notes
+heading inline only
+footnotes uses marker and endnote, check
+
+** Improvements
+
+*** HTML
+
+*** XML
+
+*** --strict mode (html w3c compliant ocn etc.)
+
+* Code (ruby) :sisu:code:
+
+** code enhancements :enhance:
+
+*** TODO [#D] directory & path, use ruby directory tools
+
+*** TODO [#D] document url shortcut, allow addition of alternative dir stub
+(e.g. viral Spiral)
+
+** code refactoring :refactor:
+
+*** ruby 2.1
+
+**** DONE make sure sisu works
+
+*** TODO [#C] refactor ruby :ongoing:
+
+** bugs :bug:
+
+*** misc, unclassified
+
+**** DONE (6.0.5) [#B] sisu should give warning when part of minimal essential structure is missing :processing:fix:
+
+work through testing for as many of these as possible
+
+minimal content/structure requirement:
+[metadata]
+ @title:
+ @creator:
+[levels]
+ A~ (level A [title])
+ 1~ (at least one level 1 [segment/(chapter)])
+test what happens in the absence of each
+
+structure rules (document heirarchy, heading levels):
+
+ there are two sets of heading levels ABCD (title & parts if any) and 123 (segment & subsegments if any)
+ sisu has the fllowing levels:
+
+ A~ [title] . required (== 1) followed by B~ or 1~
+ B~ [part] * followed by C~ or 1~
+ C~ [subpart] * followed by D~ or 1~
+ D~ [subsubpart] * followed by 1~
+ 1~ [segment (chapter)] + required (>= 1) followed by text or 2~
+ text * followed by more text or 1~, 2~ or relevant part *(B~ if none other used; if C~ is last used: C~ or B~; if D~ is used: D~, C~ or B~)
+ 2~ [subsegment] * followed by text or 3~
+ text * followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+ 3~ [subsubsegment] * followed by text
+ text * followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+ * level A~ is the tile and is mandatory
+ * there can only be one level A~
+ * heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially (alphabetically),
+ * heading levels A~ B~ C~ D~ are followed by other heading levels rather than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+ * there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond to the Chapter level)
+ * additional heading levels 1~ 2~ 3~ are optional and there may be several of each
+ * heading levels 1~ 2~ 3~ are followed by text (which may be followed by the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+
+there must be a title, level A
+creator field absent: crash, no warnings given
+title missing:
+level A missing:
+no level 1:
+
+***** NOTES/COMMENTS
+
+revisit,
+ * check logic, add to if possible
+ * tidy, inelegant solution
+
+**** DONE (5.3.5::6.0.5) [#B] victory chals discussed parsing problem caused by use of open-close markers around url
+
+**** TODO UNDERWAY (6.0.5) [#B] exclude heading where possible marker '-#' not distinguished from unnumbered heading '~#'
+
+ * ~# is general & means no ocn (for any object to which it is applied)
+ * -# is relevant only for 1~ dummy headings & instructs that they should be
+ removed from output where possible
+ * where -# is used on any other objects, it is treated the same way as ~#
+
+**** TODO [#B] collapsed level work out logic where dummy lev1 heading
+
+ * exclude heading where lev1 '-#'
+ * means subsequent headings & text belong to parent heading (of lev1 -#) 1 level up
+ * ponder
+
+
+**** TODO [#B] sisu 5.3.4-1 marked for autoremoval from debian testing on 2014-06-10, for depending on ruby-dbi
+
+sisu 5.3.4-1 is marked for autoremoval from testing on 2014-06-10
+It (build-)depends on packages with these RC bugs:
+746081: ruby-dbi: FTBFS: ERROR: Test "ruby2.1" failed: wrong number of arguments (3 for 1..2)
+
+***** NOTES/COMMENTS
+
+debian/control, remove dependency on ruby-dbi, contained in sisu-postgresql and sisu-sqlite
+
+Result, status of next sisu release
+ * sisu-sqlite works fine, depends on ruby-sqlite3
+ * sisu-postgresql is broken till fixed to work with ruby-pg (or ruby-dbi fixed)
+ * sample cgi search froms (cgi database query forms) are broken till
+
+**** TODO [#B] sisu-postgresql, fix
+
+ * fix to work with ruby-pg (or if issue resolved reinstate ruby-dbi)
+
+**** TODO [#B] sisu sample cgi database query forms, fix
+
+ * fix for sqlite3 & pg (as they currently depend on ruby-dbi)
+
+*** DBT Outstanding bugs -- Normal bugs; Unclassified (2 bugs) :debian:dbt:normal:
+ <https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=sisu>
+
+**** DONE (5.3.5::6.0.5) [#B] #744360 [n|u] sisu: includes do not work properly :processing:fix:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744360>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: includes do not work properly
+Date: Sun, 13 Apr 2014 12:38:59 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+using this in foo.ssm:
+
+ :A~ foo
+
+ :B~ bar
+
+ << bar/baz.ssi
+
+and this in baz.ssi:
+
+ 1~ foo bar baz
+
+then everything works.
+
+using the more natural foo.ssm:
+
+ :A~ foo
+
+ << bar/baz.ssi
+
+and baz.ssi:
+
+ :B~ bar
+
+ 1~ foo bar baz
+
+makes ':B~ bar' being ignored in the output (pdf) entirely.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+it appears both give faulty text, though in different ways
+
+fixed
+
+**** DONE (5.3.5::6.0.5) [#B] #744378 [n|u] sisu: --no-manifest not working anymore :check:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744378>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: --no-manifest not working anymore
+Date: Sun, 13 Apr 2014 16:12:13 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when running sisu-pdf with --no-manifest, the output (pdf) still
+contains the sisu manifest at the end of the document.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+fix, metadata page in pdf should not contain link to manifest where --no-manifest flag is used
+
+**** TODO ONGOING #746740 [n|u] manpages incomplete
+
+Date: Sat, 03 May 2014 08:45:49 +0200
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+Subject: manpages incomplete
+Package: sisu
+Version: 5.3.4-1
+Tag: upstream
+Severity: normal
+
+sisu supports options like --verbose or --no-manifest, but they are not
+listed in the sisu manpage.
+
+***** NOTES/COMMENTS
+
+documentation for sisu does lag a bit and has omissions, but I think you will
+find that --verbose is documented, and --no-* options are listed under --exc-*
+to which there is a pointer --no-manifest works but is actually
+--no-links-to-manifest and is listed under aliases --exc-links-to-manifest and
+--exc-manifest-links
+
+Will leave bug open as a reminder that updating is necessary and as there are
+no doubt numerous issues for which this could be (re)opened
+
+**** TODO #746742 [n|u] please implement --no-metadata similar to --no-manifest
+
+Date: Sun, 13 Apr 2014 16:12:13 +0200
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+Subject: --no-manifest not working anymore
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when running sisu-pdf with --no-manifest, the output (pdf) still
+contains the sisu manifest at the end of the document.
+
+Regards,
+Daniel
+
+*** DBT Outstanding bugs -- Wishlist items; Unclassified (24 bugs) :debian:dbt:wishlist:
+
+**** TODO [#D] #744352 [w|u] sisu output: aligning margin numbers when using 'code'
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744352>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: 744352@bugs.debian.org
+Subject: Re: sisu output: too many margin numbers
+Date: Sun, 13 Apr 2014 17:27:10 +0200
+retitle 744352 sisu output: aligning margin numbers when using 'code'
+severity 744352 wishlist
+thanks
+
+sorry, i've looked wrongly at the output, the problem is simply an
+aligning issue. it looks like that:
+
+ foo bar. [1]
+ [2]
+ baz
+
+ foo bar baz. [3]
+
+rather than:
+
+ foo bar. [1]
+
+ baz [2]
+
+ foo bar baz. [3]
+
+Regards,
+Daniel
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: too many margin numbers
+Date: Sun, 13 Apr 2014 12:28:14 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when using the following code:
+
+foo bar.
+
+code{
+
+ baz
+
+}code
+
+foo bar baz.
+
+the result in the output (pdf) is:
+
+foo bar. [1]
+ [2]
+baz [3]
+ [4]
+foo bar baz. [5]
+
+the '[n]' designates the margin number at the right site of the page.
+
+the problem is that sisu gives margin numbers to *empty* lines, which is
+wrong. margin numbers should only be assigned to actual content.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+issue with pdf, look again, consider,
+this is cosmetic, a fix should be found, but is not striaghtforward
+alignment issue for code blocks not so easy to fix in some outputs, have so far ignored
+this is an issue with other types of text block as well
+
+reason why this has not been addressed especially with code blocks:
+the easiest fix would be to place the numbering at the end of the first line of a code block
+however, as it is now, if you copy & paste a block of code you should get the code
+if numbering is moved down to the first line, a copy of the code block will inlcude the
+extraneous (to the code) object number
+which is to my mind a bigger problem
+
+That said re pdf, LaTeX XeTeX are flexible, it may be possible to drop the ocn
+at the start of a code block lower on its line so that it is closer to the code
+that follows
+
+**** DONE (6.0.5) [#D] #744353 [w|u] sisu output: please do not use typewriter for urls :output:consider:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744353>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: please do not use typewriter for urls
+Date: Sun, 13 Apr 2014 12:28:27 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when using urls in sisu like this:
+
+ http://example.org
+
+sisu then creates in the output (pdf) links like this:
+
+ <http://example.org>
+
+where as '<http://example.org>' is written in typewriter font
+(monospace). please don't do that automagically since it's desturbing
+the visual flow when reading. If the users wants that, he should be able
+to configure it.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+monospace for url outputs in pdf
+
+this is default behavior of the latex url package (it uses tt typewriter font)
+it is possible to modify the font to sf class or tm/rm class, & I now default to sf
+this means when the sisu default sf is used there will be no difference in typeface,
+but when times roman or other is used, urls will be in sf instead of that font,
+(instead of the latex default typewriter)
+
+it provides a visual cue even when output is monochrome, without color
+(and is in some way related to #744391 sisu output: no color on a4 portrait)
+however, it is worth noting here that urls are printed in a smaller font so as
+to fit more on a line of text
+
+**** TODO [#C] #744354 [w|u] sisu output: please do not add '<' and '>' around urls
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: please do not add '<' and '>' around links
+Date: Sun, 13 Apr 2014 12:28:37 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when using urls in sisu like this:
+
+ http://example.org
+
+sisu then creates in the output (pdf) links like this:
+
+ <http://example.org>
+
+Please do not automagically add a '<' and '>' around urls. If the user
+wants them, he would add one.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+is sisu default behavior,
+would need to make configurable
+url_visual_delimiters: '<>'
+look into later
+
+**** DONE (5.3.5::6.0.5) [#C] #744355 [w|u] vim syntaxhighlighting: includes and directories :syntaxhi:fix:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744355>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: vim syntaxhighlighting: includes and directories
+Date: Sun, 13 Apr 2014 12:28:46 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+When using includes like this:
+
+ << foo.ssi
+
+then vim correctly displays the line in blue.
+
+However, when using includes in a subdirectory like this:
+
+ << bar/foo.ssi
+
+then vim doesn't use any colors at all.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+done
+
+**** DONE PASS [#C] #744356 [w|u] vim syntaxhighlighting: urls and tags :discuss:close:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744356>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: vim syntaxhighlighting: urls and tags
+Date: Sun, 13 Apr 2014 12:28:56 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+When using an URL at the end of a sentence like this:
+
+ Foo bar baz http://example.org.
+
+then vim properly highlights the url in blue.
+
+this also works properly when a second sentence after it, like:
+
+ Foo bar baz http://example.org. Foo bar baz http://example.org.
+
+it works with html tag as well, like this:
+
+ Foo bar baz http://example.org. <br />Foo bar baz http://example.org.
+
+but it doesn't work if there's no space:
+
+ Foo bar baz http://example.org.<br />Foo bar baz http://example.org.
+
+then, the string 'http://www.gnu.org/licenses/.<' is shown red.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+this is meant to be flagged as an error,
+(red indicates error, and is an error will not parse correctly)
+even if the sisu parser works in the flagged case there is no promise that it will in future
+
+use of angle bracket markers (html markers) in sisu markup is depreciated.
+for line-break use \\ instead,
+for which there should be surrounding spaces or a preceding space and end of line;
+if <br /> is still used there should be a space after the url - which sisu should remove in output.
+
+would like to close without further action
+re-open if necessary
+
+**** DONE (6.0.5) [#C] #744357 [w|u] sisu output: please create mailto links automatically
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744357>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: please create mailto links automatically
+Date: Sun, 13 Apr 2014 12:29:12 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+When using urls like:
+
+ http://example.org
+
+in sisu, the output (pdf) contains a hyperlink to http://example.org
+automatically, which is nice.
+
+please also create mailto links when using email adresses like:
+
+ john.doe@example.org
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+for pdf fix/implement mailto links
+done but requires further testing & possibly refinement
+
+**** DONE (6.0.5) [#C] #744358 [w|u] sisu output: please do not add ';' after \:copyright: :output:fix:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744358>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: please do not add ';' after :copyright:
+Date: Sun, 13 Apr 2014 12:29:20 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+When using:
+
+ :copyright: foo bar baz.
+
+sisu generates the following in the output format (pdf):
+
+ foo bar baz.;
+
+Please do not automagically add a semicolon (;). If the user wants a
+semicolon, he would add one.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+fix copyright, remove trailing semi-colon
+
+**** DONE (5.3.5::6.0.5) [#B] #744379 [w|u] sisu: missing includes doesn't give an error :processing:fix:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744379>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: missing includes doesn't give an error
+Date: Sun, 13 Apr 2014 16:14:46 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+When using includes (*.ssi) in a sisu master document (*.ssm) like:
+
+ << foo.ssi
+
+and that to be included file foo.ssi (for whatever reason) doesn't
+exist, sisu doesn't error out but include '<< foo.ssi' literally as a
+string in the output (pdf).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+5.3.4-1 writes the following to the screen:
+"ERROR test.ssm.sst requires invalid or non-existent file: foo.ssi"
+
+and unsatisfactorily within the text output it writes no error message but the include instruction:
+
+"<< foo.ssi"
+
+5.3.5, the current "fix"/ solution, is to add an error message within the text rather than to stop processing with an error.
+In addition to (i) slightly modified (you could say corrected) to the following:
+
+"ERROR test.ssm requires an invalid or non-existent file: foo.ssi"
+
+the following is written within the text output:
+
+"<< foo.ssi [ERROR test.ssm requires an invalid or non-existent file: foo.ssi]"
+
+**** DONE (5.3.5::6.0.5) [#D] #744381 [w|u] sisu syntax: inconsistency \:copyright: and \:license: :metadata:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744381https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744381>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: inconsistency between :copyright: and :license:
+Date: Sun, 13 Apr 2014 16:26:55 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when using ':copyright: foo', then the output contains 'foo'.
+
+when using ':license: foo', then the output contains 'License: foo'.
+
+this is inconsistent. either both should have a 'prefix' in the output,
+or neither should have one (i'd prefere the latter).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+Under rights there are a series of sub-categories starting with copyright, that
+need to be distinguished. Until now started distinguishing after after
+Copyright. For consistency have add the prefix 'Copyright' to the output.
+Preference to omit noted, but this solution is consistent with options
+provided. Bug closed, re-open if necessary.
+
+**** DONE (6.0.5) [#B] #744383 [w|u] sisu syntax: :B and :C result in the same formatting :output:fix: (partial solution)
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744383>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu syntax: :B and :C result in the same formatting
+Date: Sun, 13 Apr 2014 16:32:07 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+when using :A, :B, and :C in sisu, in the output (pdf) both :B and :C
+are formatted identically.
+
+imho :C should be 'smaller' than :B.
+
+or, as an analogy with html: i would expect that :A equals <h1>, :B
+equals <h2>, and :C equals <h3>. currently, (in that analogy), :B and :C
+both equal <h2>.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+this is in part an artifact of LaTeX not having as many document heading levels
+and trying to take advantage of the behavior of existing levels rather than
+customizing further
+
+look for a solution, possibly overriding the default font sizes for each
+
+The current settings were chosen because, there are not enough levels and I
+find too many different font sizes disconcerting, especially running sisu over
+a wide variety of document types
+
+the following levels are available in LaTeX
+
+\part
+\chapter
+\section
+\subsection
+\subsubsection
+
+the levels in sisu are
+
+A [title]
+B [part]
+C [subpart]
+D [subsubpart]
+1 [segment (chapter)]
+2 [subsegment]
+3 [subsubsegment]
+
+sisu current mapping:
+
+level A [title]
+level B C D \part (it is up to the user to make part levels visually distinguishable e.g. Book Part Section)
+[skipped \chapter]
+[skipped \section]
+level 1 \subsection
+level 2 \subsubsection
+level 3 \subsubsection
+
+the reason for skipping section was the default configuration and resulting
+fact that it made for a table of contents that takes more space
+
+sisu new mapping:
+
+level A [title]
+level B C D \part (it is up to the user to make part levels visually distinguishable e.g. Book Part Section)
+[skipped \chapter]
+level 1 \section
+level 2 \subsection
+level 3 \subsubsection
+
+levels B C & D are the same size,
+ it is up to the user to make part levels visually distinguishable
+ e.g. Book Part Section
+levels 1 2 & 3 are now distinguished
+
+(Closes #744386) sisu syntax: 1~ and 2~ result in the same formatting
+(under consideration & yet to be done #744383) sisu syntax: :B and :C result in the same formatting
+(touches )
+override part font size settings for different levels (B C D)
+
+**** TODO [#C] #744384 [w|u] sisu syntax: relies on empty lines
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744384>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu syntax: relies on empty lines
+Date: Sun, 13 Apr 2014 16:34:46 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+the following snipped:
+
+ :C~ foo bar
+ << foo-bar.ssi
+
+means that the include is ignored entirely. apparently sisu relies on
+having an empty line in between like this:
+
+ :C~ foo bar
+
+ << foo-bar.ssi
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+consider,
+
+(i) as a general observation, sisu relies on emptly lines to identify separate objects
+ such as headings, paragraphs (and indeed insertions)
+
+(ii) a heading need not be on a single line (so << would be part of that heading)
+this means sisu should be able to work identifying headings in wrapped texts
+(e.g. where the text is wrapped at 80 and the heading is longer than that)
+
+there has been no rule to the contrary (i.e. that headings should be on a single text line)
+
+consider, should there be such a rule?
+
+**** DONE (6.0.5) [#B] #744386 [w|u] sisu syntax: 1~ and 2~ result in the same formatting :output:pdf:fix: (see #744383)
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744386>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu syntax: 1~ and 2~ result in the same formatting
+Date: Sun, 13 Apr 2014 16:43:51 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+similar as with #744383, the same also applies for 1~ and 2~ - they
+should be different in the output format (pdf here).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+1~ 2~ 3~ are now differentiated
+
+deal with under #744383
+
+**** TODO [#B] #744390 [w|u] sisu: empty sections are ignored
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744390>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu: empty sections are ignored
+Date: Sun, 13 Apr 2014 17:09:32 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+
+if you have the following sisu syntax:
+
+ :B~ foo
+
+ 1~ foo1
+
+ foo1.
+
+ 1~ foo2
+
+ foo2.
+
+ :B~ bar
+
+ 1~ bar1
+
+ 1~ bar2
+
+ :B~ baz
+
+ 1~ baz1
+
+ 1~ baz2
+
+then anything (including and) after ':B~ bar' is ignored entirely.
+
+***** NOTES/COMMENTS
+
+further info, have not yet been able to duplicate,
+seemed to work (checked pdf & html (scroll & seg))
+was not able to reproduce
+will look again
+
+**** DONE (6.0.5) [#C] #744391 [w|u] sisu output: no color on a4 portrait :output:pdf:contemplate:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744391>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu output: please use (blue) color for links
+Date: Sun, 13 Apr 2014 17:23:37 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+it would be nice if links (urls and emails) would be colored blue to
+mark them visually as links. this behaviour is somewhat the lowest
+common denominator in browsers (if you use html without any css that is).
+
+Regards,
+Daniel
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: 744391@bugs.debian.org
+Subject: Re: sisu output: please use (blue) color for links
+Date: Sun, 13 Apr 2014 17:35:33 +0200
+retitle 744391 sisu output: no color on a4 portrait
+thanks
+
+now this is strange.. turns out that (yes, i have colors enabled in
+sisurc) the portrait a4 pdf has no colors at all, while the landscape a4
+pdf does indeed have colors (red for toc, blue for links).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+background:
+portrait was provided for print/paper copy and is great for that in monochrome
+(without grays for colored links),
+landscape better matching a screen for visual presentations, color affecting the landscape only
+
+solution:
+make configurable by cli & rc file
+make both (portrait & landscape colors) configurable
+either as hyperlinks monochrome or colored
+overriding existing default which remains as described
+
+document
+cli:
+--pdf-hyperlinks-no-color or --pdf-hyperlinks-mono
+--pdf-hyperlinks-color
+
+rc:
+
+default:
+ pdf_hyperlinks: *[possible values]
+ pdf_hyperlinks_portrait: *[possible values]
+ pdf_hyperlinks_landscape: *[possible values]
+
+ * 'color' or ('mono' or 'no-color' or 'color-off')
+
+**** TODO [#D] #744395 [w|u] sisu output: half-page title page in landscape output
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744395>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu output: half-page title page in landscape output
+Date: Sun, 13 Apr 2014 17:38:03 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+in a4 landscape output, there's always two pages on one page, which is
+nice; except for the title page which spans over the whole page.
+
+it would be nice if the first page would be consistent to the same
+scheme like the rest of the document - spanning only over the half of
+the page.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+think about, should be fairly easily done, but am reluctant
+
+note the page numbering in landscape, the two landscape columns are given a single page number
+it is really a landscape two column per-page text, provided primarily for screen viewing or
+other convenience if found
+
+(many viewers provide two page per screen presentations, which would result in an effect similar to the one requested
+the issue I guess might arise in that they are not printable on a single page? ...
+but then the current settings are arguably justified)
+
+**** TODO [#C] #744396 [w|u] sisu output: "european" toc indenting
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744396>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu output: "european" toc indenting
+Date: Sun, 13 Apr 2014 17:40:53 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+by default, latex uses the following indenting in the TOC:
+
+ 1. foo
+ 1.1 bar1
+ 1.1.1 baz
+ 1.2 bar2
+
+there's a latex option that i don't remember off-hand to have the
+indenting like it's common in europe:
+
+ 1. foo
+ 1.1 bar1
+ 1.1.1 baz
+ 1.2 bar2
+
+it would be nice if sisu could let the used decide which indenting style
+to use for TOCs.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+will look at: should be possible; requires a configuration option
+
+**** DONE (6.0.5) [#B] #744399 [w|u] sisu syntax: :A smaller formatted than :B :output:fix: (see #744383) (partial solution)
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744399>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu syntax: :A smaller formatted than :B
+Date: Sun, 13 Apr 2014 17:49:26 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+in a document like this:
+
+:A~ foo
+
+:B~ bar
+
+the :A~ 'title' is formated 'smaller' (not bold, smaller font size) than
+the :B~ 'title' on the first page of the actual document (means, first
+page after TOC).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+for pdf
+
+now is same size see #744383
+
+\part (level A B C D)
+\chapter (skipped)
+\section (level 1)
+\subsection (level 2)
+\subsubsection (level 3)
+
+**** DONE (6.0.5) [#C] #744402 [w|u] sisu: support sha512 :implement:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744402>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu: support sha512
+Date: Sun, 13 Apr 2014 18:06:56 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+sisu uses sha256 when using sha as digest, please support sha512.
+
+it would be even nicer if you could specify the actual digest like
+'sha512', 'sha256', etc. rather than just 'sha'.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+implemented
+document command line option --sha512
+
+**** DONE (6.0.5) [#C] #744405 [w|u] sisu: set default font size :configuration:pdf:implement:
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744405>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu: set default font size
+Date: Sun, 13 Apr 2014 18:29:46 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+in sisurc, one can set the default fonts. it would be nice to be also
+able to set the default font size.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+for pdf make configurable
+
+yaml.rc
+
+default:
+ texpdf_fontsize: 12
+
+command-line
+
+--pdf-fontsize-12
+--pdf-fontsize-8
+etc.
+
+**** TODO [#C] #744407 [w|u] sisu: possibility to influence content/formating of the title page
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744407>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu: possibility to influence content/formating of the title page
+Date: Sun, 13 Apr 2014 18:32:14 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+by default, the title page (in the pdf output) shows @title and @creator.
+
+it would be nice if there would be a possibility to influence the
+formatting (e.g. to have the title written in bold), and to have
+additional possibilities to influence the content on the title page
+(like the date or version, an url, or other text strings).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+consider, work on possibly, later
+
+**** TODO [#C] #744408 [w|u] sisu: support more than one level of includes/nested includes
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744408>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu: support more than one level of includes/nested includes
+Date: Sun, 13 Apr 2014 18:39:23 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+currently, it's possible to use only one ssm file which itself includes
+one or more ssi files.
+
+it would be nice if the ssm could include an 'intermediate' ssi, which
+then includes further ssi files. this is very handy for larger documents.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+consider,
+I have to date deliberately tried to keep it easy to follow documents & not have too much depth ...
+The idea of recursive includes is un-attractive (messy for a document)
+
+.ssm currently can contain .sst or .ssi
+.sst files can be processed independently,
+.ssi files are only insertions & cannot
+
+allowing .ssi to also include other .ssi or .sst could lead to recursive .ssi
+allowing .ssm to also include other .ssm .ssi or .sst could lead to recursive .ssm
+
+stopping after an additional level of includes seems arbitrary, and possibly prone to error if you are dealing with many documents
+
+a possibility would be to have another file extension to flag the role of the file,
+.ssmi (not very attractive) might do it
+(providing visual cue signalling its role as both a master file and an insertion/included file that cannot be processed independently)
+a .ssmi file must be included in a .ssm file
+a .ssmi file (like .ssm) permits the inclusion only of .sst or .ssi files
+
+will work on eventually
+
+**** TODO [#C] #744409 [w|u] sisu output: urls in code blocks are not linkified
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744409>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu output: urls in code blocks are not linkified
+Date: Sun, 13 Apr 2014 18:41:09 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+it would be nice if urls written withiin code{...}code blocks would also
+be automatically transformed into a link within the output (html).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+consider, so far code blocks are pretty much untouched ... not tampered with,
+this could be done though
+
+**** DONE (6.0.5) [#C] #744541 [w|u] sisu: urls in @creator broken
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744541>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu: urls in @creator broken
+Date: Sun, 13 Apr 2014 18:45:35 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+first, if you have an url within @creator, like:
+
+ @creator: foo bar http://example.org
+
+the generation fails (pdf output).
+
+as a workaround, i put the url into parenthesis, like:
+
+ @creator: foo bar (http://example.org)
+
+but then, it would be nice if that url would be automatically
+transformed into a link in the output format (pdf).
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+pdf, fix
+
+**** TODO [#C] #744685 [w|u] sisu output: copy&past-able wrapped code blocks
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744685>
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu output: copy&past-able wrapped code blocks
+Date: Sun, 13 Apr 2014 19:04:01 +0200
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+if a line within a 'code{...}code' block is longer and needs to be
+wrapped, sisu indicates the wrapping with an 'arrow' (←) symbol, which
+is nice.
+
+it would be even nicer if the arrow would not 'selectable', so that when
+you mark the line spanning over two lines with your mouse, the arrow is
+not selected and thus not copy&pasted.
+
+i don't know how to do this, but it's possible within pdfs, as can be
+seen in lots of pdfs in the internet.
+
+Regards,
+Daniel
+
+***** NOTES/COMMENTS
+
+find out how and implement, further feedback on appropriate xetex tools welcome
+
+[Note: if can be applied to random characters, use may be of interest for
+object numbers as well!]
+
+**** TODO [#C] #744734 [w|u] sisu output: replace all occurences of (C) rather than the first only
+
+From: Daniel Baumann <daniel.baumann@progress-technologies.net>
+To: Debian Bug Tracking System <submit@bugs.debian.org>
+Subject: sisu output: replace all occurences of (C) rather than the first only
+Date: Mon, 14 Apr 2014 06:11:13 +0200
+
+Package: sisu
+Version: 5.3.4-1
+Severity: wishlist
+Tags: upstream
+
+if you have a '(C)' in :copyright:, it is automatically replaced with a
+copyright symbol, which is nice, however, it sisu does that with the
+first occurence only.
+
+so if you use:
+
+ :copyright: (C) john doe<br />(C) jane doe
+
+then the second occurence is not replaced and that combination looks
+very ugly. i suggest you replace all occurences of '(C)' to the
+copyright symbol automatically.
+
+Regards,
+Daniel