[NTG-context] ConTeXt mkiv and --autopdf option

Jaroslav Hajtmar hajtmar at gyza.cz
Wed Sep 22 12:26:00 CEST 2010


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
> -----------------------------------------------------------------
>



More information about the ntg-context mailing list