From 6c757d0138dc18aa176a64c751487ea40ef5641c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Aug 2014 18:34:11 -0400 Subject: v5 v6: cosmetic code --- lib/sisu/v5/texpdf.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v5/texpdf.rb') diff --git a/lib/sisu/v5/texpdf.rb b/lib/sisu/v5/texpdf.rb index fe7ec47e..d5e51398 100644 --- a/lib/sisu/v5/texpdf.rb +++ b/lib/sisu/v5/texpdf.rb @@ -64,7 +64,8 @@ module SiSU_TeX begin require 'pstore' rescue LoadError - SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('pstore NOT FOUND (LoadError)') + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error('pstore NOT FOUND (LoadError)') end require_relative 'defaults' # defaults.rb include SiSU_Viz @@ -85,7 +86,8 @@ module SiSU_TeX begin require 'pstore' rescue LoadError - SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('pstore NOT FOUND (LoadError)') + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error('pstore NOT FOUND (LoadError)') end require_relative 'se' # se.rb include SiSU_Env -- cgit v1.2.3 From 766b4b6aa046fc125fd42561a6cafc4fe82ee3ad Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Aug 2014 18:42:17 -0400 Subject: v5 v6: texpdf, output, copyright & license --- lib/sisu/v5/texpdf.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v5/texpdf.rb') diff --git a/lib/sisu/v5/texpdf.rb b/lib/sisu/v5/texpdf.rb index d5e51398..25ee6eb2 100644 --- a/lib/sisu/v5/texpdf.rb +++ b/lib/sisu/v5/texpdf.rb @@ -425,12 +425,10 @@ module SiSU_TeX if defined? @md.rights.all \ and not @md.rights.all.empty? rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed - sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,rght.copyright.all) - copymark=@md.author_copymark \ - ? '{\begin{small}\copyright\end{small}} ' - : '' - copymark='Copyright {\begin{small}\copyright\end{small}} ' - copyright=sp_char.special_characters_safe.gsub(/^\s*Copyright \(C\)/, copymark) + sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,rght.copyright.copyright_and_license) + copymark='Copyright {\begin{small}{\copyright\end{small}} ' + #copymark='Copyright {\begin{small}^{\copyright\end{small}} ' + copyright=sp_char.special_characters_safe.gsub(/\s*Copyright \(C\)/, copymark) @@rights||="\n #{Tex[:backslash]*2}[3]\\ \\linebreak #{copyright}" end if defined? @md.notes.prefix_b \ -- cgit v1.2.3 From 29fc7f3c14b36770caad64cb82ec9177384ab61a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Aug 2014 19:04:47 -0400 Subject: v5 v6: start making use of --no-stop command --- lib/sisu/v5/texpdf.rb | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v5/texpdf.rb') diff --git a/lib/sisu/v5/texpdf.rb b/lib/sisu/v5/texpdf.rb index 25ee6eb2..c2c9dc70 100644 --- a/lib/sisu/v5/texpdf.rb +++ b/lib/sisu/v5/texpdf.rb @@ -269,8 +269,16 @@ module SiSU_TeX FileUtils::cp(portrait_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_p}") FileUtils::rm(portrait_pdf) else - STDERR.puts "#{cX.fuchsia}pdf file not generated#{cX.off} <#{cX.blue}#{portrait_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')}#{cX.off}> (check texlive dependencies)" STDERR.puts "#{__FILE__}:#{__LINE__} NOT FOUND: #{portrait_pdf}" if @md.opt.act[:maintenance][:set]==:on + errmsg="pdf file not generated #{portrait_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')} (check texlive dependencies)" + if @md.opt.act[:no_stop][:set]==:on + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error("#{errmsg}, proceeding without pdf output (as requested)") + else + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error("#{errmsg}, STOPPING") + exit + end end end if @md.opt.act[:pdf_l][:set]==:on @@ -278,8 +286,16 @@ module SiSU_TeX FileUtils::cp(landscape_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_l}") FileUtils::rm(landscape_pdf) else - STDERR.puts "#{cX.fuchsia}pdf file not generated#{cX.off} <#{cX.blue}#{landscape_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')}#{cX.off}> (check texlive dependencies)" STDERR.puts "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.opt.act[:maintenance][:set]==:on + errmsg="pdf file not generated #{landscape_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')} (check texlive dependencies)" + if @md.opt.act[:no_stop][:set]==:on + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error("#{errmsg}, proceeding without pdf output (as requested)") + else + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error("#{errmsg}, STOPPING") + exit + end end end if (@md.opt.act[:verbose][:set]==:on \ @@ -314,7 +330,15 @@ module SiSU_TeX and File.size(texfile) > 0 #@tex_f_no+=1 else - SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error("\tzero file size #{@env.processing_path.tex}/#{texfile}") + errmsg="zero file size #{@env.processing_path.tex}/#{texfile}" + if @md.opt.act[:no_stop][:set]==:on + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error("#{errmsg}, proceeding without pdf output (as requested)") + else + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). + error("#{errmsg}, STOPPING") + exit + end end end end -- cgit v1.2.3