Penguin
Annotated edit history of texexec(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 texexec
2 !!!texexec
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 General Options
2 perry 8 Processing !ConTeXt Source Files
9 Creating !ConTeXt Format Files
1 perry 10 Postprocess PDF Files
11 Extract or Strip Out Documentation
12 Process METAPOST Figures
13 Producing Proof Sheets of Figures
14 USAGE
15 INITIALIZATION
16 ENCODINGS
17 FILES
18 SEE ALSO
19 AUTHOR
20 ----
21 !!NAME
22
23
2 perry 24 texexec - !ConTeXt and PDF auxiliary program and batch processor
1 perry 25 !!SYNOPSIS
26
27
28 __texexec__ [[ ''OPTION'' ... ] ''FILE'' [[ ...
29 ]
30 !!DESCRIPTION
31
32
33 __texexec__ is a Perl script that provides several
34 functions:
35
36
37 o
38
39
40 Process a TeX file. This includes performing as many runs as
41 necessary of tex(1), texutil(1), and
42 metapost(1). Options allow you to select the output
43 format, the pages to process, paper size, and so
44 forth.
45
46
47 o
48
49
2 perry 50 Create new !ConTeXt formats (with
1 perry 51 __--format__).
52
53
54 o
55
56
57 Post-process existing PDF files, including merging multiple
58 files, and extracting and rearranging pages within a file
59 (similar to the functions provided by psnup(1) and
60 pdfmerge(1)).
61
62
63 o
64
65
2 perry 66 Extract or strip documentation from com{!ConTeXt} source
1 perry 67 files (using texutil(1)).
68
69
70 o
71
72
73 Run METAPOST (mpost(1)) to generate figures from
74 METAPOST source.
75
76
77 o
78
79
2 perry 80 Produce ``proof sheets of figures used in a __!ConTeXt__
1 perry 81 source file.
82 !!OPTIONS
83
84
85 All switches are specified in full, but can be abbreviated
86 to the shortest unique string. Thus, __--ver__ works the
87 same as __--verbose__.
88 !!General Options
89
90
91 __--alone__
92
93
94 Avoid calling other programs when possible. For example,
95 __--alone__ will prevent __texexec__ from using
96 fmtutil(1) to generate formats (which can be handy
97 when tracing installation problems).
98
99
100 __--environment=__''ENVIRONMENT''
101
102
2 perry 103 Specify a !ConTeXt ''ENVIRONMENT'' to use when processing
1 perry 104 the file. This option can be useful when converting from
2 perry 105 non-!ConTeXt file formats where no environment or layout
1 perry 106 settings are present in the file.
107
108
109 __--help__ [[ ''SWITCH'' ]
110
111
112 Produce a summary of switches and arguments. Many switches
113 have additional information that can be seen by typing
114 ``texexec --help optvar(SWITCH).
115
116
117 __--interface=__''LANGUAGE''
118
119
2 perry 120 Specify the language __!ConTeXt__ should use to
1 perry 121 communicate with you. Options are
122
123
124 __en__
125
126
127 US English
128
129
130 __nl__
131
132
133 Dutch
134
135
136 __de__
137
138
139 German
140
141
142 __uk__
143
144
145 British English
146
147
148 __cz__
149
150
151 Czech
152
153
154 __it__
155
156
157 Italian
158
159
160 __--once__
161
162
163 Process a file once and only once. (By default,
164 __texexec__ processes the file as many times as necessary
165 to sort out all references, typeset __METAPOST__ code,
166 and so forth.)
167
168
169 __--output=__''DRIVER''
170
171
172 Specify the output ''DRIVER'' for use with
173 special primitives. Defaults to the setting in the
174 local ''cont-sys.tex'' file, but can be set to one
175 of
176
177
178 __pdftex__
179
180
181 Native pdftex(1) code
182
183
184 __dvips__
185
186
187 For dvips(1) (the default)
188
189
190 __dvipsone__
191
192
193 For __dvipsone__
194
195
196 __dviwindo__
197
198
2 perry 199 For __dviwindo__, the oldest __!ConTeXt__
1 perry 200 drivers
201
202
203 __dviview__
204
205
206 For __dviview__ (experimental)
207
208
209 There may be other supported drivers -- check the most
2 perry 210 recent __!ConTeXt__ documentation.
1 perry 211
212
213 __--pages=__''PAGENUMBERLIST''
214
215
216 Specify the pages or page range to appear in the output
217 file. ''PAGENUMBERLIST'' may be the keyword __odd__ or
218 __even__; one or more pages separated by commas
219 (x,y); or a page range in the form
220 :z.
221
222
223 __--passon=__''STRING''
224
225
226 Pass additional command-line switches and arguments to the
227 tex(1) process run by __texexec__.
228
229
230 For example, the __MikTeX__ TeX system (for DOS/Windows)
231 can embed information in the DVI file that will allow you to
232 find the line in a source code file corresponding to the
233 line in the typeset output. It uses a switch called ``--src
234 to activate this functionality, and can be used from
235 __texexec__ as
236
237
238 texexec --passon=
239
240
241 The double quotes () are required to prevent
242 __texexec__ from using the switch itself.
243
244
245 __--program__
246
247
248 The name of the TeX program to use (tex(1), by
249 default).
250
251
252 __--result=__''FILENAME''
253
254
255 Allows you to change the basename of the output file. See
256 __--mode__ for an example.
257
258
259 __--runs=__''NUMBER''
260
261
262 Specify the number of runs to perform on a file. Overrides
263 __texexec__s calculations.
264
265
266 __--silent__
267
268
269 Suppress diagnostic and progress messages.
270
271
272 __--suffix=__''SUFFIX''
273
274
275 Specify the suffix of the output file.
276
277
278 __--tex=__''PROGRAMNAME''
279
280
281 Allows you specify the program to use instead of
282 tex(1). Useful for trying different versions of
283 tex(1) installed on the same machine.
284
285
286 __--texutil__
287
288
289 Force a run of texutil(1).
290
291
292 __--verbose__
293
294
295 Output diagnostic information, including the contents of
296 ''texexec.ini''.
2 perry 297 !!Processing !ConTeXt Source Files
1 perry 298
299
300 Including specifying paper sizes, formats, and so
301 forth.
302
303
304 __--arrange__
305
306
307 Dont perform page rearrangements (e.g., for producing a
308 booklet) until the last run.
309
310
311 __--batch__
312
313
314 Process the file in batch mode -- continue to typeset the
315 document after finding errors. More imformation about batch
316 mode can be found in Donald E. Knuths
2 perry 317 ''!TeXbook''.
1 perry 318
319
320 __--bodyfont__
321
322
323 The name of a font to preload for use in setting the body of
324 the text.
325
326
327 __--centerpage__
328
329
330 Center the document image on the page.
331
332
333 __--color__
334
335
336 Turn on color mode. Color mode can also be set by commands
337 embedded in the document. These commands override the
338 __--color__ option.
339
340
341 __--convert=__''FORMAT''
342
343
2 perry 344 Convert the input file to !ConTeXt format from ''FORMAT''
1 perry 345 before processing. In most cases, this conversion will
346 result in a TeX file. Currently supported input
347 ''FORMAT''s are __xml__ and __sgml__.
348
349
350 __--dvi__
351
352
353 Shortcut for __--output=dvi__.
354
355
356 __--fast__
357
358
359 Typeset the document(s) as fast as possible without causing
360 problems.
361
362
363 __--final__
364
365
366 Perform a final run without skipping anything. This option
367 is typically used with __--fast__.
368
369
370 __--language=__''LANGUAGE''
371
372
373 Set the language for hyphenation. Can be specified in your
374 source file. Options are the same as those for
375 __--interface__.
376
377
378 __--mode=__''MODELIST''
379
380
381 Allows you to change the mode (page size and resolution) of
382 the output file.
383
384
385 texexec --pdf --mode=A4 --result=pdftex-a pdftex-t
386 texexec --pdf --mode=letter --result=pdftex-l pdftex-t
387 texexec --pdf --mode=screen --result=pdftex-s
388 pdftex-t
389
390
2 perry 391 Here the mode switch tells __!ConTeXt__ to obey the mode
1 perry 392 directives in the layout specifications. The __--result__
393 flag allows you to rename the output file.
394
395
396 __--noarrange__
397
398
399 Ignore arrangement commands in the source file.
400
401
402 __--paper=__''KEY''
403
404
405 For typesetting multiple pages on a single piece of paper.
406 ''KEY'' can be __a4a3__ (for printing A4 pages on A3
407 paper) or __a5a4__ (for printing A5 pages on A4 paper).
408 The actual layout of the pages is specified with the
409 __--print__ switch.
410
411
412 __--pdf__
413
414
415 Shorthand for __--output=pdftex__.
416
417
418 __--print=__''KEY''
419
420
421 Specify the layout of the final output. ''KEY'' can be
422 __up__, resulting in 2 pages per sheet, double sided, or
423 __down__, resulting in 2 rotated pages per sheet, double
424 sided. Use the --paper switch to specify the original page
425 and sheet size.
2 perry 426 !!Creating !ConTeXt Format Files
1 perry 427
428
429 __--format=__''FORMATFILE''
430
431
432 Specify a ''FORMATFILE'' to use when typesetting.
433 __texexec__ will prepend the string cont- to the
434 name you give, so you can type plain instead of
435 cont-plain, as in
436
437
438 texexec --format=plain --program=pdftex
439 somefile
440
441
442 __--make__
443
444
2 perry 445 Generate a __!ConTeXt__ format file.
1 perry 446 !!Postprocess PDF Files
447
448
449 __--combination=__''ROWS''__*__''COLS''
450
451
452 Specify the number of pages to show on a single page. Use
453 with __--pdfcombine__.
454
455
456 __--pdfarrange__
457
458
459 For rearranging pages in PDF files.
460
461
462 texexec --pdfarrange --paper=a5a4 --print=up
463 foo.pdf
464
465
466 This command creates an A5 booklet from a PDF file
467 ''foo.pdf''. __--pdfarrange__ is used in conjunction
468 with the following switches:
469
470
471 __--paperoffset__
472
473
474 Adjust the space between the edge of the pages and the
475 beginning of the text block.
476
477
478 __--backspace__
479
480
481 Adjust the inside (``gutter) margins.
482
483
484 __--topspace__
485
486
487 Adjust the top and bottom margin.
488
489
490 __--markings__
491
492
493 Add crop marks.
494
495
496 __--addempty=__''PAGES''
497
498
499 Add empty pages after the pages specified in ''PAGES''.
500 (Useful for, among other things, adding blank pages after a
501 table of contents.)
502
503
504 __--textwidth=__''WIDTH''
505
506
507 Set the width of the original text. Specifying this
508 parameter with a single-sided original will allow
2 perry 509 __!ConTeXt__ to adjust the page layout for double-sided
1 perry 510 output, producing much more attractive results.
511
512
513 With the __--pdfarrange__ flag, specifying more than one
514 file will result in all of the files being combined in the
515 final result, allowing you to add title pages, decorated
516 part separators, and so forth.
517
518
519 You can also do more complex manipulations, such as adding
520 additional text to the page by setting up a small file with
521 layout definitions and a simple figure insertion
522 loop.
523
524
525 __--pdfcombine__
526
527
528 Combine multiple pages. Requires you to specify the
529 __--combination__ switch.
530
531
532 __--pdfselect__
533
534
535 Extract pages from a file. Use in combination with the
536 __--selection__ switch, as in
537
538
539 texexec --pdfselect --paper=S6 --selection=1,9,14
540 file-1
541
542
543 which extracts pages 1, 9, and 14 from ''file-1.pdf'',
544 and places them in ''texexec.pdf'' (the default output
545 filename if an output file isnt specified).
546
547
548 See __--pdfarrange__ for other options.
549
550
551 __--selection=__''PAGES''
552
553
554 Specify pages to be affected by another option. See
555 __--pdfarrange__ and __--pdfselect__ for
556 examples.
557 !!Extract or Strip Out Documentation
558
559
560 __--listing__
561
562
563 Produce a typeset version of the source code in ''FILE''.
564 You can specify the form of the output file, as
565 in
566
567
568 texexec --listing --pdf readme.now
569
570
571 which will produce a PDF file called ''texexec.pdf''.
572 Without the __--pdf__ flag, __texexec__ will produce a
573 DVI file.
574
575
576 See also __--backspace__ and
577 __--topspace__.
578
579
580 __--module__
581
582
2 perry 583 Create documentation for __!ConTeXt__, __!MetaPost__
1 perry 584 (see mpost(1)), and Perl modules. Converts the
2 perry 585 documentation to __!ConTeXt__ format and then typesets
1 perry 586 that documentation. See texutil(1) for more
587 information about the format of the documentation
588 strings.
589 !!Process METAPOST Figures
590
591
592 __--mpformat__
593
594
2 perry 595 The name of a __!MetaPost__ format file.
1 perry 596
597
598 __--mptex__
599
600
601 Strips out and typesets TeX code embedded in a
2 perry 602 __!MetaPost__ file.
1 perry 603
604
605 __--nomp__
606
607
2 perry 608 Do not run __!MetaPost__, even if needed.
1 perry 609
610
611 __--nomprun__
612
613
2 perry 614 Do not run mpost(1) on embedded __!MetaPost__
1 perry 615 code.
616 !!Producing Proof Sheets of Figures
617
618
619 __--figures=__''ALTERNATIVE''
620
621
622 Specify one of three options to produce a document
623 containing the images used in the source file:
624
625
626 __a__
627
628
629 A proof sheet with additional information provided for each
630 figure
631
632
633 __b__
634
635
636 A proof sheet with the graphics only
637
638
639 __c__
640
641
642 One figure per page, with the page clipped to the bounding
643 box of the figure
644
645
646 See also __--paperoffset__, which allows you to specify
647 an offset to be added to the page, as in
648
649
650 texexec --figures=c --paperoffset=.5cm *.pdf *.png
651 *.jpg
652
653
654 __texexec__ uses texutil(1) to obtain the list of
655 figures to process.
656 !!USAGE
657
658
659 o
660
661
2 perry 662 Each __!ConTeXt__ user interface (language) has its own
1 perry 663 format. The following command generates two formats, one
664 using the English interface for typesetting in English, and
665 one for Dutch:
666
667
668 texexec --make en nl
669
670
671 By default, the language used for typesetting matches the
672 user-interface language (set with __--interface__. Its
673 possible to use one language for typesetting and another for
674 messages by changing the relevant settings in
675 ''cont-usr.tex'', but these languages can also be changed
676 on the command line with a command such as
677
678
679 texexec --make --language=pl,cz,sk --bodyfont=plr
680 en
681
682
2 perry 683 That command generates a __!ConTeXt__ format file with an
1 perry 684 English user interface, and the main language set to Polish
685 (__pl__). The default body font is the Polish version of
686 Computer Modern Roman (__plr__). Czech and Slovak
687 hyphenation patterns are also loaded so that Czech and
688 Slovak text included in a source file will be typeset
689 properly (__cz__ and __sk__).
690
691
692 o
693
694
695 When the appropriate formats are present, a file can be
696 typeset by typing
697
698
699 texexec test
700
701
702 __texexec__ tries to determine what interface it should
703 use to typeset ''test.tex'' by looking for a line such
704 as
705
706
707 % interface=en tex=pdfetex
708 output=pdftex
709
710
711 at the top of the file (i.e., on the very first line). This
712 line is equivalent to __TeX__s format line,
713 ``__FORMAT'').
714
715
716 By default, __texexec__ will produce a DVI file. The
717 __--pdf__ flag tells __texexec__ to produce a PDF
718 file, instead (by running pdftex(1)). You can also be
719 more specific about what drivers __texexec__ should use,
720 by specifying a command line such as
721
722
723 texexec --output=dvips,acrobat test
724
725
726 which specifies the use of the __dvips__ driver (which is
727 the default), combined with the use of Acrobat-specific PDF
728 instructions.
729
730
731 After an error-free run, __texexec__ will run
732 texutil(1) to determine whether additional runs of
733 tex(1) (or pdftex(1)) or any utility programs
734 (e.g., bibtex(1), makeindex(1)) are necessary.
735 You can suppress these additional runs by specifying the
736 __--once__ or __--runs__ flags:
737
738
739 texexec --once test
740 texexec --runs=2 test
741 !!INITIALIZATION
742
743
744 When starting, __texexec__ first looks for the file
745 ''texexec.ini'', which specifies the location of various
746 programs and configuration files, and specifies the programs
747 to use. The __--verbose__ flag causes __texexec__ to
748 print the information in ''texexec.ini'' to the terminal
749 and the log file.
750
751
752 __texexec__ requires Perl. On Unix and Unix-like systems,
753 no special steps have to be taken to get __texexec__ to
754 work beyond installing Perl and having the perl(1)
755 binary in your path. On Windows systems, however, you may
756 need to run Perl by typing commands such as ``perl
757 texexec.pl optvar(ARGS).
758
759
760 The __fpTeX__ distribution comes with a program called
761 __runperl.exe__ that can be copied and renamed to
762 __texexec.exe__. You will also have to rename a copy to
763 __texutil.exe__ (see texutil(1)). The __teTeX__
764 and __fpTeX__ distributions, at least, should perform the
765 necessary steps as part of their installation sequence -- if
766 you have problems, however, you may need to follow the
767 advice given here.
768
769
770 The file ''texexec.rme'' contains default configuration
771 information. If no file ''texexec.ini'' exists (in
772 ''TEXMF/context/config/'', you should copy
773 ''texexec.rme'' to that directory and rename it to
774 ''texexec.ini''. Make any necessary changes to this file
775 to reflect the layout of programs and directories on your
776 system.
777 !!ENCODINGS
778
779
780 Some languages require specific character encodings to
781 represent their alphabets (beyond the basic ASCII encoding).
782 Although you can use TeX commands to represent these
783 characters, such as ``.z, its easier to use a text
784 editor that includes direct support for these characters and
2 perry 785 let __!ConTeXt__ translate them to the necessary TeX
1 perry 786 commands. For some languages, this approach can also improve
2 perry 787 the performance of !TeXs hyphenation algorithms.
1 perry 788
789
2 perry 790 __!ConTeXt__ supports several of the most commonly used
1 perry 791 encodings. Check the files beginning with ''enco-'',
2 perry 792 ''lang-'', and ''font-'' in the __!ConTeXt__
1 perry 793 distribution for more information.
794
795
796 __web2c__ distributions (such as __teTeX__) support a
2 perry 797 mechanism to map document encodings to __!ConTeXt__s
1 perry 798 internal encoding, font encodings, and hyphenation patterns.
799 __texexec__ provides a document option and a command-line
800 flag to pass the necessary information to tex(1) or
801 pdftex(1). You can add lines such as
802
803
804 %
805
806
807 or
808
809
810 % --translate=cp1250pl
811
812
813 to the beginning of your document, or specify the
814 __--translate__ flag on the command line, as
815
816
817 texexec --translate=il2pl somefile
818
819
820 Note that using language-specific encodings will make your
821 file less portable than using ASCII. It may not be possible
822 for other people to typeset your documents on their
823 systems.
824 !!FILES
825
826
827 ''TEXMF/context/config/texexec.ini''
828
829
830 TeXExec configuration file
831
832
833 ''TEXMF/context/config/texexec.rme''
834
835
836 TeXExec configuration file defaults
837 !!SEE ALSO
838
839
840 bibtex(1), dvips(1), fmtutil(1),
841 makeindex(1), metapost(1), mpost(1),
842 pdfetex(1), pdfmerge(1), pdftex(1),
843 perl(1), psnup(1), tex(1),
844 texshow(1), texutil(1).
845
846
847 The TeXExec manual, ''mtexexec.pdf''.
848
849
850 The TeXExec configuration README files:
851
852
853 o
854
855
856 ''TEXMF/context/config/texexec.rme''
857
858
859 o
860
861
862 ''TEXMF/context/perltk/texexec.rme''
863
864
2 perry 865 Donald E. Knuths ''The !TeXbook''.
1 perry 866 !!AUTHOR
867
868
869 This manpage was written by Tobias Burnus
870 TeXExec__
871 manual written by Hans Hagen
872 __
873
874
875 The PDF manual and __texexec__ itself can be obtained
876 from
877 __
878 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.