aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/texpdf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v4/texpdf.rb')
-rw-r--r--lib/sisu/v4/texpdf.rb44
1 files changed, 24 insertions, 20 deletions
diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb
index aa1f9444..20998e6c 100644
--- a/lib/sisu/v4/texpdf.rb
+++ b/lib/sisu/v4/texpdf.rb
@@ -607,7 +607,7 @@ module SiSU_TeX
dob
end
def tex_box_listings
- <<WOK
+ <<-WOK
\\definecolor{listinggray}{gray}{0.9}
\\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\\lstset{
@@ -632,10 +632,10 @@ module SiSU_TeX
commentstyle=\\color[rgb]{0.133,0.545,0.133},
stringstyle=\\color[rgb]{0.627,0.126,0.941},
}
-WOK
+ WOK
end
def tex_box_boites
- <<WOK
+ <<-WOK
\\def\\codeblockboitebox{%
\\def\\bkvz@before@breakbox{\\ifhmode\\par\\fi\\vskip\\breakboxskip\\relax}%
\\def\\bkvz@set@linewidth{\\advance\\linewidth -2\\fboxrule
@@ -653,7 +653,7 @@ WOK
\\def\\bkvz@bottom{\\hrule\\@height\\fboxrule}%
\\breakbox}
\\def\\endcodeblockboitebox{\\endbreakbox}
-WOK
+ WOK
end
def tex_codeblock
codeblock_box=if @codeblock_box=='listings'
@@ -678,7 +678,7 @@ WOK
@@tex_head[ps][:p]=orient_portrait.document_head_with_orientation(@codeblock_box)
@@tex_head[ps][:l]=orient_landscape.document_head_with_orientation(@codeblock_box)
end
- @tex_file <<<<WOK
+ @tex_file <<<<-WOK
#{@tex_ml.header}#{@tex_ml.footer}
\\tolerance=300
\\clubpenalty=300
@@ -708,7 +708,7 @@ WOK
% (tilde hash amp affected by http)
% \\sloppy
\\begin{document}
-WOK
+ WOK
sisu_rc_footnote=if @md.sc_info then @tex_ml.doc_sc_info_footnote_full
else @tex_ml.doc_sc_info_footnote_brief
end
@@ -724,10 +724,10 @@ WOK
sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.creator.author)
author=sp_char.special_characters
@tex_file << if @md.author_home
- <<WOK
+ <<-WOK
\\author{\\href{#{@md.author_home}}{#{@copymark} \\textnormal{#{author}}}}
-WOK
+ WOK
else "\n\\author{#{@copymark} \\textnormal{#{author}}}"
end
end
@@ -736,22 +736,22 @@ WOK
and @md.make.cover_image[:cover] =~/\S+/
x={}
dir=SiSU_Env::InfoEnv.new(@md.fns)
- x[:l] =<<WOK
+ x[:l] =<<-WOK
\\titlepic{\\includegraphics[width=0.3\\textwidth]{#{dir.path.image_source_include}/#{@md.make.cover_image[:cover]}}}
-WOK
- x[:p] =<<WOK
+ WOK
+ x[:p] =<<-WOK
\\titlepic{\\includegraphics[width=0.6\\textwidth]{#{dir.path.image_source_include}/#{@md.make.cover_image[:cover]}}}
-WOK
+ WOK
@tex_file << x
x=nil
end
@tex_file << unless @md.fnb =~/^mail\s*$/ then @tex_ml.site
else '\date'
end
- @tex_file <<<<WOK
+ @tex_file <<<<-WOK
\\pagenumbering{roman}\\maketitle
\\pagestyle{fancy}
-WOK
+ WOK
if defined? @md.rights.all \
and @md.rights.all
@tex_file << "\\newpage\n"
@@ -760,24 +760,27 @@ WOK
end
x={}
if (@make.build.toc?)
- toc=<<WOK
+ toc=<<-WOK
\\renewcommand{\\contentsname}{#{@translate.contents}}
\\tableofcontents
-WOK
+ WOK
toc_pb={ l: @tex_ml.newpage('landscape'), p: @tex_ml.newpage('portrait') }
else
toc=''
toc_pb={ l: '', p: '' }
end
- x[:l] =<<WOK
+ if @md.opt.act[:pdf_l][:set]==:on
+ x[:l] =<<-WOK
#{@tex_ml.newpage('landscape')}
\\pagestyle{fancy}
#{toc}#{toc_pb[:l]}
\\pagenumbering{arabic}
#{@tex_ml.paraskip_normal}
#{@tex_ml.newpage('landscape')}
-WOK
- x[:p] =<<WOK
+ WOK
+ end
+ if @md.opt.act[:pdf_p][:set]==:on
+ x[:p] =<<-WOK
#{@tex_ml.newpage('portrait')}
\\pagestyle{fancy}
#{toc}#{toc_pb[:p]}
@@ -785,7 +788,8 @@ WOK
\\pagenumbering{arabic}
#{@tex_ml.paraskip_normal}
#{@tex_ml.newpage('portrait')}
-WOK
+ WOK
+ end
@tex_file << x
x=nil
data.each do |dob| #% case follows with levels 1-6 indents & graphics