summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/README
blob: 5024ca9d37c5155856d4b0516d2ea4eea1d7bb99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
Latexmk, version 4.27a, 10 October 2011
---------------------------------------

Latexmk completely automates the process of generating a LaTeX
document.  Essentially, it is a highly specialized cousin of the
general make utility.  Given the source files for a document, latexmk
issues the appropriate sequence of commands to generate a .dvi, .ps,
.pdf or hardcopy version of the document, including repeated running
of the programs until cross references etc are resolved.  Latexmk can also
be set to run continuously with a previewer; the latex program, etc,
are rerun whenever one of the source files is modified.

Latexmk automatically determines file dependencies from the LaTeX .log
file.  It features: a fully reliable algorithm for deciding how many
times to run latex and related programs, automatic detection of
dependent files, the ability to generate pdf files using pdflatex or
via dvi or postscript files, and the continuous-preview mode.  For
bibliographies, the current version now supports biber as well as the
traditional bibtex.  Which of bibtex or biber to use is determined
automatically.

Please read the man page (or the corresponding text or postscript
file) for details of what latexmk does and what all the features are.
A copy of the fast help that can be seen by doing "latexmk -h" is at
the end of this file.

Latexmk is a perl script.  It is licensed under the GNU General Public
License.

It was modified by Evan McLean from the original script called "go"
written by David J. Musliner.  Now it is supported by

            John Collins
            Physics Department
            Penn State University
            104 Davey Lab, Box 208
            University Park PA 16802
            U.S.A.  

            http://www.phys.psu.edu/~collins/
            username collins at node phys.psu.edu
(E-mail address obfuscated to reduce harvesting by worms and spammers.)

The start of the script file has copyright notices and disclaimers.  It
also has a modification history for those who are interested.

NOTES:-

1) See the INSTALL file for installation instructions

2) Portability under various UNIX-type systems (including Linux):
   A special hack is used at the beginning of the latexmk script to ensure
   that it correctly runs without the need to adjust a #! line.  All that
   is necessary is that the script has execute permission.

3) Portability under non-UNIX systems:
   Under other operating systems some other arrangement needs to be made
   to run the file.  For example under MS-Windows, the supplied batch file
   latexmk.bat will do this.  Under current TeXLive (2009 or later)
   distribution, latexmk can be installed by TeXLive's package
   manager, in which case an executable program is also installed to
   run latexmk.pl, and an appropriate version of Perl is part of the
   TeXLive system.  

   You may also find it necessary to convert files to the correct
   local format for text files.  As downloaded, the files are in UNIX
   format (line-ending is '\n').  On MS-Windows systems, the
   conversion to MSDOS format (with line-ending '\r\n') is normally
   UNnecessary, since much current software handles the UNIX format
   correctly.  (The known current software for which this statement
   applies includes MikTeX, TeXLive, emacs.)

4) Portability:  The various commands to process LaTeX files made need to
   be changed for particular installations.  See the INSTALL file and the
   documentation for information on customization.  

5) Portability: Users of different UNIX-like systems may have to change
   the "$pscmd" variable in their RC file if the -pvc option is to work
   perfectly.  Refer to $pscmd in the man page.

6) Latexmk can be downloaded from the author's site at
   http://www.phys.psu.edu/~collins/software/latexmk/
   This site also includes previous versions, and sometimes newer
   versions under development.

7) Latexmk is archived on the CTAN tex archive --- see
   http://www.tug.org/ctan.html.  

