From 1716ccd079dc399190804ede2b2b08bf19c0a3b3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 12 May 2014 21:38:34 -0400 Subject: v6: texpdf, (internal coding) use symbols to identify page orientation --- lib/sisu/v6/texpdf.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v6/texpdf.rb') diff --git a/lib/sisu/v6/texpdf.rb b/lib/sisu/v6/texpdf.rb index 97961701..b3636154 100644 --- a/lib/sisu/v6/texpdf.rb +++ b/lib/sisu/v6/texpdf.rb @@ -746,12 +746,12 @@ module SiSU_TeX title=@md.title.full.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') #no line splitting in heading neither html nor latex @md.papersize_array.each do |ps| if @md.opt.act[:pdf_p][:set]==:on - txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'portrait' } + txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: :portrait } orient_portrait=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) @@tex_head[ps][:p]=orient_portrait.document_head_with_orientation(@codeblock_box) end if @md.opt.act[:pdf_l][:set]==:on - txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'landscape' } + txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: :landscape } orient_landscape=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) @@tex_head[ps][:l]=orient_landscape.document_head_with_orientation(@codeblock_box) end @@ -843,30 +843,30 @@ module SiSU_TeX \\renewcommand{\\contentsname}{#{@translate.contents}} \\tableofcontents WOK - toc_pb={ l: @tex_ml.newpage('landscape'), p: @tex_ml.newpage('portrait') } + toc_pb={ l: @tex_ml.newpage(:landscape), p: @tex_ml.newpage(:portrait) } else toc='' toc_pb={ l: '', p: '' } end if @md.opt.act[:pdf_l][:set]==:on x[:l] =<<-WOK -#{@tex_ml.newpage('landscape')} +#{@tex_ml.newpage(:landscape)} \\pagestyle{fancy} #{toc}#{toc_pb[:l]} \\pagenumbering{arabic} #{@tex_ml.paraskip_normal} -#{@tex_ml.newpage('landscape')} +#{@tex_ml.newpage(:landscape)} WOK end if @md.opt.act[:pdf_p][:set]==:on x[:p] =<<-WOK -#{@tex_ml.newpage('portrait')} +#{@tex_ml.newpage(:portrait)} \\pagestyle{fancy} #{toc}#{toc_pb[:p]} -#{@tex_ml.newpage('portrait')} +#{@tex_ml.newpage(:portrait)} \\pagenumbering{arabic} #{@tex_ml.paraskip_normal} -#{@tex_ml.newpage('portrait')} +#{@tex_ml.newpage(:portrait)} WOK end @tex_file << x -- cgit v1.2.3 From 2b2e66c1b6c44ecb55e98ea4316b51f32c51ee80 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 12 May 2014 21:50:42 -0400 Subject: v6: texpdf, headings and table of contents representation * (Closes: #744386) 1~ and 2~ result in the same formatting 1~ 2~ & 3~ now differentiated, see discussion in sisu.org under #744383 * (Closes: #744399) :A smaller formatted than :B A~ B~ C~ now the same size, see discussion in sisu.org under #744383 * #744383 :B and :C result in the same formatting, issue explained see sisu.org --- lib/sisu/v6/texpdf.rb | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v6/texpdf.rb') diff --git a/lib/sisu/v6/texpdf.rb b/lib/sisu/v6/texpdf.rb index b3636154..5654e6df 100644 --- a/lib/sisu/v6/texpdf.rb +++ b/lib/sisu/v6/texpdf.rb @@ -594,20 +594,26 @@ module SiSU_TeX case dob.is when :heading case dob.ln - when 1..3 - tst.heading_major + when 0 + tst.title_level_A + when 1 + tst.section_heading_level_B + when 2 + tst.section_heading_level_C + when 3 + tst.section_heading_level_D when 4 - tst.level4 + tst.heading_level_1 when 5 - tst.level5 + tst.heading_level_2 when 6 - tst.level6 + tst.heading_level_3 else dob end when :heading_insert br="\n\\\\\n" if dob.name=='book_index' - h=tst.heading_major + h=tst.section_heading_level_B heading="\\clearpage\n" + h.tmp idx_arr=[] idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_raw(@md.opt).raw_idx @@ -628,10 +634,10 @@ module SiSU_TeX dob.tmp={ l: l, p: p } elsif dob.ln==2 \ and dob.obj=~/Metadata\b/ - tst.heading_major + tst.section_heading_level_B elsif dob.ln==4 \ and dob.obj=~/Metadata\b/ - h=tst.level4 + h=tst.heading_level_1 metadata=SiSU_Metadata::TeX_Metadata.new(@md).metadata_tex dob.tmp=h.tmp + ' ' + '\begin{scriptsize}' + metadata.join(br) + '\end{scriptsize}' else dob.tmp='' # dob.tmp={ l: '', p: '' } -- cgit v1.2.3