diff options
| author | Ralph Amissah <ralph@amissah.com> | 2008-07-02 22:13:01 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2008-07-02 22:13:01 -0400 | 
| commit | 01dceeb872de89577fdcd9e5cfe63df4d27a32f1 (patch) | |
| tree | 7494bde5dd180f9b02a4c747e5a15d47ad6e09ac | |
| parent | Updated sisu-0.67.1 (diff) | |
| parent | changelog and version updated (diff) | |
Merge branch 'upstream' into debian/sid
| -rw-r--r-- | CHANGELOG | 8 | ||||
| -rw-r--r-- | conf/sisu/version.yml | 6 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG | 8 | ||||
| -rw-r--r-- | lib/sisu/v0/sysenv.rb | 26 | ||||
| -rw-r--r-- | lib/sisu/v0/texpdf.rb | 4 | 
5 files changed, 42 insertions, 10 deletions
| @@ -9,6 +9,14 @@ Reverse Chronological:  %% STABLE MANIFEST +%% sisu_0.67.2.orig.tar.gz (2008-07-02:26/3) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.67.2.orig.tar.gz +  sisu_0.67.2.orig.tar.gz +  sisu_0.67.2-1.dsc +  sisu_0.67.2-1.diff.gz + +  * texpdf (sysenv), fix required for xetex landscape pdfs +  %% sisu_0.67.1.orig.tar.gz (2008-05-27:21/2)  http://www.jus.uio.no/sisu/pkg/src/sisu_0.67.1.orig.tar.gz    d05698e4e9421e15f9924ea5c019696996fc10ec396c245ea9dfc375a539868a 1498489 sisu_0.67.1.orig.tar.gz diff --git a/conf/sisu/version.yml b/conf/sisu/version.yml index 9553be6f..ee401b42 100644 --- a/conf/sisu/version.yml +++ b/conf/sisu/version.yml @@ -1,5 +1,5 @@  ---  -:version: 0.67.1 -:date_stamp: 2008w24/0 -:date: "2008-06-22" +:version: 0.67.2 +:date_stamp: 2008w26/3 +:date: "2008-07-02"  :project: SiSU diff --git a/data/doc/sisu/CHANGELOG b/data/doc/sisu/CHANGELOG index acfa20d5..34b611b9 100644 --- a/data/doc/sisu/CHANGELOG +++ b/data/doc/sisu/CHANGELOG @@ -9,6 +9,14 @@ Reverse Chronological:  %% STABLE MANIFEST +%% sisu_0.67.2.orig.tar.gz (2008-07-02:26/3) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.67.2.orig.tar.gz +  sisu_0.67.2.orig.tar.gz +  sisu_0.67.2-1.dsc +  sisu_0.67.2-1.diff.gz + +  * texpdf (sysenv), fix required for xetex landscape pdfs +  %% sisu_0.67.1.orig.tar.gz (2008-05-27:21/2)  http://www.jus.uio.no/sisu/pkg/src/sisu_0.67.1.orig.tar.gz    d05698e4e9421e15f9924ea5c019696996fc10ec396c245ea9dfc375a539868a 1498489 sisu_0.67.1.orig.tar.gz diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 22a0bc4a..3f23b7e5 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -665,9 +665,14 @@ module SiSU_Env        end        @texpdf      end -    def latex2pdf                                                              #convert from latex to pdf -      tell=if @cmd =~/[MVv]/; '' -      else                    '> /dev/null' +    def latex2pdf(md=nil)                                                              #convert from latex to pdf +      tell=((@cmd =~/[MVv]/) ? '' : '> /dev/null' ) +      papersize='a4' +      if md and defined? @md.papersize and md.papersize.empty? +        papersize=if @md.papersize =~/(?:a4|letter|legal|book|a5|b5)\b/ +          md.papersize +        else papersize +        end        end        mode='batchmode'        #mode='nonstopmode' @@ -675,9 +680,20 @@ module SiSU_Env        texpdf=tex2pdf_engine        if @pdfetex_flag;          texpdf_cmd=case texpdf -        when /xetex/;            "#{texpdf} -interaction=#{mode} -fmt=xelatex #@input #{tell}\n" +        when /xetex/ +          if @input =~/landscape\.tex$/ +            %{#{texpdf} -interaction=#{mode} -fmt=xelatex -papersize="#{papersize} -l" #@input #{tell}\n} +          else +            "#{texpdf} -interaction=#{mode} -fmt=xelatex #@input #{tell}\n" +          end +        when /xelatex/ +          if @input =~/landscape\.tex$/ +            %{#{texpdf} -interaction=#{mode} -papersize="#{papersize} -l" #@input #{tell}\n} +          else +            "#{texpdf} -interaction=#{mode} #@input #{tell}\n" +          end          when /pdftex/;           "#{texpdf} -interaction=#{mode} -fmt=pdflatex #@input #{tell}\n" -        when /xelatex|pdflatex/; "#{texpdf} -interaction=#{mode} #@input #{tell}\n" +        when /pdflatex/; "#{texpdf} -interaction=#{mode} #@input #{tell}\n"          end          system(texpdf_cmd)        else puts "\tWARN: none of the following programs are installed: #{program[0]}, #{program[1]}, #{program[2]} is installed. #{program_ref}" diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index a17033c8..1d37b588 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -169,13 +169,13 @@ module SiSU_TeX          cmd=SiSU_Env::System_call.new("#{tex_fn_base}.tex",'',@md.cmd)          tell=SiSU_Screen::Ansi.new(@md.cmd)          tell.grey_open unless @md.cmd =~/q/ -        2.times { |i| cmd.latex2pdf unless ("#{tex_fn_base}.tex" !~/\w+/) } +        2.times { |i| cmd.latex2pdf(@md) unless ("#{tex_fn_base}.tex" !~/\w+/) }          tell.p_off unless @md.cmd =~/q/          tell=SiSU_Screen::Ansi.new(@md.cmd,'landscape ->')          tell.dark_grey_title_hi if @md.cmd =~/[MVv]/          cmd=SiSU_Env::System_call.new("#{tex_fn_base}.landscape.tex",'',@md.cmd)          tell.grey_open -        2.times { |i| cmd.latex2pdf unless ("#{tex_fn_base}.landscape.tex" !~/\w+/) } +        2.times { |i| cmd.latex2pdf(@md) unless ("#{tex_fn_base}.landscape.tex" !~/\w+/) }          tell.p_off unless @md.cmd =~/q/          pwd=Dir.pwd          portrait_pdf="#{pwd}/#{tex_fn_base}.pdf" | 
