Hello all, Is it possible to open a PDF file (after compilation of ConTeXt) in other PDF viewer which is not the default setting? I mean change the default choice: context --autopdf file.tex to another, for example: context --viewer=PDFViewer file.tex I would like to retain the default browser settings, but I would like after ConTeXt compilation opened the files with something else. Thanx Jaroslav
On 22-9-2010 11:26, Jaroslav Hajtmar wrote:
Hello all, Is it possible to open a PDF file (after compilation of ConTeXt) in other PDF viewer which is not the default setting? I mean change the default choice:
context --autopdf file.tex
to another, for example:
context --viewer=PDFViewer file.tex
I would like to retain the default browser settings, but I would like after ConTeXt compilation opened the files with something else.
the log mentions: MTXrun | pdfview methods: default okular xpdf, current method: default, MTX_PDFVIEW_METHOD=<unset> so you can set the method i could extend --autopdf to accept a method Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanx Hans, I have ConTeXt in TL2010 ... Settings are made in MTX-context.lua or l-pdfview.lua? It is necessary to refresh the settings by luatools --generate or something like? Jaroslav Settings in l-pdfview.lua is (only part): pdfview = pdfview or { } local opencalls = { ['default'] = "pdfopen --file", -- "pdfopen --back --file" ['xpdf'] = "xpdfopen", } local closecalls= { ['default'] = "pdfclose --file", ['xpdf'] = nil, } local allcalls = { ['default'] = "pdfclose --all", ['xpdf'] = nil, } if os.type == "windows" then opencalls['okular'] = 'start "test" "c:/program files/kde/bin/okular.exe" --unique' -- todo: get focus else opencalls['okular'] = 'okular --unique' end pdfview.METHOD = "MTX_PDFVIEW_METHOD" pdfview.method = getenv(pdfview.METHOD) or 'default' pdfview.method = (opencalls[pdfview.method] and pdfview.method) or 'default' function pdfview.methods() return table.concat(table.sortedkeys(opencalls), " ") end Dne 22.9.2010 11:34, Hans Hagen napsal(a):
On 22-9-2010 11:26, Jaroslav Hajtmar wrote:
Hello all, Is it possible to open a PDF file (after compilation of ConTeXt) in other PDF viewer which is not the default setting? I mean change the default choice:
context --autopdf file.tex
to another, for example:
context --viewer=PDFViewer file.tex
I would like to retain the default browser settings, but I would like after ConTeXt compilation opened the files with something else.
the log mentions:
MTXrun | pdfview methods: default okular xpdf, current method: default, MTX_PDFVIEW_METHOD=<unset>
so you can set the method
i could extend --autopdf to accept a method
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 22-9-2010 12:26, Jaroslav Hajtmar wrote:
I have ConTeXt in TL2010 ... Settings are made in MTX-context.lua or l-pdfview.lua? It is necessary to refresh the settings by luatools --generate or something like?
No clue as I don't have tl 2010 installed (and no time now to put it in a vm). You can try to set the environment variable: MTX_PDFVIEW_METHOD Adapting scripts directly that come with context is not a good idea as changes will be lost with an update. A next version of context will also accept --autopdf=<method> Some day I might also support configuration in texmfcnf.lua. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
OK.. Thank You very much .. Jaroslav .. Dne 22.9.2010 12:37, Hans Hagen napsal(a):
On 22-9-2010 12:26, Jaroslav Hajtmar wrote:
I have ConTeXt in TL2010 ... Settings are made in MTX-context.lua or l-pdfview.lua? It is necessary to refresh the settings by luatools --generate or something like?
No clue as I don't have tl 2010 installed (and no time now to put it in a vm). You can try to set the environment variable:
MTX_PDFVIEW_METHOD
Adapting scripts directly that come with context is not a good idea as changes will be lost with an update.
A next version of context will also accept --autopdf=<method>
Some day I might also support configuration in texmfcnf.lua.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Jaroslav Hajtmar