aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3')
-rw-r--r--lib/sisu/v3/css.rb12
-rw-r--r--lib/sisu/v3/epub_format.rb10
-rw-r--r--lib/sisu/v3/html.rb14
-rw-r--r--lib/sisu/v3/html_scroll.rb14
-rw-r--r--lib/sisu/v3/sysenv.rb3
5 files changed, 27 insertions, 26 deletions
diff --git a/lib/sisu/v3/css.rb b/lib/sisu/v3/css.rb
index cee2ea8e..c18d10c5 100644
--- a/lib/sisu/v3/css.rb
+++ b/lib/sisu/v3/css.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2013, 2013 Ralph Amissah, All Rights Reserved.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -428,10 +428,10 @@ WOK
}
.norm, .bold, .verse, .group, .block, .alt {
- line-height: 150%;
+ line-height: 133%;
margin-left: 0em;
margin-right: 2em;
- margin-top: 10px;
+ margin-top: 12px;
margin-bottom: 0px;
padding-left: 0em;
text-indent: 0em;
@@ -441,13 +441,13 @@ WOK
font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman;
font-size: 100%;
font-weight: normal;
- line-height: 150%;
+ line-height: 133%;
text-align: justify;
margin-left: 0em;
margin-right: 2em;
text-indent: 0mm;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-top: 4px;
+ margin-bottom: 4px;
}
/* indent */
diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb
index 38717359..c202c2f6 100644
--- a/lib/sisu/v3/epub_format.rb
+++ b/lib/sisu/v3/epub_format.rb
@@ -151,10 +151,10 @@ module SiSU_EPUB_Format
}
.norm, .bold, .verse, .group, .block, .alt {
- line-height: 150%;
+ line-height: 133%;
margin-left: 0em;
margin-right: 2em;
- margin-top: 10px;
+ margin-top: 12px;
margin-bottom: 0px;
padding-left: 0em;
text-indent: 0mm;
@@ -164,13 +164,13 @@ module SiSU_EPUB_Format
font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman;
font-size: 100%;
font-weight: normal;
- line-height: 150%;
+ line-height: 133%;
text-align: justify;
margin-left: 0em;
margin-right: 2em;
text-indent: 0mm;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-top: 4px;
+ margin-bottom: 4px;
}
p.norm { }
p.i1 {padding-left: 1em;}
diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb
index 2dbb688b..7faf8f99 100644
--- a/lib/sisu/v3/html.rb
+++ b/lib/sisu/v3/html.rb
@@ -542,14 +542,16 @@ WOK
toc_shared << format_head_toc.scroll_head_title_banner_open
@segtoc << format_head_toc.seg_head_title_banner_open
tmp_head=nil
- doc_title_endnote=@md.title.full.gsub(/(\*+)/,'<sup><a href="#endnotes">\1</a></sup>')
+ doc_title_endnote=@md.title.full.gsub(/(\*+)/,
+ '<sup><a href="#endnotes">\1</a></sup>')
tmp_head=doc_title_endnote + "\n"
txt_obj={ txt: tmp_head }
format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj)
toc_shared << format_txt_obj.center_bold
@segtoc << format_txt_obj.center_bold
if defined? @md.creator.author
- creator_endnote=@md.creator.author.gsub(/(\*+)/,%{&nbsp;<sup><a href="#notes">\\1</a></sup>})
+ creator_endnote=@md.creator.author.gsub(/(\*+)/,
+ %{&nbsp;<sup><a href="#notes">\\1</a></sup>})
tmp_head=creator_endnote + "\n"
txt_obj={ txt: tmp_head }
format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj)
@@ -657,11 +659,9 @@ WOK
ensure
@filename_html_segtoc.close
pwd_set=Dir.pwd
- idx_lnk=if @o_str.dump_or_redirect?
- @file.base_filename.manifest
- else
- @file.base_filename.html_segtoc
- end
+ idx_lnk=(@o_str.dump_or_redirect?) \
+ ? @file.base_filename.manifest
+ : @file.base_filename.html_segtoc
mlnk=@file.base_filename.html_seg_index
Dir.chdir(@file.output_path.html_seg.dir)
FileUtils::rm_f(mlnk)
diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb
index 15bea9eb..07fa5d98 100644
--- a/lib/sisu/v3/html_scroll.rb
+++ b/lib/sisu/v3/html_scroll.rb
@@ -86,7 +86,8 @@ module SiSU_HTML_Scroll
dob.obj=dob.obj.gsub(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image)
if defined? dob.name and dob.name =~/^meta/ \
and dob.obj =~/Document Information/
- dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,'\1<a name="docinfo"></a>')
+ dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,
+ '\1<a name="docinfo"></a>')
end
if dob.obj =~/^Metadata$/ \
and dob.lv =='B'
@@ -152,7 +153,8 @@ module SiSU_HTML_Scroll
sto.heading_body4
book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx
book_idx.each do |x| #takes book index prepared for segments & strips segment identifying info
- x=x.gsub(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,'<a href="#\1">\2</a>')
+ x.gsub!(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,
+ '<a href="#\1">\2</a>')
end
book_idx.join("\n")
elsif dob.ln==5
@@ -170,11 +172,9 @@ module SiSU_HTML_Scroll
and dob.indent =~/[0-9]/ \
and dob.hang =~/[0-9]/
if dob.bullet_
- if dob.indent =~/[1-9]/
- sto.format('li',"i#{dob.indent}")
- else
- sto.format('li','bullet')
- end
+ (dob.indent =~/[1-9]/) \
+ ? sto.format('li',"i#{dob.indent}")
+ : sto.format('li','bullet')
elsif dob.indent == dob.hang
sto.format('p',"i#{dob.indent}")
elsif dob.indent != dob.hang
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index bfe35c5d..8ed17f88 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -4106,7 +4106,8 @@ WOK
end
def html_segtoc
pth=((by_filename?) \
- || (output_dir_structure.dump?)) \
+ || (output_dir_structure.dump?) \
+ || (output_dir_structure.redirect?)) \
? "#{output_path.html.dir}"
: "#{output_path.html.dir}/#{@md.fnb}"
fn=base_filename.html_segtoc