aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-30 23:48:54 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-30 23:48:54 -0400
commitb70456bc6ffc452459b12741f1afc4f9f1fbfa4d (patch)
tree3dc850832a170047d70e41acd1465a1158dc809e /lib/sisu/v2/html.rb
parentdebian/changelog 2.7.7-1 (diff)
parenttexpdf_format, i18n, set tex document header language (polyglossia) (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v2/html.rb')
-rw-r--r--lib/sisu/v2/html.rb38
1 files changed, 20 insertions, 18 deletions
diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb
index 309297df..c984a858 100644
--- a/lib/sisu/v2/html.rb
+++ b/lib/sisu/v2/html.rb
@@ -162,29 +162,33 @@ module SiSU_HTML
@links_guide_toc=[]
def initialize(data,md)
@data,@md=data,md
+ @links_guide_=SiSU_Env::Create_site.new(@md.cmd).html_quick_ref?
end
def toc
@links_guide_toc=[]
- format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
- guide_type='horzontal' #values: horizontal or vertical
- @links_guide_toc << format_head_toc.links_guide_open(guide_type)
- if defined? @md.lnk \
- and @md.lnk
- @md.lnk.each do |l|
- if defined? l[:say]
- target=if l[:url] !~/^\.(\.)?\//; 'external'
- else '_top'
+ if @links_guide_
+ format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
+ guide_type='horzontal' #values: horizontal or vertical
+ @links_guide_toc << format_head_toc.links_guide_open(guide_type)
+ if defined? @md.lnk \
+ and @md.lnk
+ @md.lnk.each do |l|
+ if defined? l[:say]
+ target=if l[:url] !~/^\.(\.)?\//; 'external'
+ else '_top'
+ end
+ s_lnk_url,s_lnk_lnk=l[:url],l[:say]
+ txt_obj={:lnk_url =>s_lnk_url,:lnk_txt =>s_lnk_lnk,:target =>target}
+ lev_dob_ocn=SiSU_HTML_Format::Format_toc.new(@md,txt_obj)
+ @links_guide_toc << lev_dob_ocn.links_guide if s_lnk_lnk
end
- s_lnk_url,s_lnk_lnk=l[:url],l[:say]
- txt_obj={:lnk_url =>s_lnk_url,:lnk_txt =>s_lnk_lnk,:target =>target}
- lev_dob_ocn=SiSU_HTML_Format::Format_toc.new(@md,txt_obj)
- @links_guide_toc << lev_dob_ocn.links_guide if s_lnk_lnk
end
end
+ format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
+ @links_guide_toc << format_head_toc.links_guide_close #(guide_type)
+ @links_guide_toc
+ else ''
end
- format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
- @links_guide_toc << format_head_toc.links_guide_close #(guide_type)
- @links_guide_toc
end
end
class Endnotes
@@ -545,8 +549,6 @@ WOK
toc_shared << format_txt_obj.center_bold
@segtoc << format_txt_obj.center_bold
end
- toc_shared << format_head_toc.copyat
- @segtoc << format_head_toc.copyat
toc_shared << "#{@vz.table_close*1}\n"
@segtoc << "#{@vz.table_close*1}\n"
tmp_head=nil