aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-02 17:11:19 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-02 17:11:19 +0100
commitfe185e84173ddce19bb171fb32e84459acfd5ca4 (patch)
tree1fc2a1017b2784c84ce5433fc4def3897aabb521 /lib
parentrenamed debian constitution files with default markup, removed '.default' fro... (diff)
minor fixes to go
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/css.rb139
-rw-r--r--lib/sisu/v0/dal.rb66
-rw-r--r--lib/sisu/v0/odf.rb2
-rw-r--r--lib/sisu/v0/semantics.rb2
4 files changed, 94 insertions, 115 deletions
diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb
index 85084e45..df53f46a 100644
--- a/lib/sisu/v0/css.rb
+++ b/lib/sisu/v0/css.rb
@@ -389,15 +389,15 @@ WOK
margin-right: 5px;
text-align: center;
}
- p.i1 {margin-left: 20mm;}
- p.i2 {margin-left: 25mm;}
- p.i3 {margin-left: 30mm;}
- p.i4 {margin-left: 35mm;}
- p.i5 {margin-left: 40mm;}
- p.i6 {margin-left: 45mm;}
- p.i7 {margin-left: 50mm;}
- p.i8 {margin-left: 55mm;}
- p.i9 {margin-left: 60mm;}
+ p.i1 {margin-left: 15mm;}
+ p.i2 {margin-left: 20mm;}
+ p.i3 {margin-left: 25mm;}
+ p.i4 {margin-left: 30mm;}
+ p.i5 {margin-left: 35mm;}
+ p.i6 {margin-left: 40mm;}
+ p.i7 {margin-left: 45mm;}
+ p.i8 {margin-left: 50mm;}
+ p.i9 {margin-left: 55mm;}
table { }
tr { }
@@ -439,76 +439,43 @@ WOK
font-family: #{fonts};
/* font-size: 100%; */
font-weight: normal;
- line-height: 100%;
+ line-height: 150%;
text-align: left;
margin-left: 10mm;
text-indent: 0mm;
- margin-top: 0px;
- margin-bottom: 0px;
- margin-right: 5mm;
- }
- li.bullet {
- line-height: 150%;
- margin-left: 0mm;
- margin-right: 0mm;
margin-top: 3px;
margin-bottom: 3px;
+ margin-right: 0mm;
+ }
+ li.bullet {
+ margin-left: 10mm;
}
li.i1 {
- margin-left: 20mm;
- line-height: 150%;
- margin-left: 5mm;
- margin-right: 5mm;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 15mm;
}
li.i2 {
- margin-left: 25mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 20mm;
}
li.i3 {
- margin-left: 30mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 25mm;
}
li.i4 {
- margin-left: 35mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 30mm;
}
li.i5 {
- margin-left: 40mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 35mm;
}
li.i6 {
- margin-left: 45mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 40mm;
}
li.i7 {
- margin-left: 50mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 45mm;
}
li.i8 {
- margin-left: 55mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 50mm;
}
li.i9 {
- margin-left: 60mm;
- line-height: 150%;
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-left: 55mm;
}
#horizontal_links {
background: #eeeeee;
@@ -731,6 +698,9 @@ WOK
h4.i {margin-left: 25mm;}
h5.i {margin-left: 30mm;}
h6.i {margin-left: 35mm;}
+ h7.i {margin-left: 40mm;}
+ h8.i {margin-left: 45mm;}
+ h9.i {margin-left: 50mm;}
h1.banner {
font-weight: bold;
text-align: center;
@@ -785,28 +755,28 @@ WOK
font-weight: bold;
}
h1.toc {
- margin-left: 0mm;
+ margin-left: 10mm;
font-size: 115%;
margin-top: 6px;
margin-bottom: 6px;
line-height: 150%;
}
h2.toc {
- margin-left: 5mm;
+ margin-left: 15mm;
font-size: 110%;
margin-top: 6px;
margin-bottom: 6px;
line-height: 140%;
}
h3.toc {
- margin-left: 10mm;
+ margin-left: 20mm;
font-size: 105%;
margin-top: 6px;
margin-bottom: 6px;
line-height: 120%;
}
h4.toc {
- margin-left: 15mm;
+ margin-left: 25mm;
font-weight: normal;
font-size: 100%;
margin-top: 6px;
@@ -814,7 +784,7 @@ WOK
line-height: 120%;
}
h5.toc {
- margin-left: 20mm;
+ margin-left: 30mm;
font-weight: normal;
font-size: 95%;
margin-top: 6px;
@@ -822,7 +792,7 @@ WOK
line-height: 110%;
}
h6.toc {
- margin-left: 25mm;
+ margin-left: 35mm;
font-weight: normal;
font-size: 90%;
margin-top: 6px;
@@ -1385,59 +1355,68 @@ WOK
font-weight: bold;
text-align: left;
}
- text[class|="indent1"] {
+ text[class|="indent0"] {
margin-left: 10%;
}
- text[class|="indent2"] {
+ text[class|="indent1"] {
margin-left: 15%;
}
- text[class|="indent3"] {
+ text[class|="indent2"] {
margin-left: 20%;
}
- text[class|="indent4"] {
+ text[class|="indent3"] {
margin-left: 25%;
}
- text[class|="indent5"] {
+ text[class|="indent4"] {
margin-left: 30%;
}
- text[class|="indent6"] {
+ text[class|="indent5"] {
margin-left: 35%;
}
- text[class|="indent7"] {
+ text[class|="indent6"] {
margin-left: 40%;
}
- text[class|="indent8"] {
+ text[class|="indent7"] {
margin-left: 45%;
}
- text[class|="indent9"] {
+ text[class|="indent8"] {
margin-left: 50%;
}
+ text[class|="indent9"] {
+ margin-left: 55%;
+ }
+ text[class|="indent_bullet"] {
+ text-indent: 0%;
+ }
+ text[class|="indent_bullet0"] {
+ text-indent: 0%;
+ }
text[class|="indent_bullet1"] {
- margin-left: 10%;
+ text-indent: 10%;
}
text[class|="indent_bullet2"] {
- margin-left: 15%;
+ text-indent: 15%;
}
text[class|="indent_bullet3"] {
- margin-left: 20%;
+ text-indent: 20%;
}
text[class|="indent_bullet4"] {
- margin-left: 25%;
+ text-indent: 25%;
}
text[class|="indent_bullet5"] {
- margin-left: 30%;
+ text-indent: 30%;
}
text[class|="indent_bullet6"] {
- margin-left: 35%;
+ text-indent: 35%;
}
text[class|="indent_bullet7"] {
- margin-left: 40%;
+ text-indent: 40%;
}
text[class|="indent_bullet8"] {
- margin-left: 45%;
+ text-indent: 45%;
}
text[class|="indent_bullet9"] {
- margin-left: 50%;
+ text-indent: 50%;
}
text[class|="verse"], text[class|="group"], text[class|="code"] {
text-align: left;
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index a70d1880..8880ca9d 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -516,7 +516,9 @@ module SiSU_DAL
when /^#{num}~#\s*/; para.gsub!(/^#{num}~#\s*/,"#{title_no} ")
when /^#{num}~[a-z_\.]+ /
para.gsub!(/^#{num}~([a-z_\.]+)\s+(.+)/i,%{#{num}~\\1 #{title_no} \\2 <:name##{title_no}>})
- else para.gsub!(/^#{num}~ /,"#{num}~#{title_no} #{title_no} ") #main
+ when /^#{num}~\s+#{title_no}/
+ para.gsub!(/^#{num}~ /,"#{num}~#{title_no} ") #where title contains title number
+ else para.gsub!(/^#{num}~ /,"#{num}~#{title_no} #{title_no} ") #main, where title number is to be provided
end
if @md.toc_lev_limit and @md.toc_lev_limit < num
para.gsub!(/^[5-8]~(?:~\S+)?\s*/,'!_ ')
@@ -649,41 +651,39 @@ module SiSU_DAL
puts 'manual segment names, numbers used as names, risk warning (segmented html)' if not @md.seg_autoname_safe and @md.cmd =~/[MV]/
data.each do |para|
para=SiSU_document_structure::Structure.new(@md,para).structure_markup
- if para !~/^0~/
- if para =~/^[456]~ /
- if para=~/^4/ and not @md.set_heading_seg
- @md.set_heading_seg=true
- end
- if para =~/^[456]~(?:\s\S+)?\s+([\d.,:-]+)/m #heading starts with a recognised numeric or word followed by a recognised numerical construct, use that as name
- pattern=$1
- pattern.gsub!(/(?:[:,-]|\W)/,'.')
- pattern.gsub!(/\.$/,'')
- if not @md.seg_names.nil? and not @md.seg_names.include?(pattern)
- para.gsub!(/^([456])~\s*/,"\\1~#{pattern} ")
- @md.seg_names << pattern
- else puts 'warn, there may be a conflicting numbering scheme' if @md.cmd =~/[VM]/
- end
+ if para =~/^[456]~ /
+ if para=~/^4/ and not @md.set_heading_seg
+ @md.set_heading_seg=true
+ end
+ if para =~/^[456]~(?:\s\S+)?\s+([\d.,:-]+)/m #heading starts with a recognised numeric or word followed by a recognised numerical construct, use that as name
+ pattern=$1
+ pattern.gsub!(/(?:[:,-]|\W)/,'.')
+ pattern.gsub!(/\.$/,'')
+ if not @md.seg_names.nil? and not @md.seg_names.include?(pattern)
+ para.gsub!(/^([456])~\s*/,"\\1~#{pattern} ")
+ @md.seg_names << pattern
+ else puts 'warn, there may be a conflicting numbering scheme' if @md.cmd =~/[VM]/
end
- if para =~/^4~\s.+?;4:(\d+);/m #extract segment name from embedded document structure info
- pattern=$1
- pattern.gsub!(/(?:[:,-]|\W)/,'.')
- pattern.gsub!(/\.$/,'')
- if not @md.seg_names.nil? and not @md.seg_names.include?(pattern)
- para.gsub!(/^(4)~\s*/,"\\1~#{pattern} ")
- @md.seg_names << pattern
- else
- para.gsub!(/^(4)~\s*/,"\\1~~#{pattern} ")
- @md.seg_names << "~#{pattern}"
- end
+ end
+ if para =~/^4~\s.+?;4:(\d+);/m #extract segment name from embedded document structure info
+ pattern=$1
+ pattern.gsub!(/(?:[:,-]|\W)/,'.')
+ pattern.gsub!(/\.$/,'')
+ if not @md.seg_names.nil? and not @md.seg_names.include?(pattern)
+ para.gsub!(/^(4)~\s*/,"\\1~#{pattern} ")
+ @md.seg_names << pattern
+ else
+ para.gsub!(/^(4)~\s*/,"\\1~~#{pattern} ")
+ @md.seg_names << "~#{pattern}"
end
- if para =~/^4~\s+/ #if still not segment name, provide a numerical one
- if not @md.seg_names.nil? and not @md.seg_names.include?(art_filename_auto)
- para.gsub!(/^4~\s+/,%{4~_#{art_filename_auto} })
- @md.seg_names << art_filename_auto
- else puts 'segment name (numbering) error'
- end
- art_filename_auto+=1
+ end
+ if para =~/^4~\s+/ #if still not segment name, provide a numerical one
+ if not @md.seg_names.nil? and not @md.seg_names.include?(art_filename_auto)
+ para.gsub!(/^4~\s+/,%{4~_#{art_filename_auto} })
+ @md.seg_names << art_filename_auto
+ else puts 'segment name (numbering) error'
end
+ art_filename_auto+=1
end
end
@tuned_file << if para =~/^([1-6])~/m and (@md.pagenew or @md.pagebreak); m=$1 #watch ref~
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb
index 1370f6fa..93817f31 100644
--- a/lib/sisu/v0/odf.rb
+++ b/lib/sisu/v0/odf.rb
@@ -657,7 +657,7 @@ module SiSU_ODF
content << @@odf[:head]
content << @@odf[:body]
content << @@odf[:metadata]
- content << @@odf[:owner_details] if @md.stmp =~/\w+/ #not used?
+ #content << @@odf[:owner_details] if @md.stmp =~/\w+/ #not used?
content << @@odf[:tail]
Output.new(content,@md).odf
@@odf[:head],@@odf[:body],@@odf[:tail],@@odf[:metadata]=[],[],[],[]
diff --git a/lib/sisu/v0/semantics.rb b/lib/sisu/v0/semantics.rb
index 86e05fc4..177a5d98 100644
--- a/lib/sisu/v0/semantics.rb
+++ b/lib/sisu/v0/semantics.rb
@@ -349,7 +349,7 @@ outputdir=SiSU_Env::Info_env.new.path.feed
pwd=Dir.pwd
@argv=[]
argv=$*
-p argv
+#p argv
my_make=SiSU_Env::Create_file.new('','')
if argv.to_s =~/yaml/
my_make.file_semantic