diff options
author | Hans Hagen <pragma@wxs.nl> | 2007-12-31 11:54:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2007-12-31 11:54:00 +0100 |
commit | f5db49f15c3f9ec7dba40d6120b89df2cd0030ff (patch) | |
tree | 46248003cc54a3c00875c0dd9fd692d9b2631ddc /scripts/context/ruby/base | |
parent | fd7a16a8cc13f71119d5fbad9a395cd3d2107d89 (diff) | |
download | context-f5db49f15c3f9ec7dba40d6120b89df2cd0030ff.tar.gz |
stable 2007.12.31 11:54
Diffstat (limited to 'scripts/context/ruby/base')
-rw-r--r-- | scripts/context/ruby/base/system.rb | 2 | ||||
-rw-r--r-- | scripts/context/ruby/base/tex.rb | 10 | ||||
-rw-r--r-- | scripts/context/ruby/base/texutil.rb | 7 |
3 files changed, 14 insertions, 5 deletions
diff --git a/scripts/context/ruby/base/system.rb b/scripts/context/ruby/base/system.rb index 267a22cb9..c3fb08645 100644 --- a/scripts/context/ruby/base/system.rb +++ b/scripts/context/ruby/base/system.rb @@ -30,7 +30,7 @@ module System def System.null - if @@mswindows then 'nul' else '/dev/null/' end + if @@mswindows then 'nul' else '/dev/null' end end def System.unix? diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb index 54d5bc730..02683bd60 100644 --- a/scripts/context/ruby/base/tex.rb +++ b/scripts/context/ruby/base/tex.rb @@ -95,6 +95,7 @@ class TEX ['tex','etex','pdftex','pdfetex','standard'] .each do |e| @@texengines[e] = 'pdftex' end ['aleph','omega'] .each do |e| @@texengines[e] = 'aleph' end ['xetex'] .each do |e| @@texengines[e] = 'xetex' end + ['petex'] .each do |e| @@texengines[e] = 'petex' end ['luatex'] .each do |e| @@texengines[e] = 'luatex' end ['metapost','mpost', 'standard'] .each do |e| @@mpsengines[e] = 'mpost' end @@ -102,6 +103,7 @@ class TEX ['pdfetex','pdftex','pdf','pdftex','standard'] .each do |b| @@backends[b] = 'pdftex' end ['dvipdfmx','dvipdfm','dpx','dpm'] .each do |b| @@backends[b] = 'dvipdfmx' end ['xetex','xtx'] .each do |b| @@backends[b] = 'xetex' end + ['petex'] .each do |b| @@backends[b] = 'dvipdfmx' end ['aleph'] .each do |b| @@backends[b] = 'dvipdfmx' end ['dvips','ps','dvi'] .each do |b| @@backends[b] = 'dvips' end ['dvipsone'] .each do |b| @@backends[b] = 'dvipsone' end @@ -110,7 +112,7 @@ class TEX ['tex','standard'] .each do |b| @@mappaths[b] = 'dvips' end ['pdftex','pdfetex'] .each do |b| @@mappaths[b] = 'pdftex' end - ['aleph','omega','xetex'] .each do |b| @@mappaths[b] = 'dvipdfm' end + ['aleph','omega','xetex','petex'] .each do |b| @@mappaths[b] = 'dvipdfm' end ['dvipdfm', 'dvipdfmx', 'xdvipdfmx'] .each do |b| @@mappaths[b] = 'dvipdfm' end ['xdv','xdv2pdf'] .each do |b| @@mappaths[b] = 'dvips' end @@ -132,9 +134,7 @@ class TEX ['plain','mpost'] .each do |f| @@mpsformats[f] = 'plain' end ['metafun','context','standard'] .each do |f| @@mpsformats[f] = 'metafun' end - # no 'standard' progname ! / beware, when using texexec we always use the context/metafun values - - ['pdftex','pdfetex','aleph','omega', + ['pdftex','pdfetex','aleph','omega','petex', 'xetex','luatex'] .each do |p| @@prognames[p] = 'context' end ['mpost'] .each do |p| @@prognames[p] = 'metafun' end ['latex','pdflatex'] .each do |p| @@prognames[p] = 'latex' end @@ -158,6 +158,7 @@ class TEX @@runoptions['mpost'] = ['--8bit'] @@runoptions['pdfetex'] = ['--8bit'] # obsolete @@runoptions['pdftex'] = ['--8bit'] # pdftex is now pdfetex + # @@runoptions['petex'] = [] @@runoptions['xetex'] = ['--8bit','-output-driver="xdvipdfmx -E -d 4 -V 5"'] @@tcxflag['aleph'] = true @@ -165,6 +166,7 @@ class TEX @@tcxflag['mpost'] = true @@tcxflag['pdfetex'] = true @@tcxflag['pdftex'] = true + @@tcxflag['petex'] = false @@tcxflag['xetex'] = false @@draftoptions['pdftex'] = ['--draftmode'] diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb index 4882404d5..063f67f2d 100644 --- a/scripts/context/ruby/base/texutil.rb +++ b/scripts/context/ruby/base/texutil.rb @@ -187,7 +187,14 @@ class TeXUtil # shortcut("\\\"e", 'ediaeresis') # shortcut("\\\'o", 'oacute') + def hextoutf(str) + str.gsub(/^(0x[A-F\d]+)$/) do + [$1.hex()].pack("U") + end + end + def shortcut(from,to) + from = hextoutf(from) replacer(from,to) expander(to) end |