aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-17 13:36:33 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-17 13:36:33 -0400
commite681ba98d51ddc437c465defe44fb797f5154979 (patch)
treef97ba70e8d09e5aa170d1a0c11d6668191489a6b
parentdebian/changelog 2.7.6-1 (diff)
parentversion date (diff)
Merge branch 'upstream' into debian/sid
-rw-r--r--CHANGELOG_v245
-rw-r--r--data/doc/sisu/v2/CHANGELOG45
-rw-r--r--data/doc/sisu/v2/markup-samples/sisu_manual/sisu_manual.ssm2
-rw-r--r--data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst135
-rw-r--r--data/sisu/v2/v/version.yml6
-rw-r--r--lib/sisu/v2/cgi_sql_common.rb11
-rw-r--r--lib/sisu/v2/constants.rb1
-rw-r--r--lib/sisu/v2/dal_doc_objects.rb117
-rw-r--r--lib/sisu/v2/dal_doc_str.rb3
-rw-r--r--lib/sisu/v2/dal_endnotes.rb4
-rw-r--r--lib/sisu/v2/dal_syntax.rb23
-rw-r--r--lib/sisu/v2/defaults.rb15
-rw-r--r--lib/sisu/v2/texpdf.rb20
-rw-r--r--lib/sisu/v2/texpdf_format.rb33
-rw-r--r--man/man1/sisu.12
15 files changed, 359 insertions, 103 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2
index 1ab0c980..9b7a7c11 100644
--- a/CHANGELOG_v2
+++ b/CHANGELOG_v2
@@ -12,11 +12,41 @@ Reverse Chronological:
%% Development branch UNSTABLE
-2.7.6.orig.tar.gz (2010-10-11:41/1)
+%% 2.7.7.orig.tar.gz (2010-10-17:41/7)
+http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz
+ sisu_2.7.7.orig.tar.gz
+ sisu_2.7.7-1.dsc
+ sisu_2.7.7-1.diff.gz
+
+ [debian freeze, fix]
+
+ * numbered codeblocks, fix, where codeblock opens with code{#
+ (requested fix needed by debian-live:live-manual, Ben Armstrong, Mark
+ Schneider & Daniel Baumann)
+ * dal changes as required, flag markup request and number
+ * constants, provide vertical line symbol, use to separate numbered
+ codeblock from code
+ * texpdf substitute \vline for numbered codeblock line separator
+
+ * texpdf, first space following a bullet should be fixed width, fix
+ (used \enspace (0.5em))
+ (requested fix and suggested latex solution, Ben Armstrong)
+
+ * texpdf, bullet text, hanging indent, fix works for regular text (not
+ grouped text)
+ (requested fix, Ben Armstrong)
+
+ * texpdf, codeblocks do not permit empty lines, fix
+
+ * documentation related minor updates and fixes
+
+%% 2.7.6.orig.tar.gz (2010-10-11:41/1)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.6.orig.tar.gz
- sisu_2.7.6.orig.tar.gz
- sisu_2.7.6-1.dsc
- sisu_2.7.6-1.diff.gz
+ 7cd4c46fa3bcadd9bad5f009836e3f76ba33581f346c20baa750df849e132a4c 2746314 sisu_2.7.6.orig.tar.gz
+ f9805002b99b9c7784a2e20a8f7ded02516f6a268e361785d7a15b0bd92c1360 1196 sisu_2.7.6-1.dsc
+ fbe107cce73dd5a4c302f014aff43a101e1f7e69333786b4667d39c0af044772 288465 sisu_2.7.6-1.diff.gz
+
+ [debian freeze, fix]
* texpdf, codeblocks, code-line continuation backslash dropped, fix
(requested fix, Ben Armstrong)
@@ -113,7 +143,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.1.orig.tar.gz
* texpdf
* provide line-break-points for long directory names
- (requested fix)
+ (requested fix, Ben Armstrong)
* a5, increase headheight (11pt from 8pt)
* shared_metadata
@@ -354,6 +384,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.0.orig.tar.gz
sisu-pdf, sisu-html, sisu-odf, sisu-epub, sisu-txt, sisu-pg, sisu-sqlite
* monospace
+ (requested feature Daniel Baumann)
* dal_syntax, constants, introduce #{ monospace }# tag
* monospace font for codeblocks and #{ monospace }# tag
* vim syntax, recognize #{ monospace }# tag
@@ -527,8 +558,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.3.2.orig.tar.gz
* markup for *{emphasis}* configurable as being displayed as bold, italics or
underscore, the default is that emphasis output is in bold so there is no
change unless configured, either in sisurc.yml (default: emphasis: 'bold'),
- or the markup source document header @make: :emphasis: 'bold' [requested]
- (requested modification, Cory Doctorow)
+ or the markup source document header @make: :emphasis: 'bold'
+ (requested modification, Cory Doctorow (prefers asterisk to be italics))
* plaintext, wrap width configurable between 20 to 200 characters, the
default width being 78, configuration either in sisurc.yml (default: text_wrap:
diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG
index 156afe9f..ca439395 100644
--- a/data/doc/sisu/v2/CHANGELOG
+++ b/data/doc/sisu/v2/CHANGELOG
@@ -12,11 +12,41 @@ Reverse Chronological:
%% Development branch UNSTABLE
-2.7.6.orig.tar.gz (2010-10-11:41/1)
+%% 2.7.7.orig.tar.gz (2010-10-17:41/7)
+http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz
+ sisu_2.7.7.orig.tar.gz
+ sisu_2.7.7-1.dsc
+ sisu_2.7.7-1.diff.gz
+
+ [debian freeze, fix]
+
+ * numbered codeblocks, fix, where codeblock opens with code{#
+ (requested fix needed by debian-live:live-manual, Ben Armstrong, Mark
+ Schneider & Daniel Baumann)
+ * dal changes as required, flag markup request and number
+ * constants, provide vertical line symbol, use to separate numbered
+ codeblock from code
+ * texpdf substitute \vline for numbered codeblock line separator
+
+ * texpdf, first space following a bullet should be fixed width, fix
+ (used \enspace (0.5em))
+ (requested fix and suggested latex solution, Ben Armstrong)
+
+ * texpdf, bullet text, hanging indent, fix works for regular text (not
+ grouped text)
+ (requested fix, Ben Armstrong)
+
+ * texpdf, codeblocks do not permit empty lines, fix
+
+ * documentation related minor updates and fixes
+
+%% 2.7.6.orig.tar.gz (2010-10-11:41/1)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.6.orig.tar.gz
- sisu_2.7.6.orig.tar.gz
- sisu_2.7.6-1.dsc
- sisu_2.7.6-1.diff.gz
+ 7cd4c46fa3bcadd9bad5f009836e3f76ba33581f346c20baa750df849e132a4c 2746314 sisu_2.7.6.orig.tar.gz
+ f9805002b99b9c7784a2e20a8f7ded02516f6a268e361785d7a15b0bd92c1360 1196 sisu_2.7.6-1.dsc
+ fbe107cce73dd5a4c302f014aff43a101e1f7e69333786b4667d39c0af044772 288465 sisu_2.7.6-1.diff.gz
+
+ [debian freeze, fix]
* texpdf, codeblocks, code-line continuation backslash dropped, fix
(requested fix, Ben Armstrong)
@@ -113,7 +143,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.1.orig.tar.gz
* texpdf
* provide line-break-points for long directory names
- (requested fix)
+ (requested fix, Ben Armstrong)
* a5, increase headheight (11pt from 8pt)
* shared_metadata
@@ -354,6 +384,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.0.orig.tar.gz
sisu-pdf, sisu-html, sisu-odf, sisu-epub, sisu-txt, sisu-pg, sisu-sqlite
* monospace
+ (requested feature Daniel Baumann)
* dal_syntax, constants, introduce #{ monospace }# tag
* monospace font for codeblocks and #{ monospace }# tag
* vim syntax, recognize #{ monospace }# tag
@@ -527,8 +558,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.3.2.orig.tar.gz
* markup for *{emphasis}* configurable as being displayed as bold, italics or
underscore, the default is that emphasis output is in bold so there is no
change unless configured, either in sisurc.yml (default: emphasis: 'bold'),
- or the markup source document header @make: :emphasis: 'bold' [requested]
- (requested modification, Cory Doctorow)
+ or the markup source document header @make: :emphasis: 'bold'
+ (requested modification, Cory Doctorow (prefers asterisk to be italics))
* plaintext, wrap width configurable between 20 to 200 characters, the
default width being 78, configuration either in sisurc.yml (default: text_wrap:
diff --git a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_manual.ssm b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_manual.ssm
index 48c6d681..878dc5cb 100644
--- a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_manual.ssm
+++ b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_manual.ssm
@@ -43,7 +43,7 @@
:B~ What is SiSU?
-<< sisu_introduction.ssi
+<< sisu_introduction.sst
<< sisu_how.ssi
diff --git a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst
index b718e997..09f3cc63 100644
--- a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst
+++ b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst
@@ -22,7 +22,7 @@
:issued: 2002-08-28
:available: 2002-08-28
:published: 2008-05-22
- :modified: 2010-07-07
+ :modified: 2010-10-14
@make:
:num_top: 1
@@ -173,7 +173,7 @@ code{
2~ Available Headers
-Header tags appear at the beginning of a document and provide meta information on the document (such as the Dublin Core), or information as to how the document as a whole is to be processed. All header instructions take either the form @headername: or 0~headername. All Dublin Core meta tags are available
+Header tags appear at the beginning of a document and provide meta information on the document (such as the Dublin Core), or information as to how the document as a whole is to be processed. All header instructions take the form @headername: or on the next line and indented by once space :subheadername: All Dublin Core meta tags are available
!_ @indentifier:
information or instructions
@@ -1004,7 +1004,7 @@ group{
3~ Code
-Code tags are used to escape regular sisu markup, and have been used extensively within this document to provide examples of SiSU markup. You cannot however use code tags to escape code tags. They are however used in the same way as group or poem tags.
+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 document to provide examples of SiSU markup. You cannot however use code tags to escape code tags. They are however used in the same way as group or poem tags.
A code-block is treated as an object and given a single object number. [an option to number each line of code may be considered at some later time]
@@ -1059,6 +1059,57 @@ code{
}code
+From SiSU 2.7.7 on you can number codeblocks by placing a hash after the opening code tag #{ code{# }# as demonstrated here:
+
+code{#
+
+ `Fury said to a
+ mouse, That he
+ met in the
+ house,
+ "Let us
+ both go to
+ law: I will
+ prosecute
+ YOU. --Come,
+ I'll take no
+ denial; We
+ must have a
+ trial: For
+ really this
+ morning I've
+ nothing
+ to do."
+ Said the
+ mouse to the
+ cur, "Such
+ a trial,
+ dear Sir,
+ With
+ no jury
+ or judge,
+ would be
+ wasting
+ our
+ breath."
+ "I'll be
+ judge, I'll
+ be jury,"
+ Said
+ cunning
+ old Fury:
+ "I'll
+ try the
+ whole
+ cause,
+ and
+ condemn
+ you
+ to
+ death."'
+
+}code
+
2~ Book index
To make an index append to paragraph the book index term relates to it, using an equal sign and curly braces.
@@ -1155,12 +1206,88 @@ code{
1~ Notes related to Files-types and Markup Syntax
-0.38 is substantially current, depreciated 0.16 supported, though file names were changed at 0.37
+2.0 introduced new headers and is therefore incompatible with 1.0 though otherwise the same with the addition of a couple of tags (i.e. a superset)
+
+0.38 is substantially current for version 1.0
+
+depreciated 0.16 supported, though file names were changed at 0.37
_* sisu --query=[sisu version [0.38] or 'history]
provides a short history of changes to SiSU markup
+!_ SiSU 2.0
+(2010-03-06:09/6)
+same as 1.0, apart from the changing of headers and the addition of a monospace tag related headers now grouped, e.g.
+
+code{
+
+@title:
+ :subtitle:
+
+@creator:
+ :author:
+ :translator:
+ :illustrator:
+
+@rights:
+ :text:
+ :illustrations:
+
+}code
+
+see document markup samples, and sisu --help headers
+
+the monospace tag takes the form of a hash '#'
+
+code{
+
+#{ this enclosed text would be monospaced }#
+
+}code
+
+!_ 1.0
+(2009-12-19:50/6)
+same as 0.69
+
+!_ 0.69
+(2008-09-16:37/2)
+(same as 1.0) and as previous (0.57) with the addition of book index tags
+
+code{
+
+/^={.+?}$/
+
+}code
+
+e.g. appended to a paragraph, on a new-line (without a blank line in between) logical structure produced assuming this is the first text "object"
+
+code{
+
+ ={GNU/Linux community distribution:Debian+2|Fedora|Gentoo;Free Software Foundation+5}
+
+}code
+
+code{
+
+Free Software Foundation, 1-6
+GNU/Linux community distribution, 1
+ Debian, 1-3
+ Fedora, 1
+ Gentoo,
+
+}code
+
+!_ 0.66
+(2008-02-24:07/7)
+same as previous, adds semantic tags, [experimental and not-used]
+
+code{
+
+/[:;]{.+?}[:;][a-z+]/
+
+}code
+
!_ 0.57
(2007w34/4)
SiSU 0.57 is the same as 0.42 with the introduction of some a shortcut to use the headers @title and @creator in the first heading [expanded using the contents of the headers @title: and @author:]
diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml
index 86505db2..48cd5d90 100644
--- a/data/sisu/v2/v/version.yml
+++ b/data/sisu/v2/v/version.yml
@@ -1,5 +1,5 @@
---
-:version: 2.7.6
-:date_stamp: 2010w41/1
-:date: "2010-10-11"
+:version: 2.7.7
+:date_stamp: 2010w41/7
+:date: "2010-10-17"
:project: SiSU
diff --git a/lib/sisu/v2/cgi_sql_common.rb b/lib/sisu/v2/cgi_sql_common.rb
index 56f6cb37..1b043f00 100644
--- a/lib/sisu/v2/cgi_sql_common.rb
+++ b/lib/sisu/v2/cgi_sql_common.rb
@@ -569,9 +569,18 @@ module SiSU_CGI_sql
</a>
<br />
<i>w3 since October 3 1993</i>
- <a href="mailto://ralph@amissah.com" >
+ <a href="mailto:ralph@amissah.com" >
ralph@amissah.com
</a>
+ <br />
+ mailing list subscription
+ <a href="http://lists.sisudoc.org/listinfo/sisu" >
+ http://lists.sisudoc.org/listinfo/sisu
+ </a>
+ <br />
+ <a href="mailto:sisu@lists.sisudoc.org" >
+ sisu@lists.sisudoc.org
+ </a>
</font></p>
</td><td valign="top" width="45%">
<p class="tiny_left"><font color="#666666" size="2">
diff --git a/lib/sisu/v2/constants.rb b/lib/sisu/v2/constants.rb
index 7fe795da..9367e9cd 100644
--- a/lib/sisu/v2/constants.rb
+++ b/lib/sisu/v2/constants.rb
@@ -103,6 +103,7 @@ Mx[:rel_o]='⌈'; Mx[:rel_c]='⌋'
Mx[:tag_o]='⌊'; Mx[:tag_c]='⌉'
Mx[:sm_set_o]='《'; Mx[:sm_set_c]='》'
Mx[:sm_subset_o]='《 '; Mx[:sm_subset_c]='》'
+Mx[:vline]='┆' # ¦ |
#Mx[:sm_set_o]='∈ '; Mx[:sm_set_c]='∋ '
#Mx[:sm_subset_o]='∈ '; Mx[:sm_subset_c]='∋ '
Rx[:mx_fa_clean]= /#{Mx[:fa_o]}.+?#{Mx[:fa_c]}|#{Mx[:pa_o]}.+?#{Mx[:pa_c]}|#{Mx[:mk_o]}.+?#{Mx[:mk_c]}/
diff --git a/lib/sisu/v2/dal_doc_objects.rb b/lib/sisu/v2/dal_doc_objects.rb
index 0102ff94..bc0020b2 100644
--- a/lib/sisu/v2/dal_doc_objects.rb
+++ b/lib/sisu/v2/dal_doc_objects.rb
@@ -221,84 +221,85 @@ module SiSU_document_structure
end
end
class Object_group
- attr_accessor :obj,:is,:of,:tags,:idx,:ocn,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp
+ attr_accessor :obj,:is,:of,:tags,:idx,:ocn,:odv,:osp,:parent,:note_,:number_,:ocn_,:digest,:tmp
def initialize
@of='group'
- @is=@obj=@idx=@ocn=@odv=@osp=@parent=@note_=@ocn_=@digest=@tmp=nil
+ @is=@obj=@idx=@ocn=@odv=@osp=@parent=@note_=@number_=@ocn_=@digest=@tmp=nil
@tags=[]
end
def code(h,o=nil)
- of= @of #String, classification - group #alt 'code'
- is= 'code' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group #alt 'code'
+ is= 'code' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ number_= h[:number_] || ((defined? o.number_) ? o.number_ : false) #Bool, numbered or not?
+ note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_= if h[:ocn_].nil?; ((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
- 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_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either 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_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,number_,note_,ocn_,digest,tmp
self
end
def group(h,o=nil)
- of= @of #String, classification - group
- is= 'group' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group
+ is= 'group' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_= if h[:ocn_].nil?; ((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
- 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
+ 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_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
self
end
def alt(h,o=nil) #see group
- of= @of #String, classification - group
- is= 'alt' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group
+ is= 'alt' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_= if h[:ocn_].nil?; ((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
- 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
+ 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_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
self
end
def verse(h,o=nil) #part of poem decide how you deal with this
- of= @of #String, classification - group
- is= 'verse' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group
+ is= 'verse' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ ocn_= if h[:ocn_].nil?; ((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
- 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
+ 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_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
@h=nil
self
diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb
index 2d4ee192..6eb2ee69 100644
--- a/lib/sisu/v2/dal_doc_str.rb
+++ b/lib/sisu/v2/dal_doc_str.rb
@@ -198,6 +198,7 @@ module SiSU_document_structure_extract
if t_o =~/^code\{/
@@flag['code']=true
@@counter=1
+ @codeblock_numbered=(t_o =~/^code\{#/) ? true : false
h={:obj=>'code block start'} #introduce a counter
t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h)
elsif t_o =~/^poem\{/
@@ -314,7 +315,7 @@ module SiSU_document_structure_extract
if t_o =~/^\}code/
@@flag['code']=false
obj,tags=extract_tags(@tuned_code.join("\n"))
- h={:obj=>obj,:tags=>tags}
+ h={:obj=>obj,:tags=>tags,:number_=>@codeblock_numbered}
t_o=SiSU_document_structure::Object_group.new.code(h)
@tuned_code=[]
tuned_file << t_o
diff --git a/lib/sisu/v2/dal_endnotes.rb b/lib/sisu/v2/dal_endnotes.rb
index 0ea1d148..95176516 100644
--- a/lib/sisu/v2/dal_endnotes.rb
+++ b/lib/sisu/v2/dal_endnotes.rb
@@ -74,7 +74,9 @@ module SiSU_endnotes
if @md.mod.inspect =~/--no-dagger|--no-annotate/
dob.obj.gsub!(/#{Mx[:en_b_o]}[+]\s.+?#{Mx[:en_b_c]}/,'')
end
- if defined? dob.obj and defined? dob.is and dob.is !~/^code/
+ if defined? dob.obj \
+ and defined? dob.is \
+ and dob.is !~/^code/
case dob.obj # auto-numbered endnotes <!e!> <!e_!> -->
when /#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}[*+]\s+.+?#{Mx[:en_b_c]}/
dob.obj.gsub!(/\s*(#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/,' \1') # required 2003w31
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index 2f78fbe6..fbc62158 100644
--- a/lib/sisu/v2/dal_syntax.rb
+++ b/lib/sisu/v2/dal_syntax.rb
@@ -427,14 +427,31 @@ module SiSU_Syntax
"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked image
elsif dob.is=='table'
dob=fontface(dob)
- elsif dob.is =='code' # /^<:code>/ #should be enough # underscore used as escape for angle brackets
+ elsif dob.is =='code'
+#p dob.obj
dob.obj.gsub!(/#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}\s*/,'@\1: ')
dob.obj.gsub!(/([<>])/,'_\1')
dob.obj.gsub!(/_<:(\S+?)_>/,'<:\1>') #convert <:\S+> back, clumsy
dob.obj.gsub!(/_<(br(?: \/)?)_>/,'<\1>') #convert <br> <br /> back, clumsy
dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s)&lt;(br(?: \/)?)&gt;([\s,.]|$)/,'\1<\2>\3') #convert <br> <br /> back, clumsy
- dob.obj.gsub!(/#{Mx[:gr_o]}codeline#{Mx[:gr_c]}/,
- "\n#{Mx[:nbsp]}#{Mx[:nbsp]}") #temporary fix, prefer: #line.gsub!(/<:codeline>/,"\n")
+ if dob.number_
+ codeline=[]
+ ln=1
+ dob.obj.split(/#{Mx[:gr_o]}codeline#{Mx[:gr_c]}|<br(?: \/)?>|\n/).each_with_index do |cl,i|
+ unless i == 0
+ cl.gsub!(Mx[:br_nl],'')
+ w=3-ln.to_s.length
+ cl = "#{ln}#{Mx[:nbsp]*w}#{Mx[:vline]}#{Mx[:nbsp]}#{Mx[:nbsp]}#{cl}#{Mx[:br_nl]}"
+ ln +=1
+ end
+ codeline << cl
+ end
+ codeline= codeline.join("")
+ dob.obj=codeline
+ else
+ dob.obj.gsub!(/#{Mx[:gr_o]}codeline#{Mx[:gr_c]}/,
+ "\n#{Mx[:nbsp]}#{Mx[:nbsp]}") #temporary fix, prefer: #line.gsub!(/<:codeline>/,"\n")
+ end
dob
else # @\S+?:
end
diff --git a/lib/sisu/v2/defaults.rb b/lib/sisu/v2/defaults.rb
index 188b1869..362b67e5 100644
--- a/lib/sisu/v2/defaults.rb
+++ b/lib/sisu/v2/defaults.rb
@@ -1595,7 +1595,7 @@ WOK
</a>
<br />
<i>w3 since October 3 1993</i>
- <a href="mailto://ralph@amissah.com" #{js_mail}>
+ <a href="mailto:ralph@amissah.com" #{js_mail}>
ralph@amissah.com
</a>
</font></p>
@@ -1989,7 +1989,7 @@ SiSU is a comprehensive future-proofing electronic document management system.
Potential users of SiSU include individual authors who want to publish their books or articles electronically to reach a broad audience, web publishers who want to provide multiple channels of access to their electronic documents, or any organizations which centrally manage a medium or large set of electronic documents, especially governmental organizations which may prefer to keep their documents in easily accessible yet non-proprietary formats.
</p>
<p>
-SiSU is an Open Source project initiated and led by Ralph Amissah (<a href="mailto://ralph.amissah@gmail.com">ralph.amissah@gmail.com</a>) and can be contacted at <a href="mailto://sisu@lists.sisudoc.org">sisu@lists.sisudoc.org</a>. SiSU is licensed under the GNU General Public License.
+SiSU is an Open Source project initiated and led by Ralph Amissah (<a href="mailto:ralph.amissah@gmail.com">ralph.amissah@gmail.com</a>) and can be contacted via mailing list <a href="http://lists.sisudoc.org/listinfo/sisu">http://lists.sisudoc.org/listinfo/sisu</a> at <a href="mailto:sisu@lists.sisudoc.org">sisu@lists.sisudoc.org</a>. SiSU is licensed under the GNU General Public License.
</p>
<p class="bold">
For less markup than the most elementary HTML you can have more.
@@ -2151,21 +2151,26 @@ SiSU was developed in relation to legal documents, and is strong across a wide v
<p class="tiny">
SiSU has been developed and has been in use for several years. Requirements to cover a wide range of documents within its use domain have been explored.</p>
<p class="small">
-<a href="mailto://ralph@amissah.com">
+<a href="mailto:ralph@amissah.com">
ralph@amissah.com
</a>
</p>
<p class="small">
-<a href="mailto://ralph.amissah@gmail.com">
+<a href="mailto:ralph.amissah@gmail.com">
ralph.amissah@gmail.com
</a>
</p>
<p class="small">
-<a href="mailto://sisu@lists.sisudoc.org">
+<a href="mailto:sisu@lists.sisudoc.org">
sisu@lists.sisudoc.org.
</a>
</p>
<p class="small">
+<a href="http://lists.sisudoc.org/listinfo/sisu">
+http://lists.sisudoc.org/listinfo/sisu
+</a>
+</p>
+<p class="small">
#{@date.year_static}
</p>
<p class="tiny">
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb
index 32b0d2ff..3a868cd8 100644
--- a/lib/sisu/v2/texpdf.rb
+++ b/lib/sisu/v2/texpdf.rb
@@ -341,10 +341,6 @@ module SiSU_TeX
if dob.tmp =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/
dob.tmp=SiSU_TeX_Pdf::Format_text_object.new(@md,dob.tmp).url_str_internal(dob.tmp)
end
- if dob.is=='para' \
- and dob.bullet_
- dob.tmp='$\txtbullet$~~' + dob.tmp
- end
elsif dob.is =='break'
if dob.obj==Mx[:br_page]; dob.tmp='\newpage'
elsif dob.obj==Mx[:br_page_new]; dob.tmp='\clearpage'
@@ -406,7 +402,7 @@ module SiSU_TeX
@lineone=case dob.is
when /alt|group|verse/
dob.tmp.gsub!(/#{Mx[:nbsp]}/m,'{~}')
- dob.tmp.gsub!(/#{Mx[:gl_bullet]}/m,'$\txtbullet$~~')
+ dob.tmp.gsub!(/#{Mx[:gl_bullet]}/m,'$\txtbullet$\hspace{\enspace}') #Bullet environment not used for grouped text, ∴ no hanging indent here
dob.tmp.gsub!(/#{Mx[:br_nl]}+/m,"\n\n") #match not ideal, but currently not inserting extra newlines anyway
ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob)
dob.tmp=if dob.is=='group' \
@@ -436,11 +432,13 @@ module SiSU_TeX
when /code/
sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp,dob.is)
dob.tmp=sp_char.special_characters_safe
- dob.tmp.gsub!(/#{Mx[:nbsp]}/,'{~}')
- #dob.tmp.gsub!(/#{Mx[:nbsp]}\s*/,'{~}')
+ dob.tmp.gsub!(/#{Mx[:nbsp]}/,'{~}') #dob.tmp.gsub!(/#{Mx[:nbsp]}\s*/,'{~}')
+ dob.tmp.gsub!(/#{Mx[:vline]}/m,'\vline')
dob.tmp.gsub!(/ \\( |#{Mx[:br_nl]})/,' {\textbackslash}\1')
- dob.tmp.gsub!(/(?:#{Mx[:br_nl]}\s*)+/,' \\\\\\ ') #watch
- dob.tmp.gsub!(/\n\n\n/m," \\newline\n\n") #watch
+ dob.tmp.gsub!(/#{Mx[:br_nl]}\s*\Z/m,'')
+ dob.tmp.gsub!(/#{Mx[:br_nl]}{2}/,'\newline \\\\\\ ')
+ dob.tmp.gsub!(/#{Mx[:br_nl]}/,' \\\\\\ ')
+ dob.tmp.gsub!(/\n\n\n/m," \\newline\n\n")
ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob)
dob.tmp = ocn \
+ @tex_ml.paraskip_small \
@@ -506,7 +504,9 @@ module SiSU_TeX
else dob.tmp='' # dob.tmp={:l =>'',:p =>''}
end
when 'para'
- if dob.indent \
+ if dob.bullet_
+ dob.tmp=tst.bullet
+ elsif dob.indent \
and dob.indent =~/[1-9]/
dob.tmp=tst.indent
else
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 36366c9b..9ebef9dc 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -295,7 +295,27 @@ module SiSU_TeX_Pdf
when /8/; '70mm'
when /9/; '80mm'
end
- "\\begin{ParagraphIndent}{#{indent}}#{@dob.tmp} \\end{ParagraphIndent}}" #"\\begin{ParagraphIndent}{#{indent}}#{@dob.tmp}\\end{ParagraphIndent}}"
+ "\\begin{ParagraphIndent}{#{indent}}#{@dob.tmp} \\end{ParagraphIndent}}"
+ end
+ def bullet
+ blt=if @dob.indent
+ indent=case @dob.indent
+ when /1/; '0em'
+ when /2/; '1.0em'
+ when /3/; '2.0em'
+ when /4/; '3.0em'
+ when /5/; '4.0em'
+ when /6/; '5.0em'
+ when /7/; '6.0em'
+ when /8/; '7.0em'
+ when /9/; '8.0em'
+ else '-1.0em'
+ end
+ "\\begin{Bullet}{#{indent}}$\\txtbullet$\\hspace{\\enspace}#{@dob.tmp}\\end{Bullet}"
+ else
+ "\\begin{Bullet}{-5mm}$\\txtbullet$\\hspace{\\enspace}#{@dob.tmp}\\end{Bullet}"
+ end
+ blt
end
def symbol_graphic
dir=SiSU_Env::Info_env.new(@md.fns)
@@ -918,6 +938,17 @@ WOK
\\item[]
}
{\\end{list}}
+\\newenvironment{Bullet}[1]%
+{
+\\begin{list}{}{%
+\\setlength\\topsep{0pt}%
+\\addtolength{\\leftmargin}{#1}
+\\itemindent=-1em
+\\setlength\\parsep{0pt plus 1pt}%
+}
+\\item[]
+}
+{\\end{list}}
\\usepackage{fancyhdr}
\\lhead{}
\\renewcommand{\\part}{\\\@startsection
diff --git a/man/man1/sisu.1 b/man/man1/sisu.1
index 7a9d9659..3dd8f71a 100644
--- a/man/man1/sisu.1
+++ b/man/man1/sisu.1
@@ -1256,7 +1256,7 @@ normally be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document
.BR
/{italics}/
.BR
- \"{citation}\"
+ "{citation}"
.BR
^{superscript}^
.BR