aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/texpdf.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-10-03 00:22:04 -0400
committerRalph Amissah <ralph@amissah.com>2012-10-03 00:22:04 -0400
commit7456ed5b0a4c85c3ea6ab808342689e38e222730 (patch)
tree48adb32c257d7f0c93c2b5ec622e470da714900f /lib/sisu/v4/texpdf.rb
parentv4 (&v3): markup samples, for v4 remove skins, separate (v3 & v4) directories (diff)
v4: param (header make), epub, pdf, book cover images
Diffstat (limited to 'lib/sisu/v4/texpdf.rb')
-rw-r--r--lib/sisu/v4/texpdf.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb
index c52b0641..f5c90cf5 100644
--- a/lib/sisu/v4/texpdf.rb
+++ b/lib/sisu/v4/texpdf.rb
@@ -731,8 +731,22 @@ WOK
else "\n\\author{#{@copymark} \\textnormal{#{author}}}"
end
end
- @tex_file << unless @md.fnb =~/^mail\s*$/; @tex_ml.site
- else '\date'
+ if defined? @md.make.cover_image \
+ and not @md.make.cover_image.nil? \
+ and @md.make.cover_image[:cover] =~/\S+/
+ x={}
+ dir=SiSU_Env::InfoEnv.new(@md.fns)
+ x[:l] =<<WOK
+\\titlepic{\\includegraphics[width=0.3\\textwidth]{#{dir.path.image_source_include}/#{@md.make.cover_image[:cover]}}}
+WOK
+ x[:p] =<<WOK
+\\titlepic{\\includegraphics[width=0.6\\textwidth]{#{dir.path.image_source_include}/#{@md.make.cover_image[:cover]}}}
+WOK
+ @tex_file << x
+ x=nil
+ end
+ @tex_file << unless @md.fnb =~/^mail\s*$/ then @tex_ml.site
+ else '\date'
end
@tex_file <<<<WOK
\\pagenumbering{roman}\\maketitle