diff options
-rw-r--r-- | CHANGELOG_v2 | 79 | ||||
-rw-r--r-- | data/doc/sisu/v2/CHANGELOG | 79 | ||||
-rw-r--r-- | data/sisu/v2/v/version.yml | 6 | ||||
-rw-r--r-- | lib/sisu/v2/css.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v2/dal_doc_str.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v2/dal_syntax.rb | 28 | ||||
-rw-r--r-- | lib/sisu/v2/defaults.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v2/epub_format.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v2/html.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v2/html_format.rb | 86 | ||||
-rw-r--r-- | lib/sisu/v2/odf.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v2/plaintext.rb | 16 | ||||
-rw-r--r-- | lib/sisu/v2/sysenv.rb | 30 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf_format.rb | 16 |
14 files changed, 198 insertions, 170 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2 index e55187cd..d0ea34a0 100644 --- a/CHANGELOG_v2 +++ b/CHANGELOG_v2 @@ -12,11 +12,54 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.7.9.orig.tar.gz (2010-12-09:49/4) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.9.orig.tar.gz + sisu_2.7.9.orig.tar.gz + sisu_2.7.9-1.dsc + sisu_2.7.9-1.diff.gz + + [debian freeze, fix] + + * dal, fix missing multi-line regex matches for line-wrap text + (live-manual, to work better with po4a) + * dal_doc_str, bulleted text (and headings), multi-line match, to permit + line-wrapped paragraphs + (requested fix, Ben Armstrong (live-manual)) + * dal_syntax, multi-line match for fontface markup (emphasis, bold, + italics, underscore etc.) + + * texpdf, use of monospace in headings causes table of contents breakage, fix + (requested fix, Ben Armstrong (live-manual)) + + * texpdf, toc now contains level 3~ to be consistent with other output + formats + (requested fix, Ben Armstrong (live-manual) "all TOC for different formats + include headings for 1~ 2~ and 3~ *except* PDF which only has 1~ and 2~. i + consider this a bug. how do i fix it?") + (the fix is a workaround manually indenting level 3 further than + level 2 as both levels make use of LaTeX "subsubsection") + + * html & css, ocn (object numbers) now link to themselves, clicking on one + places that object at the top of the browser and provides its url + (requested, Ben Armstrong (live-manual)) + + * epub, ocn (object numbers) now link to themselves, clicking on one + places that object at the top of the viewer + + * document manfest links + * html, link to "document manifest" remains (links to individual output + types removed) + * plaintext, link to "document manifest" fix(links to individual output + types removed) + * odf, manifest link fix + + * html search form, configuration check + %% 2.7.8.orig.tar.gz (2010-10-25:43/1) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz - sisu_2.7.8.orig.tar.gz - sisu_2.7.8-1.dsc - sisu_2.7.8-1.diff.gz + af9dac02064ea03c61d6eecd0882a9f1be6f83d37fdddcf8e45832b9def52140 2750397 sisu_2.7.8.orig.tar.gz + fcaada42eb8e449b620c2f529c642fdb44e0c0466b9d8ecd6e769cf07f986a3d 1196 sisu_2.7.8-1.dsc + e0fac804d4309740916666120acef61c1a82b4b7cabca04e979d4fc8b57db8c2 289790 sisu_2.7.8-1.diff.gz [debian freeze, fix] @@ -35,21 +78,21 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz * internal links * dal, exclude parentheses and square brackets from matching - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * html, remove space between link & following punctuation, parentheses &/or square brackets - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * epub, remove space between link & following punctuation, parentheses &/or square brackets * html * remove "copy @" mark - (requested, Daniel Baumann) + (requested, Daniel Baumann (live-manual)) * segments, title banner (including "copy @" mark) configurable, boolean, true/false (default false) - (requested off option, Daniel Baumann) + (requested off option, Daniel Baumann (live-manual)) * quick ref links_guide configurable, boolean, true/false (default false) - (requested off option, Daniel Baumann) + (requested off option, Daniel Baumann (live-manual)) * config.yml * html, seg title banner, boolean true/false setting (commented out, @@ -67,7 +110,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz * numbered codeblocks, fix, where codeblock opens with code{# (requested fix needed by debian-live:live-manual, Ben Armstrong, Mark - Schneider & Daniel Baumann) + Schneider & Daniel Baumann (live-manual)) * dal changes as required, flag markup request and number * constants, provide vertical line symbol, use to separate numbered codeblock from code @@ -75,11 +118,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz * texpdf, first space following a bullet should be fixed width, fix (used \enspace (0.5em)) - (requested fix and suggested latex solution, Ben Armstrong) + (requested fix and suggested latex solution, Ben Armstrong (live-manual)) * texpdf, bullet text, hanging indent, fix works for regular text (not grouped text) - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * texpdf, codeblocks do not permit empty lines, fix @@ -94,7 +137,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.6.orig.tar.gz [debian freeze, fix] * texpdf, codeblocks, code-line continuation backslash dropped, fix - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * shared_metadata, odf, url characters to not match @@ -129,7 +172,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.4.orig.tar.gz [debian freeze, fix] * image scaling, requested fixes - (behaviour testing & request by Mark Schneider) + (behaviour testing & request by Mark Schneider (live-manual)) * texpdf, scaling of images (below the set maximum size), fix * odf:odt, incorporation and scaling of images, fix * html (html_tune) scaling of images, fix @@ -167,7 +210,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.2.orig.tar.gz [debian freeze, fix] * hub, test whether user name set, fix - (requested fix, provided by Ben Armstrong) + (requested fix, provided by Ben Armstrong (live-manual)) * epub, fix breakage where angle brackets used in used metadata header @@ -188,12 +231,12 @@ 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, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * a5, increase headheight (11pt from 8pt) * shared_metadata * odt, fix breakage where angle brackets used in metadata headers - (requested fix, Daniel Baumann) + (requested fix, Daniel Baumann (live-manual)) * a typo fix * param, a few fixes (checks, aliases, typo) @@ -279,7 +322,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.3.orig.tar.gz * html_format, epub_format: subtoc, footnote content bug (fix) * odf: lt (<), gt (>) fix for codeblocks; & fix, messy - (requested fix, Daniel Baumann) + (requested fix, Daniel Baumann (live-manual)) * epub_format, removed some title & author info, check @@ -429,7 +472,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) + (requested feature Daniel Baumann (live-manual)) * dal_syntax, constants, introduce #{ monospace }# tag * monospace font for codeblocks and #{ monospace }# tag * vim syntax, recognize #{ monospace }# tag diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG index 743786b4..1f522bbb 100644 --- a/data/doc/sisu/v2/CHANGELOG +++ b/data/doc/sisu/v2/CHANGELOG @@ -12,11 +12,54 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.7.9.orig.tar.gz (2010-12-09:49/4) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.9.orig.tar.gz + sisu_2.7.9.orig.tar.gz + sisu_2.7.9-1.dsc + sisu_2.7.9-1.diff.gz + + [debian freeze, fix] + + * dal, fix missing multi-line regex matches for line-wrap text + (live-manual, to work better with po4a) + * dal_doc_str, bulleted text (and headings), multi-line match, to permit + line-wrapped paragraphs + (requested fix, Ben Armstrong (live-manual)) + * dal_syntax, multi-line match for fontface markup (emphasis, bold, + italics, underscore etc.) + + * texpdf, use of monospace in headings causes table of contents breakage, fix + (requested fix, Ben Armstrong (live-manual)) + + * texpdf, toc now contains level 3~ to be consistent with other output + formats + (requested fix, Ben Armstrong (live-manual) "all TOC for different formats + include headings for 1~ 2~ and 3~ *except* PDF which only has 1~ and 2~. i + consider this a bug. how do i fix it?") + (the fix is a workaround manually indenting level 3 further than + level 2 as both levels make use of LaTeX "subsubsection") + + * html & css, ocn (object numbers) now link to themselves, clicking on one + places that object at the top of the browser and provides its url + (requested, Ben Armstrong (live-manual)) + + * epub, ocn (object numbers) now link to themselves, clicking on one + places that object at the top of the viewer + + * document manfest links + * html, link to "document manifest" remains (links to individual output + types removed) + * plaintext, link to "document manifest" fix(links to individual output + types removed) + * odf, manifest link fix + + * html search form, configuration check + %% 2.7.8.orig.tar.gz (2010-10-25:43/1) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz - sisu_2.7.8.orig.tar.gz - sisu_2.7.8-1.dsc - sisu_2.7.8-1.diff.gz + af9dac02064ea03c61d6eecd0882a9f1be6f83d37fdddcf8e45832b9def52140 2750397 sisu_2.7.8.orig.tar.gz + fcaada42eb8e449b620c2f529c642fdb44e0c0466b9d8ecd6e769cf07f986a3d 1196 sisu_2.7.8-1.dsc + e0fac804d4309740916666120acef61c1a82b4b7cabca04e979d4fc8b57db8c2 289790 sisu_2.7.8-1.diff.gz [debian freeze, fix] @@ -35,21 +78,21 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz * internal links * dal, exclude parentheses and square brackets from matching - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * html, remove space between link & following punctuation, parentheses &/or square brackets - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * epub, remove space between link & following punctuation, parentheses &/or square brackets * html * remove "copy @" mark - (requested, Daniel Baumann) + (requested, Daniel Baumann (live-manual)) * segments, title banner (including "copy @" mark) configurable, boolean, true/false (default false) - (requested off option, Daniel Baumann) + (requested off option, Daniel Baumann (live-manual)) * quick ref links_guide configurable, boolean, true/false (default false) - (requested off option, Daniel Baumann) + (requested off option, Daniel Baumann (live-manual)) * config.yml * html, seg title banner, boolean true/false setting (commented out, @@ -67,7 +110,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz * numbered codeblocks, fix, where codeblock opens with code{# (requested fix needed by debian-live:live-manual, Ben Armstrong, Mark - Schneider & Daniel Baumann) + Schneider & Daniel Baumann (live-manual)) * dal changes as required, flag markup request and number * constants, provide vertical line symbol, use to separate numbered codeblock from code @@ -75,11 +118,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz * texpdf, first space following a bullet should be fixed width, fix (used \enspace (0.5em)) - (requested fix and suggested latex solution, Ben Armstrong) + (requested fix and suggested latex solution, Ben Armstrong (live-manual)) * texpdf, bullet text, hanging indent, fix works for regular text (not grouped text) - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * texpdf, codeblocks do not permit empty lines, fix @@ -94,7 +137,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.6.orig.tar.gz [debian freeze, fix] * texpdf, codeblocks, code-line continuation backslash dropped, fix - (requested fix, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * shared_metadata, odf, url characters to not match @@ -129,7 +172,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.4.orig.tar.gz [debian freeze, fix] * image scaling, requested fixes - (behaviour testing & request by Mark Schneider) + (behaviour testing & request by Mark Schneider (live-manual)) * texpdf, scaling of images (below the set maximum size), fix * odf:odt, incorporation and scaling of images, fix * html (html_tune) scaling of images, fix @@ -167,7 +210,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.2.orig.tar.gz [debian freeze, fix] * hub, test whether user name set, fix - (requested fix, provided by Ben Armstrong) + (requested fix, provided by Ben Armstrong (live-manual)) * epub, fix breakage where angle brackets used in used metadata header @@ -188,12 +231,12 @@ 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, Ben Armstrong) + (requested fix, Ben Armstrong (live-manual)) * a5, increase headheight (11pt from 8pt) * shared_metadata * odt, fix breakage where angle brackets used in metadata headers - (requested fix, Daniel Baumann) + (requested fix, Daniel Baumann (live-manual)) * a typo fix * param, a few fixes (checks, aliases, typo) @@ -279,7 +322,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.3.orig.tar.gz * html_format, epub_format: subtoc, footnote content bug (fix) * odf: lt (<), gt (>) fix for codeblocks; & fix, messy - (requested fix, Daniel Baumann) + (requested fix, Daniel Baumann (live-manual)) * epub_format, removed some title & author info, check @@ -429,7 +472,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) + (requested feature Daniel Baumann (live-manual)) * dal_syntax, constants, introduce #{ monospace }# tag * monospace font for codeblocks and #{ monospace }# tag * vim syntax, recognize #{ monospace }# tag diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml index 58135bb9..fe09b004 100644 --- a/data/sisu/v2/v/version.yml +++ b/data/sisu/v2/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 2.7.8 -:date_stamp: 2010w43/1 -:date: "2010-10-25" +:version: 2.7.9 +:date_stamp: 2010w49/4 +:date: "2010-12-09" :project: SiSU diff --git a/lib/sisu/v2/css.rb b/lib/sisu/v2/css.rb index 38913431..9856c0d0 100644 --- a/lib/sisu/v2/css.rb +++ b/lib/sisu/v2/css.rb @@ -261,6 +261,10 @@ WOK color: #000000; background-color: #f9f9aa; } + a.lnkocn:link { + color: #777777; + text-decoration: none; + } /* a:hover { border-bottom: 2px solid #777777; diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb index 6eb2ee69..f1282df2 100644 --- a/lib/sisu/v2/dal_doc_str.rb +++ b/lib/sisu/v2/dal_doc_str.rb @@ -150,19 +150,19 @@ module SiSU_document_structure_extract when /^:?([A-C1-6])\~/ #heading / lv lv=$1 ln=ln_get(lv) - t_o=if t_o=~/^:?[A-C1-6]\~\s+(.+)/ + t_o=if t_o=~/^:?[A-C1-6]\~\s+(.+)/m obj=$1 note=endnote_test?(obj) obj,tags=extract_tags(obj) h={:lv=>lv,:ln=>ln,:obj=>obj,:idx=>idx,:tags=>tags} SiSU_document_structure::Object_heading.new.heading(h) - elsif t_o=~/^:?[A-C1-6]\~(\S+?)-\s+(.+)/ + elsif t_o=~/^:?[A-C1-6]\~(\S+?)-\s+(.+)/m name,obj=$1,$2 note=endnote_test?(obj) obj,tags=extract_tags(obj) h={:lv=>lv,:name=>name,:obj=>obj,:idx=>idx,:autonum_=>false,:tags=>tags} SiSU_document_structure::Object_heading.new.heading(h) - elsif t_o=~/^:?[A-C1-6]\~(\S+)\s+(.+)/ + elsif t_o=~/^:?[A-C1-6]\~(\S+)\s+(.+)/m name,obj=$1,$2 note=endnote_test?(obj) obj,tags=extract_tags(obj,name) @@ -171,7 +171,7 @@ module SiSU_document_structure_extract else nil end when /^(?:_[1-9]|_[1-9]?\*)\s+/ #indented and/or bullet paragraph - t_o=if t_o=~/^(_(?:[1-9]?\*|[1-9])\s+)(.+)/ + t_o=if t_o=~/^(_(?:[1-9]?\*|[1-9])\s+)(.+)/m tst,obj=$1,$2 indent=indent_test(tst) bullet=bullet_test(tst) @@ -182,7 +182,7 @@ module SiSU_document_structure_extract SiSU_document_structure::Object_para.new.paragraph(h) else nil end - when /^(?:<?:p[bn]>?)\s*$/ #indented and/or bullet paragraph + when /^(?:<?:p[bn]>?)\s*$/ if t_o =~/^(?:<?:pn>?)\s*$/ SiSU_document_structure::Object_layout.new.break(Hx[:br_page_new]) else SiSU_document_structure::Object_layout.new.break(Hx[:br_page]) diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb index 01604b65..0422d7b3 100644 --- a/lib/sisu/v2/dal_syntax.rb +++ b/lib/sisu/v2/dal_syntax.rb @@ -235,33 +235,33 @@ module SiSU_Syntax dob end def fontface(dob) - dob.obj.gsub!(/(^|#{Mx[:gl_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\}\^/m, "\\1#{Mx[:fa_superscript_o]}\\2#{Mx[:fa_superscript_c]}") #superscript - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|\(|\>|\S)9\{(.+?)\}9/, + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|\(|\>|\S)9\{(.+?)\}9/m, "\\1#{Mx[:fa_superscript_o]}\\2#{Mx[:fa_superscript_c]}") #superscript - dob.obj.gsub!(/(^|[^\\]),\{(.+?)\},/, + dob.obj.gsub!(/(^|[^\\]),\{(.+?)\},/m, "\\1#{Mx[:fa_subscript_o]}\\2#{Mx[:fa_subscript_c]}") #subscript - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)6\{(.+?)\}6/, + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)6\{(.+?)\}6/m, "\\1#{Mx[:fa_subscript_o]}\\2#{Mx[:fa_subscript_c]}") #subscript - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\+\{(.+?)\}\+/, + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\+\{(.+?)\}\+/m, "\\1#{Mx[:fa_insert_o]}\\2#{Mx[:fa_insert_c]}") #inserted text - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)v\{(.+?)\}v/, + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)v\{(.+?)\}v/m, "\\1#{Mx[:fa_insert_o]}\\2#{Mx[:fa_insert_c]}") #inserted text - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)-\{(.+?)\}-/, + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)-\{(.+?)\}-/m, "\\1#{Mx[:fa_strike_o]}\\2#{Mx[:fa_strike_c]}") #strikethrough - deleted text - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)x\{(.+?)\}x/, + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)x\{(.+?)\}x/m, "\\1#{Mx[:fa_strike_o]}\\2#{Mx[:fa_strike_c]}") #deleted text dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\*(\S+?)\*/, "\\1#{@emph[:o]}\\2#{@emph[:c]}") #emphasise single word, watch diff --git a/lib/sisu/v2/defaults.rb b/lib/sisu/v2/defaults.rb index 362b67e5..a5305e4d 100644 --- a/lib/sisu/v2/defaults.rb +++ b/lib/sisu/v2/defaults.rb @@ -1134,7 +1134,7 @@ module SiSU_Viz end def nav_txt_manifest %{ <font face="#{font_fonts}" size="2"> - #{png_manifest} + [ document manifest ] </font> } end def nav_txt_concordance diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb index 761d771e..e016b011 100644 --- a/lib/sisu/v2/epub_format.rb +++ b/lib/sisu/v2/epub_format.rb @@ -82,7 +82,7 @@ module SiSU_EPUB_Format else ocn_class='ocn' @ocn.gsub(/^(\d+|)$/, - %{<label class="#{ocn_class}">\\1</label>}) + %{<label class="#{ocn_class}"><a href="#o\\1" class="lnk#{ocn_class}">\\1</a></label>}) end end def name @@ -142,6 +142,10 @@ module SiSU_EPUB_Format color: #003399; text-decoration: underline; } + a.lnkocn:link { + color: #777777; + text-decoration: none; + } div { margin-left: 0; margin-right: 0; diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb index c984a858..ba2afabc 100644 --- a/lib/sisu/v2/html.rb +++ b/lib/sisu/v2/html.rb @@ -529,9 +529,7 @@ WOK prefix_b=format_head_toc.notes.prefix_b prefix_b=SiSU_HTML_Tune::Clean_html.new(prefix_b).clean end - @seg_toc_band=format_head_toc.seg_head_navigation_band('pdf') #bug, vary depending on type of doc !! examine - @seg_toc_band_bottom=format_head_toc.seg_head_navigation_band_bottom('pdf') #bug, vary depending on type of doc !! examine - @segtoc << @seg_toc_band + @segtoc << format_head_toc.seg_head_navigation_band toc_shared << format_head_toc.scroll_head_title_banner_open @segtoc << format_head_toc.seg_head_title_banner_open tmp_head=nil diff --git a/lib/sisu/v2/html_format.rb b/lib/sisu/v2/html_format.rb index c4758c5f..8074a7ee 100644 --- a/lib/sisu/v2/html_format.rb +++ b/lib/sisu/v2/html_format.rb @@ -82,7 +82,7 @@ module SiSU_HTML_Format else ocn_class='ocn' @ocn.gsub(/^(\d+|)$/, - %{<label class="#{ocn_class}"><a name="#{@ocn}">\\1</a></label>}) + %{<label class="#{ocn_class}"><a name="#{@ocn}" href="##{@ocn}" class="lnk#{ocn_class}">\\1</a></label>}) end end def name @@ -108,7 +108,17 @@ module SiSU_HTML_Format @seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || []) @index='index' @metalink='#metadata' - @tocband_scroll,@tocband_segtoc=nil,nil + end + def doc_types #used in toc & seg_nav_band + scroll=seg='' + wgt=Widget.new(@md) + %{ +<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0"> +<tr> +<td align="center" bgcolor=#{@vz.color_band2}> + #{wgt.manifest} + #{wgt.search} +</tr></table>} end def rdf SiSU_XML_tags::RDF.new(md) @@ -180,7 +190,7 @@ module SiSU_HTML_Format </a> </td>} end - def pdf + def pdf #retired 2.7.9 pdf=if @md.programs[:pdf] \ and @cf_defaults.cf_0 =~/p/ %{ @@ -198,7 +208,7 @@ module SiSU_HTML_Format else '' end end - def txt + def txt #retired 2.7.9 txt=if @cf_defaults.cf_0 =~/[at]/ %{ <td valign=bottom bgcolor=#{@vz.color_band2}> @@ -209,7 +219,7 @@ module SiSU_HTML_Format else '' end end - def epub + def epub #retired 2.7.9 epub=if @cf_defaults.cf_0 =~/e/ %{ <td align="center" bgcolor=#{@vz.color_band2}> @@ -220,7 +230,7 @@ module SiSU_HTML_Format else '' end end - def odf + def odf #retired 2.7.9 odf=if @cf_defaults.cf_0 =~/o/ %{ <td align="center" bgcolor=#{@vz.color_band2}> @@ -231,7 +241,7 @@ module SiSU_HTML_Format else '' end end - def concordance(text) + def concordance(text) #retired 2.7.9 if @md.concord_make \ and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file %{<td align="center" bgcolor=#{@vz.color_band2}> @@ -249,7 +259,6 @@ module SiSU_HTML_Format def initialize(md) super(md) @md=md - @tocband_scroll,@tocband_segtoc=make_scroll,make_seg end def scroll_head_navigation_band pdf=if @md.programs[:pdf] @@ -270,16 +279,10 @@ WOK <p />} end def concordance_navigation_band(type='') - if type=~/pdf/ - @tocband_concordance=make_concordance - end %{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}> <tr><td width="20%"> #{@vz.banner_band} </td> -<td width="60%" align="center"> - #{@tocband_concordance} -</td> <td width="20%" align="right"> <a href="index.html" target="_top" alt="->"> #{@vz.png_nav_toc} @@ -288,9 +291,6 @@ WOK <p />} end def seg_head_navigation_band(type='') - if type=~/pdf/ - @tocband_segtoc=make_scroll_seg_pdf - end firstseg=%{<a href="#{@md.fnl[:pre]}#{@md.firstseg}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" target="_top" alt="->"> #{@vz.png_nav_nxt} </a>} if @md.firstseg =~/\S+/ @@ -299,14 +299,14 @@ WOK #{@vz.banner_band} </td> <td width="75%" align="center"> - #{@tocband_segtoc} + #{doc_types} </td> <td width="5%" align="right"> #{firstseg} #{@vz.table_close} <p />} end - def seg_head_navigation_band_bottom(type='') + def seg_head_navigation_band_bottom(type='') #retired 2.7.9 if type=~/pdf/ @tocband_segtoc=make_scroll_seg_pdf end @@ -330,7 +330,7 @@ WOK <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a> </font>} end - def concordance_link(text) + def concordance_link(text) #retired 2.7.9 if @md.concord_make %{<font size=2> <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}> @@ -348,12 +348,8 @@ WOK } %{<table summary="toc segment and scroll with pdf" border="0" cellpadding="3" cellspacing="0"> <tr> - #{scroll} - #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf} - #{wgt.concordance(@vz.nav_txt_concordance)} #{wgt.manifest} #{wgt.search} - #{wgt.home} </tr></table>} end def make_scroll_seg_pdf @@ -365,13 +361,9 @@ WOK } %{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0"> <tr> - #{seg} - #{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf} <td align="center" bgcolor=#{@vz.color_band2}> - #{wgt.concordance(@vz.nav_txt_concordance)} #{wgt.manifest} #{wgt.search} - #{wgt.home} </tr></table>} end def make_concordance @@ -379,12 +371,9 @@ WOK wgt=Widget.new(@md) %{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0"> <tr> - #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf} <td align="center" bgcolor=#{@vz.color_band2}> - #{wgt.concordance(@vz.nav_txt_concordance)} #{wgt.manifest} #{wgt.search} - #{wgt.home} </tr></table>} end def head @@ -564,11 +553,6 @@ WOK <table summary="toc segment tail" bgcolor=#{@vz.color_band1}> <tr><td width="20%"> #{@vz.banner_band} -</td> -<td width="60%"> - <center> - #{@tocband_segtoc} - </center> </td></tr> </table> <p> </p> @@ -733,36 +717,6 @@ WOK else '' end end - def doc_types #used in seg_nav_band ### - scroll=seg='' - wgt=Widget.new(@md) - x=if @md.concord_make - %{ -<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0"> -<tr> - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf} -<td align="center" bgcolor=#{@vz.color_band2}> - #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -</tr></table>} - else - %{ -<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0"> -<tr> - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf} -<td align="center" bgcolor=#{@vz.color_band2}> - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -</tr></table>} - end - end def navigation_table %{<table summary="navigation segment table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0"> <tr><th width="#{@@indent['leve_1']}" align="right"> diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index ad1f45d1..769870eb 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -151,7 +151,7 @@ module SiSU_ODF end url=@md.fnb fn=@md.fn[:manifest] - manifest="#{@vz.url_root_http}/#{url}/#{fn}" + manifest="#{@env.url.root}/#{@md.fnb}/#{@md.fn[:manifest]}" @@odf[:tail] << %{<text:p text:style-name="P1">Available document outputs: <br /> <<text:a xlink:type="simple" xlink:href="#{manifest}">#{manifest}</text:a>></text:p>} @@odf[:tail] << %{\n<text:p text:style-name="P1">SiSU: <<text:a xlink:type="simple" xlink:href="http://www.jus.uio.no/lm">www.jus.uio.no/sisu</text:a>> and <<text:a xlink:type="simple" xlink:href="http://www.sisudoc.org">www.sisudoc.org</text:a>></text:p>} @@odf[:tail] << "\n</office:text></office:body></office:document-content>" diff --git a/lib/sisu/v2/plaintext.rb b/lib/sisu/v2/plaintext.rb index bc83702b..e919af78 100644 --- a/lib/sisu/v2/plaintext.rb +++ b/lib/sisu/v2/plaintext.rb @@ -117,7 +117,6 @@ module SiSU_Plaintext def initialize(data,md,wrap_width) @data,@md,@wrap_width=data,md,wrap_width @brace_url=SiSU_Viz::Skin.new.url_decoration - @vz=SiSU_Env::Get_init.instance.skin @tab="\t" @@endnotes_=case md.mod.inspect when /--footnote/; false @@ -188,7 +187,9 @@ WOK end def plaintext_tail SiSU_Env::Info_skin.new(@md).select + env=SiSU_Env::Info_env.new(@md.fns) vz=SiSU_Env::Get_init.instance.skin + base_url="#{env.url.root}/#{@md.fnb}" generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version] lastdone="Last Generated on: #{Time.now}" rubyv="Ruby version: #{@md.ruby_version}" @@ -198,18 +199,13 @@ WOK end @plaintext[:tail] <<<<WOK #{@br} +plaintext (plain text): + #{base_url}/#{@md.fn[:plain]}#{@br} Other versions of this document: #{@br} manifest: - #{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:manifest]}#{@br} -html: - #{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:toc]}#{@br} -pdf: - #{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:pdf_p]} - #{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:pdf_l]}#{@br} -plaintext (plain text): - #{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:plain]}#{@br} + #{base_url}/#{@md.fn[:manifest]}#{@br} at: - #{vz.url_site}#{@br} + #{env.url.root}#{@br} #{sc} * #{generator} diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index ed955006..ef6d86c7 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -1019,13 +1019,6 @@ module SiSU_Env end def search_form(type='sisusearch',action=nil,db=nil,table=false) rc=SiSU_Env::Get_init.instance.yamlrc - create_form_hyperestraier=if defined? rc['search']['sisu']['flag'] \ - and rc['search']['sisu']['flag']==true \ - and action \ - and action =~/https?:\/\// - true - else false - end create_form_sisu=if action \ and db \ and action =~/https?:\/\// \ @@ -1041,6 +1034,11 @@ module SiSU_Env end action=rc['search']['sisu']['action'] true + elsif defined? rc['search']['sisu']['flag'] \ + and defined? rc['search']['sisu']['action'] \ + and rc['search']['sisu']['flag']==true \ + and rc['search']['sisu']['action'] =~/https?:\/\// + true else false end if table @@ -1071,24 +1069,6 @@ module SiSU_Env #{table_close} <!-- SiSU Search --> WOK - elsif create_form_hyperestraier \ - and type=~/hyperestraier/ \ - and defined? rc['search']['hyperestraier'] - <<WOK -<!-- SiSU Search using Hyperestraier --> -#{table_open} -<a name="search"></a> -<form method="get" action="#{rc['search']['hyperestraier']['action']}" target="_top"> -<font size="2"> -<input type="text" name="phrase" value="" size="24" maxlength="255" /> -<input type="submit" value="search" /> -<input type="hidden" name="enc" value="UTF-8" /> -<font size="2"> -<a href="#{rc['search']['hyperestraier']['action']}">hyperestraier search</a> -</font></form> -#{table_close} -<!-- SiSU Search using Hyperestraier --> -WOK else '' end form diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 465d4d90..732a903e 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -210,8 +210,9 @@ module SiSU_TeX_Pdf dob=@dob title=@md.title.full dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.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! @@ -227,8 +228,9 @@ module SiSU_TeX_Pdf def level4 dob=@dob dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') cont_ln.gsub!(/#{Tex[:backslash]*2}/,"#{Tex[:backslash]*4}") # added w42 cont_ln.gsub!(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 @@ -250,8 +252,9 @@ module SiSU_TeX_Pdf 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.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') cont_ln.gsub!(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 cont_ln.gsub!(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 @@ -270,8 +273,9 @@ module SiSU_TeX_Pdf 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 dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') cont_ln.gsub!(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 cont_ln.gsub!(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 @@ -280,7 +284,9 @@ module SiSU_TeX_Pdf cont_ln.gsub!(/\s*\\Footnote[A]\{[*+]+\d*\}\{%\n .+? \}\s*/,' ') end dob.tmp.gsub!(/^(.*)?\n?$/m, - '\subsubsection*{\1}') + "\\subsubsection*{\\1} +\\addcontentsline{toc}{subsubsection}{~~~~#{cont_ln} \\\\ +}") dob end def indent |