From 6896a4a149cfef0372867be3faabde35f62f67eb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:12:18 -0500 Subject: v4 (v3): version & changelog --- data/doc/sisu/CHANGELOG_v3 | 6 ++++++ data/doc/sisu/CHANGELOG_v4 | 7 +++++++ data/sisu/v3/v/version.yml | 6 +++--- data/sisu/v4/v/version.yml | 6 +++--- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 81ccd058..8379f677 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -29,6 +29,12 @@ v1 branch is removed; it is available in sisu =< 2.7 %% Reverse Chronological: +%% 3.3.9.orig.tar.xz (2013-02-06:05/3) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_3.3.9 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.9.orig.tar.xz + sisu_3.3.9.orig.tar.xz + sisu_3.3.9-1.dsc + %% 3.3.8.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_3.3.8 http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.8.orig.tar.xz diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 739b4ba5..a4907803 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -17,6 +17,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 4.0.6.orig.tar.xz (2013-02-06:05/3) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.6 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.6-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz + sisu_4.0.6.orig.tar.xz + sisu_4.0.6-1.dsc + %% 4.0.5.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1 diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index 7c0f9b6d..a69a13bb 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.3.8 -:date_stamp: 2013w04/7 -:date: "2013-02-03" +:version: 3.3.9 +:date_stamp: 2013w05/3 +:date: "2013-02-06" :project: SiSU diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index a81c8c01..0bb1bbbb 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.0.5 -:date_stamp: 2013w04/7 -:date: "2013-02-03" +:version: 4.0.6 +:date_stamp: 2013w05/3 +:date: "2013-02-06" :project: SiSU -- cgit v1.2.3 From 5b0d2c1fc909a5a50bd8168428a0ce42364b0b5c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:17:46 -0500 Subject: v4: html, screen reporting for --html-scroll, correctly identify output file --- data/doc/sisu/CHANGELOG_v4 | 5 ++++- lib/sisu/v4/html.rb | 7 +++++-- lib/sisu/v4/options.rb | 16 ++++++---------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index a4907803..1b51330a 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -24,6 +24,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz sisu_4.0.6.orig.tar.xz sisu_4.0.6-1.dsc +* v4: html, screen reporting for --html-scroll, correctly identify output file + %% 4.0.5.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1 @@ -31,7 +33,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.5.orig.tar.xz sisu_4.0.5.orig.tar.xz sisu_4.0.5-1.dsc -* v4: html (urls), scroll & seg optionally discrete, individually callable +* v4: html (options, hub, urls), scroll & seg optionally discrete, individually + callable * --html (both), --html-scroll, --html-seg * [possibly of interest where only one form of html of interest for use &/or to cut generation time (roughly to 63% for --html-scroll only)] diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb index 9e6ec0fa..530b5faf 100644 --- a/lib/sisu/v4/html.rb +++ b/lib/sisu/v4/html.rb @@ -89,14 +89,17 @@ module SiSU_HTML @fnb=@md.fnb @env=@particulars.env loc=@env.url.output_tell + primary_output_file=(@opt.act[:html_seg][:set]==:on) \ + ? (@md.file.output_path.html_seg.dir + '/' + @md.file.base_filename.html_segtoc) + : (@md.file.output_path.html_scroll.dir + '/' + @md.file.base_filename.html_scroll) unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVvz]/) \ - ? ("#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}") + ? ("#{@env.program.web_browser} file://#{primary_output_file}") : ("[#{@opt.f_pth[:lng_is]}] #{@opt.fno}") @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{primary_output_file}").flow if @opt.cmd =~/[MV]/ end data=nil tuned_file_array=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index fbdfc8f3..6aac2b1a 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -765,16 +765,12 @@ module SiSU_Commandline act[:html_seg]={ bool: true, set: :on } { bool: true, set: :on } else - act[:html_scroll]=if mod.inspect =~/"--html-scroll"/ - { bool: true, set: :on } - else - { bool: false, set: :na } - end - act[:html_seg]=if mod.inspect =~/"--html-seg"/ - { bool: true, set: :on } - else - { bool: false, set: :na } - end + act[:html_scroll]=(mod.inspect =~/"--html-scroll"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } + act[:html_seg]=(mod.inspect =~/"--html-seg"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } { bool: false, set: :na } end act[:concordance]=(cmd =~/w/ \ -- cgit v1.2.3 From cd01cd76e133dce0708fcfedf3e62fc6fbae83af Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:19:27 -0500 Subject: v4 (v3): utils (debug renamed), SiSU_Utils::CodeMarker (from Debug::Mark) --- data/doc/sisu/CHANGELOG_v3 | 2 + data/doc/sisu/CHANGELOG_v4 | 2 + lib/sisu/v3/debug.rb | 109 --------------------------------------------- lib/sisu/v3/hub.rb | 2 +- lib/sisu/v3/utils.rb | 109 +++++++++++++++++++++++++++++++++++++++++++++ lib/sisu/v4/constants.rb | 4 +- lib/sisu/v4/debug.rb | 109 --------------------------------------------- lib/sisu/v4/hub.rb | 2 +- lib/sisu/v4/sysenv.rb | 2 +- lib/sisu/v4/utils.rb | 109 +++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 227 insertions(+), 223 deletions(-) delete mode 100644 lib/sisu/v3/debug.rb create mode 100644 lib/sisu/v3/utils.rb delete mode 100644 lib/sisu/v4/debug.rb create mode 100644 lib/sisu/v4/utils.rb diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 8379f677..9cd95b77 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -35,6 +35,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.9.orig.tar.xz sisu_3.3.9.orig.tar.xz sisu_3.3.9-1.dsc +* v3: utils (debug renamed), Utils::CodeMarker (from Debug::Mark) + %% 3.3.8.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_3.3.8 http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.8.orig.tar.xz diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 1b51330a..c79ebe1a 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -26,6 +26,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz * v4: html, screen reporting for --html-scroll, correctly identify output file +* v4: utils (debug renamed) SiSU_Utils::CodeMarker (from Debug::Mark) + %% 4.0.5.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1 diff --git a/lib/sisu/v3/debug.rb b/lib/sisu/v3/debug.rb deleted file mode 100644 index a49cecb7..00000000 --- a/lib/sisu/v3/debug.rb +++ /dev/null @@ -1,109 +0,0 @@ -# encoding: utf-8 -=begin - - * Name: SiSU - - * Description: a framework for document structuring, publishing and search - - * Author: Ralph Amissah - - * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved. - - * License: GPL 3 or later: - - SiSU, a framework for document structuring, publishing and search - - Copyright (C) Ralph Amissah - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program. If not, see . - - If you have Internet connection, the latest version of the GPL should be - available at these locations: - - - - - - * SiSU uses: - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system - - * Hompages: - - - - * Download: - - - * Ralph Amissah - - - - ** Description: system environment, debug related - -=end -module SiSU_Debug - class Mark - def initialize(line,file,color=:red) - @line,@file,@color=line.to_s,file,color - end - def ansi(color=nil) - @color=color ? color : @color - c={} - c[:on]=case @color - when :red; ANSI_C[:red] - when :green; ANSI_C[:green] - when :yellow; ANSI_C[:yellow] - when :blue; ANSI_C[:blue] - when :fuchsia; ANSI_C[:fuchsia] - when :cyan; ANSI_C[:cyan] - when :inv_red; ANSI_C[:inv_red] - when :inv_green; ANSI_C[:inv_green] - when :inv_yellow; ANSI_C[:inv_yellow] - when :inv_blue; ANSI_C[:inv_blue] - when :inv_fuchsia; ANSI_C[:inv_fuchsia] - when :inv_cyan; ANSI_C[:inv_cyan] - when :b_red; ANSI_C[:b_red] - when :b_green; ANSI_C[:b_green] - when :b_yellow; ANSI_C[:b_yellow] - when :b_blue; ANSI_C[:b_blue] - when :b_fuchsia; ANSI_C[:b_fuchsia] - when :b_cyan; ANSI_C[:b_cyan] - else ANSI_C[:red] - end - c[:off]= ANSI_C[:off] - #ansi_color + @line.to_s + ansi_color_off + ' ' + @file.gsub(/([^\/]+$)/,"#{ansi_color}\\1#{ansi_color_off}") - c - end - def set(color=nil) - c=ansi(color) - file,path=File.basename(@file),File.dirname(@file) - c[:on] + @line + c[:off] + ' ' + path + '/' "#{c[:on]}#{file}#{c[:off]}" - end - def set_(color=nil) - c=ansi(color) - c[:on] + @line + c[:off] + ' ' + - @file.gsub(/([^\/]+$)/,"#{c[:on]}\\1#{c[:off]}") - end - end -end -__END__ -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:red) -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:green) -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:inv_red) -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:red).set -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:green).set -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:inv_red).set diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index eeba4cb1..73155047 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -68,7 +68,7 @@ module SiSU include SiSU_Viz require_relative 'help' # help.rb include SiSU_Help - require_relative 'debug' # debug.rb + require_relative 'utils' # utils.rb require 'uri' class HubMaster def initialize(argv) diff --git a/lib/sisu/v3/utils.rb b/lib/sisu/v3/utils.rb new file mode 100644 index 00000000..ade6132a --- /dev/null +++ b/lib/sisu/v3/utils.rb @@ -0,0 +1,109 @@ +# encoding: utf-8 +=begin + + * Name: SiSU + + * Description: a framework for document structuring, publishing and search + + * Author: Ralph Amissah + + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved. + + * License: GPL 3 or later: + + SiSU, a framework for document structuring, publishing and search + + Copyright (C) Ralph Amissah + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + + + + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system + + * Hompages: + + + + * Download: + + + * Ralph Amissah + + + + ** Description: system environment, debug related + +=end +module SiSU_Debug + class Mark + def initialize(line,file,color=:red) + @line,@file,@color=line.to_s,file,color + end + def ansi(color=nil) + @color=color ? color : @color + c={} + c[:on]=case @color + when :red; ANSI_C[:red] + when :green; ANSI_C[:green] + when :yellow; ANSI_C[:yellow] + when :blue; ANSI_C[:blue] + when :fuchsia; ANSI_C[:fuchsia] + when :cyan; ANSI_C[:cyan] + when :inv_red; ANSI_C[:inv_red] + when :inv_green; ANSI_C[:inv_green] + when :inv_yellow; ANSI_C[:inv_yellow] + when :inv_blue; ANSI_C[:inv_blue] + when :inv_fuchsia; ANSI_C[:inv_fuchsia] + when :inv_cyan; ANSI_C[:inv_cyan] + when :b_red; ANSI_C[:b_red] + when :b_green; ANSI_C[:b_green] + when :b_yellow; ANSI_C[:b_yellow] + when :b_blue; ANSI_C[:b_blue] + when :b_fuchsia; ANSI_C[:b_fuchsia] + when :b_cyan; ANSI_C[:b_cyan] + else ANSI_C[:red] + end + c[:off]= ANSI_C[:off] + #ansi_color + @line.to_s + ansi_color_off + ' ' + @file.gsub(/([^\/]+$)/,"#{ansi_color}\\1#{ansi_color_off}") + c + end + def set(color=nil) + c=ansi(color) + file,path=File.basename(@file),File.dirname(@file) + c[:on] + @line + c[:off] + ' ' + path + '/' "#{c[:on]}#{file}#{c[:off]}" + end + def set_(color=nil) + c=ansi(color) + c[:on] + @line + c[:off] + ' ' + + @file.gsub(/([^\/]+$)/,"#{c[:on]}\\1#{c[:off]}") + end + end +end +__END__ +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:red) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:green) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:inv_red) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).set +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).set +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:inv_red).set diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb index 65b17796..d774be25 100644 --- a/lib/sisu/v4/constants.rb +++ b/lib/sisu/v4/constants.rb @@ -289,8 +289,8 @@ DEVELOPER={ maintenance: :false, } __END__ -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:red).set -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:green) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).set +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:green) puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__ puts "#{ANSI_C[:red]} #{__LINE__.to_s} #{ANSI_C[:off]} #{__FILE__}" puts ANSI_C[:fuchsia] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:fuchsia]}\\1#{ANSI_C[:off]}") diff --git a/lib/sisu/v4/debug.rb b/lib/sisu/v4/debug.rb deleted file mode 100644 index a49cecb7..00000000 --- a/lib/sisu/v4/debug.rb +++ /dev/null @@ -1,109 +0,0 @@ -# encoding: utf-8 -=begin - - * Name: SiSU - - * Description: a framework for document structuring, publishing and search - - * Author: Ralph Amissah - - * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved. - - * License: GPL 3 or later: - - SiSU, a framework for document structuring, publishing and search - - Copyright (C) Ralph Amissah - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program. If not, see . - - If you have Internet connection, the latest version of the GPL should be - available at these locations: - - - - - - * SiSU uses: - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system - - * Hompages: - - - - * Download: - - - * Ralph Amissah - - - - ** Description: system environment, debug related - -=end -module SiSU_Debug - class Mark - def initialize(line,file,color=:red) - @line,@file,@color=line.to_s,file,color - end - def ansi(color=nil) - @color=color ? color : @color - c={} - c[:on]=case @color - when :red; ANSI_C[:red] - when :green; ANSI_C[:green] - when :yellow; ANSI_C[:yellow] - when :blue; ANSI_C[:blue] - when :fuchsia; ANSI_C[:fuchsia] - when :cyan; ANSI_C[:cyan] - when :inv_red; ANSI_C[:inv_red] - when :inv_green; ANSI_C[:inv_green] - when :inv_yellow; ANSI_C[:inv_yellow] - when :inv_blue; ANSI_C[:inv_blue] - when :inv_fuchsia; ANSI_C[:inv_fuchsia] - when :inv_cyan; ANSI_C[:inv_cyan] - when :b_red; ANSI_C[:b_red] - when :b_green; ANSI_C[:b_green] - when :b_yellow; ANSI_C[:b_yellow] - when :b_blue; ANSI_C[:b_blue] - when :b_fuchsia; ANSI_C[:b_fuchsia] - when :b_cyan; ANSI_C[:b_cyan] - else ANSI_C[:red] - end - c[:off]= ANSI_C[:off] - #ansi_color + @line.to_s + ansi_color_off + ' ' + @file.gsub(/([^\/]+$)/,"#{ansi_color}\\1#{ansi_color_off}") - c - end - def set(color=nil) - c=ansi(color) - file,path=File.basename(@file),File.dirname(@file) - c[:on] + @line + c[:off] + ' ' + path + '/' "#{c[:on]}#{file}#{c[:off]}" - end - def set_(color=nil) - c=ansi(color) - c[:on] + @line + c[:off] + ' ' + - @file.gsub(/([^\/]+$)/,"#{c[:on]}\\1#{c[:off]}") - end - end -end -__END__ -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:red) -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:green) -puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:inv_red) -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:red).set -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:green).set -puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:inv_red).set diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index 2cfcee57..0cfa0d6e 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -68,7 +68,7 @@ module SiSU include SiSU_Viz require_relative 'help' # help.rb include SiSU_Help - require_relative 'debug' # debug.rb + require_relative 'utils' # utils.rb require 'uri' class HubMaster def initialize(argv) diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index d8b6f4fd..c5a1cebb 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1067,7 +1067,7 @@ module SiSU_Env elsif output_dir_structure.by_filename? '' else - puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:fuschia) + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuschia) puts 'set output type, by: language, filetype or filename' end @stub_set_manifest=stub + '/manifest' diff --git a/lib/sisu/v4/utils.rb b/lib/sisu/v4/utils.rb new file mode 100644 index 00000000..7567d26a --- /dev/null +++ b/lib/sisu/v4/utils.rb @@ -0,0 +1,109 @@ +# encoding: utf-8 +=begin + + * Name: SiSU + + * Description: a framework for document structuring, publishing and search + + * Author: Ralph Amissah + + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved. + + * License: GPL 3 or later: + + SiSU, a framework for document structuring, publishing and search + + Copyright (C) Ralph Amissah + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + + + + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system + + * Hompages: + + + + * Download: + + + * Ralph Amissah + + + + ** Description: system environment, debug related + +=end +module SiSU_Utils + class CodeMarker + def initialize(line,file,color=:red) + @line,@file,@color=line.to_s,file,color + end + def ansi(color=nil) + @color=color ? color : @color + c={} + c[:on]=case @color + when :red; ANSI_C[:red] + when :green; ANSI_C[:green] + when :yellow; ANSI_C[:yellow] + when :blue; ANSI_C[:blue] + when :fuchsia; ANSI_C[:fuchsia] + when :cyan; ANSI_C[:cyan] + when :inv_red; ANSI_C[:inv_red] + when :inv_green; ANSI_C[:inv_green] + when :inv_yellow; ANSI_C[:inv_yellow] + when :inv_blue; ANSI_C[:inv_blue] + when :inv_fuchsia; ANSI_C[:inv_fuchsia] + when :inv_cyan; ANSI_C[:inv_cyan] + when :b_red; ANSI_C[:b_red] + when :b_green; ANSI_C[:b_green] + when :b_yellow; ANSI_C[:b_yellow] + when :b_blue; ANSI_C[:b_blue] + when :b_fuchsia; ANSI_C[:b_fuchsia] + when :b_cyan; ANSI_C[:b_cyan] + else ANSI_C[:red] + end + c[:off]= ANSI_C[:off] + #ansi_color + @line.to_s + ansi_color_off + ' ' + @file.gsub(/([^\/]+$)/,"#{ansi_color}\\1#{ansi_color_off}") + c + end + def set(color=nil) + c=ansi(color) + file,path=File.basename(@file),File.dirname(@file) + c[:on] + @line + c[:off] + ' ' + path + '/' "#{c[:on]}#{file}#{c[:off]}" + end + def set_(color=nil) + c=ansi(color) + c[:on] + @line + c[:off] + ' ' + + @file.gsub(/([^\/]+$)/,"#{c[:on]}\\1#{c[:off]}") + end + end +end +__END__ +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:red) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:green) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:inv_red) +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).set +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).set +puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:inv_red).set -- cgit v1.2.3 From 9729605b3202aa4c808be01fe65faf88fd353df4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:20:53 -0500 Subject: v4: utils, SiSU_Utils::Path.new.base_markup provides base markup directory * base markup directory contains sisu markup files, any language sub-directories (with sisu markup files) and sisu resource configuration sub-directory, if any (./_sisu) (identifies when needed in runtime) --- data/doc/sisu/CHANGELOG_v4 | 7 ++++++- lib/sisu/v4/sysenv.rb | 5 +++-- lib/sisu/v4/utils.rb | 11 +++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index c79ebe1a..9cdd4885 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -26,7 +26,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz * v4: html, screen reporting for --html-scroll, correctly identify output file -* v4: utils (debug renamed) SiSU_Utils::CodeMarker (from Debug::Mark) +* v4: utils (debug renamed) + * SiSU_Utils::CodeMarker (from Debug::Mark) + * SiSU_Utils::Path.new.base_markup provides base markup directory that + contains sisu markup files, any language sub-directories (with sisu markup + files) and sisu resource configuration sub-directory, if any (./_sisu) + (identifies when needed in runtime) %% 4.0.5.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index c5a1cebb..2ac8897f 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -60,6 +60,7 @@ @@lang_info=nil module SiSU_Env require_relative 'constants' # constants.rb + require_relative 'utils' # utils.rb require 'fileutils' include FileUtils::Verbose require 'singleton' @@ -213,7 +214,7 @@ module SiSU_Env } @@default_dir=DEFAULT_DIR m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m - @@pwd=@pwd=(/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1] + @@pwd=@pwd=SiSU_Utils::Path.new.base_markup stub_pwd=@pwd[m,1] attr_accessor :user,:home,:hostname,:pwd,:host,:arch,:rbver,:dir_arch,:dir_sitearch,:dir_bin,:locale,:webserv_path,:webserv_host_cgi,:webserv_port_cgi,:default_dir,:rc_path,:ad_path def initialize @@ -3926,7 +3927,7 @@ WOK class InfoDb < InfoEnv @@rc=nil def initialize - @@pwd=@pwd=(/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1] + @@pwd=@pwd=SiSU_Utils::Path.new.base_markup @env=SiSU_Env::InfoEnv.new pt=Pathname.new(@pwd) r=Px[:lng_lst_rgx] diff --git a/lib/sisu/v4/utils.rb b/lib/sisu/v4/utils.rb index 7567d26a..040e06b6 100644 --- a/lib/sisu/v4/utils.rb +++ b/lib/sisu/v4/utils.rb @@ -99,6 +99,17 @@ module SiSU_Utils @file.gsub(/([^\/]+$)/,"#{c[:on]}\\1#{c[:off]}") end end + class Path + def initialize(dir=Dir.pwd) + @dir=dir + end + def base_markup + (/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1] + end + def bmd + base_markup + end + end end __END__ puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:red) -- cgit v1.2.3 From 83a88c716a3577de0667f49cce77699790eb3686 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:21:41 -0500 Subject: v4: sysenv, webserv dir (output dir), ensure is determined from base markup dir * where relative path provided (remove possibility of path expansion being done from a language sub-directory), fix --- data/doc/sisu/CHANGELOG_v4 | 4 ++++ lib/sisu/v4/sysenv.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 9cdd4885..83692be3 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -33,6 +33,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz files) and sisu resource configuration sub-directory, if any (./_sisu) (identifies when needed in runtime) +* v4: sysenv, webserv dir (output dir), ensure it is determined from base markup + dir where relative path provided (remove possibility of it being done from a + language sub-directory), fix + %% 4.0.5.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1 diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 2ac8897f..728f4fc4 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1941,7 +1941,11 @@ WOK man_path=if @@man_path.nil? man_path=if defined? @rc['webserv']['path'] \ and @rc['webserv']['path'] =~/\S\S+/ + pwd=Dir.pwd + Dir.chdir(SiSU_Utils::Path.new.base_markup) man_path=@@man_path=File.expand_path(@rc['webserv']['path']) + Dir.chdir(pwd) + man_path else defaults[:webserv_path] end else @@man_path -- cgit v1.2.3 From 1803ceb1a0cfa7fad679794ded0305a170dcf722 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:44:36 -0500 Subject: v4: texpdf, cosmetic code --- data/doc/sisu/CHANGELOG_v4 | 2 + lib/sisu/v4/texpdf.rb | 44 +++++++++++---------- lib/sisu/v4/texpdf_format.rb | 94 ++++++++++++++++++++++---------------------- 3 files changed, 73 insertions(+), 67 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 83692be3..8244ed40 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -33,6 +33,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz files) and sisu resource configuration sub-directory, if any (./_sisu) (identifies when needed in runtime) +* v4: texpdf, cosmetic code + * v4: sysenv, webserv dir (output dir), ensure it is determined from base markup dir where relative path provided (remove possibility of it being done from a language sub-directory), fix 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 - < Date: Wed, 6 Feb 2013 22:28:34 -0500 Subject: v4: pdf (texpdf, options, hub, urls) orientation discrete, individually callable --- data/doc/sisu/CHANGELOG_v4 | 9 +- lib/sisu/v4/hub.rb | 8 +- lib/sisu/v4/options.rb | 115 +++++++++++-------- lib/sisu/v4/texpdf.rb | 278 ++++++++++++++++++++++++++++----------------- lib/sisu/v4/urls.rb | 12 +- 5 files changed, 264 insertions(+), 158 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 8244ed40..494a51e8 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -26,6 +26,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz * v4: html, screen reporting for --html-scroll, correctly identify output file +* v4: pdf + * pdf (options, hub, urls), orientation, portrait & landscape optionally + discrete, individually callable + * --pdf-l (--pdf-landscape), --pdf-p (--pdf-portrait) + * sisu latex output & xetex generation + * texpdf, cosmetic code + * v4: utils (debug renamed) * SiSU_Utils::CodeMarker (from Debug::Mark) * SiSU_Utils::Path.new.base_markup provides base markup directory that @@ -33,8 +40,6 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz files) and sisu resource configuration sub-directory, if any (./_sisu) (identifies when needed in runtime) -* v4: texpdf, cosmetic code - * v4: sysenv, webserv dir (output dir), ensure it is determined from base markup dir where relative path provided (remove possibility of it being done from a language sub-directory), fix diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index 0cfa0d6e..ccae2b9f 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -337,7 +337,11 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on require_relative 'xml_dom' # -X xml_dom.rb SiSU_XML_DOM::Source.new(@opt).read end - if @opt.act[:pdf][:set]==:on #% --pdf, -p latex/ texpdf + if @opt.act[:pdf][:set]==:on \ + or @opt.act[:pdf_p][:set]==:on \ + or @opt.act[:pdf_l][:set]==:on + #% --pdf-l + #% --pdf, -p latex/ texpdf require_relative 'texpdf' # -p texpdf.rb SiSU_TeX::Source.new(@opt).read end @@ -651,6 +655,8 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on or @opt.act[:xml_sax][:set]==:on \ or @opt.act[:xml_dom][:set]==:on \ or @opt.act[:pdf][:set]==:on \ + or @opt.act[:pdf_p][:set]==:on \ + or @opt.act[:pdf_l][:set]==:on \ or @opt.act[:psql][:set]==:on \ or @opt.act[:sqlite][:set]==:on \ or @opt.act[:sqlite_discreet][:set]==:on \ diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 6aac2b1a..fca60a3d 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -465,47 +465,49 @@ module SiSU_Commandline unless m.empty? m.each do |m| case m - when /^--(?:color-toggle)$/; c=c+'c' - when /^--(?:color-off)$/; c=c+'k' - when /^--(?:configure|init-site)$/; c=c+'CC' - when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m' - when /^--(?:txt|text|plaintext)$/; c=c+'t' - when /^--(?:html)$/; c=c+'h' - when /^--(?:html-scroll|html-seg)$/; c=c+'H' + when /^--(?:color-toggle)$/; c=c+'c' + when /^--(?:color-off)$/; c=c+'k' + when /^--(?:configure|init-site)$/; c=c+'CC' + when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m' + when /^--(?:txt|text|plaintext)$/; c=c+'t' + when /^--(?:html)$/; c=c+'h' + when /^--(?:html-scroll|html-seg)$/; c=c+'H' mod << m - when /^--(?:epub)$/; c=c+'e' - when /^--(?:od[ft])$/; c=c+'o' - when /^--(?:pdf)$/; c=c+'p' - when /^--(?:concordance|wordmap)$/; c=c+'w' - when /^--(?:manpage|man)$/; c=c+'i' - when /^--(?:texinfo)$/; c=c+'I' - when /^--(?:xhtml)$/; c=c+'b' - when /^--(?:xml-sax)$/; c=c+'x' - when /^--(?:xml-dom)$/; c=c+'X' - when /^--(?:images)$/; c=c+'j' - when /^--(?:hash-digests)$/; c=c+'N' - when /^--(?:po4a|pot?)$/; c=c+'P' - when /^--(?:termsheet)$/; c=c+'T' - when /^--(?:manifest)$/; c=c+'y' - when /^--(?:qrcode)$/; c=c+'Q' - when /^--(?:sqlite)$/; c=c+'d' - when /^--(?:pg|pg?sql|postgresql)$/; c=c+'D' - when /^--(?:remote|rsync)$/; c=c+'R' - when /^--(?:scp)$/; c=c+'r' - when /^--(?:source)$/; c=c+'s' - when /^--(?:sisupod|pod)$/; c=c+'S' - when /^--(?:git)$/; c=c+'g' - when /^--(?:urls)$/; c=c+'U' - when /^--(?:zap|delete)$/; c=c+'Z' - when /^--(?:sample-search-form)$/; c=c+'F' - when /^--(?:webserv|webrick)$/; c=c+'W' - when /^--(?:profile)$/; c=c+'E' - when /^--(?:maintenance|keep-processing-files)$/; c=c+'M' - when /^--(?:verbose[=-]3)$/; c=c+'VM' - when /^--(?:verbose[=-]2|Verbose|VERBOSE)$/; c=c+'V' - when /^--(?:verbose(?:[=-]1)?)$/; c=c+'v' - when /^--(?:version)$/; c=c+'v' - when /^--(?:verbose[=-]0|quiet|silent)$/; c=c+'q' + when /^--(?:epub)$/; c=c+'e' + when /^--(?:od[ft])$/; c=c+'o' + when /^--(?:pdf)$/; c=c+'p' + when /^--pdf-(?:p|l|portrait|landscape)$/; c=c+'L' + mod << m + when /^--(?:concordance|wordmap)$/; c=c+'w' + when /^--(?:manpage|man)$/; c=c+'i' + when /^--(?:texinfo)$/; c=c+'I' + when /^--(?:xhtml)$/; c=c+'b' + when /^--(?:xml-sax)$/; c=c+'x' + when /^--(?:xml-dom)$/; c=c+'X' + when /^--(?:images)$/; c=c+'j' + when /^--(?:hash-digests)$/; c=c+'N' + when /^--(?:po4a|pot?)$/; c=c+'P' + when /^--(?:termsheet)$/; c=c+'T' + when /^--(?:manifest)$/; c=c+'y' + when /^--(?:qrcode)$/; c=c+'Q' + when /^--(?:sqlite)$/; c=c+'d' + when /^--(?:pg|pg?sql|postgresql)$/; c=c+'D' + when /^--(?:remote|rsync)$/; c=c+'R' + when /^--(?:scp)$/; c=c+'r' + when /^--(?:source)$/; c=c+'s' + when /^--(?:sisupod|pod)$/; c=c+'S' + when /^--(?:git)$/; c=c+'g' + when /^--(?:urls)$/; c=c+'U' + when /^--(?:zap|delete)$/; c=c+'Z' + when /^--(?:sample-search-form)$/; c=c+'F' + when /^--(?:webserv|webrick)$/; c=c+'W' + when /^--(?:profile)$/; c=c+'E' + when /^--(?:maintenance|keep-processing-files)$/; c=c+'M' + when /^--(?:verbose[=-]3)$/; c=c+'VM' + when /^--(?:verbose[=-]2|Verbose|VERBOSE)$/; c=c+'V' + when /^--(?:verbose(?:[=-]1)?)$/; c=c+'v' + when /^--(?:version)$/; c=c+'v' + when /^--(?:verbose[=-]0|quiet|silent)$/; c=c+'q' else mod << m #mod only contains command modifiers; commands converted to character end end @@ -518,7 +520,7 @@ module SiSU_Commandline end extra='' if cmd !~/[mn]/ - extra+=if cmd =~/[abegHhIiNOoPpQTtwXxyz]/ \ + extra+=if cmd =~/[abegHhIiLNOoPpQTtwXxyz]/ \ and cmd !~/[mn]/ 'm' #% add dal elsif ((cmd =~/[Dd]/ \ @@ -561,8 +563,7 @@ module SiSU_Commandline @act=@@act else act={} - act[:license]=(cmd =~/L/ \ - || mod.inspect =~/"--license/) \ + act[:license]=(mod.inspect =~/"--license/) \ ? { bool: true, set: :on } : { bool: false, set: :na } act[:site_init]=(cmd =~/C/ \ @@ -781,10 +782,30 @@ module SiSU_Commandline || mod.inspect =~/"--images"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } - act[:pdf]=(cmd =~/p/ \ - || mod.inspect =~/"--pdf"/) \ - ? { bool: true, set: :on } - : { bool: false, set: :na } + act[:pdf]=if (cmd =~/p/ \ + || mod.inspect =~/"--pdf"/) + if mod.inspect =~/"--portrait"/ + act[:pdf_p]={ bool: true, set: :on } + act[:pdf_l]={ bool: false, set: :na } + { bool: false, set: :na } + elsif mod.inspect =~/"--landscape"/ + act[:pdf_l]={ bool: true, set: :on } + act[:pdf_p]={ bool: false, set: :na } + { bool: false, set: :na } + else + act[:pdf_p]={ bool: true, set: :on } + act[:pdf_l]={ bool: true, set: :on } + { bool: true, set: :on } + end + else + act[:pdf_p]=(mod.inspect =~/"--pdf-(?:p|portrait)"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } + act[:pdf_l]=(mod.inspect =~/"--pdf-(?:l|landscape)"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } + { bool: false, set: :na } + end act[:epub]=(cmd =~/e/ \ || mod.inspect =~/"--epub"/) \ ? { bool: true, set: :on } diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb index 20998e6c..34d4f69c 100644 --- a/lib/sisu/v4/texpdf.rb +++ b/lib/sisu/v4/texpdf.rb @@ -109,8 +109,12 @@ module SiSU_TeX SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.cmd =~/q/ if @opt.cmd =~/[MVv]/ path=@env.url.output_tell - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l}pdf").flow - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@opt.fns} #{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p}pdf").flow + if @md.opt.act[:pdf_l][:set]==:on + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l}pdf").flow + end + if @md.opt.act[:pdf_p][:set]==:on + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@opt.fns} #{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p}pdf").flow + end end @md=@particulars.md $flag=@md.opt.cmd #introduced to pass 0 for no object citation numbers... to texpdf_format @@ -157,27 +161,35 @@ module SiSU_TeX def latex_do(texfilename,papersize) @texfilename=texfilename @@n_lpdf=@@n_lpdf+1 - SiSU_Screen::Ansi.new(@md.opt.cmd,"#{papersize} portrait ->").dark_grey_title_hi if @md.opt.cmd =~/[MVv]/ tex_fn_base=@texfilename.gsub(/\.tex$/,'') - cmd=SiSU_Env::SystemCall.new("#{tex_fn_base}.tex",'',@md.opt.cmd) tell=SiSU_Screen::Ansi.new(@md.opt.cmd) - tell.grey_open if @md.opt.cmd =~/[MVv]/ - if "#{tex_fn_base}" =~/\w+/ \ - and "#{papersize}" =~/\w+/ - 2.times { |i| cmd.latex2pdf(@md,papersize) } #comment out to skip processing of latex portrait - end - tell.p_off if @md.opt.cmd =~/[MVv]/ - SiSU_Screen::Ansi.new(@md.opt.cmd,"#{papersize} landscape ->").dark_grey_title_hi if @md.opt.cmd =~/[MVv]/ - cmd=SiSU_Env::SystemCall.new("#{tex_fn_base}.landscape.tex",'',@md.opt.cmd) - tell.grey_open if @md.opt.cmd =~/[MVv]/ - if "#{tex_fn_base}" =~/\w+/ \ - and "#{papersize}" =~/\w+/ - 2.times { |i| cmd.latex2pdf(@md,papersize) } #comment out to skip processing of latex landscape - end - tell.p_off if @md.opt.cmd =~/[MVv]/ + if @md.opt.act[:pdf_p][:set]==:on + SiSU_Screen::Ansi.new(@md.opt.cmd,"#{papersize} portrait ->").dark_grey_title_hi if @md.opt.cmd =~/[MVv]/ + cmd=SiSU_Env::SystemCall.new("#{tex_fn_base}.tex",'',@md.opt.cmd) + tell.grey_open if @md.opt.cmd =~/[MVv]/ + if "#{tex_fn_base}" =~/\w+/ \ + and "#{papersize}" =~/\w+/ + 2.times { |i| cmd.latex2pdf(@md,papersize) } #comment out to skip processing of latex portrait + end + tell.p_off if @md.opt.cmd =~/[MVv]/ + end + if @md.opt.act[:pdf_l][:set]==:on + SiSU_Screen::Ansi.new(@md.opt.cmd,"#{papersize} landscape ->").dark_grey_title_hi if @md.opt.cmd =~/[MVv]/ + cmd=SiSU_Env::SystemCall.new("#{tex_fn_base}.landscape.tex",'',@md.opt.cmd) + tell.grey_open if @md.opt.cmd =~/[MVv]/ + if "#{tex_fn_base}" =~/\w+/ \ + and "#{papersize}" =~/\w+/ + 2.times { |i| cmd.latex2pdf(@md,papersize) } #comment out to skip processing of latex landscape + end + tell.p_off if @md.opt.cmd =~/[MVv]/ + end pwd=Dir.pwd - portrait_pdf="#{pwd}/#{tex_fn_base}.pdf" - landscape_pdf="#{pwd}/#{tex_fn_base}.landscape.pdf" + if @md.opt.act[:pdf_p][:set]==:on + portrait_pdf="#{pwd}/#{tex_fn_base}.pdf" + end + if @md.opt.act[:pdf_l][:set]==:on + landscape_pdf="#{pwd}/#{tex_fn_base}.landscape.pdf" + end case papersize when /a4/; pdf_p=@f.pdf_p_a4; pdf_l=@f.pdf_l_a4 when /a5/; pdf_p=@f.pdf_p_a5; pdf_l=@f.pdf_l_a5 @@ -187,15 +199,19 @@ module SiSU_TeX else pdf_p=@f.pdf_p_a4; pdf_l=@f.pdf_l_a4 end FileUtils::mkdir_p(@md.file.output_path.pdf.dir) unless FileTest.directory?(@md.file.output_path.pdf.dir) - if FileTest.file?(portrait_pdf) - FileUtils::cp(portrait_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_p}") - FileUtils::rm(portrait_pdf) - else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{portrait_pdf}" if @md.opt.cmd.inspect =~/M/ + if @md.opt.act[:pdf_p][:set]==:on + if FileTest.file?(portrait_pdf) + FileUtils::cp(portrait_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_p}") + FileUtils::rm(portrait_pdf) + else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{portrait_pdf}" if @md.opt.cmd.inspect =~/M/ + end end - if FileTest.file?(landscape_pdf) - FileUtils::cp(landscape_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_l}") - FileUtils::rm(landscape_pdf) - else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.opt.cmd.inspect =~/M/ + if @md.opt.act[:pdf_l][:set]==:on + if FileTest.file?(landscape_pdf) + FileUtils::cp(landscape_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_l}") + FileUtils::rm(landscape_pdf) + else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.opt.cmd.inspect =~/M/ + end end SiSU_Screen::Ansi.new(@md.opt.cmd,@@n_lpdf,'processed (SiSU LaTeX to pdf - using pdfetex aka. pdftex or pdflatex)').generic_number if @md.opt.cmd =~/[MVv]/ end @@ -214,13 +230,18 @@ module SiSU_TeX Dir.chdir(@env.processing_path.tex) texfile=@md.fns.gsub(/$/,".#{ps}.tex"). gsub(/~/,'-') - if File.exist?(texfile) \ - and File.size(texfile) > 0 - @tex_f_no+=1 - #p "#{__FILE__}:#{__LINE__} texpdf generation disabled" if @md.opt.cmd.inspect =~/M/ #%% disable temporarily, re-enable + if @md.opt.act[:pdf_p][:set]==:on \ + or @md.opt.act[:pdf_l][:set]==:on latex_do(texfile,ps) - else - puts "\tzero file size #{@env.processing_path.tex}/#{texfile}" + if @md.opt.act[:pdf_p][:set]==:on + if File.exist?(texfile) \ + and File.size(texfile) > 0 + #@tex_f_no+=1 + else + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia) + puts "\tzero file size #{@env.processing_path.tex}/#{texfile}" + end + end end end end @@ -234,32 +255,34 @@ module SiSU_TeX when /legal/; pdf_p=@f.pdf_p_legal; pdf_l=@f.pdf_l_legal else pdf_p=@f.pdf_p_a4; pdf_l=@f.pdf_l_a4 end - if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_p}") - mklnk=if @md.file.output_dir_structure.by_language_code? \ - or @md.file.output_dir_structure.by_filetype? - "#{@md.fnb}.portrait.pdf" - else 'portrait.pdf' + if @md.opt.act[:pdf_p][:set]==:on + if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_p}") + mklnk=((@md.file.output_dir_structure.by_language_code?) \ + || (@md.file.output_dir_structure.by_filetype?)) \ + ? "#{@md.fnb}.portrait.pdf" + : 'portrait.pdf' + if FileTest.directory?(@md.file.output_path.pdf.dir) + pwd=Dir.pwd + Dir.chdir(@md.file.output_path.pdf.dir) + FileUtils::rm_f(mklnk) + FileUtils::ln_s(pdf_p, mklnk) + Dir.chdir(pwd) + end end - if FileTest.directory?(@md.file.output_path.pdf.dir) - pwd=Dir.pwd + end + if @md.opt.act[:pdf_l][:set]==:on + if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_l}") + mklnk=((@md.file.output_dir_structure.by_language_code?) \ + || (@md.file.output_dir_structure.by_filetype?)) \ + ? "#{@md.fnb}.landscape.pdf" + : 'landscape.pdf' + pwd_set=Dir.pwd Dir.chdir(@md.file.output_path.pdf.dir) FileUtils::rm_f(mklnk) - FileUtils::ln_s(pdf_p, mklnk) - Dir.chdir(pwd) + FileUtils::ln_s(pdf_l, mklnk) + Dir.chdir(pwd_set) end end - if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_l}") - mklnk=if @md.file.output_dir_structure.by_language_code? \ - or @md.file.output_dir_structure.by_filetype? - "#{@md.fnb}.landscape.pdf" - else 'landscape.pdf' - end - pwd_set=Dir.pwd - Dir.chdir(@md.file.output_path.pdf.dir) - FileUtils::rm_f(mklnk) - FileUtils::ln_s(pdf_l, mklnk) - Dir.chdir(pwd_set) - end else SiSU_Screen::Ansi.new(@md.opt.cmd,"*WARN* FILE NOT FOUND: << #{@md.fns} >> - requested latex system processing skipped").warn end @@ -303,7 +326,18 @@ module SiSU_TeX data=@data @@tex_footnote_array=[] @@rights=nil - SiSU_Screen::Ansi.new(@md.opt.cmd,"pdfTex portrait & landscape").txt_grey if @md.opt.cmd=~/[MVvz]/ + txt_gen=if @md.opt.act[:pdf_l][:set]==:on \ + and @md.opt.act[:pdf_p][:set]==:on + 'pdfTex portrait & landscape' + elsif @md.opt.act[:pdf_l][:set]==:on + 'pdfTex landscape' + elsif @md.opt.act[:pdf_p][:set]==:on + 'pdfTex portrait' + else + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia) + 'error: neither landscape nor portrait' + end + SiSU_Screen::Ansi.new(@md.opt.cmd,txt_gen).txt_grey if @md.opt.cmd=~/[MVvz]/ if defined? @md.rights.all \ and not @md.rights.all.empty? rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed @@ -671,12 +705,16 @@ module SiSU_TeX home=@vz.txt_home.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') #no line splitting in heading neither html nor latex 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| - txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'portrait' } - orient_portrait=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) - txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'landscape' } - orient_landscape=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) - @@tex_head[ps][:p]=orient_portrait.document_head_with_orientation(@codeblock_box) - @@tex_head[ps][:l]=orient_landscape.document_head_with_orientation(@codeblock_box) + if @md.opt.act[:pdf_p][:set]==:on + 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' } + orient_landscape=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) + @@tex_head[ps][:l]=orient_landscape.document_head_with_orientation(@codeblock_box) + end end @tex_file <<<<-WOK #{@tex_ml.header}#{@tex_ml.footer} @@ -715,8 +753,12 @@ module SiSU_TeX @copymark='' #check and remove as now is superflous x={} txt_obj={ title: @md.title.full } - x[:l]=SiSU_TeX_Pdf::FormatTextObject.new(@md,txt_obj).title_landscape - x[:p]=SiSU_TeX_Pdf::FormatTextObject.new(@md,txt_obj).title_portrait + if @md.opt.act[:pdf_l][:set]==:on + x[:l]=SiSU_TeX_Pdf::FormatTextObject.new(@md,txt_obj).title_landscape + end + if @md.opt.act[:pdf_p][:set]==:on + x[:p]=SiSU_TeX_Pdf::FormatTextObject.new(@md,txt_obj).title_portrait + end @tex_file << x x=nil if defined? @md.creator.author \ @@ -901,59 +943,77 @@ module SiSU_TeX def output_morph_hash(o) ps,h,fn=o[:ps],o[:h],o[:filename] if h[ps] \ - and (h[ps][:p] and h[ps][:l]) - if h[ps][:p] - h[ps][:p]=h[ps][:p].gsub(/[ ]+$/m,''). - gsub(/\n\n\n+/m,"\n\n") - end - if h[ps][:l] - h[ps][:l]=h[ps][:l].gsub(/[ ]+$/m,''). - gsub(/\n\n\n+/m,"\n\n") - end - #h[ps][:p].gsub!(/(?:^[ ]+|[ ]+$)/m,'') if h[ps][:p] - #h[ps][:l].gsub!(/(?:^[ ]+|[ ]+$)/m,'') if h[ps][:l] - if h[ps][:p] !~/\A\s*\Z/ - fn[:portrait].puts h[ps][:p],"\n" - end - if h[ps][:l] !~/\A\s*\Z/ - fn[:landscape].puts h[ps][:l],"\n" - end - elsif (h[:p] and h[:l]) - if h[:p] - h[:p]=h[:p].gsub(/[ ]+$/m,''). - gsub(/\n\n\n+/m,"\n\n") + and (h[ps][:p] or h[ps][:l]) + if @md.opt.act[:pdf_p][:set]==:on + if h[ps][:p] + h[ps][:p]=h[ps][:p].gsub(/[ ]+$/m,''). + gsub(/\n\n\n+/m,"\n\n") + end + if h[ps][:p] !~/\A\s*\Z/ + fn[:portrait].puts h[ps][:p],"\n" + end end - if h[:l] - h[:l]=h[:l].gsub(/[ ]+$/m,''). - gsub(/\n\n\n+/m,"\n\n") + if @md.opt.act[:pdf_l][:set]==:on + if h[ps][:l] + h[ps][:l]=h[ps][:l].gsub(/[ ]+$/m,''). + gsub(/\n\n\n+/m,"\n\n") + end + if h[ps][:l] !~/\A\s*\Z/ + fn[:landscape].puts h[ps][:l],"\n" + end end - #h[:p].gsub!(/(?:^[ ]+|[ ]+$)/m,'') if h[:p] - #h[:l].gsub!(/(?:^[ ]+|[ ]+$)/m,'') if h[:l] - if h[:p] !~/\A\s*\Z/ - fn[:portrait].puts h[:p],"\n" + elsif (h[:p] or h[:l]) + if @md.opt.act[:pdf_p][:set]==:on + if h[:p] + h[:p]=h[:p].gsub(/[ ]+$/m,''). + gsub(/\n\n\n+/m,"\n\n") + end + if h[:p] !~/\A\s*\Z/ + fn[:portrait].puts h[:p],"\n" + end end - if h[:l] !~/\A\s*\Z/ - fn[:landscape].puts h[:l],"\n" + if @md.opt.act[:pdf_l][:set]==:on + if h[:l] + h[:l]=h[:l].gsub(/[ ]+$/m,''). + gsub(/\n\n\n+/m,"\n\n") + end + if h[:l] !~/\A\s*\Z/ + fn[:landscape].puts h[:l],"\n" + end end else p "#{__FILE__}:#{__LINE__}" if @md.opt.cmd.inspect =~/M/ end end def output(array) @array=array=array.flatten.compact - fns_l=@md.fns.gsub(/~/,'-') #this is a sorry fix, but necessary as it appears latex programs like not ~ + fns=@md.fns.gsub(/~/,'-') #this is a sorry fix, but necessary as it appears latex programs like not ~ @md.papersize_array.each do |ps| + texfile_landscape=(@md.opt.act[:pdf_l][:set]==:on) \ + ? (File.new("#{@env.processing_path.tex}/#{fns}.#{ps}.landscape.tex",'w+')) + : nil + texfile_portrait=(@md.opt.act[:pdf_p][:set]==:on) \ + ? (File.new("#{@env.processing_path.tex}/#{fns}.#{ps}.tex",'w+')) + : nil file={ - landscape: File.new("#{@env.processing_path.tex}/#{fns_l}.#{ps}.landscape.tex",'w+'), - portrait: File.new("#{@env.processing_path.tex}/#{fns_l}.#{ps}.tex",'w+') + landscape: texfile_landscape, + portrait: texfile_portrait } - file[:portrait] << @@tex_head[ps][:p] - file[:landscape] << @@tex_head[ps][:l] + if @md.opt.act[:pdf_p][:set]==:on + file[:portrait] << @@tex_head[ps][:p] + end + if @md.opt.act[:pdf_l][:set]==:on + file[:landscape] << @@tex_head[ps][:l] + end array.each do |morph| if morph.is_a?(String) #morph.gsub!(/^\s+/,'') if morph !~/\A\s*\Z/ - file[:portrait].puts morph,"\n" - file[:landscape].puts morph,"\n" + if @md.opt.act[:pdf_p][:set]==:on + file[:portrait].puts morph,"\n" + end + if @md.opt.act[:pdf_l][:set]==:on + file[:landscape].puts morph,"\n" + end end elsif morph.class.inspect =~ /SiSU_DAL_DocumentStructure/ \ and morph.tmp \ @@ -965,8 +1025,12 @@ module SiSU_TeX end if (morph.tmp !~/\A\s*\Z/) \ || morph.is==:code - file[:portrait].puts morph.tmp,"\n" - file[:landscape].puts morph.tmp,"\n" + if @md.opt.act[:pdf_p][:set]==:on + file[:portrait].puts morph.tmp,"\n" + end + if @md.opt.act[:pdf_l][:set]==:on + file[:landscape].puts morph.tmp,"\n" + end end elsif morph.is_a?(Hash) #inserted headers and the like, only h={ ps: ps, h: morph, filename: file } @@ -977,8 +1041,12 @@ module SiSU_TeX end end array=@array - file[:portrait].close - file[:landscape].close + if @md.opt.act[:pdf_p][:set]==:on + file[:portrait].close + end + if @md.opt.act[:pdf_l][:set]==:on + file[:landscape].close + end end @@tex_head={ 'a4'=> { p: nil, l: nil }, diff --git a/lib/sisu/v4/urls.rb b/lib/sisu/v4/urls.rb index 5e6bcc8a..e3671dcd 100644 --- a/lib/sisu/v4/urls.rb +++ b/lib/sisu/v4/urls.rb @@ -355,11 +355,17 @@ module SiSU_Urls end end if x=~/--pdf\b/ \ - and @opt.act[:pdf][:set]==:on + and (@opt.act[:pdf][:set]==:on \ + or @opt.act[:pdf_p][:set]==:on \ + or @opt.act[:pdf_l][:set]==:on) if x =~/portrait/ - show.pdf.portrait(x) + if @opt.act[:pdf_p][:set]==:on + show.pdf.portrait(x) + end else - show.pdf.landscape(x) + if @opt.act[:pdf_l][:set]==:on + show.pdf.landscape(x) + end end end if x=~/--sisupod\b/ \ -- cgit v1.2.3 From bf57f03babb2375adc9a225f4d95799c37d81d55 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 23:10:58 -0500 Subject: v4: options, param, pdf papersize, command-line options to override sisurc --- data/doc/sisu/CHANGELOG_v4 | 9 ++++++++ lib/sisu/v4/options.rb | 57 +++++++++++++++++++++++++++++++++++++++++++++- lib/sisu/v4/param.rb | 26 +++++++++------------ 3 files changed, 76 insertions(+), 16 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 494a51e8..715341a5 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -31,6 +31,15 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz discrete, individually callable * --pdf-l (--pdf-landscape), --pdf-p (--pdf-portrait) * sisu latex output & xetex generation + * pdf (options, param), papersize, command-line options to override sisurc + settings, [a4,a5,b5,letter,legal] when --pdf* used: + * --papersize-a4 --papersize-letter (also --a4 --letter) + * --papersize=a4,letter + * --pdf-a4 --pdf-letter (for portrait only --pdf-p-a4 --pdf-p-letter) + [orientation & papersize options are set independently so calling + --pdf-p-a4 & --pdf-l-letter would result in landscapes and portraits of + both a4 & letter (rather than an individual request for a portrait A4 & a + landscape letter size)] * texpdf, cosmetic code * v4: utils (debug renamed) diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index fca60a3d..8f07e0c4 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -476,8 +476,14 @@ module SiSU_Commandline when /^--(?:epub)$/; c=c+'e' when /^--(?:od[ft])$/; c=c+'o' when /^--(?:pdf)$/; c=c+'p' + when /^--pdf-(?:a4|a5|b5|legal|letter)$/; c=c+'p' + mod << m when /^--pdf-(?:p|l|portrait|landscape)$/; c=c+'L' mod << m + when /^--pdf-(?:p(?:ortrait)?|l(?:andscape)?)-(?:a4|letter|a5|b5|legal)$/; c=c+'L' + mod << m + when /^--pdf-(?:a4|letter|a5|b5|legal)-(?:p(?:ortrait)?|l(?:andscape)?)$/; c=c+'L' + mod << m when /^--(?:concordance|wordmap)$/; c=c+'w' when /^--(?:manpage|man)$/; c=c+'i' when /^--(?:texinfo)$/; c=c+'I' @@ -783,7 +789,7 @@ module SiSU_Commandline ? { bool: true, set: :on } : { bool: false, set: :na } act[:pdf]=if (cmd =~/p/ \ - || mod.inspect =~/"--pdf"/) + || mod.inspect =~/"--pdf"|"--pdf-(?:a4|a5|b5|letter|legal)"/) if mod.inspect =~/"--portrait"/ act[:pdf_p]={ bool: true, set: :on } act[:pdf_l]={ bool: false, set: :na } @@ -799,13 +805,62 @@ module SiSU_Commandline end else act[:pdf_p]=(mod.inspect =~/"--pdf-(?:p|portrait)"/) \ + || (mod.inspect =~/"--pdf(?:-p(?:ortrait)?-(?:a4|a5|b5|letter|legal))"/) \ + || (mod.inspect =~/"--pdf-(?:a4|a5|b5|letter|legal)(?:-p(?:ortrait)?)"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } act[:pdf_l]=(mod.inspect =~/"--pdf-(?:l|landscape)"/) \ + || (mod.inspect =~/"--pdf(?:-l(?:andscape)?-(?:a4|a5|b5|letter|legal))"/) \ + || (mod.inspect =~/"--pdf-(?:a4|a5|b5|letter|legal)(?:-l(?:andscape)?)"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } { bool: false, set: :na } end + if act[:pdf][:set]==:on \ + or act[:pdf_p][:set]==:on \ + or act[:pdf_l][:set]==:on + #mod.inspect =~/"--pdf-([pl]-|portrait-|landscape-)?(?:a4|a5|b5|letter|legal)"/ + act[:pdf_a4]=if mod.inspect =~/"--pdf(?:-[pl]|-portrait|-landscape)?-a4"/ \ + or mod.inspect =~/"--pdf-a4(?:-[pl]|-portrait|-landscape)?"/ \ + or mod.inspect =~/"--a4"|--papersize-a4"/ \ + or mod.inspect =~/"--papersize=\S*a4\b\S*"/ #--papersize=a4,a5 + { bool: true, set: :on } + else + { bool: false, set: :na } + end + act[:pdf_a5]=if mod.inspect =~/"--pdf(?:-[pl]|-portrait|-landscape)?-a5"/ \ + or mod.inspect =~/"--pdf-a5(?:-[pl]|-portrait|-landscape)?"/ \ + or mod.inspect =~/"--a5"|"--papersize-a5"/ \ + or mod.inspect =~/"--papersize=\S*a5\b\S*"/ #--papersize=a4,a5 + { bool: true, set: :on } + else + { bool: false, set: :na } + end + act[:pdf_b5]=if mod.inspect =~/"--pdf(-[pl]|-portrait|-landscape)?-b5"/ \ + or mod.inspect =~/"--pdf-b5(?:-[pl]|-portrait|-landscape)?"/ \ + or mod.inspect =~/"--b5"|"--papersize-b5"/ \ + or mod.inspect =~/"--papersize=\S*b5\b\S*"/ + { bool: true, set: :on } + else + { bool: false, set: :na } + end + act[:pdf_letter]=if mod.inspect =~/"--pdf(-[pl]|-portrait|-landscape)?-letter"/ \ + or mod.inspect =~/"--pdf-letter(?:-[pl]|-portrait|-landscape)?"/ \ + or mod.inspect =~/"--letter"|"--papersize-letter"/ \ + or mod.inspect =~/"--papersize=\S*letter\b\S*"/ + { bool: true, set: :on } + else + { bool: false, set: :na } + end + act[:pdf_legal]=if mod.inspect =~/"--pdf(-[pl]|-portrait|-landscape)?-legal"/ \ + or mod.inspect =~/"--pdf-legal(?:-[pl]|-portrait|-landscape)?"/ \ + or mod.inspect =~/"--legal"|"--papersize-legal"/ \ + or mod.inspect =~/"--papersize=\S*legal\b\S*"/ + { bool: true, set: :on } + else + { bool: false, set: :na } + end + end act[:epub]=(cmd =~/e/ \ || mod.inspect =~/"--epub"/) \ ? { bool: true, set: :on } diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb index bcbf9ce3..8d0cf482 100644 --- a/lib/sisu/v4/param.rb +++ b/lib/sisu/v4/param.rb @@ -894,16 +894,6 @@ module SiSU_Param end end #protected - def determine_papersize(l) - l=case l - when /eu|europe|uk/i; 'A4' #European default, SiSU default - when /(?:us-)?legal|legal/i; 'US_legal' #U.S. alternative - when /(?:us-)?letter|u.s.|us/i; 'US_letter' #U.S. default - when /book_a5|a5/i; 'book_a5' - when /book_b5|b5|book/i; 'book_b5' #book default - larger - else 'A4' - end - end def extract @user,@home,@hostname,@pwd=ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'] @programs,@wc,@language,@language_original={},{},{},{} @@ -1303,11 +1293,17 @@ module SiSU_Param gsub(/num_top\s*=\s*([\dA-C])/,"num_top=#{@num_top}"). gsub(/toc_lev_limit\s*=\s*([\dA-C])/,"toc_lev_limit=#{@toc_lev_limit}") end - if @opt.mod.inspect =~/--papersize[=-]\S+|--pdf[=-]\S+/ \ - or @opt.mod.inspect =~/--(?:a4|letter|legal|book|a5|b5)\b/i #command line config/header override - @papersize=determine_papersize(@opt.mod.inspect) - end - @papersize_array=@papersize.scan(/(?:a4|letter|legal|book|a5|b5)/i) + papersize_array_rc=@papersize.downcase.scan(/(?:a4|letter|legal|book|a5|b5)/) + papersize_array_opt=[ + ((@opt.act[:pdf_a4][:set]==:on) ? 'a4' : ''), + ((@opt.act[:pdf_a5][:set]==:on) ? 'a5' : ''), + ((@opt.act[:pdf_b5][:set]==:on) ? 'b5' : ''), + ((@opt.act[:pdf_letter][:set]==:on) ? 'letter' : ''), + ((@opt.act[:pdf_legal][:set]==:on) ? 'legal' : ''), + ] - [""] + @papersize_array=(papersize_array_opt.length > 0) \ + ? papersize_array_opt + : papersize_array_rc fn=@opt.fno #decide what to do a filesize on .ssm tells very little about actual document size @filesize=(File.size(fn)).to_s if @sys.openssl !=false -- cgit v1.2.3 From 75dc380f544c55d38765a7679c464e6c71125fb6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Feb 2013 18:10:21 -0500 Subject: v4: options, for pdf, concentrate & simplify matching of orientation & papersize --- lib/sisu/v4/options.rb | 89 +++++++++++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 8f07e0c4..3dca5253 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -462,6 +462,37 @@ module SiSU_Commandline end def opt_cmd_and_mod_adjust(c,m) cmd,mod,files=@cmd,@mod,@files + if not m.empty? \ + and m.inspect =~/"--pdf-/ + ps,psa='',[] + mod << '--pdf' + m.each do |m| + if m =~ /^--pdf-(?:(?:l|landscape)(?:-(?:a4|letter|a5|b5|legal))?|(?:a4|letter|a5|b5|legal)-(?:l|landscape))$/ + mod << '--landscape' + end + if m =~ /^--pdf-(?:(?:p|portrait)(?:-(?:a4|letter|a5|b5|legal))?|(?:a4|letter|a5|b5|legal)-(?:p|portrait))$/ + mod << '--portrait' + end + if m =~ /^--pdf(?:-(?:a4|letter|a5|b5|legal)(?:-(?:[lp]|landscape|portrait))?|(?:-(?:[lp]|landscape|portrait))(?:-(?:a4|letter|a5|b5|legal)))$/ + if m =~ /^--pdf(?:-a4(?:-(?:[lp]|landscape|portrait))?|(?:-(?:[lp]|landscape|portrait))-a4)$/ + mod << '--papersize-a4' + end + if m =~ /^--pdf(?:-a5(?:-(?:[lp]|landscape|portrait))?|(?:-(?:[lp]|landscape|portrait))-a5)$/ + mod << '--papersize-a5' + end + if m =~ /^--pdf(?:-b5(?:-(?:[lp]|landscape|portrait))?|(?:-(?:[lp]|landscape|portrait))-b5)$/ + mod << '--papersize-b5' + end + if m =~ /^--pdf(?:-letter(?:-(?:[lp]|landscape|portrait))?|(?:-(?:[lp]|landscape|portrait))-letter)$/ + mod << '--papersize-letter' + end + if m =~ /^--pdf(?:-legal(?:-(?:[lp]|landscape|portrait))?|(?:-(?:[lp]|landscape|portrait))-legal)$/ + mod << '--papersize-legal' + end + end + end + mod=mod.uniq + end unless m.empty? m.each do |m| case m @@ -477,13 +508,9 @@ module SiSU_Commandline when /^--(?:od[ft])$/; c=c+'o' when /^--(?:pdf)$/; c=c+'p' when /^--pdf-(?:a4|a5|b5|legal|letter)$/; c=c+'p' - mod << m when /^--pdf-(?:p|l|portrait|landscape)$/; c=c+'L' - mod << m when /^--pdf-(?:p(?:ortrait)?|l(?:andscape)?)-(?:a4|letter|a5|b5|legal)$/; c=c+'L' - mod << m when /^--pdf-(?:a4|letter|a5|b5|legal)-(?:p(?:ortrait)?|l(?:andscape)?)$/; c=c+'L' - mod << m when /^--(?:concordance|wordmap)$/; c=c+'w' when /^--(?:manpage|man)$/; c=c+'i' when /^--(?:texinfo)$/; c=c+'I' @@ -788,73 +815,59 @@ module SiSU_Commandline || mod.inspect =~/"--images"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } - act[:pdf]=if (cmd =~/p/ \ - || mod.inspect =~/"--pdf"|"--pdf-(?:a4|a5|b5|letter|legal)"/) + if (cmd =~/p/ \ + || mod.inspect =~/"--pdf"/) if mod.inspect =~/"--portrait"/ - act[:pdf_p]={ bool: true, set: :on } + act[:pdf]= { bool: false, set: :na } act[:pdf_l]={ bool: false, set: :na } - { bool: false, set: :na } + act[:pdf_p]={ bool: true, set: :on } elsif mod.inspect =~/"--landscape"/ + act[:pdf]= { bool: false, set: :na } act[:pdf_l]={ bool: true, set: :on } act[:pdf_p]={ bool: false, set: :na } - { bool: false, set: :na } else - act[:pdf_p]={ bool: true, set: :on } + act[:pdf]= { bool: true, set: :on } act[:pdf_l]={ bool: true, set: :on } - { bool: true, set: :on } + act[:pdf_p]={ bool: true, set: :on } end else - act[:pdf_p]=(mod.inspect =~/"--pdf-(?:p|portrait)"/) \ - || (mod.inspect =~/"--pdf(?:-p(?:ortrait)?-(?:a4|a5|b5|letter|legal))"/) \ - || (mod.inspect =~/"--pdf-(?:a4|a5|b5|letter|legal)(?:-p(?:ortrait)?)"/) \ - ? { bool: true, set: :on } - : { bool: false, set: :na } - act[:pdf_l]=(mod.inspect =~/"--pdf-(?:l|landscape)"/) \ - || (mod.inspect =~/"--pdf(?:-l(?:andscape)?-(?:a4|a5|b5|letter|legal))"/) \ - || (mod.inspect =~/"--pdf-(?:a4|a5|b5|letter|legal)(?:-l(?:andscape)?)"/) \ - ? { bool: true, set: :on } - : { bool: false, set: :na } - { bool: false, set: :na } + act[:pdf]= { bool: false, set: :na } + act[:pdf_p]= { bool: false, set: :na } + act[:pdf_l]= { bool: false, set: :na } + act[:pdf_a4]= { bool: false, set: :na } + act[:pdf_a5]= { bool: false, set: :na } + act[:pdf_b5]= { bool: false, set: :na } + act[:pdf_letter]={ bool: false, set: :na } + act[:pdf_legal]= { bool: false, set: :na } end if act[:pdf][:set]==:on \ or act[:pdf_p][:set]==:on \ or act[:pdf_l][:set]==:on - #mod.inspect =~/"--pdf-([pl]-|portrait-|landscape-)?(?:a4|a5|b5|letter|legal)"/ - act[:pdf_a4]=if mod.inspect =~/"--pdf(?:-[pl]|-portrait|-landscape)?-a4"/ \ - or mod.inspect =~/"--pdf-a4(?:-[pl]|-portrait|-landscape)?"/ \ - or mod.inspect =~/"--a4"|--papersize-a4"/ \ + act[:pdf_a4]=if mod.inspect =~/"--a4"|--papersize-a4"/ \ or mod.inspect =~/"--papersize=\S*a4\b\S*"/ #--papersize=a4,a5 { bool: true, set: :on } else { bool: false, set: :na } end - act[:pdf_a5]=if mod.inspect =~/"--pdf(?:-[pl]|-portrait|-landscape)?-a5"/ \ - or mod.inspect =~/"--pdf-a5(?:-[pl]|-portrait|-landscape)?"/ \ - or mod.inspect =~/"--a5"|"--papersize-a5"/ \ + act[:pdf_a5]=if mod.inspect =~/"--a5"|"--papersize-a5"/ \ or mod.inspect =~/"--papersize=\S*a5\b\S*"/ #--papersize=a4,a5 { bool: true, set: :on } else { bool: false, set: :na } end - act[:pdf_b5]=if mod.inspect =~/"--pdf(-[pl]|-portrait|-landscape)?-b5"/ \ - or mod.inspect =~/"--pdf-b5(?:-[pl]|-portrait|-landscape)?"/ \ - or mod.inspect =~/"--b5"|"--papersize-b5"/ \ + act[:pdf_b5]=if mod.inspect =~/"--b5"|"--papersize-b5"/ \ or mod.inspect =~/"--papersize=\S*b5\b\S*"/ { bool: true, set: :on } else { bool: false, set: :na } end - act[:pdf_letter]=if mod.inspect =~/"--pdf(-[pl]|-portrait|-landscape)?-letter"/ \ - or mod.inspect =~/"--pdf-letter(?:-[pl]|-portrait|-landscape)?"/ \ - or mod.inspect =~/"--letter"|"--papersize-letter"/ \ + act[:pdf_letter]=if mod.inspect =~/"--letter"|"--papersize-letter"/ \ or mod.inspect =~/"--papersize=\S*letter\b\S*"/ { bool: true, set: :on } else { bool: false, set: :na } end - act[:pdf_legal]=if mod.inspect =~/"--pdf(-[pl]|-portrait|-landscape)?-legal"/ \ - or mod.inspect =~/"--pdf-legal(?:-[pl]|-portrait|-landscape)?"/ \ - or mod.inspect =~/"--legal"|"--papersize-legal"/ \ + act[:pdf_legal]=if mod.inspect =~/"--legal"|"--papersize-legal"/ \ or mod.inspect =~/"--papersize=\S*legal\b\S*"/ { bool: true, set: :on } else -- cgit v1.2.3 From e68a2c03c0be4269b842b7d4cee91b0f85a0c97a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Feb 2013 18:18:57 -0500 Subject: v4: documentation, sisu_manual/sisu_commands, manpage & html --- data/doc/sisu/CHANGELOG_v4 | 4 ++ data/doc/sisu/html/sisu.1.html | 62 +++++++++++++++++----- .../v4/sisu_manual/sisu_commands.sst | 23 ++++++-- man/man1/sisu.1 | 57 +++++++++++++++++--- 4 files changed, 121 insertions(+), 25 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 715341a5..36275e85 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -53,6 +53,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz dir where relative path provided (remove possibility of it being done from a language sub-directory), fix +* v4: documentation + * sisu_manual/sisu_commands + * manpage & html + %% 4.0.5.orig.tar.xz (2013-02-03:04/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1 diff --git a/data/doc/sisu/html/sisu.1.html b/data/doc/sisu/html/sisu.1.html index 2063c021..3d852a3e 100644 --- a/data/doc/sisu/html/sisu.1.html +++ b/data/doc/sisu/html/sisu.1.html @@ -365,9 +365,6 @@ invoked by --dump & redirect).
--keep-processing-files [filename/wildcard/url]
see --maintenance
-
-L
-
prints license information.
-
-M [filename/wildcard/url]
see --maintenance
@@ -429,18 +426,57 @@ Alias --by-* [filename/wildcard]
see --pdf
+
--papersize-(a4|a5|b5|letter|legal)
+
in conjunction +with --pdf set pdf papersize, overriding any configuration settings, to set +more than one papersize repeat the option --pdf --papersize-a4 --papersize-letter. +See also --papersize=* +

