aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_latex.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-12-16 22:06:45 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-12-23 18:17:59 -0500
commitd11d08bbc31bc8d15fa3bc1a85c2d555e6983c96 (patch)
tree0e17d0ebc3fbe319ed300eeb44b8be5d68e77134 /org/out_latex.org
parentsqlite, check db exists, writable etc. (diff)
removed old ruby utility scripts
Diffstat (limited to 'org/out_latex.org')
-rw-r--r--org/out_latex.org82
1 files changed, 0 insertions, 82 deletions
diff --git a/org/out_latex.org b/org/out_latex.org
index 1c1442b..0f8e348 100644
--- a/org/out_latex.org
+++ b/org/out_latex.org
@@ -2361,88 +2361,6 @@ string _latex_tail = format(q"┃
}
#+END_SRC
-* latex system command helper script
-** latex command, ruby script
-
-#+HEADER: :tangle "../sundry/misc/util/rb/tex/dr_tex.rb"
-#+HEADER: :tangle-mode (identity #o755)
-#+HEADER: :shebang #!/usr/bin/env ruby
-#+HEADER: :noweb yes
-#+BEGIN_SRC ruby
-=begin
-<<doc_header_including_copyright_and_license>>
-=end
-require 'fileutils'
-pwd = Dir.pwd
-argv,texfiles_with_path,flags=[],[],[]
-lngs = %{(am|bg|bn|br|ca|cs|cy|da|de|el|en|eo|es|et|eu|fi|fr|ga|gl|he|hi|hr|hy|ia|is|it|ja|ko|la|lo|lt|lv|ml|mr|nl|no|nn|oc|pl|pt|pt_BR|ro|ru|sa|se|sk|sl|sq|sr|sv|ta|te|th|tk|tr|uk|ur|vi|zh)}
-Regexp.new(lngs, Regexp::IGNORECASE)
-argv=$*
-argv.sort.each{|y| (y =~/^--\S+$/i) ? (flags << y) : (texfiles_with_path << y) }
-if flags.length==0 \
-|| flags.inspect =~/"--help"/
- cmd=(/([^\/]+)$/).match($0)[1]
- puts <<WOK
-#{cmd} --help
-#{cmd} --out=[output path]
-#{cmd} --paper-size=a5 --out=~/test
-WOK
-end
-// paper_size_orientation = (flags.inspect.match(/"--paper-size=(a4|a5|b5|letter|legal)"/)) ? $1 : "a4"
-out_path = Dir.pwd
-if (flags.inspect.match(/"--out=\S+"/))
- out_path = flags.inspect.match(/"--out=(\S+)"/)[1]
- unless (FileTest.directory?(out_path))
- puts "Creating output directory: --out=#{out_path}"
- FileUtils::mkdir_p(out_path)
- unless (FileTest.directory?(out_path))
- puts "FAILS unable to create directory: #{out_path}"
- exit
- end
- end
-end
-if texfiles_with_path.length == 0
- texfiles_with_path=Dir.glob('*.tex')
-end
-if texfiles_with_path.length > 0
- texfiles_with_path.each do |texfile_with_path|
- if texfile_with_path =~/.+\.tex/
- #puts texfile_with_path
- if FileTest.file?(texfile_with_path)
- file_basename_with_path = texfile_with_path.sub(/\.tex$/,'')
- file_basename = file_basename_with_path.sub(/.*?([^\/]+)$/,'\1')
- _out_path = out_path
- if file_basename =~ /\.#{lngs}$/
- lng = file_basename.match(/\.#{lngs}$/)[1]
- puts file_basename
- puts lng
- puts _out_path
- unless _out_path.match(/\/#{lng}\/pdf$/)
- _out_path = "#{out_path}/#{lng}/pdf"
- FileUtils::mkdir_p(_out_path)
- end
- end
- texpdf_cmd = %{xetex -interaction=batchmode -fmt=xelatex #{texfile_with_path}\n}
- puts texpdf_cmd
- 2.times { |i| system(texpdf_cmd) }
- if (FileTest.file?(%{#{pwd}/#{file_basename}.pdf})) && (FileTest.directory?(_out_path))
- FileUtils::Verbose::mv(%{#{pwd}/#{file_basename}.pdf}, %{#{_out_path}/#{file_basename}.pdf})
- puts (%{#{_out_path}/#{file_basename}.pdf})
- else
- puts "issue with pdf file or output directory"
- puts "pdf file: #{pwd}/#{file_basename}.pdf}"
- puts "output dir: #{_out_path}/"
- end
- suffix = ['log', 'out', 'toc', 'aux']
- suffix.each { |s| FileUtils::rm_f(%{#{pwd}/#{file_basename}.#{s}})}
- end
- end
- end
-end
-Dir.chdir(pwd)
-__END__
-#+END_SRC
-
* document header including copyright & license
#+NAME: doc_header_including_copyright_and_license