aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-12-09 12:58:15 -0500
committerRalph Amissah <ralph@amissah.com>2010-12-09 12:58:15 -0500
commit05acd8e977b774b78ed6562a125f89fd3bb3d7a9 (patch)
treed689b7cc5fd41af7d48851e9401b5f1aeda03818 /lib
parentdebian/changelog 2.7.8-1 (diff)
parentchangelog, cosmetic (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/css.rb4
-rw-r--r--lib/sisu/v2/dal_doc_str.rb10
-rw-r--r--lib/sisu/v2/dal_syntax.rb28
-rw-r--r--lib/sisu/v2/defaults.rb2
-rw-r--r--lib/sisu/v2/epub_format.rb6
-rw-r--r--lib/sisu/v2/html.rb4
-rw-r--r--lib/sisu/v2/html_format.rb86
-rw-r--r--lib/sisu/v2/odf.rb2
-rw-r--r--lib/sisu/v2/plaintext.rb16
-rw-r--r--lib/sisu/v2/sysenv.rb30
-rw-r--r--lib/sisu/v2/texpdf_format.rb16
11 files changed, 73 insertions, 131 deletions
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_c]}|\s+|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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}&nbsp;
+ [&nbsp;document&nbsp;manifest&nbsp;]
</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">
&nbsp;<a href="index.html" target="_top" alt="-&gt;">
#{@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="-&gt;">
#{@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">
&nbsp;#{firstseg}&nbsp;
#{@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>&nbsp;</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 /> &lt;<text:a xlink:type="simple" xlink:href="#{manifest}">#{manifest}</text:a>&gt;</text:p>}
@@odf[:tail] << %{\n<text:p text:style-name="P1">SiSU: &lt;<text:a xlink:type="simple" xlink:href="http://www.jus.uio.no/lm">www.jus.uio.no/sisu</text:a>&gt; and &lt;<text:a xlink:type="simple" xlink:href="http://www.sisudoc.org">www.sisudoc.org</text:a>&gt;</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