+

--papersize=a4,a5,b5,letter,legal in conjunction +with --pdf set pdf papersize, overriding any configuration settings, to set +more than one papersize list after the equal sign with a comma separator +--papersize=a4,letter. See also --papersize-*

+
--pdf [filename/wildcard]
produces LaTeX pdf -(portrait.pdf & landscape.pdf). Default paper size is set in config file, or -document header, or provided with additional command line parameter, e.g. ---papersize-a4 preset sizes include: ’A4’, U.S. ’letter’ and ’legal’ and book sizes -’A5’ and ’B5’ (system defaults to A4). Alias -p
- -
--pg [instruction] [filename]
-
database -PostgreSQL ( --pgsql may be used instead) possible instructions, include: ---createdb; --create; --dropall; --import [filename]; --update [filename]; --remove -[filename]; see database section below. Alias -D
+(portrait.pdf & landscape.pdf). Orientation and papersize may be +set on the command-line. Default paper size is set in config file, or document +header, or provided with additional command line parameter, e.g. --papersize-a4 +preset sizes include: ’A4’, U.S. ’letter’ and ’legal’ and book sizes ’A5’ and ’B5’ +(system defaults to A4), and; --landscape or --portrait, so: e.g. "sisu --pdf-a4 +--pdf-letter --landscape --verbose [filename/wildcard]" or "sisu --pdf --landscape +--a4 --letter --verbose [filename/wildcard]". --pdf defaults to both landscape & +portrait output, and a4 if no other papersizes are configured. Related options +--pdf-landscape --pdf-portrait --pdf-papersize-* --pdf-papersize=[list]. Alias -p + +
--pdf-l +[filename/wildcard]
+
See --pdf-landscape
+ +
--pdf-landscape [filename/wildcard]
+
sets +orientation, produces LaTeX pdf landscape.pdf. Default paper size is set +in config file, or document header, or provided with additional command +line parameter, e.g. --papersize-a4 preset sizes include: ’A4’, U.S. ’letter’ and +’legal’ and book sizes ’A5’ and --papersize-* or --papersize=[list]. Alias --pdf-l +or in conjunction with --pdf --landscape
+ +
--pdf-p [filename/wildcard]
+
See --pdf-portrait +
+ +
--pdf-portrait [filename/wildcard]
+
sets orientation, produces LaTeX pdf portrait.pdf.pdf. +Default paper size is set in config file, or document header, or provided +with additional command line parameter, e.g. --papersize-a4 preset sizes include: +’A4’, U.S. ’letter’ and ’legal’ and book sizes ’A5’ and --papersize-* or --papersize=[list]. +Alias --pdf-p or in conjunction with --pdf --portrait
+ +
--pg [instruction] [filename] +
+
database PostgreSQL ( --pgsql may be used instead) possible instructions, +include: --createdb; --create; --dropall; --import [filename]; --update [filename]; +--remove [filename]; see database section below. Alias -D
--po [language_directory/filename language_directory]
diff --git a/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst b/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst index 86f818f6..1c5c1cec 100644 --- a/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst +++ b/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst @@ -169,9 +169,6 @@ see --color-off !_ --keep-processing-files [filename/wildcard/url] \\ see --maintenance -!_ -L \\ -prints license information. - !_ -M [filename/wildcard/url] \\ see --maintenance @@ -218,8 +215,26 @@ see --po4a !_ -p [filename/wildcard] \\ see --pdf +!_ --papersize-(a4|a5|b5|letter|legal) \\ +in conjunction with --pdf set pdf papersize, overriding any configuration settings, to set more than one papersize repeat the option --pdf --papersize-a4 --papersize-letter. See also --papersize=* + +!_ --papersize=a4,a5,b5,letter,legal +in conjunction with --pdf set pdf papersize, overriding any configuration settings, to set more than one papersize list after the equal sign with a comma separator --papersize=a4,letter. See also --papersize-* + !_ --pdf [filename/wildcard] \\ -produces LaTeX pdf (portrait.pdf & landscape.pdf). Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Alias -p +produces LaTeX pdf (portrait.pdf & landscape.pdf). Orientation and papersize may be set on the command-line. Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4), and; --landscape or --portrait, so: e.g. "sisu --pdf-a4 --pdf-letter --landscape --verbose [filename/wildcard]" or "sisu --pdf --landscape --a4 --letter --verbose [filename/wildcard]". --pdf defaults to both landscape & portrait output, and a4 if no other papersizes are configured. Related options --pdf-landscape --pdf-portrait --pdf-papersize-* --pdf-papersize=[list]. Alias -p + +!_ --pdf-l [filename/wildcard] \\ +See --pdf-landscape + +!_ --pdf-landscape [filename/wildcard] \\ +sets orientation, produces LaTeX pdf landscape.pdf. Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Related options --pdf --pdf-portrait. See also --papersize-* or --papersize=[list]. Alias --pdf-l or in conjunction with --pdf --landscape + +!_ --pdf-p [filename/wildcard] \\ +See --pdf-portrait + +!_ --pdf-portrait [filename/wildcard] \\ +sets orientation, produces LaTeX pdf portrait.pdf.pdf. Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Related options --pdf --pdf-landscape. See also --papersize-* or --papersize=[list]. Alias --pdf-p or in conjunction with --pdf --portrait !_ --pg [instruction] [filename] \\ database PostgreSQL ( --pgsql may be used instead) possible instructions, include: --createdb; --create; --dropall; --import [filename]; --update [filename]; --remove [filename]; see database section below. Alias -D diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index 11c88a3d..f21808b1 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2013-02-03" "4.0.5" "SiSU" +.TH "sisu" "1" "2013-02-07" "4.0.6" "SiSU" .br .SH NAME .br @@ -437,9 +437,6 @@ see --color-off .B --keep-processing-files [filename/wildcard/url] see --maintenance .TP -.B -L -prints license information. -.TP .B -M [filename/wildcard/url] see --maintenance .TP @@ -492,13 +489,57 @@ see --po4a .B -p [filename/wildcard] see --pdf .TP +.B --papersize-(a4|a5|b5|letter|legal) +in conjunction with --pdf set pdf papersize, overriding any configuration +settings, to set more than one papersize repeat the option --pdf --papersize-a4 +--papersize-letter. See also --papersize=* + +.BR + +.B --papersize=a4,a5,b5,letter,legal +in conjunction with --pdf set pdf papersize, overriding any configuration +settings, to set more than one papersize list after the equal sign with a comma +separator --papersize=a4,letter. See also --papersize-* +.TP .B --pdf [filename/wildcard] produces .I LaTeX -pdf (portrait.pdf & landscape.pdf). Default paper size is set in config file, -or document header, or provided with additional command line parameter, e.g. ---papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book -sizes 'A5' and 'B5' (system defaults to A4). Alias -p +pdf (portrait.pdf & landscape.pdf). Orientation and papersize may be set on the +command-line. Default paper size is set in config file, or document header, or +provided with additional command line parameter, e.g. --papersize-a4 preset +sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' +(system defaults to A4), and; --landscape or --portrait, so: e.g. "sisu +--pdf-a4 --pdf-letter --landscape --verbose [filename/wildcard]" or "sisu --pdf +--landscape --a4 --letter --verbose [filename/wildcard]". --pdf defaults to +both landscape & portrait output, and a4 if no other papersizes are configured. +Related options --pdf-landscape --pdf-portrait --pdf-papersize-* +--pdf-papersize=[list]. Alias -p +.TP +.B --pdf-l [filename/wildcard] +See --pdf-landscape +.TP +.B --pdf-landscape [filename/wildcard] +sets orientation, produces +.I LaTeX +pdf landscape.pdf. Default paper size is set in config file, or document +header, or provided with additional command line parameter, e.g. --papersize-a4 +preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and +'B5' (system defaults to A4). Related options --pdf --pdf-portrait. See also +--papersize-* or --papersize=[list]. Alias --pdf-l or in conjunction with --pdf +--landscape +.TP +.B --pdf-p [filename/wildcard] +See --pdf-portrait +.TP +.B --pdf-portrait [filename/wildcard] +sets orientation, produces +.I LaTeX +pdf portrait.pdf.pdf. Default paper size is set in config file, or document +header, or provided with additional command line parameter, e.g. --papersize-a4 +preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and +'B5' (system defaults to A4). Related options --pdf --pdf-landscape. See also +--papersize-* or --papersize=[list]. Alias --pdf-p or in conjunction with --pdf +--portrait .TP .B --pg [instruction] [filename] database -- cgit v1.2.3 From ad6bcd2659748932dc0c202a92b1edfa8082a191 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Feb 2013 18:53:53 -0500 Subject: v4: version & changelog, dates touched --- data/doc/sisu/CHANGELOG_v4 | 2 +- data/sisu/v4/v/version.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 36275e85..8be362c4 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -17,7 +17,7 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: -%% 4.0.6.orig.tar.xz (2013-02-06:05/3) +%% 4.0.6.orig.tar.xz (2013-02-07:05/4) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.6 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.6-1 http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 0bb1bbbb..564c26c3 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- :version: 4.0.6 -:date_stamp: 2013w05/3 -:date: "2013-02-06" +:date_stamp: 2013w05/4 +:date: "2013-02-07" :project: SiSU -- cgit v1.2.3