8) [If for some reason you need to find the obsolete version 2, it can
   also be found on CTAN, e.g., at
   http://ctan.org/tex-archive/obsolete/support/latexmk/] 

John Collins
---------------------------- "latexmk -h" ----------------------------
Latexmk 4.27a: Automatic LaTeX document generation routine

Usage: latexmk [latexmk_options] [filename ...]

  Latexmk_options:
   -aux-directory=dir or -auxdir=dir 
                 - set name of directory for auxiliary files (aux, log)
                 - Currently this only works with MiKTeX
   -bibtex       - use bibtex when needed (default)
   -bibtex-      - never use bibtex
   -bibtex-cond  - use bibtex when needed, but only if the bib files exist
   -bm <message> - Print message across the page when converting to postscript
   -bi <intensity> - Set contrast or intensity of banner
   -bs <scale> - Set scale for banner
   -commands  - list commands used by latexmk for processing files
   -c     - clean up (remove) all nonessential files, except
            dvi, ps and pdf files.
            This and the other clean-ups are instead of a regular make.
   -C     - clean up (remove) all nonessential files
            including aux, dep, dvi, postscript and pdf files
            and file of database of file information
   -CA     - clean up (remove) all nonessential files.
            Equivalent to -C option.
   -CF     - Remove file of database of file information before doing 
            other actions
   -cd    - Change to directory of source file when processing it
   -cd-   - Do NOT change to directory of source file when processing it
   -dependents or -deps - Show list of dependent files after processing
   -dependents- or -deps- - Do not show list of dependent files
   -deps-out=file - Set name of output file for dependency list,
                    and turn on showing of dependency list
   -dF <filter> - Filter to apply to dvi file
   -dvi   - generate dvi
   -dvi-  - turn off required dvi
   -e <code> - Execute specified Perl code (as part of latexmk start-up
               code)
   -f     - force continued processing past errors
   -f-    - turn off forced continuing processing past errors
   -gg    - Super go mode: clean out generated files (-CA), and then
            process files regardless of file timestamps
   -g     - process regardless of file timestamps
   -g-    - Turn off -g
   -h     - print help
   -help - print help
   -jobname=STRING - set basename of output file(s) to STRING.
            (Like --jobname=STRING on command line for many current
            implementations of latex/pdflatex.)
   -l     - force landscape mode
   -l-    - turn off -l
   -latex=<program> - set program used for latex.
                      (replace '<program>' by the program name)
   -new-viewer    - in -pvc mode, always start a new viewer
   -new-viewer-   - in -pvc mode, start a new viewer only if needed
   -nobibtex      - never use bibtex
   -nodependents  - Do not show list of dependent files after processing
   -norc          - omit automatic reading of system, user and project rc files
   -output-directory=dir or -outdir=dir
                  - set name of directory for output files
   -pdf   - generate pdf by pdflatex
   -pdfdvi - generate pdf by dvipdf
   -pdflatex=<program> - set program used for pdflatex.
                      (replace '<program>' by the program name)
   -pdfps - generate pdf by ps2pdf
   -pdf-  - turn off pdf
   -ps    - generate postscript
   -ps-   - turn off postscript
   -pF <filter> - Filter to apply to postscript file
   -p     - print document after generating postscript.
            (Can also .dvi or .pdf files -- see documentation)
   -print=dvi     - when file is to be printed, print the dvi file
   -print=ps      - when file is to be printed, print the ps file (default)
   -print=pdf     - when file is to be printed, print the pdf file
   -pv    - preview document.  (Side effect turn off continuous preview)
   -pv-   - turn off preview mode
   -pvc   - preview document and continuously update.  (This also turns
                on force mode, so errors do not cause latexmk to stop.)
            (Side effect: turn off ordinary preview mode.)
   -pvc-  - turn off -pvc
   -r <file> - Read custom RC file
               (N.B. This file could override options specified earlier
               on the command line.)
   -recorder - Use -recorder option for (pdf)latex
               (to give list of input and output files)
   -recorder- - Do not use -recorder option for (pdf)latex
   -rules    - Show list of rules after processing
   -rules-   - Do not show list of rules after processing
   -silent   - silence progress messages from called programs
   -time     - show CPU time used
   -time-    - don't show CPU time used
   -use-make - use the make program to try to make missing files
   -use-make- - don't use the make program to try to make missing files
   -v        - display program version
   -verbose  - display usual progress messages from called programs
   -version      - display program version
   -view=default - viewer is default (dvi, ps, pdf)
   -view=dvi     - viewer is for dvi
   -view=none    - no viewer is used
   -view=ps      - viewer is for ps
   -view=pdf     - viewer is for pdf
   filename = the root filename of LaTeX document

-p, -pv and -pvc are mutually exclusive
-h, -c and -C override all other options.
-pv and -pvc require one and only one filename specified
All options can be introduced by '-' or '--'.  (E.g., --help or -help.)