diff options
36 files changed, 265 insertions, 128 deletions
diff --git a/CHANGELOG_v1 b/CHANGELOG_v1 index 7c107438..13f656e4 100644 --- a/CHANGELOG_v1 +++ b/CHANGELOG_v1 @@ -12,6 +12,14 @@ Reverse Chronological: %% STABLE MANIFEST +%% 1.0.4.orig.tar.gz (2010-02-17:07/3) [2010-07-07] +http://www.jus.uio.no/sisu/pkg/src/sisu_1.0.3.orig.tar.gz + sisu_1.0.3.orig.tar.gz + sisu_1.0.3-1.dsc + sisu_1.0.3-1.diff.gz + + * sysenv, version.yml moved to /usr/share/sisu/v1/v (from /etc/sisu) + %% 2.0.0.orig.tar.gz (2010-03-06:09/6) http://www.jus.uio.no/sisu/pkg/src/sisu_2.0.0.orig.tar.gz sisu_2.0.0.orig.tar.gz diff --git a/CHANGELOG_v2 b/CHANGELOG_v2 index fb385458..e8d868a8 100644 --- a/CHANGELOG_v2 +++ b/CHANGELOG_v2 @@ -12,6 +12,30 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.6.0.orig.tar.gz (2010-07-07:27/3) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.0.orig.tar.gz + sisu_2.6.0.orig.tar.gz + sisu_2.6.0-1.dsc + sisu_2.6.0-1.diff.gz + + * sysenv, version.yml moved to /usr/share/sisu/v2/v (from /etc/sisu) + + * provide alternative sisu command names for producing single output types + sisu-pdf, sisu-html, sisu-odf, sisu-epub, sisu-txt sisu-pg sisu-sqlite + + * monospace + * dal_syntax, constants, introduce #{ monospace }# tag + * monospace font for codeblocks and #{ monospace }# tag + * vim syntax, recognize #{ monospace }# tag + + * hub, make -t produce plaintext output + + * sysenv, make output directory if needed (if possible) + + * texpdf_format, output special characters, special circumstance fix + + * outputs, some cleaning of default outputs ... ongoing + %% 2.5.1.orig.tar.gz (2010-06-12:23/6) http://www.jus.uio.no/sisu/pkg/src/sisu_2.5.1.orig.tar.gz c87a04a3071de4e8388b214fb6bb1a602657c5859a817bd0f001c92a4ce1f98d 2768984 sisu_2.5.1.orig.tar.gz diff --git a/bin/sisu-pg b/bin/sisu-pg new file mode 100644 index 00000000..e2c31233 --- /dev/null +++ b/bin/sisu-pg @@ -0,0 +1,2 @@ +#!/bin/sh +sisu -D ${@} diff --git a/bin/sisu-sqlite b/bin/sisu-sqlite new file mode 100644 index 00000000..3cb11629 --- /dev/null +++ b/bin/sisu-sqlite @@ -0,0 +1,2 @@ +#!/bin/sh +sisu -d ${@} diff --git a/conf/sisu/v2/version.yml b/conf/sisu/v2/version.yml deleted file mode 100644 index e772370c..00000000 --- a/conf/sisu/v2/version.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -:version: 2.5.1 -:date_stamp: 2010w23/6 -:date: "2010-06-12" -:project: SiSU diff --git a/data/doc/sisu/v1/CHANGELOG b/data/doc/sisu/v1/CHANGELOG index 4b48f34f..28b9ae5c 100644 --- a/data/doc/sisu/v1/CHANGELOG +++ b/data/doc/sisu/v1/CHANGELOG @@ -12,6 +12,14 @@ Reverse Chronological: %% STABLE MANIFEST +%% 1.0.4.orig.tar.gz (2010-02-17:07/3) [2010-07-07] +http://www.jus.uio.no/sisu/pkg/src/sisu_1.0.3.orig.tar.gz + sisu_1.0.3.orig.tar.gz + sisu_1.0.3-1.dsc + sisu_1.0.3-1.diff.gz + + * sysenv, version.yml moved to /usr/share/sisu/v1/v (from /etc/sisu) + %% 2.0.0.orig.tar.gz (2010-03-06:09/6) http://www.jus.uio.no/sisu/pkg/src/sisu_2.0.0.orig.tar.gz sisu_2.0.0.orig.tar.gz diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG index a47cebed..4f0506cf 100644 --- a/data/doc/sisu/v2/CHANGELOG +++ b/data/doc/sisu/v2/CHANGELOG @@ -12,6 +12,30 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.6.0.orig.tar.gz (2010-07-07:27/3) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.0.orig.tar.gz + sisu_2.6.0.orig.tar.gz + sisu_2.6.0-1.dsc + sisu_2.6.0-1.diff.gz + + * sysenv, version.yml moved to /usr/share/sisu/v2/v (from /etc/sisu) + + * provide alternative sisu command names for producing single output types + sisu-pdf, sisu-html, sisu-odf, sisu-epub, sisu-txt sisu-pg sisu-sqlite + + * monospace + * dal_syntax, constants, introduce #{ monospace }# tag + * monospace font for codeblocks and #{ monospace }# tag + * vim syntax, recognize #{ monospace }# tag + + * hub, make -t produce plaintext output + + * sysenv, make output directory if needed (if possible) + + * texpdf_format, output special characters, special circumstance fix + + * outputs, some cleaning of default outputs ... ongoing + %% 2.5.1.orig.tar.gz (2010-06-12:23/6) http://www.jus.uio.no/sisu/pkg/src/sisu_2.5.1.orig.tar.gz c87a04a3071de4e8388b214fb6bb1a602657c5859a817bd0f001c92a4ce1f98d 2768984 sisu_2.5.1.orig.tar.gz diff --git a/data/doc/sisu/v2/html/sisu.1.html b/data/doc/sisu/v2/html/sisu.1.html index 207475d4..9d4b35d6 100644 --- a/data/doc/sisu/v2/html/sisu.1.html +++ b/data/doc/sisu/v2/html/sisu.1.html @@ -338,21 +338,30 @@ the individual files for sending). See the -S option without [filename/wildcard] <dd>copies sisu markup file to output directory. <p> </dd> -<dt><b>-t [filename/wildcard +<dt><b>-T [filename/wildcard (*.termsheet.rb)]</b> </dt> <dd>standard form document builder, preprocessing feature <p> </dd> +<dt><b>-t [filename/wildcard]</b> </dt> +<dd>produces plaintext with Unix linefeeds and without +markup, (object numbers are omitted), has footnotes at end of each paragraph +that contains them [ -A for equivalent dos (linefeed) output file] [see + -e for (Options include: --endnotes for endnotes --footnotes for footnotes at +the end of each paragraph --unix for unix linefeed (default) --msdos for msdos +linefeed) +<p> </dd> + <dt><b>-U [filename/wildcard]</b> </dt> -<dd>prints url output list/map for the available processing -flags options and resulting files that could be requested, (can be used -to get a list of processing options in relation to a file, together with -information on the output that would be produced), -u provides url output -mapping for those flags requested for processing. The default assumes sisu_webrick -is running and provides webrick url mappings where appropriate, but these +<dd>prints url output list/map for the available +processing flags options and resulting files that could be requested, (can +be used to get a list of processing options in relation to a file, together +with information on the output that would be produced), -u provides url +output mapping for those flags requested for processing. The default assumes +sisu_webrick is running and provides webrick url mappings where appropriate, -<p>can be switched to file system paths in sisurc.yml +<p>but these can be switched to file system paths in sisurc.yml <p> </dd> <dt><b>-u [filename/wildcard]</b> @@ -907,7 +916,9 @@ html <p> <b>markup example:</b> <p> <p> <br> -<pre> normal text !{emphasis}! *{bold text}* _{underscore}_ /{italics}/ +<pre> normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, +"{citation}", + ^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- #{monospace}# normal text !{emphasis}! *{bold text}* @@ -918,25 +929,27 @@ html ,{subscript}, +{inserted text}+ -{strikethrough}- + #{monospace}# </pre> <p> <b>resulting output:</b> <p> normal text <b>emphasis</b> <b>bold text</b> <i>underscore</i> <i>italics</i> -"citation" ^superscript^ [subscript] ++inserted text++ --strikethrough-- -<p> normal +"citation" ^superscript^ [subscript] ++inserted text++ --strikethrough-- monospace -<p>text -<p> <b>emphasis</b> +<p> normal text +<p> <b>emphasis</b> [note: can be configured to be represented by + bold, italics or underscore] <p> <b>bold text</b> -<p> <i>underscore</i> <p> <i>italics</i> +<p> <i>underscore</i> <p> "citation" -<p> ^superscript^ +<p> ^superscript^ <p> [subscript] <p> ++inserted text++ <p> --strikethrough-- -<p> 9.3 INDENTATION AND BULLETS +<p> monospace +<p> 9.3 INDENTATION AND BULLETS <p> <b>markup example:</b> <p> <p> <br> @@ -1017,7 +1030,6 @@ asterisks if required }~ continues <p> normal text [^*3] continues <p> normal text [^+2] continues -<p> <p> <b>Alternative endnote pair notation for footnotes/endnotes:</b> <p> <p> <br> @@ -1030,11 +1042,11 @@ asterisks if required }~ continues <p>9.5 LINKS <p> 9.5.1 NAKED URLS WITHIN TEXT, DEALING WITH URLS -<p> urls are found -within text and marked up automatically. A url within text is automatically -hyperlinked to itself and by default decorated with angled braces, unless -they are contained within a code block (in which case they are passed as -normal text), or escaped by a preceding underscore (in which case the decoration +<p> urls found within +text are marked up automatically. A url within text is automatically hyperlinked +to itself and by default decorated with angled braces, unless they are +contained within a code block (in which case they are passed as normal +text), or escaped by a preceding underscore (in which case the decoration is omitted). <p> <b>markup example:</b> <p> @@ -1091,11 +1103,11 @@ block is used there is neither decoration nor hyperlinking, code blocks <pre> about {~^ SiSU }http://url.org markup </pre> <p> <b>resulting output:</b> -<p> aboutSiSU <<a href='http://www.jus.uio.no/sisu/'>http://www.jus.uio.no/sisu/</a> +<p> abou tSiSU <<a href='http://www.jus.uio.no/sisu/'>http://www.jus.uio.no/sisu/</a> > [^14] markup -<p> 9.5.3 +<p> -<p>LINKING IMAGES +<p>9.5.3 LINKING IMAGES <p> <b>markup example:</b> <p> <p> <br> @@ -3305,23 +3317,23 @@ are authors’ works that while freely distributable are not freely changeab <p> </dd> <dt>Source digest: </dt> -<dd><i>MD5(sisu.ssm.sst)=</i> fd741a3ccf160aa55b942d76bd4e3f2a +<dd><i>SHA256(sisu.ssm.sst)=</i> a704e4b934fba753bf594990673cdd43a974d405702b78a12788ba80b5021850 <p> </dd> <dt>Generated by: </dt> -<dd><i>Generated</i> by: SiSU 2.0.0 of 2010w09/6 (2010-03-06) +<dd><i>Generated</i> by: SiSU 2.6.0 of 2010w27/3 (2010-07-07) <p> </dd> <dt>Ruby version: </dt> -<dd><i>ruby</i> 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] +<dd><i>ruby</i> 1.8.7 (2010-06-23 patchlevel 299) [i486-linux] <p> </dd> <dt>Document (dal) last generated: </dt> <dd> -<p><i>Wed</i> Mar 17 13:34:15 -0400 2010 +<p><i>Wed</i> Jul 07 09:33:25 -0400 2010 <p> </dd> <dt>Other versions of this document: </dt> @@ -3361,14 +3373,14 @@ are authors’ works that while freely distributable are not freely changeab </dt> <dd></dd> -<dt>* Generated by: SiSU 2.0.0 of 2010w09/6 (2010-03-06) </dt> +<dt>* Generated by: SiSU 2.6.0 of 2010w27/3 (2010-07-07) </dt> <dd></dd> <dt>* Ruby version: ruby 1.8.7 -(2010-01-10 patchlevel 249) [i486-linux] </dt> +(2010-06-23 patchlevel 299) [i486-linux] </dt> <dd></dd> -<dt>* Last Generated on: Wed Mar 17 13:34:17 +<dt>* Last Generated on: Wed Jul 07 09:33:28 -0400 2010 </dt> <dd></dd> diff --git a/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu.ssm b/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu.ssm index 230c247c..c162db3f 100644 --- a/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu.ssm +++ b/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu.ssm @@ -19,7 +19,7 @@ :created: 2002-08-28 :issued: 2002-08-28 :available: 2002-08-28 - :modified: 2010-03-03 + :modified: 2010-07-07 @make: :num_top: 1 diff --git a/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_commands.sst b/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_commands.sst index 9e4417ea..a406dc57 100644 --- a/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_commands.sst +++ b/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_commands.sst @@ -19,7 +19,7 @@ :issued: 2002-08-28 :available: 2002-08-28 :published: 2007-09-16 - :modified: 2009-12-16 + :modified: 2010-07-07 @make: :num_top: 1 @@ -130,9 +130,12 @@ produces a zipped file of the prepared document specified along with associated !_ -s [filename/wildcard] <br> copies sisu markup file to output directory. -!_ -t [filename/wildcard (*.termsheet.rb)] <br> +!_ -T [filename/wildcard (*.termsheet.rb)] <br> standard form document builder, preprocessing feature +!_ -t [filename/wildcard] <br> +produces plaintext with Unix linefeeds and without markup, (object numbers are omitted), has footnotes at end of each paragraph that contains them [ -A for equivalent dos (linefeed) output file] [see -e for endnotes]. (Options include: --endnotes for endnotes --footnotes for footnotes at the end of each paragraph --unix for unix linefeed (default) --msdos for msdos linefeed) + !_ -U [filename/wildcard] <br> prints url output list/map for the available processing flags options and resulting files that could be requested, (can be used to get a list of processing options in relation to a file, together with information on the output that would be produced), -u provides url output mapping for those flags requested for processing. The default assumes sisu_webrick is running and provides webrick url mappings where appropriate, but these can be switched to file system paths in sisurc.yml diff --git a/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_markup.sst b/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_markup.sst index baae0855..331e6af5 100644 --- a/data/doc/sisu/v2/sisu_markup_samples/sisu_manual/sisu_markup.sst +++ b/data/doc/sisu/v2/sisu_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-05-25 + :modified: 2010-07-07 @make: :num_top: 1 @@ -330,7 +330,8 @@ code{ code{ -normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", ^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- +normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", +^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- #{monospace}# normal text @@ -352,11 +353,14 @@ _{underscore}_ -{strikethrough}- +#{monospace}# + }code !_ resulting output: -normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", ^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- +normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", +^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- #{monospace}# normal text @@ -378,6 +382,8 @@ _{underscore}_ -{strikethrough}- +#{monospace}# + 2~ Indentation and bullets !_ markup example: diff --git a/conf/sisu/v1/version.yml b/data/sisu/v1/v/version.yml index 90edca90..75fe7895 100644 --- a/conf/sisu/v1/version.yml +++ b/data/sisu/v1/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 1.0.3 +:version: 1.0.4 :date_stamp: 2010w07/3 :date: "2010-02-17" :project: SiSU diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim index cba13164..11636720 100644 --- a/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,6 +1,6 @@ "SiSU Vim syntax file "SiSU Maintainer: Ralph Amissah <ralph@amissah.com> -"SiSU Markup: SiSU (sisu-2.5.0, 2010-06-11) +"SiSU Markup: SiSU (sisu-2.6.0, 2010-07-07) "(originally looked at Ruby Vim by Mirko Nasato) if version < 600 @@ -98,6 +98,7 @@ syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline "single words bold italicise etc. "workon diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml new file mode 100644 index 00000000..e328bd68 --- /dev/null +++ b/data/sisu/v2/v/version.yml @@ -0,0 +1,5 @@ +--- +:version: 2.6.0 +:date_stamp: 2010w27/3 +:date: "2010-07-07" +:project: SiSU diff --git a/lib/sisu/v1/sysenv.rb b/lib/sisu/v1/sysenv.rb index a55b03cc..519c0f9f 100644 --- a/lib/sisu/v1/sysenv.rb +++ b/lib/sisu/v1/sysenv.rb @@ -2648,10 +2648,10 @@ WOK def get_version @version={} @pwd=ENV['PWD'] - yst_etc="#{defaults[:sisu_etc]}/#{SiSU_version_dir}/version.yml" + yst_ver="#{defaults[:sisu_share]}/#{SiSU_version_dir}/v/version.yml" lib_path=@@lib_path ? @@lib_path : `echo $RUBYLIB`.split(':') @@lib_path ||=lib_path - if File.exist?(yst_etc); @version=YAML::load(File::open(yst_etc)) #unless @@noyaml + if File.exist?(yst_ver); @version=YAML::load(File::open(yst_ver)) #unless @@noyaml end @version end diff --git a/lib/sisu/v2/concordance.rb b/lib/sisu/v2/concordance.rb index 03635cd0..20ab8efa 100644 --- a/lib/sisu/v2/concordance.rb +++ b/lib/sisu/v2/concordance.rb @@ -331,7 +331,7 @@ WOK # special cases endnotes and header levels 1 - 3 end credits=@vz.credits_sisu - @file_concordance << %{</div><div class="content">#{credits}<div></body>\n</html>} # footer + @file_concordance << %{</div></body>\n</html>} # footer SiSU_Screen::Ansi.new(@md.cmd,@md.fns,"#{@env.path.output_tell}/#{@md.fn[:concordance]}").flow if @md.cmd =~/[MV]/ end end diff --git a/lib/sisu/v2/constants.rb b/lib/sisu/v2/constants.rb index 363bc65a..7fe795da 100644 --- a/lib/sisu/v2/constants.rb +++ b/lib/sisu/v2/constants.rb @@ -84,6 +84,7 @@ Mx[:fa_strike_o]= "#{Mx[:fa_o]}del#{Mx[:fa_o_c]}"; Mx[:fa_strike_c]= " Mx[:fa_superscript_o]="#{Mx[:fa_o]}sup#{Mx[:fa_o_c]}"; Mx[:fa_superscript_c]="#{Mx[:fa_c_o]}sup#{Mx[:fa_c]}" Mx[:fa_subscript_o]= "#{Mx[:fa_o]}sub#{Mx[:fa_o_c]}"; Mx[:fa_subscript_c]= "#{Mx[:fa_c_o]}sub#{Mx[:fa_c]}" Mx[:fa_hilite_o]= "#{Mx[:fa_o]}hi#{Mx[:fa_o_c]}"; Mx[:fa_hilite_c]= "#{Mx[:fa_c_o]}hi#{Mx[:fa_c]}" +Mx[:fa_monospace_o]= "#{Mx[:fa_o]}mono#{Mx[:fa_o_c]}"; Mx[:fa_monospace_c]= "#{Mx[:fa_c_o]}mono#{Mx[:fa_c]}" Mx[:gl_bullet]= "#{Mx[:gl_o]}●#{Mx[:gl_c]}" Mx[:pa_non_object_dummy_heading]="#{Mx[:pa_o]}-##{Mx[:pa_c]}" #unnumbered paragraph, delete when not required [used in dummy headings, eg. for segmented html] (place marker at end of paragraph) Mx[:pa_non_object_no_heading]="#{Mx[:pa_o]}~##{Mx[:pa_c]}" #unnumbered paragraph (place marker at end of paragraph) @@ -125,6 +126,7 @@ Px[:strike_o]= '-'; Px[:strike_c]= '-' Px[:superscript_o]='^'; Px[:superscript_c]='^' Px[:subscript_o]= '['; Px[:subscript_c]= ']' Px[:hilite_o]= '*'; Px[:hilite_c]= '*' +Px[:monospace_o]= ''; Px[:monospace_c]= '' Px[:lv1]= '*' Px[:lv2]= '=' Px[:lv3]= '=' diff --git a/lib/sisu/v2/css.rb b/lib/sisu/v2/css.rb index f088c44e..38913431 100644 --- a/lib/sisu/v2/css.rb +++ b/lib/sisu/v2/css.rb @@ -605,6 +605,11 @@ WOK background: #880000; } + tt { + font-family: inconsolata, andale mono, courier new, courier, monospace; + background-color: #eeeeee; + } + label.ocn { width: 2%; float: right; diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb index 5e04730f..713bc886 100644 --- a/lib/sisu/v2/dal_syntax.rb +++ b/lib/sisu/v2/dal_syntax.rb @@ -253,6 +253,8 @@ module SiSU_Syntax "\\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/, "\\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]}|\(|\>)#\{(.+?)\}#/, + "\\1#{Mx[:fa_monospace_o]}\\2#{Mx[:fa_monospace_c]}") #monospace text dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\+\{(.+?)\}\+/, "\\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/, @@ -288,6 +290,7 @@ module SiSU_Syntax # ,{subscript}, <sub>subscript</sub> # +{inserted text}+ <ins>inserted text</ins> # -{deleted text}- <del>deleted text</del> + # #{monospace text}# # # {url address}:url # {image.png}imageurl @@ -447,6 +450,7 @@ module SiSU_Syntax # ,{subscript}, <sub>subscript</sub> # +{inserted text}+ <ins>inserted text</ins> # -{deleted text}- <del>deleted text</del> + # #{monospace text}# # {url address}:url # {image.png}imageurl # {image.png}png diff --git a/lib/sisu/v2/db_import.rb b/lib/sisu/v2/db_import.rb index 3b5c1cc9..4237757f 100644 --- a/lib/sisu/v2/db_import.rb +++ b/lib/sisu/v2/db_import.rb @@ -250,6 +250,7 @@ module SiSU_DB_import data.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'\1') data.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'\1') data.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1') + data.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\1') data.obj.gsub!(/#{Mx[:gl_o]}(●)#{Mx[:gl_c]}\s*/,'\1 ') data.obj.gsub!(/#{Mx[:tag_o]}\S+?#{Mx[:tag_c]}/,'') #check @col[:seg]=@@seg @@ -384,6 +385,8 @@ module SiSU_DB_import @en_a_plus,@en_z_plus=@en_pls[0].first,@en_pls[0].last if @en_pls[0] @col[:body]=if data.is=='table' SiSU_Format_Shared::CSS_Format.new(@md,data).html_table + elsif data.is=='code' + SiSU_Format_Shared::CSS_Format.new(@md,data).code elsif defined? data.indent and data.indent =~/[1-9]/ SiSU_Format_Shared::CSS_Format.new(@md,data).indent(data.indent) else diff --git a/lib/sisu/v2/defaults.rb b/lib/sisu/v2/defaults.rb index 849c430c..09a9808b 100644 --- a/lib/sisu/v2/defaults.rb +++ b/lib/sisu/v2/defaults.rb @@ -1649,7 +1649,7 @@ WOK </font> #{table_close*4}} end - def credits_sisu + def credits_sisu_manifest %{<div class="substance"> <table summary="SiSU summary" bgcolor="#ffffff" cellpadding="4" border="0"> <tr><td> @@ -1657,12 +1657,22 @@ WOK #{widget_way_better} </table></div>} end + def credits_sisu + x=%{<div class="substance"> +<table summary="SiSU summary" bgcolor="#ffffff" cellpadding="4" border="0"> +<tr><td> + #{widget_sisu} + #{widget_way_better} +</table></div>} + '' + end def credits_splash end def credits_sisu_epub - %{<div class="substance"> + x=%{<div class="substance"> <p class="center"><a href="http://www.openebook.org"><b>EPUB</b></a> generated by <a href="http://www.sisudoc.org"><b>#{@v[:project]}</b></a> v#{@v[:version]}, GPL3</p> </div>} + '' end #% bottom def bottom_surround diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb index 498912a3..6bbbd668 100644 --- a/lib/sisu/v2/epub_format.rb +++ b/lib/sisu/v2/epub_format.rb @@ -398,6 +398,11 @@ module SiSU_EPUB_Format background: #880000; } + tt { + font-family: inconsolata, andale mono, courier new, courier, monospace; + background-color: #eeeeee; + } + label.ocn { width: 2%; float: right; diff --git a/lib/sisu/v2/epub_tune.rb b/lib/sisu/v2/epub_tune.rb index 035a453b..5da82392 100644 --- a/lib/sisu/v2/epub_tune.rb +++ b/lib/sisu/v2/epub_tune.rb @@ -244,6 +244,7 @@ module SiSU_EPUB_Tune dob.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'<ins>\1</ins>') dob.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'<cite>\1</cite>') dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>') + dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>') # tt, kbd dob.obj.gsub!(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'') dob.obj.gsub!(/^#{Mx[:gl_bullet]}/m,'● ') dob.obj.gsub!(/#{Mx[:nbsp]}/,' ') diff --git a/lib/sisu/v2/html_promo.rb b/lib/sisu/v2/html_promo.rb index 0b3e500a..290e74f2 100644 --- a/lib/sisu/v2/html_promo.rb +++ b/lib/sisu/v2/html_promo.rb @@ -163,7 +163,7 @@ module SiSU_HTML_promo end form=if action \ and db - 'SiSU search:<br />' + @env.widget.search_form('sisusearch',action,db,table) + @env.widget.search_form('sisusearch',action,db,table) else '' end end diff --git a/lib/sisu/v2/html_tune.rb b/lib/sisu/v2/html_tune.rb index 11b1dbde..d5f3f35e 100644 --- a/lib/sisu/v2/html_tune.rb +++ b/lib/sisu/v2/html_tune.rb @@ -240,6 +240,7 @@ module SiSU_HTML_Tune dob.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'<ins>\1</ins>') dob.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'<cite>\1</cite>') dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>') + dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>') # tt, kbd dob.obj.gsub!(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'<a name="\1"></a>') dob.obj.gsub!(/^#{Mx[:gl_bullet]}/m,'● ') dob.obj.gsub!(/#{Mx[:nbsp]}/,' ') diff --git a/lib/sisu/v2/manifest.rb b/lib/sisu/v2/manifest.rb index c8dd3753..7be18b19 100644 --- a/lib/sisu/v2/manifest.rb +++ b/lib/sisu/v2/manifest.rb @@ -677,7 +677,7 @@ WOK </table> </div> <div class="main_column"> -#{vz.credits_sisu} +#{vz.credits_sisu_manifest} </div> </body> </html> diff --git a/lib/sisu/v2/manpage.rb b/lib/sisu/v2/manpage.rb index 48b22fd3..2d13793b 100644 --- a/lib/sisu/v2/manpage.rb +++ b/lib/sisu/v2/manpage.rb @@ -274,6 +274,7 @@ WOK dob.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'++\1++') dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'--\1--') dob.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'"\1"') + dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\1') dob.obj.gsub!(/\A\s*#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}#{Mx[:br_line]}/m,"#{Mx[:br_line]}.I \\1#{Mx[:br_line]}") dob.obj.gsub!(/\s*#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/m,"#{Mx[:br_line]}.I \\1#{Mx[:br_line]}") dob.obj.gsub!(/\A\s*#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}#{Mx[:br_line]}/m,"#{Mx[:br_line]}.BI \\1#{Mx[:br_line]}") diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index 4eabbba5..2c0e206b 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -392,7 +392,7 @@ module SiSU_ODF parablock.gsub!(/^\s*$/,'<br />') parablock.gsub!(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/, '<text:a xlink:type="simple" xlink:href="\1">\1</text:a>') #http ftp matches escaped, no decoration - parray << %{<text:p text:style-name="P5">#{parablock}</text:p>} if parablock =~/\S+/ + parray << %{<text:p text:style-name="P20">#{parablock}</text:p>} if parablock =~/\S+/ end dob.obj=parray.join + '<text:p text:style-name="Standard"/>' end @@ -485,14 +485,22 @@ module SiSU_ODF dob.obj end dob.obj.gsub!(/#{Mx[:br_line]}/,'<br />') - dob.obj.gsub!(/#{Mx[:br_page]}|#{Mx[:br_page_new]}/,'<text:p text:style-name="P8"> </text:p>') + dob.obj.gsub!(/#{Mx[:br_page]}|#{Mx[:br_page_new]}/, + '<text:p text:style-name="P8"> </text:p>') dob.obj.gsub!(/©/,'©') #too arbitrary dob.obj.gsub!(/.+?<-#>/,'') # remove dummy headings (used by html) #check - dob.obj.gsub!(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'<text:span text:style-name="T1">\1</text:span>') - dob.obj.gsub!(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'<text:span text:style-name="T2">\1</text:span>') - dob.obj.gsub!(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'<text:span text:style-name="T3">\1</text:span>') - dob.obj.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'<text:span text:style-name="T4">\1</text:span>') - dob.obj.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'<text:span text:style-name="T5">\1</text:span>') + dob.obj.gsub!(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/, + '<text:span text:style-name="T1">\1</text:span>') + dob.obj.gsub!(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/, + '<text:span text:style-name="T2">\1</text:span>') + dob.obj.gsub!(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/, + '<text:span text:style-name="T3">\1</text:span>') + dob.obj.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/, + '<text:span text:style-name="T4">\1</text:span>') + dob.obj.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/, + '<text:span text:style-name="T5">\1</text:span>') + dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/, + '<text:span text:style-name="T7">\1</text:span>') dob.obj.gsub!(//u,'-') dob.obj.gsub!(/ /u, ' ') # space identify dob.obj.gsub!(/ /u, ' ') # space identify @@ -557,7 +565,7 @@ module SiSU_ODF end @@odf[:head]<<%{<?xml version="1.0" encoding="UTF-8"?>#{@br}} + %{<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" office:version="1.0"><office:scripts/>#{@br}} + - %{<office:font-face-decls><style:font-face style:name="HG Mincho Light J" svg:font-family="'HG Mincho Light J', 'MS Mincho', 'HG Mincho J', 'HG Mincho L', 'HG Mincho', Mincho, 'MS PMincho', 'HG Mincho Light J', 'MS Gothic', 'HG Gothic J', 'HG Gothic B', 'HG Gothic', Gothic, 'MS PGothic', 'Andale Sans UI', 'Arial Unicode MS', 'Lucida Sans Unicode', Tahoma" style:font-pitch="variable"/><style:font-face style:name="Nimbus Sans L" svg:font-family="'Nimbus Sans L'" style:font-pitch="variable"/><style:font-face style:name="Tahoma" svg:font-family="Tahoma, Lucidasans, 'Lucida Sans', 'Arial Unicode MS'" style:font-pitch="variable"/><style:font-face style:name="Nimbus Roman No9 L" svg:font-family="'Nimbus Roman No9 L'" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Bitstream Vera Sans" svg:font-family="'Bitstream Vera Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/></office:font-face-decls>#{@br}} + + %{<office:font-face-decls><style:font-face style:name="DejaVu Sans Mono" svg:font-family="'DejaVu Sans Mono'" style:font-adornments="Book" style:font-family-generic="modern" style:font-pitch="fixed"/><style:font-face style:name="Inconsolata" svg:font-family="Inconsolata" style:font-adornments="Regular" style:font-pitch="fixed"/><style:font-face style:name="Liberation Mono" svg:font-family="'Liberation Mono'" style:font-adornments="Regular" style:font-family-generic="modern" style:font-pitch="fixed"/><style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-adornments="ExtraLight" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Nimbus Sans L" svg:font-family="'Nimbus Sans L'" style:font-pitch="variable"/><style:font-face style:name="Tahoma" svg:font-family="Tahoma, Lucidasans, 'Lucida Sans', 'Arial Unicode MS'" style:font-pitch="variable"/><style:font-face style:name="DejaVu Serif" svg:font-family="'DejaVu Sans'" style:font-adornments="ExtraLight" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Nimbus Roman No9 L" svg:font-family="'Nimbus Roman No9 L'" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Bitstream Vera Sans" svg:font-family="'Bitstream Vera Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/></office:font-face-decls>#{@br}} + %{<office:automatic-styles>#{@br}} + %{#{table}#{@br}} + %{<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/></style:style>#{@br}} + @@ -579,13 +587,14 @@ module SiSU_ODF %{<style:style style:name="P17" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="7cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#{@br}} + %{<style:style style:name="P18" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="8cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#{@br}} + %{<style:style style:name="P19" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="8cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#{@br}} + - + %{<style:style style:name="P20" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%" fo:text-align="start" style:justify-single-word="false"/><style:text-properties style:font-name="DejaVu Sans Mono" fo:font-size="9pt" fo:font-weight="normal" fo:background-color="#e6e6e6"/></style:style>#{@br}} + %{<style:style style:name="T1" style:family="text"><style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/></style:style>#{@br}} + %{<style:style style:name="T2" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/></style:style>#{@br}} + %{<style:style style:name="T3" style:family="text"><style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/></style:style>#{@br}} + %{<style:style style:name="T4" style:family="text"><style:text-properties style:text-position="super 58%"/></style:style>#{@br}} + %{<style:style style:name="T5" style:family="text"><style:text-properties style:text-position="sub 58%"/></style:style>#{@br}} + %{<style:style style:name="T6" style:family="text"><style:text-properties style:font-name="Courier 10 Pitch" fo:font-size="12pt"/></style:style>#{@br}} + + %{<style:style style:name="T7" style:family="text"><style:text-properties style:font-name="DejaVu Sans Mono" fo:font-size="10pt" fo:font-weight="normal" fo:background-color="#e6e6e6"/></style:style>#{@br}} + %{<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics"><style:graphic-properties style:wrap="none" style:horizontal-pos="left" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/></style:style>#{@br}} + %{<style:style style:name="gr1" style:family="graphic"><style:graphic-properties draw:stroke="none" draw:fill="none" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle" draw:color-mode="standard" draw:luminance="0%" draw:contrast="0%" draw:gamma="100%" draw:red="0%" draw:green="0%" draw:blue="0%" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:image-opacity="100%" style:mirror="none" style:run-through="background" style:wrap="none" style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" style:flow-with-text="false"/></style:style>#{@br}} + %{<style:style style:name="gr2" style:family="graphic"><style:graphic-properties draw:stroke="none" draw:fill="none" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle" draw:color-mode="standard" draw:luminance="0%" draw:contrast="0%" draw:gamma="100%" draw:red="0%" draw:green="0%" draw:blue="0%" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:image-opacity="100%" style:mirror="none" style:run-through="background" style:wrap="none" style:vertical-pos="middle" style:vertical-rel="baseline" style:horizontal-pos="left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" style:flow-with-text="false"/></style:style>#{@br}} + diff --git a/lib/sisu/v2/plaintext.rb b/lib/sisu/v2/plaintext.rb index 4acdec93..bc83702b 100644 --- a/lib/sisu/v2/plaintext.rb +++ b/lib/sisu/v2/plaintext.rb @@ -298,6 +298,8 @@ WOK "#{Px[:cite_o]}\\1#{Px[:cite_c]}") dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/, "#{Px[:strike_o]}\\1#{Px[:strike_c]}") + dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/, + "#{Px[:monospace_o]}\\1#{Px[:monospace_c]}") unless dob.is=='code' dob.obj.gsub!(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1') dob.obj.gsub!(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1') diff --git a/lib/sisu/v2/shared_html_lite.rb b/lib/sisu/v2/shared_html_lite.rb index bb27258c..02b4dcc2 100644 --- a/lib/sisu/v2/shared_html_lite.rb +++ b/lib/sisu/v2/shared_html_lite.rb @@ -147,6 +147,7 @@ module SiSU_Format_Shared s=s.gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strke_c]}/,'-{\1}-') s=s.gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'<sup>\1</sup>') s=s.gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'<sub>\1</sub>') + s=s.gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>') # tt, kbd s=s.gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/i,'~') end def markup_object(t_o) @@ -225,6 +226,11 @@ GSUB h={:txt =>txt,:class =>'norm',:type =>'substantive',:id =>@ocn} tag_para(h) end + def code + txt=markup_object(@t_o) + h={:txt =>"<tt>#{txt}</tt>",:class =>'code',:type =>'substantive',:id =>@ocn} + tag_para(h) + end def indent(t) txt=markup_object(@t_o) h={:txt =>txt,:class =>"indent#{t}",:type =>'substantive',:id =>@ocn} diff --git a/lib/sisu/v2/shared_xml.rb b/lib/sisu/v2/shared_xml.rb index 4d504882..2fcab17e 100644 --- a/lib/sisu/v2/shared_xml.rb +++ b/lib/sisu/v2/shared_xml.rb @@ -357,6 +357,7 @@ module SiSU_XML_munge dob.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'<ins>\1</ins>') dob.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'<cite>\1</cite>') dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>') + dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>') dob.obj.gsub!(/<:pb>\s*/,'') #Fix dob.obj.gsub!(/<+[-~]#>+/,'') if dob.is !~/^code/ diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index 1727e630..3a532d65 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -1352,7 +1352,11 @@ WOK man_path=@@man_path=File.expand_path(@rc['webserv']['path']) else nil end - else manpath=@@man_path + else @@man_path + end + man_path_head=man_path.gsub(/(\S+)\/[^\/\s]+$/,'\1') + unless FileTest.directory?(man_path) + mkdir_p(man_path) if File.writable?("#{man_path_head}/.") end @webserv_path=if defined? man_path \ and File.writable?("#{man_path}/.") @@ -1977,7 +1981,7 @@ WOK elsif defined? @rc['program_select']['epub_viewer'] \ and @rc['program_select']['epub_viewer'] =~/\S\S+/ @rc['program_select']['epub_viewer'] - else 'calibre' #'calibre' 'fbreader' + else 'ebook-viewer' #'calibre' 'fbreader' end end def xml_viewer @@ -2665,10 +2669,10 @@ WOK def get_version @version={} @pwd=ENV['PWD'] - yst_etc="#{defaults[:sisu_etc]}/#{SiSU_version_dir}/version.yml" + yst_ver="#{defaults[:sisu_share]}/#{SiSU_version_dir}/v/version.yml" lib_path=@@lib_path ? @@lib_path : `echo $RUBYLIB`.split(':') @@lib_path ||=lib_path - if File.exist?(yst_etc); @version=YAML::load(File::open(yst_etc)) #unless @@noyaml + if File.exist?(yst_ver); @version=YAML::load(File::open(yst_ver)) #unless @@noyaml end @version end diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb index b9d9e2c0..9aa82927 100644 --- a/lib/sisu/v2/texpdf.rb +++ b/lib/sisu/v2/texpdf.rb @@ -443,10 +443,10 @@ module SiSU_TeX dob.tmp = ocn \ + @tex_ml.paraskip_small \ + "\n" \ - + ' \\begin{scriptsize}' \ + + ' \\begin{Codeblock}' \ + "\n" \ + dob.tmp \ - + '\\end{scriptsize}' \ + + ' \\end{Codeblock}' \ + "\n" \ + @tex_ml.paraskip_normal dob @@ -502,7 +502,7 @@ module SiSU_TeX and dob.obj=~/Metadata\b/ h=tst.level4 metadata=Metadata::TeX_metadata.new(@md).metadata_tex - dob.tmp=h.tmp + ' ' + metadata.join(br) + dob.tmp=h.tmp + ' ' + '\begin{scriptsize}' + metadata.join(br) + '\end{scriptsize}' else dob.tmp='' # dob.tmp={:l =>'',:p =>''} end when 'para' @@ -566,6 +566,8 @@ module SiSU_TeX \\makeatother \\chardef\\txtbullet="2022 \\chardef\\tilde="7E +\\definecolor{Light}{gray}{.92} +\\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\tiny\\ttfamily\\texbackslash#1} % \\sloppy \\begin{document} WOK @@ -591,19 +593,19 @@ WOK else "\n\\author{#{@copymark} \\textnormal{#{author}}}" end end - @tex_file << unless @md.fnb =~/^mail\s*$/; "\n\\date{\\begin{footnotesize} copy @ #{@tex_ml.site} \\end{footnotesize} #{sisu_rc_footnote}}" + @tex_file << unless @md.fnb =~/^mail\s*$/; "\n\\date{\\begin{footnotesize} copy @ #{@tex_ml.site} \\end{footnotesize}}" else "\\date" end @tex_file <<<<WOK \\pagenumbering{roman}\\maketitle \\pagestyle{fancy} WOK - @tex_file << "\\newpage\n" - @tex_file << @@rights if defined? @md.rights.all and @md.rights.all #if @orientation =~/landscape/ - @tex_file << @@prefix_b if defined? @md.creator.prefix_b and @md.creator.prefix_b - @tex_file << @tex_ml.sisu_rights - @tex_file << (@md.sc_info ? @tex_ml.doc_sc_info : @tex_ml.doc_no_sc_info) - @tex_file << @tex_ml.manifest_info + if defined? @md.rights.all \ + and @md.rights.all + @tex_file << "\\newpage\n" + @tex_file << @@rights + @tex_file << @@prefix_b if defined? @md.creator.prefix_b and @md.creator.prefix_b + end x={} x[:l] =<<WOK #{@tex_ml.newpage('landscape')} @@ -658,37 +660,6 @@ WOK end @tex_file << dob end - @tex_file << "\n\\newpage\n" # was \\pagebreak\n - # kludge ... look again later - @tex_file << if @md.doc_skin !~/skin_mail/; @tex_ml.doc_tail - else @tex_ml.mail_tail - end - if defined? @md.lnk \ - and @md.lnk - @md.lnk.each do |l| - if l[:say] - url=%<#{l[:url]}> - url.gsub!(/(?:\\)*([$&~%_#}{^])/,"\\\\\\1") #latex special chars - s_lnk=l[:say] - s_lnk.gsub!(/\s*(#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]})\s*/,' \newline ') - s_lnk.gsub!(/(?:\\)*([$&~%_#}{^])/,"\\\\\\1") #latex special chars - if url !~/^\.(\.)?\// - s_lnk_url=%<#{@brace_url.tex_open}\\begin{scriptsize}\\url{#{url}}\\end{scriptsize}#{@brace_url.tex_close}> # note this bit of dereferencing magic - else - url.gsub!(/\.\.\//,'') - s_lnk_url="(#{@tex_ml.site}) \\\\\n" + ' ' + - '\begin{scriptsize}' + - %<\\url\{#{@vz.url_root_http}/#{url}\}> + # note this bit of dereferencing magic - "\\end{scriptsize}" - end - @tex_file << " #{s_lnk} \\\\\n #{s_lnk_url} \n" unless @md.doc_skin =~/skin_mail/ - s_lnk=s_lnk_url=nil - end - end - end - @tex_file << " #{@tex_ml.sitename} home: \\\\ -\\begin{bfseries}#{@tex_ml.site}\\end{bfseries} -" @st[:tex][:stmp]||=@md.stmpd stamp=@st[:tex][:stmp] if @st[:tex][:stmp] if stamp diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index ba615749..637271a0 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -213,12 +213,13 @@ module SiSU_TeX_Pdf dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') cont_ln=dob.tmp.dup 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! cont_ln.gsub!(/\s*\\footnote\[\d+\]\{%\n .+? \}\s*/,' ') cont_ln.gsub!(/\s*\\Footnote[A]\{[*+]+\d*\}\{%\n .+? \}\s*/,' ') end dob.tmp.gsub!(/^(.*)\n?$/m, - "\\part*{\\1} + "#{clearp}\\part*{\\1} \\addcontentsline{toc}{section}{#{cont_ln}} \\markboth{#{title}}\n") dob @@ -967,7 +968,10 @@ WOK w.gsub!(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,' \newline ') #watch w.gsub!(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/,'<=tilde>') #126 usual w.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 - w.gsub!(/\#/,'<=hash>') unless w =~/#{Mx[:rel_o]}/ + if w !~/#{Mx[:rel_o]}/ \ + and w !~/#{Mx[:gl_o]}#/ + w.gsub!(/\#/,'<=hash>') + end para_array << w end str=para_array.join(' ') @@ -1060,6 +1064,7 @@ WOK str.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\sout{\1}') # ulem str.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,"\$^{\\textrm{\\1}}\$") str.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,"\$_{\\textrm{\\1}}\$") + str.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,' \monosp{ \1 } ') unless is=='code' str.gsub!(/"(.+?)"/,'“\1”') # quote marks / quotations open & close " need condition exclude for code str.gsub!(/\s+"/,' “') # open " diff --git a/lib/sisu/v2/urls.rb b/lib/sisu/v2/urls.rb index 56b93a78..1011eda4 100644 --- a/lib/sisu/v2/urls.rb +++ b/lib/sisu/v2/urls.rb @@ -114,6 +114,7 @@ module SiSU_urls 'P (Ruby profiler)'=>'profile', 's (sisu markup)'=>source, 'S (sisupod)'=>@fn[:sisupod], + 't (Plain-text (endnotes))'=>@fn[:plain], 'x (XML sax type)'=>@fn[:sax], 'X (XML dom type)'=>@fn[:dom], 'y (Manifest, html)'=>@fn[:manifest], @@ -129,8 +130,8 @@ module SiSU_urls end end def urls_maintenance(opt,x,y) - if x=~/^([abcehHmNopwxXy])/ \ - and opt.cmd =~/[abcehHmNopwxXy]/ \ + if x=~/^([abcehHmNoptwxXy])/ \ + and opt.cmd =~/[abcehHmNoptwxXy]/ \ and x=~/^[#{opt.cmd}]/ \ and opt.cmd =~/M/ m=$1 @@ -191,8 +192,8 @@ module SiSU_urls @u.each do |x,y| if @opt.fns =~ @m_regular if @opt.cmd =~/[MVv]/ - if x=~/^([abchHNopwxXyY])/ \ - and @opt.cmd=~/[abchHNopwxXyY]/ \ + if x=~/^([abchHNoptwxXyY])/ \ + and @opt.cmd=~/[abchHNoptwxXyY]/ \ and x=~/^[#{@opt.cmd}]/ m=$1 SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}").result diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index ef5edb98..79d1f4ef 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2010-03-03" "2.0.0" "SiSU" +.TH "sisu" "1" "2010-07-07" "2.6.0" "SiSU" .SH NAME sisu \- documents: markup, structuring, publishing in multiple standard formats, and search .SH SYNOPSIS @@ -370,10 +370,19 @@ individual files for sending). See the \-S option without [filename/wildcard]. copies sisu markup file to output directory. .TP -.B \-t [filename/wildcard \ (*.termsheet.rb)] +.B \-T [filename/wildcard \ (*.termsheet.rb)] standard form document builder, preprocessing feature .TP +.B \-t [filename/wildcard] +produces plaintext with Unix linefeeds and without markup, (object numbers +are omitted), has footnotes at end of each paragraph that contains them [ \ \-A +\ for \ equivalent \ dos \ (linefeed) \ output \ file] [see \ \-e \ for \ +endnotes]. (Options include: \-\-endnotes for endnotes \-\-footnotes for +footnotes at the end of each paragraph \-\-unix for unix linefeed (default) +\-\-msdos for msdos linefeed) + +.TP .B \-U [filename/wildcard] prints url output list/map for the available processing flags options and resulting files that could be requested, (can be used to get a list of @@ -1074,7 +1083,8 @@ normally be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document .nf - normal text !{emphasis}! *{bold text}* _{underscore}_ /{italics}/ \"{citation}\" ^{superscript}^ ,{subscript}, +{inserted text}+ + normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", + ^{superscript}^, ,{subscript},, +{inserted text}+, \-{strikethrough}\- #{monospace}# .BR normal text .BR @@ -1095,6 +1105,8 @@ normally be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document +{inserted text}+ .BR \-{strikethrough}\- +.BR + #{monospace}# .fi .BR @@ -1106,22 +1118,24 @@ normal text .B bold text .I underscore .I italics -"citation" ^superscript^ [subscript] ++inserted text++ \-\-strikethrough\-\- +"citation" ^superscript^ [subscript] ++inserted text++ \-\-strikethrough\-\- monospace .BR normal text .BR .B emphasis +[note: \ can \ be \ configured \ to \ be \ represented \ by \ bold, \ italics +\ or \ underscore] .BR .B bold text .BR -.I underscore +.I italics .BR -.I italics +.I underscore .BR "citation" @@ -1138,6 +1152,9 @@ normal text .BR \-\-strikethrough\-\- +.BR +monospace + .SH 9.3 INDENTATION AND BULLETS @@ -1281,7 +1298,6 @@ normal text [^*3] continues .BR normal text [^+2] continues - .BR .B Alternative endnote pair notation for footnotes/endnotes: @@ -1304,7 +1320,7 @@ the standard and pair notation cannot be mixed in the same document 9.5.1 NAKED URLS WITHIN TEXT, DEALING WITH URLS .BR -urls are found within text and marked up automatically. A url within text is +urls found within text are marked up automatically. A url within text is automatically hyperlinked to itself and by default decorated with angled braces, unless they are contained within a code block (in which case they are passed as normal text), or escaped by a preceding underscore (in which case the @@ -1395,7 +1411,7 @@ automatically as a footnote .B resulting output: .BR -aboutSiSU <http://www.jus.uio.no/sisu/> [^14] markup +abou tSiSU <http://www.jus.uio.no/sisu/> [^14] markup .SH 9.5.3 LINKING IMAGES @@ -4630,19 +4646,19 @@ Filetype: .TP Source digest: -.I MD5(sisu.ssm.sst)= fd741a3ccf160aa55b942d76bd4e3f2a +.I SHA256(sisu.ssm.sst)= a704e4b934fba753bf594990673cdd43a974d405702b78a12788ba80b5021850 .TP Generated by: -.I Generated by: SiSU 2.0.0 of 2010w09/6 (2010-03-06) +.I Generated by: SiSU 2.6.0 of 2010w27/3 (2010-07-07) .TP Ruby version: -.I ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] +.I ruby 1.8.7 (2010-06-23 patchlevel 299) [i486-linux] .TP Document (dal) last generated: -.I Wed Mar 17 13:34:15 -0400 2010 +.I Wed Jul 07 09:33:25 -0400 2010 .TP Other versions of this document: @@ -4662,10 +4678,10 @@ pdf: <http://www.jus.uio.no/sisu/sisu/landscape.pdf> at: <http://www.jus.uio.no/sisu> .TP .TP -* Generated by: SiSU 2.0.0 of 2010w09/6 (2010-03-06) +* Generated by: SiSU 2.6.0 of 2010w27/3 (2010-07-07) .TP -* Ruby version: ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] +* Ruby version: ruby 1.8.7 (2010-06-23 patchlevel 299) [i486-linux] .TP -* Last Generated on: Wed Mar 17 13:34:17 -0400 2010 +* Last Generated on: Wed Jul 07 09:33:28 -0400 2010 .TP * SiSU http://www.jus.uio.no/sisu |