1ARLATEX(1) User Commands ARLATEX(1)
2
3
4
6 arlatex - archive a number of ancillary LaTeX files into a master .tex
7 file
8
10 arlatex [--outfile=filename.tex] --document=filename.tex filename ...
11
12 arlatex --version
13
14 arlatex --help
15
17 arlatex is an archiving program like shar, tar, zip, etc. Unlike those
18 other archivers, however, arlatex is designed specifically for use with
19 LaTeX. arlatex takes the name of a master .tex file and a number of
20 ancillary files used by that master file (e.g., .tex, .sty, .cls, and
21 .eps files). From these, arlatex outputs a single file that, when it's
22 run through latex, both regenerates the ancillary files and compiles
23 the document into a .dvi file.
24
25 arlatex has a few advantages over other archiving programs:
26
27 · The .tex files produced by arlatex are in a plain-text format.
28 They are therefore perfectly portable and trivial to e-mail to
29 colleagues.
30
31 · arlatex needs only LaTeX to run. There is no dependence on any
32 external tools.
33
34 · There is no explicit extraction step. As the generated document is
35 run through latex, it extracts the ancillary files and builds the
36 document in the same step. The user running latex may not even
37 notice that additional files are being produced.
38
39 arlatex works by writing a number of "\begin{filecontents*}" ...
40 "\end{filecontents*}" blocks to the output file, followed by the
41 contents of the master file. (In fact, any LaTeX comments at the
42 beginning of the master file are hoisted to the top of the generated
43 file. This enables the author to draw attention, if so desired, to the
44 fact that ancillary files will be generated.) The "filecontents*"
45 environment, part of standard LaTeX2e, writes its contents verbatim to
46 a specified file.
47
49 --version
50 Output the arlatex script's version number.
51
52 --help
53 Output brief arlatex usage information.
54
55 --document=.tex file
56 Specify the master document. The output from arlatex is this file
57 with all of the other files named on the command line prepended to
58 it. Note that "--document" is a mandatory parameter; arlatex will
59 abort with an error message if "--document" is not specified.
60
61 --outfile=.tex file
62 Specify the output file. The output file looks just like the
63 master document, but with a number of "filecontents*" environments
64 preceding the "\documentclass" line. If "--outfile" is not
65 specified, output will be written to the standard output device.
66
68 Suppose you have a paper called paper.tex that loads a custom package
69 with "\usepackage{mypackage}". You want to submit the paper to a
70 conference, but you want to be absolutely certain that mypackage.sty
71 doesn't get lost as your paper is shuttled from person to person.
72 Here's how arlatex can be of use:
73
74 arlatex --document=paper.tex mypackage.sty --outfile=paper-submit.tex
75
76 When paper-submit.tex is processed with latex, it builds just like the
77 original paper.tex, except that it additionally creates a mypackage.sty
78 in the current directory:
79
80 This is TeX, Version 3.14159 (Web2C 7.3.1)
81 (paper-submit.tex
82 LaTeX2e <1999/12/01> patch level 1
83 Babel <v3.6Z> and hyphenation patterns for american, french, german,
84 ngerman, italian, nohyphenation, loaded.
85
86 LaTeX Warning: Writing file `./mypackage.sty'.
87
88 (/usr/share/texmf/tex/latex/base/article.cls
89 Document Class: article 1999/09/10 v1.4a Standard LaTeX document class
90 (/usr/share/texmf/tex/latex/base/size12.clo)) (mypackage.sty)
91 .
92 .
93 .
94
95 As another example, here's how you could bundle together all of the
96 files needed to build a large document for longevity:
97
98 arlatex --document=thesis.tex abstract.tex introduction.tex
99 background.tex approach.tex experiments.tex relatedwork.tex
100 conclusions.tex before.eps after.eps fast.eps slow.eps
101 podunkUthesis.cls --outfile=thesis-all.tex
102
103 As the number of files to archive together increases it becomes more
104 cumbersome to run arlatex manually. Fortunately, using arlatex with
105 bundledoc is straightforward. bundledoc finds all of the files needed
106 to build the document, and arlatex combines them into a single file.
107 The following are examples of the "bundle:" line you might use in a
108 bundledoc configuration file:
109
110 Unix:
111 bundle: (arlatex --document=$BDBASE.tex $BDINPUTS \
112 --outfile=$BDBASE-all.tex)
113
114 Windows:
115 bundle: arlatex --document=%BDBASE%.tex %BDINPUTS% \
116 --outfile=%BDBASE%-all.tex
117
118 See the bundledoc documentation for more information.
119
121 arlatex makes use of LaTeX2e's "filecontents*" environment.
122 "filecontents*" refuses to overwrite an existing file. However, it
123 also refuses to create a file that exists anywhere that LaTeX can find
124 it. That is, if the user running latex on an arlatex-generated .tex
125 file already has a /usr/share/texmf/tex/latex/whatever/whatever.sty
126 file then "filecontents*" will refuse to create a whatever.sty file,
127 even in a different directory.
128
130 bundledoc(1), latex(1), shar(1), tar(1), zip(1)
131
133 Scott Pakin, scott+bdoc@pakin.org
134
135
136
137v1.03 2018-05-23 ARLATEX(1)