Re: [NTG-context] texmfstart texexec --pdf --pages=1:2 = empty PDF

2006-05-23 Thread Tobias Burnus
Hello,

Tobias Burnus schrieb:
 I freshly switched to the ruby script and have now a problem:
texmfstart texexec --pdf --pages=1:2
 produces: No pages of output.
texmfstart texexec --pdf
 however, works: Output written on tmp_.pdf (3 pages, 103204 bytes)
   
I do not know what that option does. It seems to do something, but not
the right thing.
Actually, looking at texexec.rb I get the impression that --pages= is
not supported. One finds there
-
# so far for compatibility
@@extrastringvars = [
'pages', 'background', 'backspace', 'topspace', 'boxtype', 'tempdir',
-

Could the --pages option made to work in texexec.rb? In texexec.pl I
find the following. I probably should learn ruby [and python for that
matter] ...

Tobias

if ($Pages)  {
if ( lc $Pages eq odd ) {
print OPT \\chardef\\whichpagetoshipout=1\n;
} elsif ( lc $Pages eq even ) {
print OPT \\chardef\\whichpagetoshipout=2\n;
} else {
my @Pages = split( /\,/, $Pages );
$Pages = '';
foreach my $page (@Pages) {
if ( $page =~ /\:/ ) {
my ( $from, $to ) = split( /\:/, $page );
foreach ( my $i = $from ; $i = $to ; $i++ ) {
$Pages .= $i . ',';
}
} else {
$Pages .= $page . ',';
}
}
chop $Pages;
print OPT \\def\\pagestoshipout\{$Pages\}\n;
}
}
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texmfstart texexec --pdf --pages=1:2 = empty PDF

2006-05-23 Thread Hans Hagen
Tobias Burnus wrote:
 Hello,

 Tobias Burnus schrieb:
   
 I freshly switched to the ruby script and have now a problem:
texmfstart texexec --pdf --pages=1:2
 produces: No pages of output.
texmfstart texexec --pdf
 however, works: Output written on tmp_.pdf (3 pages, 103204 bytes)
   
 
 I do not know what that option does. It seems to do something, but not
 the right thing.
 Actually, looking at texexec.rb I get the impression that --pages= is
 not supported. One finds there
 -
 # so far for compatibility
 @@extrastringvars = [
 'pages', 'background', 'backspace', 'topspace', 'boxtype', 'tempdir',
 -

 Could the --pages option made to work in texexec.rb? In texexec.pl I
 find the following. I probably should learn ruby [and python for that
 matter] ...

   
actually, the code is there ... scripts/context/ruby/tex.rb 

but there is a buglet in there: 

  opt  \\def\\pagestoshipout\{pagelist.join(',')\}\n;

should be: 

  opt  \\def\\pagestoshipout\{#{pagelist.join(',')}\}\n;

#{..} evaluates inside a string 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context