aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/texpdf_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-07-26 20:11:52 -0400
committerRalph Amissah <ralph@amissah.com>2011-07-26 20:11:54 -0400
commit427c8b2969fef30a403a55adfc32b449d78d7fe9 (patch)
tree8f8c3ca597e45631d434e5798bbdbd1c68aa7a8b /lib/sisu/v3/texpdf_format.rb
parentv3: xmls (sax, dom, xhtml) use of tidy, correct output location (diff)
v3: texpdf, XeTeX language settings (setmainlanguage setotherlanguage)
* get from directory or filename if header @make: :language: not set
Diffstat (limited to 'lib/sisu/v3/texpdf_format.rb')
-rw-r--r--lib/sisu/v3/texpdf_format.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb
index d7942121..cd63cd4e 100644
--- a/lib/sisu/v3/texpdf_format.rb
+++ b/lib/sisu/v3/texpdf_format.rb
@@ -636,10 +636,20 @@ module SiSU_TeX_Pdf
end
def tex_head_lang #babel 18n
lang_char_arr=@md.i18n
- mainlang_char=lang_char_arr.slice(0)
+ mainlang_char=if @md.i18n == Array \
+ and @md.i18n.length > 0
+ lang_char_arr.slice(0)
+ else @md.opt.lng
+ end
mainlang=@lang.list[mainlang_char][:xlp]
- otherlang=[]
- lang_char_arr.slice(1..9).each { |ch| otherlang << @lang.list[ch][:xlp] }
+ otherlang=if mainlang != 'english'
+ [ @lang.list['en'][:xlp] ]
+ else []
+ end
+ if lang_char_arr.length > 0
+ lang_char_arr.slice(1..9).each { |ch| otherlang << @lang.list[ch][:xlp] }
+ otherlang.uniq!
+ end
otherlang=otherlang.join(',')
{ mainlang: mainlang, otherlang: otherlang }
end