Re: [NTG-context] Re: [OS X TeX] TeX run : 8
Hans Hagen
Steffen Wolfrum wrote:
TEST.tex \startproject TEST \startfrontmatter \component PARTS/ONE.tex \component PARTS/TWO.tex \stopfrontmatter \stopproject
ONE.tex \startcomponent ONE text \stopcomponent
TWO.tex \startcomponent TWO text \stopcomponent
The Mac output (plus the Win output) were unfortunately bounced back - Message body is too big: 59628 bytes with a limit of 40 KB.
texexec test --pdf --runs=1 copy test.tui 1.tui texexec test --pdf --runs=2 copy test.tui 2.tui texexec test --pdf --runs=3 copy test.tui 3.tui texexec test --pdf copy test.tui n.tui
where do the tui's difer?
Hans
They don't. They are all the same. But nevertheless texexec test --pdf ran 8 runs ... Steffen
Hans Hagen
wrote: texexec test --pdf --runs=1 copy test.tui 1.tui texexec test --pdf --runs=2 copy test.tui 2.tui texexec test --pdf --runs=3 copy test.tui 3.tui texexec test --pdf copy test.tui n.tui
where do the tui's difer?
Hans
They don't. They are all the same. But nevertheless texexec test --pdf ran 8 runs ...
- How do you check that they are the same? (cmp command?) - How does texexec check if another run is needed? Hans, if you want me to test something tonight on Mac OS X, different versions of TeX, I can. I'll first update to any latest ConTeXt beta if any. G
Gerben Wierda wrote:
- How do you check that they are the same? (cmp command?) - How does texexec check if another run is needed?
texexec calls texutil which converts a tui file into a tuo file (in the process it sorts indexes and such); when a job is aborted (or has errors) no tuo file is generated (saves an additional later run after a fix); copied from texexec: use File::Compare; sub RunTeXutil { my $StopRunning; my $JobName = shift; unlink "$JobName.tup"; rename "$JobName.tuo", "$JobName.tup"; print " sorting and checking : running texutil\n"; my $TcXSwitch = ''; if ( $TcXPath ne '' ) { $TcXSwitch = "--tcxpath=$TcXPath" } RunPerlScript( $TeXUtil, "--ref --ij --high $TcXPath $JobName" ); if ( -e "$JobName.tuo" ) { CheckPositions($JobName); $StopRunning = !compare( "$JobName.tup", "$JobName.tuo" ); } else { $StopRunning = 1; } # otherwise potential loop if ( !$StopRunning ) { print "\n utility file analysis : another run needed\n"; } return $StopRunning; } maybe some file permissions problem? 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 -----------------------------------------------------------------
Gerben Wierda wrote:
- How do you check that they are the same? (cmp command?) - How does texexec check if another run is needed?
texexec calls texutil which converts a tui file into a tuo file (in the process it sorts indexes and such); when a job is aborted (or has errors) no tuo file is generated (saves an additional later run after a fix); copied from texexec:
use File::Compare;
sub RunTeXutil { my $StopRunning; my $JobName = shift; unlink "$JobName.tup"; rename "$JobName.tuo", "$JobName.tup"; print " sorting and checking : running texutil\n"; my $TcXSwitch = ''; if ( $TcXPath ne '' ) { $TcXSwitch = "--tcxpath=$TcXPath" } RunPerlScript( $TeXUtil, "--ref --ij --high $TcXPath $JobName" );
Lines like these make my eyebrows go up though it might not be th eproblem at hand. What if $JobName contains whitespace? This stuff must run on Win and Unix so shall escapes and quoting is not the same on both sides. From the perlfunc man page: exec LIST The exec() function executes a system command AND NEVER RETURNS. Use the system() function if you want it to return. If there is more than one argument in LIST, or if LIST is an array with more than one value, calls execvp(3) with the arguments in LIST. If there is only one scalar argument, the argument is checked for shell metacharacters. If there are any, the entire argument is passed to /bin/sh -c for parsing. If there are none, the argument is split into words and passed directly to execvp(), which is more efficient. Note: exec() (and system(0) do not flush your output buffer, so you may need to set $| to avoid lost output. I am not at my system right now, but executing stuff is a bit tricky to get the same on Win and Unix. And given that the argument contains multiple arguments for texutil, I suspect it is the one-argument version of system() (which does shell interpretation) that is eventually used. Better circumvent this and use the LIST version which is almost guaranteed to be the same on both OS's.
if ( -e "$JobName.tuo" ) { CheckPositions($JobName); $StopRunning = !compare( "$JobName.tup", "$JobName.tuo" ); } else { $StopRunning = 1; } # otherwise potential loop if ( !$StopRunning ) { print "\n utility file analysis : another run needed\n"; } return $StopRunning; }
maybe some file permissions problem?
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
Gerben Wierda wrote:
Lines like these make my eyebrows go up though it might not be th eproblem at hand. What if $JobName contains whitespace?
it has worked ok for many years on our linux and windows boxes, and quoting in perl is mostly a problem for windows (perl being more unix oriented) and all quoting magic in texexec is for windows 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 -----------------------------------------------------------------
Steffen Wolfrum wrote:
They don't. They are all the same. But nevertheless texexec test --pdf ran 8 runs ...
ah ... and how bout the tuo file? are they produced? 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 -----------------------------------------------------------------
Steffen Wolfrum wrote:
Hans Hagen
wrote: Steffen Wolfrum wrote:
TEST.tex \startproject TEST \startfrontmatter \component PARTS/ONE.tex \component PARTS/TWO.tex \stopfrontmatter \stopproject
(not related to the problem but ...) projects normally only have references to products/components/environments, so you example should be: \startproduct TEST \startfrontmatter \component PARTS/ONE.tex \component PARTS/TWO.tex \stopfrontmatter \stopproduct 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 -----------------------------------------------------------------
participants (4)
-
Gerben Wierda
-
Hans Hagen
-
Steffen Wolfrum
-
Taco Hoekwater