summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/ruby/base/tex.rb64
-rw-r--r--scripts/context/ruby/ctxtools.rb1
2 files changed, 34 insertions, 31 deletions
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index c14cb840f..4a60ad4c1 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -69,28 +69,26 @@ class TEX
include Variables
- @@texengines = Hash.new
- @@mpsengines = Hash.new
- @@backends = Hash.new
- @@mappaths = Hash.new
- @@runoptions = Hash.new
- @@tcxflag = Hash.new
- @@draftoptions = Hash.new
- @@texformats = Hash.new
- @@mpsformats = Hash.new
- @@prognames = Hash.new
- @@texmakestr = Hash.new
- @@texprocstr = Hash.new
- @@mpsmakestr = Hash.new
- @@mpsprocstr = Hash.new
-
- @@texmethods = Hash.new
- @@mpsmethods = Hash.new
-
- @@pdftex = 'pdftex' # new default, pdfetex is gone
-
- @@luafiles = "luafiles.tmp"
- @@luatarget = "lua/context"
+ @@texengines = Hash.new
+ @@mpsengines = Hash.new
+ @@backends = Hash.new
+ @@mappaths = Hash.new
+ @@runoptions = Hash.new
+ @@tcxflag = Hash.new
+ @@draftoptions = Hash.new
+ @@synctexcoptions = Hash.new
+ @@texformats = Hash.new
+ @@mpsformats = Hash.new
+ @@prognames = Hash.new
+ @@texmakestr = Hash.new
+ @@texprocstr = Hash.new
+ @@mpsmakestr = Hash.new
+ @@mpsprocstr = Hash.new
+ @@texmethods = Hash.new
+ @@mpsmethods = Hash.new
+ @@pdftex = 'pdftex' # new default, pdfetex is gone
+ @@luafiles = "luafiles.tmp"
+ @@luatarget = "lua/context"
@@platformslash = if System.unix? then "\\\\" else "\\" end
@@ -159,13 +157,17 @@ class TEX
'cont-fr','cont-cs','cont-ro','cont-gb',
'cont-pe','cont-xp'] .each do |f| @@texprocstr[f] = @@platformslash + "emergencyend" end
- @@runoptions['aleph'] = ['--8bit']
- @@runoptions['luatex'] = ['--file-line-error']
- @@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"']
+ @@runoptions['aleph'] = ['--8bit']
+ @@runoptions['luatex'] = ['--file-line-error']
+ @@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"']
+ @@draftoptions['pdftex'] = ['--draftmode']
+ @@synctexcoptions['pdftex'] = ['--synctex=1']
+ @@synctexcoptions['luatex'] = ['--synctex=1']
+ @@synctexcoptions['xetex'] = ['--synctex=1']
@@tcxflag['aleph'] = true
@@tcxflag['luatex'] = false
@@ -175,8 +177,6 @@ class TEX
@@tcxflag['petex'] = false
@@tcxflag['xetex'] = false
- @@draftoptions['pdftex'] = ['--draftmode']
-
@@mainbooleanvars = [
'batchmode', 'nonstopmode', 'fast', 'final',
'paranoid', 'notparanoid', 'nobanner', 'once', 'allpatterns', 'draft',
@@ -191,6 +191,7 @@ class TEX
'purge', 'purgeall', 'keep', 'autopdf', 'xpdf', 'simplerun', 'verbose',
'nooptionfile', 'nobackend', 'noctx', 'utfbom',
'mkii','mkiv',
+ 'synctex',
]
@@mainstringvars = [
'modefile', 'result', 'suffix', 'response', 'path',
@@ -386,6 +387,7 @@ class TEX
def runoptions(engine)
options = if getvariable('draft') then @@draftoptions[engine] else [] end
+ options = if getvariable('synctex') then @@synctexcoptions[engine] else [] end
begin
if str = getvariable('passon') then
options = [options,str.split(' ')].flatten
diff --git a/scripts/context/ruby/ctxtools.rb b/scripts/context/ruby/ctxtools.rb
index ecdc4c128..67baaab39 100644
--- a/scripts/context/ruby/ctxtools.rb
+++ b/scripts/context/ruby/ctxtools.rb
@@ -543,6 +543,7 @@ class Commands
"log", "tmp", "run", "bck", "rlg",
"mpt", "mpx", "mpd", "mpo", "mpb",
"ctl",
+ "pgf", "synctex.gz",
"tmp.md5", "tmp.out"
]
$texonlysuffixes = [