diff options
Diffstat (limited to 'lib/sisu/v2/texpdf_format.rb')
-rw-r--r-- | lib/sisu/v2/texpdf_format.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index aca5378e..2d81f40c 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -290,8 +290,7 @@ module SiSU_TeX_Pdf @txt.gsub!(/<:=\s*(\S+?)\s*>/, "\\includegraphics*[width=11pt]{#{dir.path.image_source_tex}/c_\\1.png}") else - tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search path: #{dir.path.image_source_tex}") - tell.error2 unless @md.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search path: #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/ @txt.gsub!(/#{Mx[:lnk_o]}\S+\.(png|jpg|gif).+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,'') # fragile match operator\\ fragile ! end end @@ -309,8 +308,7 @@ module SiSU_TeX_Pdf elsif FileTest.file?("#{dir.path.image_source_tex}/#{image}") dir.path.image_source_tex else - tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}") - tell.error2 unless @md.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/ nil end if image_source #CHECK @@ -347,8 +345,7 @@ module SiSU_TeX_Pdf else unless image.nil? \ or image.length < 2 - tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}") - tell.error2 unless @md.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/ end nil end @@ -492,8 +489,7 @@ module SiSU_TeX_Pdf hsp="\n{\\color{mywhite} .}&~\n" # ~ character for hardspace caption=(c ? "{\\\\\ \n\\begin{scriptsize}#{hsp*3}#{c}\\end{scriptsize}&}" : '') elsif images_hash[ps] =~/#{Mx[:lnk_o]}\s*(\S+\.?\.(?:png|jpg|gif))/m - tell=SiSU_Screen::Ansi.new(@md.cmd,%{document built without image: "#{$1}" as image dimensions not provided (either image not found or neither imagemagick nor graphicsmagick is installed)?\n}) - tell.print_grey #unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.cmd,%{document built without image: "#{$1}" as image dimensions not provided (either image not found or neither imagemagick nor graphicsmagick is installed)?\n}).print_grey #unless @opt.cmd =~/q/ images_hash[ps].gsub!(/#{Mx[:lnk_o]}\s*(\S+\.?\.(?:png|jpg|gif))/,'[image]') end if image #most images fc etc. #% clean up ! @@ -530,8 +526,7 @@ module SiSU_TeX_Pdf end images_hash[ps] else - tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}") - tell.error2 unless @md.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/ if images_hash[ps] =~url_image_rgx \ or images_hash[ps] =~image_rgx images_hash[ps]='' @@ -1262,8 +1257,7 @@ WOK sisu_ico=if FileTest.file?("#{dir.path.image_source_tex}/sisu.png") "\\includegraphics*[width=60pt]{#{dir.path.image_source_tex}/sisu.png}" else - tell=SiSU_Screen::Ansi.new(@md.cmd,'WARNING - image directory or image(s) missing:', %{"#{dir.path.image_source_tex}"} ) - tell.warn unless @md.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.cmd,'WARNING - image directory or image(s) missing:', %{"#{dir.path.image_source_tex}"} ).warn unless @md.cmd =~/q/ " SiSU " end url=@md.fnb.gsub(/(?:\\)*([$&~%_#}{^])/,'\\\\\1') |