ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt mkiv and --autopdf option
@ 2010-09-22  9:26 Jaroslav Hajtmar
  2010-09-22  9:34 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Hajtmar @ 2010-09-22  9:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt mkiv and --autopdf option
  2010-09-22  9:26 ConTeXt mkiv and --autopdf option Jaroslav Hajtmar
@ 2010-09-22  9:34 ` Hans Hagen
  2010-09-22 10:26   ` Jaroslav Hajtmar
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2010-09-22  9:34 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt mkiv and --autopdf option
  2010-09-22  9:34 ` Hans Hagen
@ 2010-09-22 10:26   ` Jaroslav Hajtmar
  2010-09-22 10:37     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Hajtmar @ 2010-09-22 10:26 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt mkiv and --autopdf option
  2010-09-22 10:26   ` Jaroslav Hajtmar
@ 2010-09-22 10:37     ` Hans Hagen
  2010-09-22 10:40       ` Jaroslav Hajtmar
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2010-09-22 10:37 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt mkiv and --autopdf option
  2010-09-22 10:37     ` Hans Hagen
@ 2010-09-22 10:40       ` Jaroslav Hajtmar
  0 siblings, 0 replies; 5+ messages in thread
From: Jaroslav Hajtmar @ 2010-09-22 10:40 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-22 10:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-22  9:26 ConTeXt mkiv and --autopdf option Jaroslav Hajtmar
2010-09-22  9:34 ` Hans Hagen
2010-09-22 10:26   ` Jaroslav Hajtmar
2010-09-22 10:37     ` Hans Hagen
2010-09-22 10:40       ` Jaroslav Hajtmar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).