diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/css.rb | 9 | ||||
-rw-r--r-- | lib/sisu/v0/html.rb | 9 | ||||
-rw-r--r-- | lib/sisu/v0/html_format.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v0/html_format_css.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v0/manpage.rb | 25 | ||||
-rw-r--r-- | lib/sisu/v0/plaintext.rb | 2 |
6 files changed, 29 insertions, 29 deletions
diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb index f4cf5228..febf0cd1 100644 --- a/lib/sisu/v0/css.rb +++ b/lib/sisu/v0/css.rb @@ -414,11 +414,15 @@ WOK p.left, th.left, td.left { text-align: left; } + p.small_left, th.small_left, td.small_left { + text-align: left; + font-size: 80%; + } p.right, th.right, td.right { text-align: right; } - h1, h2, h3, h4, h5, h6 { + h0, h1, h2, h3, h4, h5, h6 { display: block; font-family: #{fonts}; font-weight: bold; @@ -638,6 +642,9 @@ WOK h6 { font-size: 100%; } + h0 { + font-size: 80%; + } h1.norm, h2.norm, h3.norm { font-size: 110%; margin-left: 10mm; diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 2894fa27..89c6d463 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -390,12 +390,11 @@ WOK end toc={} format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) - toc[:seg]=format_toc.lev1 title=if para =~/(<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)$/ m=/#{$1}/ para.gsub!(m,'') if para=~/^\d~\s+Document Information/ - %{<b><a href="#docinfo">#{linkname}</a></b>} + %{<a href="#docinfo">#{linkname}</a>} else linkname end else @@ -406,7 +405,11 @@ WOK %{<b><a href="##{link}">#{linkname}</a></b>} end format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) - toc[:scr]=format_toc.lev1 + if para =~/^\d~\s+Document Information/ + toc[:seg]=toc[:scr]=format_toc.lev0 + else + toc[:seg]=toc[:scr]=format_toc.lev1 + end toc end def level_2 diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index d9fa95c2..5a28c271 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -468,17 +468,11 @@ WOK end def rights rights=@md.dc_rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') - %{<p class="left">#{rights}</p> + %{<p class="small_left">Rights: #{rights}</p> <p />} end def prefix_b - %{<table summary="prefix"> -<tr> -<td width=10%> </td> -<td width=80%> - #{@md.prefix_b} -#{@vz.table_close} -<p />} + %{<p class="small_left">Prefix: #{@md.prefix_b}<p />} end def scroll_head_title_banner_open %{<center> diff --git a/lib/sisu/v0/html_format_css.rb b/lib/sisu/v0/html_format_css.rb index 9ef61a02..497e883c 100644 --- a/lib/sisu/v0/html_format_css.rb +++ b/lib/sisu/v0/html_format_css.rb @@ -469,6 +469,9 @@ module SiSU_HTML_Format_type def lev6 lev('h6','toc') end + def lev0 #docinfo + lev('h0','toc') + end end end __END__ diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb index 05586dec..5b2cef6f 100644 --- a/lib/sisu/v0/manpage.rb +++ b/lib/sisu/v0/manpage.rb @@ -187,6 +187,8 @@ module SiSU_manpage end wrap=util.line_wrap if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m + wrap.gsub!(/(^| |\s|\*)\\\*/,'\1\\\\\*') #man page requires + wrap.gsub!(/\s\.(\S+)/,' \\.\1') wrap.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape wrap.gsub!(/^\s*([\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB .TP @@ -277,19 +279,8 @@ WOK when 2..3; '.SH ' << @br << wrapped.upcase << @br << '.BR' when 4; '.SH ' << @br << wrapped.upcase << @br << '.BR' when 5..6; '.SH ' << @br << wrapped.upcase << @br - #when 1; '.SH ' + wrapped.upcase << @br << '.BR' - #when 2..3; '.SH ' + wrapped.upcase << @br << '.BR' - #when 4; '.SH ' + wrapped.upcase << @br << '.BR' - #when 5..6; '.SH ' + wrapped.upcase << @br - ##when 1; '.SH ' + wrapped.upcase << @br << '.TP' << @br # << '*'*times << @br - ##when 2..3; '.SH ' + wrapped.upcase << @br << '.TP' << @br # << '='*times << @br - ##when 4; '.SH ' + wrapped.upcase << @br << '.TP' << @br # << '-'*times << @br - ##when 5..6; '.SH ' + wrapped.upcase << @br << '.TP' << @br # << '.'*times << @br end else - ##@manpage[:body] << wrapped << '.TP' # main text, contents, body KEEP - #@manpage[:body] << '.BR' << wrapped # main text, contents, body KEEP [consider s/.BR/.PP/] - @manpage[:body] << if wrapped =~/^\.BI\s/ # main text, contents, body KEEP '.TP' << @br << wrapped.gsub!(/^\.BI\s/,'.B ') # sleight ... simpler output else @@ -339,6 +330,9 @@ WOK para.gsub!(/~/,'~') para.gsub!(/©/,'©') end + para.gsub!(/(^| |\s|\*)\\\*/,'\1\\\\\*') #man page requires + para.gsub!(/\s\.(\S+)/,' \\.\1') + para.gsub!(/(\n\.)(\S\S\S+)/m,'\1\\.\2') para.gsub!(/-/,'\-') #manpages use this para.gsub!(/~/,'~') if para #manpages use this if para =~/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/ @@ -370,10 +364,9 @@ WOK para.gsub!(/^\s*<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/,'') # remove empty lines - check para.gsub!(/(^|\s)[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?:\s|$))/,'\1\2\3') para.gsub!(/<a href=".+?">(.+?)<\/a>/m,'\1') - para.gsub!(/<:name#\S+?>/,'') # remove name links - para.gsub!(/ /,' ') # decide on - para.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape - #para.gsub!(/(["''])/,"\\\\\\1") # decide on + para.gsub!(/<:name#\S+?>/,'') # remove name links + para.gsub!(/ /,' ') # decide on + para.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape para.gsub!(/\{(\S+?\.(?:png|jpg|gif)) .+?\}(?:(?:https?|file|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]") para.gsub!(/^\{\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]') wordlist=para.scan(/\S+/) @@ -508,7 +501,7 @@ WOK line.gsub!(/\s+$/m,'') filename_manpage.puts line #unix manpage end - else filename_manpage.puts para #unix manpage # /^([*=-]|\.){5}/ + else filename_manpage.puts para #unix manpage # /^([*=-]|\.){5}/ end end filename_manpage.close diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb index aa2d747a..c308dfb2 100644 --- a/lib/sisu/v0/plaintext.rb +++ b/lib/sisu/v0/plaintext.rb @@ -217,7 +217,7 @@ GSUB ) end @@endnotes[:para] << "-#{wrap}" - @@endnotes[:end] << wrap + @@endnotes[:end] << '' << wrap end @@endnotes end |