summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-12 17:18:38 +0000
committerKarl Berry <karl@freefriends.org>2008-10-12 17:18:38 +0000
commit7800349461c795f293e70e58022fcad1055fbf9e (patch)
tree8f32c357e7beac1b65072f113e95411d04f6eb55 /Master/texmf-dist/doc/support
parent6c9096722a86a9bc2f9d78b7b4ec5d2245910d6b (diff)
latexmk 4.01 (29sep08)
git-svn-id: svn://tug.org/texlive/trunk@10937 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support')
-rw-r--r--Master/texmf-dist/doc/support/latexmk/CHANGES52
-rw-r--r--Master/texmf-dist/doc/support/latexmk/COPYING340
-rw-r--r--Master/texmf-dist/doc/support/latexmk/INSTALL271
-rw-r--r--Master/texmf-dist/doc/support/latexmk/README172
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/README14
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc77
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/README1140
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call14
-rwxr-xr-xMaster/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call.bat19
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call14
-rwxr-xr-xMaster/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call.bat19
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/kickxdvi22
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/l1122
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/l2143
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk50
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk_README.txt13
-rw-r--r--Master/texmf-dist/doc/support/latexmk/extra-scripts/startacroread231
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.11476
-rwxr-xr-xMaster/texmf-dist/doc/support/latexmk/latexmk.bat5
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.pdfbin0 -> 148057 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.txt1772
21 files changed, 4966 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/CHANGES b/Master/texmf-dist/doc/support/latexmk/CHANGES
new file mode 100644
index 00000000000..509b82fe299
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/CHANGES
@@ -0,0 +1,52 @@
+From v. 3.04 to v. 3.07
+ Pdf files can be made by any of three methods: pdflatex, from dvi
+ or from postscript.
+ Extra command-line options -- see documentation
+ Improved configuration options -- see documentation
+ Bug fixes, etc
+ Improved detection of dependencies
+ If latexmk exits because of an error with latex, bibtex
+ or makeindex, then it gives a non-zero exit code.
+ Under MS-Windows allow wildcards in filenames.
+
+From v. 3.07 to v. 4.01
+ Allow dvips, etc to put files in temporary location then move to
+ final location. This enables the problem to be avoided that
+ some viewers look for changes in a file and read a new file
+ before the writing of it is complete.
+ Ensure that an error in exectuing an rcfile results in an error
+ message visible to the user.
+ OS-specific initialization code now includes section for Mac OS-X.
+ Make code safe, as far as possible, for filenames containing
+ spaces.
+ Change method of detecting out-of-date-ness, etc, to examine all
+ files for changes. Keep a database (in a file with extension
+ fdb_latexmk) of the previous state of the files. The aux.bak
+ and idx.bak files are no longer used. The primary method of
+ detecting change is from the md5 checksum of a file. This deals
+ automatically with the vast majority of cases where there is
+ circular dependence of files, without needing special coding in
+ latexmk to know which input files to a LaTeX run are generated
+ from a previous run.
+ Hence make a much more systematic and general method for treating
+ dependencies.
+ Substituteable place holders allowed in command specifications, to
+ allow very general specification of commands (including multiple
+ commands, pipelines etc).
+ Extra option --dependents to list dependent files.
+ Support for multibib.sty, multind.sty, etc.
+ Support for index.sty as well as makeidx.sty.
+ Allow .latexmkrc as file name in project directory (as opposed to
+ latexmkrc).
+ Command-line option -e to allow execution of initialization code
+ from command-line invocation of latexmk.
+ Routines add_cus_dep, remove_cus_dep and show_cus_dep for
+ manipulating custom-dependency list.
+ Ability to specify lines to be ignored in computing md5 checksum of
+ a file of a particular extension. (An example would be a
+ comment line in an encapsulated postscript file that contains
+ the date and time it was created. Such lines may change without
+ having any consequence on the use of the file.)
+ Miscellaneous bug fixes, etc.
+ Improvements in parsing of log file
+
diff --git a/Master/texmf-dist/doc/support/latexmk/COPYING b/Master/texmf-dist/doc/support/latexmk/COPYING
new file mode 100644
index 00000000000..5b6e7c66c27
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/Master/texmf-dist/doc/support/latexmk/INSTALL b/Master/texmf-dist/doc/support/latexmk/INSTALL
new file mode 100644
index 00000000000..225e1c6e6b5
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/INSTALL
@@ -0,0 +1,271 @@
+ INSTALLING latexmk
+ ==================
+ (Version 4.00, 12 March 2008)
+
+ 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/
+ http://www.phys.psu.edu/~collins/software/latexmk/
+ username collins at node phys.psu.edu
+(E-mail address obfuscated to avoid being harvested by worms and spammers)
+
+Latexmk is a "make" tool for building latex documents. It runs latex
+and/or pdflatex the appropriate number of times to resolve cross
+references, and, if necessary, it also runs makeindex and/or bibtex when
+appropriate. Then it can make postscript files, print the result or
+preview it, as request. It can also be set to run continuously with a
+previewer; the latex program, etc, are rerun whenever one of the source
+files is modified.
+
+It automatically determines file dependencies from either the LaTeX .log
+file or the source .tex file. Compared with previous versions, the
+current version features: a fully reliable algorithm for deciding how
+many times to run latex, greatly improved automatic detection of dependent
+files, the ability to generate pdf files using pdflatex, and a continuous
+preview mode that actually works.
+
+Latexmk can be installed and used on UNIX (including LINUX), and MS
+Windows (tested under WinXP). It can presumably be used on other
+systems with suitable customization.
+
+On all systems, the prequisites are
+
+a. A working installation of Perl. (See http://www.cpan.org/ if you
+ don't have one.)
+
+b. A working installation of TeX and LaTeX. (See http://www.ctan.org/ if
+ you don't have one.)
+
+
+
+Installing on UNIX/LINUX
+========================
+
+1. Make sure you have working installations of Perl and TeX/LaTeX.
+
+2. Put the file latexmk.pl in a directory for executable files. For
+ example, for a system-wide installation, you could put it in
+ /usr/local/bin.
+
+3. Rename this file to latexmk.
+
+4. Make sure latexmk is executable, e.g., by using chmod suitably.
+
+5. (Optional) Copy the file latexmk.1 to an appropriate directory for man
+ pages, e.g., /usr/local/man/man1/.
+
+6. Check whether the commands used by latexmk for executing latex etc are
+ correct. Normally the only one you have to worry about is $pscmd.
+ This runs the command ps and is used in preview_continuous_mode to
+ determine whether a previewer is already running. The format of the
+ output of ps is highly system dependent. Latexmk should get it right
+ under LINUX and Solaris. If latexmk does not get this or another
+ command correct, put an override in a startup file.
+
+ a. For a system-wide installation, the correction should be in the
+ system startup file, which is any one of the files
+ /opt/local/share/latexmk/LatexMk,
+ /usr/local/share/latexmk/LatexMk,
+ /usr/local/lib/latexmk/LatexMk.
+ (You get to choose which.)
+
+ b. If you are installing latexmk as an ordinary user, the startup
+ file is the user startup file, which is the file .latexmkrc in
+ your home directory.
+
+ The startup files are written in perl, so possible overrides are like
+
+ $latex = 'unusual_program_to_run_instead_of_normal_latex';
+
+ for changing the program to run latex, and
+
+ $pscmd = 'ps -aeg';
+ $pid_position = 1;
+
+ for the ps command. Here, $pid_position = 1 indicates that the process
+ ID number is in the first column of the output of the command ps.
+
+7. If you need any modifications on the commands for running previewers,
+ like gv, note that prefixing a command by start, as in
+
+ $ps_previewer = 'start gv -watch';
+
+ ensures that the command is run detached, as is normally appropriate
+ for a previewer.
+
+
+Installing on MS-Windows
+========================
+
+(Power users can modify these as appropriate.)
+
+1. Make sure you have working installations of Perl and TeX/LaTeX,
+ complete with viewers for dvi and/or postscript files.
+
+2. If necessary, unpack the distribution. [Note: It is a good idea to
+ unpack the files so that they have the correct line-end characters for
+ MS-Windows. For example, if you use unzip on latexmk.zip, the command
+ unzip -a latexmk.zip should do the job. If you don't do this
+ conversion, it probably won't matter, since much software, including
+ perl, MikTeX and emacs, handles MS-Windows and UNIX line ends equally
+ well.]
+
+3. Copy the files latexmk.pl and latexmk.bat to a suitable directory
+ (your choice). One possibility is a directory C:\local\bin. You will
+ need to make sure this directory in the search path for executable
+ files --- see the next step.
+
+4. If the directory in the previous step is NOT already in the search
+ path for executable files, arrange for this, by adjusting the
+ environment variable PATH suitably. Suppose the latexmk directory
+ is C:\local\bin.
+
+ a. In Windows XP, there is an item in the Control Panel to adjust
+ the environment: normally Control Panel -> Performance and
+ Maintenance -> System. The pick the tab Advanced and click on
+ Environment Variables.
+
+ (i) If you are a REGULAR user, examine the User variables. If
+ there is already an entry for PATH, append a semicolon and
+ then the name of latexmk's directory (e.g., C:\local\bin).
+ If not, then make a new variable named PATH with the value
+ %PATH%;C:\local\bin
+
+ (ii) If you are an administrator, examine the System variables,
+ and adjust the entry to PATH, as above.
+
+ b. ONLY in Windows 95, 98 and ME: you will need to add a line to
+ the end of the C:\AUTOEXEC.BAT file. Suppose the directory for
+ latexmk is named C:\local\bin, then the line you add is
+
+ PATH %PATH%;C:\local\bin
+
+ This change will take effect the next time you reboot.
+
+5. (Optional) Copy documentation file(s) to a suitable directory. The
+ only requirement on the directory is your convenience: some convenient
+ place to look up documentation. The relevant files are latexmk.txt
+ which is a pure ASCII text file, and latexmk.ps which is a postscript
+ file.
+
+6. Check whether perl is in the search path for executables. (E.g., from
+ the MSDOS command-line prompt, try the command perl --version.) If
+ perl is not in the search path, then modify the first line of
+ latexmk.bat (which you installed at step 2) by replacing the command
+ perl by the full path name for perl, e.g., C:\perl\bin\perl.exe.
+
+7. You may need to reboot, or at least logoff and log back in, if you
+ made any changes to the path at step 3. Test out the installation
+ at the command-line prompt:
+
+ a. First do
+
+ latexmk --version
+
+ This should show you the version number of latexmk. If this works
+ latexmk is accessible. If not, you will have to figure out what
+ did not work in the previous steps.
+
+ b. Then change to a directory where you have a good LaTeX file.
+ Suppose the file is paper.tex. Delete any pre-existing dvi file,
+ so that latexmk is forced to remake the output files. The
+ following commands will check out the main features of latexmk:
+
+ latexmk paper
+ latexmk -pv paper
+ latexmk -pv -ps paper
+
+ The first command will create the dvi file, running latex a
+ suitable number of times, and additionally running bibtex and
+ makeindex, but only if needed. The second command will open a
+ viewer of the dvi file. The third command will create a postscript
+ file, and then open a viewer for it.
+
+ c. If the above works, you are done. If not, you will have to figure
+ out what is wrong, and correct it. FIRST, READ THE DOCUMENTATION!
+ The normal problems are that the names for the commands used by
+ latexmk are incorrect for your system, or they are not present on
+ your system. See the next item for how to customize latexmk.
+ Also LOOK AT THE SECTION NAMED "TRICKY POINTS" below to see some
+ hints.
+
+
+8. If the commands used by latexmk are incorrect, see the UNIX
+ installation instructions for what to do. The only changes needed
+ from the UNIX instructions are:
+
+ a. The system initialization file is C:\latexmk\LatexMk.
+
+ b. The user initialization file is .latexmkrc in the directory
+ specified by the environment variable HOME. If there is no HOME
+ variable, then the file is in the root directory of the current
+ drive.
+
+
+Other systems
+=============
+
+You are on your own. The instructions for UNIX/LINUX and MS-Windows
+should help you to see what to do. Let me know (username collins at
+node phys.psu.edu) what happens, so that I can update these
+instructions and possibly latexmk as well.
+
+
+Tricky points
+=============
+
+1. BEWARE of filenames with funny extensions, for example, two.part.tex,
+ with a double extension. The behavior of TeX-related software is not
+ consistent in this situation. You may, for example, find a log file
+ named two.log or two.part.log, depending on which version of which
+ implementation of TeX/LaTeX you use. Naturally, there is a
+ possibility that latexmk will get confused, and not recognize, for
+ example, that a dvi file has been generated. Latexmk has some
+ configuration variables to deal with some of the possibilities, so you
+ could try playing with them --- see the code. But it general, it is
+ best to avoid such double extensions: they make your files
+ non-portable. Do something like two-part.tex or two_part.tex
+ instead.
+
+2. The same goes for filenames and directory names with spaces in them.
+ Much software interprets spaces as separators between different file
+ names or between filenames and other text.
+
+3. If you need to remake documentation files, e.g., latexmk.pdf or
+ latexmk.txt, from the man page file latexmk.1, the following
+ commands work (on my linux system at least):
+
+ Postscript file from latexmk.1:
+
+ groff -Tps -man-old -rcR=0 latexmk.1 > latexmk.ps
+
+ Pdf file from postscript:
+
+ ps2pdf latexmk.ps latexmk.pdf
+
+ Text file:
+
+ groff -Tascii -man-old -rcR=0 latexmk.1 > latexmk.txt
+
+
+
+Credits
+=======
+
+The original version of this program was called 'go', and written by David
+Musliner. That version is Copyright 1992 by David J. Musliner and The
+University of Michigan.
+
+Version 2 was modified by Evan McLean.
+
+The current version is by John Collins (username collins at node
+phys.psu.edu) -- other contact details at the top. It is copyright
+1998-2008 by John Collins, and the previous authors; see the copyright
+notice in the latexmk.pl file, which gives permission to use, copy,
+modify, and distribute this software and its documentation under the
+terms of the GNU Public License.
diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README
new file mode 100644
index 00000000000..5a77ae7382c
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/README
@@ -0,0 +1,172 @@
+Hi, and thanks for checking out latexmk. (Version 4.01, 24 September 2008)
+
+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. It 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 either the LaTeX
+.log file or the source .tex file. Compared with previous versions, the
+current version features: a fully reliable algorithm for deciding how many
+times to run latex, greatly improved automatic detection of dependent
+files, the ability to generate pdf files using pdflatex, and a continuous
+preview mode that actually works.
+
+Please read the man page (or the corresponding text or postscript file)
+for a run down on 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.
+
+The latexmk perl script 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 avoid being harvested 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.
+
+ 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
+ software for which this statement applies includes MikTeX, fpTeX,
+ 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 possibly newer
+ versions under development.
+
+7) Latexmk is archived on the CTAN tex archive --- see
+ http://www.tug.org/ctan.html. By ftp it can be found in
+ /tex-archive/support/latexmk on the following hosts (as well as on
+ many other mirror sites): ftp://ftp.dante.de, ftp://ftp.tex.ac.uk,
+ ftp://ctan.tug.org.
+
+8) [If for some reason you need to find the obsolete version 2, it can
+ also be found on CTAN, at /tex-archive/obsolete/support/latexmk/ on
+ the above hosts.]
+
+
+I hope you find this useful.
+
+John Collins
+---------------------------- "latexmk -h" ----------------------------
+Latexmk 4.01a: Automatic LaTeX document generation routine
+
+Usage: latexmk [latexmk_options] [filename ...]
+
+ Latexmk_options:
+ -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
+ But exclude file of database of file information
+ -CA - clean up (remove) absolutely ALL nonessential files
+ including aux, dep, dvi, postscript and pdf files,
+ and file of database of file information
+ -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 - Show list of dependent files after processing
+ -dependents- - Do not show list of dependent files after processing
+ -dF <filter> - Filter to apply to dvi file
+ -dvi - generate dvi
+ -dvi- - turn off required dvi
+ -e <code> - Execute specified PERL code
+ -f - force continued processing past errors
+ -f- - turn off forced continuing processing past errors
+ -F - Ignore non-existent files when testing for dependencies
+ -F- - Turn off -F
+ -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
+ -new-viewer - in -pvc mode, always start a new viewer
+ -new-viewer- - in -pvc mode, start a new viewer only if needed
+ -nodependents - Do not show list of dependent files after processing
+ -pdf - generate pdf by pdflatex
+ -pdfdvi - generate pdf by dvipdf
+ -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
+ -silent - silence progress messages from called programs
+ -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 overides 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.)
+Contents of RC file specified by -r overrides options specified
+ before the -r option on the command line
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README
new file mode 100644
index 00000000000..0fa2d6345da
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README
@@ -0,0 +1,14 @@
+The files in this directory provide suggestions for customizing an
+initialization file ("rc file") for latexmk. See the latexmk
+documentation for general information on its initialization files.
+
+NOTES: 1. These examples are developed by particular users to solve
+particular problems. You may have to customize them for your own
+needs. So read the comments carefully, and understand how the
+examples are working.
+
+
+2. Another source of examples is in Herb Schulz's distribution of
+ TexShop, at http://homepage.mac.com/herbs2, for some further
+ examples. (The file Latexmk321jTeXShop.zip is the one you want.)
+ It shows how to use glossaries, epstopdf, pdftricks and pst-pdf.
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc
new file mode 100644
index 00000000000..df5dfd5d81e
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc
@@ -0,0 +1,77 @@
+# Use of glossaries, extra indexes, epstopdf, and other images conversions
+# Thanks to Herb Schulz
+
+
+$pdflatex = 'pdflatex --shell-escape %O %S';
+
+# Custom dependency for glossary/glossaries package
+# if you make custom glossaries you may have to add items to the @cus_dep_list and corresponding sub-routines
+add_cus_dep('glo', 'gls', 0, 'makeglo2gls');
+ sub makeglo2gls {
+ system("makeindex -s $_[0].ist -t $_[0].glg -o $_[0].gls $_[0].glo");
+ }
+# The glossaries package, with the [acronym] option, produces a .acn file when processed with (xe/pdf)latex and
+# then makeindex to process the .acn into .acr and finally runs of (xe/pdf)latex to read in the .acr file. Unfortunately
+# the glossary package does just the reverse; i.e. (xe/pdf)latex processing produces a .acr files and makeindex then
+# is used to convert the .acr file to a .acn file which is then ... . This dependency assumes the glossaries package.
+add_cus_dep('acn', 'acr', 0, 'makeacn2acr');
+ sub makeacn2acr {
+ system("makeindex -s $_[0].ist -t $_[0].alg -o $_[0].acr $_[0].acn");
+ }
+# for glossary package (Sigh...) --- they can co-exist!
+add_cus_dep('acr', 'acn', 0, 'makeacr2acn');
+ sub makeacr2acn {
+ system("makeindex -s $_[0].ist -t $_[0].alg -o $_[0].acn $_[0].acr");
+ }
+# example of an added custom glossary type that is used in some of the glossary/glossaries example files:
+# this is for the new glossary type command \newglossary[nlg]{notation}{not}{ntn}{Notation} from the glossaries package
+# NOTE: the glossary package uses a very different command: the <in-ext> and <out-ext>
+# are reversed in the calling sequence :-(
+add_cus_dep('ntn', 'not', 0, 'makentn2not');
+ sub makentn2not {
+ system("makeindex -s $_[0].ist -t $_[0].nlg -o $_[0].not $_[0].ntn");
+ }
+# for the glossary package (Sigh...) --- they can co-exist!
+add_cus_dep('not', 'ntn', 0, 'makenot2ntn');
+ sub makenot2ntn {
+ system("makeindex -s $_[0].ist -t $_[0].nlg -o $_[0].ntn $_[0].not");
+ }
+
+# dependencies for custom indexes using the index package
+# examples for sample.tex for index package:
+ add_cus_dep('adx', 'and', 0, 'makeadx2and');
+ sub makeadx2and {
+ system("makeindex -o $_[0].and $_[0].adx");
+ }
+ add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
+ sub makendx2nnd {
+ system("makeindex -o $_[0].nnd $_[0].ndx");
+ }
+ add_cus_dep('ldx', 'lnd', 0, 'makeldx2lnd');
+ sub makeldx2lnd {
+ system("makeindex -o $_[0].lnd $_[0].ldx");
+ }
+
+# Custom dependency and function for nomencl package
+add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
+ sub makenlo2nls {
+ system("makeindex -s nomencl.ist -o $_[0].nls $_[0].nlo");
+ }
+
+# Custom dependency and function(s) for epstopdf package
+
+# FOR USERS OF epstopf v1.4 and before: should also work with v1.5 and later
+# note: you may get extras runs if you use the .eps extension in the \includgraphics command
+# deletes an outdated pdf-image, and triggers a pdflatex-run
+add_cus_dep('eps', 'pdf', 0, 'cus_dep_delete_dest');
+
+# FOR USERS OF epstopdf v1.5 and later only:
+# load it as \usepackage[update,prepend]{epstopdf}
+# detects an outdated pdf-image, and triggers a pdflatex-run
+#add_cus_dep('eps', 'pdf', 0, 'cus_dep_require_primary_run');
+
+# Custom dependecy to convert tif to png
+add_cus_dep('tif', 'png', 0, 'maketif2png');
+ sub maketif2png {
+ system("convert $_[0].tif $_[0].png");
+ }
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/README1 b/Master/texmf-dist/doc/support/latexmk/extra-scripts/README1
new file mode 100644
index 00000000000..aeb5e615e49
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/README1
@@ -0,0 +1,140 @@
+Auxiliary scripts for latexmk
+=============================
+
+John Collins (collins at phys.psu.edu)
+20 Jan 2007
+
+Latexmk can be configured to use different programs than the standard
+ones to perform its tasks. If a user finds that the default behavior
+is not what is desired, it is frequently possible to use a script
+replacing a standard program to acheive the desired effect. It is
+also possible to have a script to run some other programs as well as
+latexmk to do certain tasks. A certain amount of creativity works
+wonders.
+
+In this directory are some scripts that you may find useful. They
+have been provided by other users (who I thank) or by myself. They
+were written to perform certain jobs desired by these users, so they
+may have some very special features that are not useful to everytone.
+You may well need to modify them for your own needs, and you will
+probably need to read through them in detail to understand what they
+do. They can also be quite operating system specific.
+
+For all these scripts, the instructions assumes that the script is in
+the path for executables, and that you have done whatever your OS
+needs you to do to make the script executable.
+
+1. startacroread
+
+ This is specific for UNIX/LINUX systems (script running under
+ bash). It solves a problem that when acroread is used as a pdf
+ viewer and latexmk is used in preview-continuous mode, acroread
+ does not automatically update its display when the pdf file
+ changes.
+
+ Prerequisites:
+ UNIX-style OS
+ bash (command shell)
+ acroread
+ pdfopen and pdfclose from the xpdfopen package
+ (see http://www.tug.org/tex-archive/support/xpdfopen/)
+
+ To use:
+
+ Put the following lines in a startup file for latexmk
+
+ $pdf_previewer = "start startacrobat";
+ $pdf_update_method = "2";
+
+ This will, of course, only have an effect when latexmk will
+ have you view pdf files.
+
+ Advantage:
+
+ Use of acroread (under UNIX/LINUX) for viewing pdf files, with
+ automatic update when latexmk -pvc is used.
+
+ Disadvantage:
+
+ Acroread does not retain its page position; it returns to the
+ first page. (Both gv and xpdf are better for this.)
+
+ Notes:
+
+ The viewer window disappears and then reappears as the
+ foreground window.
+
+ This solution cannot be easily adapted under MSWindows, since
+ the MSWindows version of acroread locks the pdf file, so that a
+ new version cannot be written.
+
+ Thanks: Thorsten Bonow
+
+
+
+2. l1
+
+ For UNIX/LINUX, possibly cygwin, although I haven't tried.
+
+ It is a replacement for latex that brings up a window there are
+ errors. It first runs latex to completion (without a stop if
+ there are errors). Then if there are errors, it makes their
+ description (from the log file) into a dvi file, which it brings
+ up in a separate window.
+
+ Advantage:
+
+ Automatic display of log file, in middle of workflow when using
+ latexmk in preview-continuous mode.
+
+ Disadvantage:
+
+ Log files are verbose. A single line error message in a latex
+ run is often easier to read.
+
+ Thanks: Tom Schneider
+
+
+3. l2
+
+ A version of l1 with command-line options for changing its
+ behavior.
+
+
+4. kickxdvi
+
+ A script for making xdvi update its display. Used by l1.
+
+5. dvipdfm_call
+ dvipdfmx_call
+ dvipdfm_call.bat
+ dvipdfmx_call.bat
+
+ Scripts for using dvipdfm or dvipdfmx from latexmk. They solve
+ the problem that when latexmk converts dvi files to pdf, it
+ assumes that it is using dvipdf. If you reconfigure latexmk to
+ use dvipdfm or dvipdfmx, the command line arguments are wrong, and
+ you will get an error message. The scripts dvipdfm_call and
+ dvipdfmx_call do the appropriate conversion of the command-line
+ arguments.
+
+ For Unix-like systems, including linux and Mac OS-X, use the
+ scripts dvipdfm_call and dvipdfmx_call.
+ For MS-Windows systems use the batch files dvipdfm_call.bat and
+ dvipdfmx_call.bat.
+
+ To use these scripts: install the scripts/batch files as
+ appropriate, and configure one of latexmk's initialization files
+ to use the script you need. The correct configuration will have
+ one of the lines
+
+ $dvipdf = 'dvipdfm_call';
+ or
+ $dvipdf = 'dvipdfmx_call';
+
+ Then you will need to set to use the dvipdf method of making pdf
+ files, either on latexmk's command line, or in a configuration
+ file with the line
+
+ $pdf_mode = 3;
+
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call
new file mode 100644
index 00000000000..896dce71fc6
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Run dvipdfm from dvipdf-style command-line
+# Assume no options specified
+# If this script is called from latexmk,
+# we have $1=source.dvi, $2=dest.pdf
+# But for safety, let's handle correctly a one argument call,
+# i.e., $1=source, with no $2
+
+if [ "$2" = "" ]; then
+ dvipdfm $1
+else
+ dvipdfm -o $2 $1
+fi
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call.bat b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call.bat
new file mode 100755
index 00000000000..a0817015fe6
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfm_call.bat
@@ -0,0 +1,19 @@
+@echo off
+REM Run dvipdfm from dvipdf-style command-line
+REM Assume no options specified
+REM If this script is called from latexmk,
+REM we have %1=source.dvi, %2=dest.pdf
+REM But for safety, let's handle correctly a one argument call,
+REM i.e., %1=source, with no %2
+
+if "%2" == "" goto onearg
+
+:twoarg
+dvipdfm -o %2 %1
+goto done
+
+:onearg
+dvipdfm %1
+
+
+:done \ No newline at end of file
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call
new file mode 100644
index 00000000000..9ff04c4bdc2
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Run dvipdfmx from dvipdf-style command-line
+# Assume no options specified
+# If this script is called from latexmk,
+# we have $1=source.dvi, $2=dest.pdf
+# But for safety, let's handle correctly a one argument call,
+# i.e., $1=source, with no $2
+
+if [ "$2" = "" ]; then
+ dvipdfmx $1
+else
+ dvipdfmx -o $2 $1
+fi
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call.bat b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call.bat
new file mode 100755
index 00000000000..0068de2196d
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/dvipdfmx_call.bat
@@ -0,0 +1,19 @@
+@echo off
+REM Run dvipdfmx from dvipdf-style command-line
+REM Assume no options specified
+REM If this script is called from latexmk,
+REM we have %1=source.dvi, %2=dest.pdf
+REM But for safety, let's handle correctly a one argument call,
+REM i.e., %1=source, with no %2
+
+if "%2" == "" goto onearg
+
+:twoarg
+dvipdfmx -o %2 %1
+goto done
+
+:onearg
+dvipdfmx %1
+
+
+:done \ No newline at end of file
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/kickxdvi b/Master/texmf-dist/doc/support/latexmk/extra-scripts/kickxdvi
new file mode 100644
index 00000000000..f0809637aa2
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/kickxdvi
@@ -0,0 +1,22 @@
+#!/bin/csh -f
+#(ie run the cshell on this but don't read the .cshrc)
+
+echo version = 1.05 of kickxdvi 2002 Nov 12
+# 2002 Nov 12, 1.05: (John Collins) Simplify
+# 2002 Nov 5, 1.04: (John Collins) Simplify
+# 2002 Oct 21, 1.04: functional!
+# origin 1999Feb15.17:23:04
+
+echo refresh xdvi processes:
+
+# It picks up multiple processes just fine.
+
+set whoami = `whoami`
+
+set pid=`ps -f -u $whoami | grep xdvi.bin | grep -v grep | cut -c10-14`
+if ( "$pid" != "" ) then
+ echo pid: $pid
+ /usr/bin/kill -s USR1 $pid
+else
+ echo No xdvi.bin processes
+endif
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/l1 b/Master/texmf-dist/doc/support/latexmk/extra-scripts/l1
new file mode 100644
index 00000000000..cf8d1c4b643
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/l1
@@ -0,0 +1,122 @@
+#!/bin/csh -f
+#(ie run the cshell on this but don't read the .cshrc)
+
+clear
+echo version = 2.17 of l 2002 Nov 5
+# 2002 Nov 5, 2.17: (John Collins) Make work with latexmk
+# 2002 Oct 21, 2.16: replace popcross with kickxdvi
+# 2000 Mar 6, 2.14: done is created as a directory (more useful than a file)
+# 1999 Nov 18: removal of a paper triggers bibtex call now
+# 1999 Aug 19: when done, `touch done` so that other
+# programs can be triggered (ie latex2html!)
+
+set myname=l1
+
+if ( "$1" == "") then
+ set paper=paper
+else
+ set paper=$1
+endif
+
+if ( "$paper:e" == "" ) then
+ set base=$paper
+ set paper=${base}.tex
+else
+ set base=$paper:r
+endif
+
+if !(-f $paper) then
+ echo $paper does not exist\!
+ exit 1;
+endif
+
+# popcross refreshes the xdvi display by briefly putting
+# a window in front of the xdvi window. This is crude but effective.
+# A better way is to use the kickxdvi routine.
+set kickxdvi = popcross # old method.
+set kickxdvi = kickxdvi
+
+# set overfull = Overfull
+set overfull = NoOverfull
+echo ALL $overfull MESSAGES WILL BE SUPPRESSED
+# see Lamport page 177 for dealing with overfull boxes.
+# basically, do this:
+# \documentclass[12pt,draft]{article}
+# draft will mark the overfull boxes and the solution
+# will become obvious...
+
+# run latex. The cat /dev/null prevents
+# latex from stopping. Errors are reported to paper.log
+cat /dev/null | latex $paper | grep -v $overfull
+
+# determine if there was an error, by looking at paper.log:
+grep "! Emergency stop." $base.log
+@ EmergencyStop = ($status == 0)
+# Also find if no output produced:
+# Examine only the last line of the file to pick out only the
+# message produced by TeX, and not something else with the same
+# string.
+tail -1 $base.log | grep "No pages of output."
+@ NoOutput = ($status == 0)
+
+if ($EmergencyStop || $NoOutput)then
+
+ # begin latexerrors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ echo create and display latex errors
+
+ set err = `whoami`-$base
+ set tmperr = /tmp/$err.tex
+
+ echo "\documentclass[12pt]{article}" > $tmperr
+ echo "\textwidth 7.5in" >> $tmperr
+ echo "\begin{document}" >> $tmperr
+ if ( $EmergencyStop ) then
+ echo "Error(s) in tex file ($paper): " >> $tmperr
+ else if ( $NoOutput ) then
+ echo "No output from tex file ($paper): " >> $tmperr
+ endif
+ echo "\begin{verbatim}" >> $tmperr
+
+ cat $base.log >> $tmperr
+
+ echo "\end{verbatim}" >> $tmperr
+ echo "\end{document}" >> $tmperr
+
+ pushd /tmp
+ latex $err.tex
+ if ( $EmergencyStop ) then
+ echo xdvi display shows the last page of the errors
+ set page = '+'
+ else
+ set page = ''
+ endif
+ xdvi $err.dvi $page &
+ popd
+ # end latexerrors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ cp /tmp/$err.dvi $base.dvi
+ $kickxdvi
+ echo "****************************************"
+ echo "* ERROR IN PAPER - fix paper.tex file\! *"
+ echo "****************************************"
+ # beep
+ echo -n ""
+ sleep 2
+ # beep
+ echo -n ""
+ cd /tmp
+ rm -f $err.aux $err.dvi $err.log $err.tex
+
+ exit 1
+else
+ echo Successful run
+ $kickxdvi
+ if !(-f done || -d done) then
+ mkdir done
+ endif
+ touch done
+
+ exit
+
+endif
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/l2 b/Master/texmf-dist/doc/support/latexmk/extra-scripts/l2
new file mode 100644
index 00000000000..f179bf36a56
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/l2
@@ -0,0 +1,143 @@
+#!/bin/csh -f
+#(ie run the cshell on this but don't read the .cshrc)
+
+# l2: 2002 Nov 12. John Collins.
+# l2: 2002 Nov 11. John Collins.
+# l2: 2002 Nov 6. John Collins.
+# l2: 2002 Nov 5. John Collins. Simplified from l v. 2.17
+
+set myname=l2
+set displayErrors = 0
+set mainCwd = $cwd
+
+
+#alias beep '(echo -n ""; sleep 1; echo -n "")'
+alias beep '(echo -n "")'
+
+
+nextarg:
+if ( "$1" == "-d" ) then
+ set displayErrors=1
+ shift
+ goto nextarg
+endif
+if ( "$1" == "-d-" ) then
+ set displayErrors=0
+ shift
+ goto nextarg
+endif
+
+if ( ("$1" == "") || ("$1" == "-h") || ("$1" == "--help") ) then
+ echo "Usage $myname [-d|-d-] paper.tex"
+ echo ""
+ echo " -d ==> display errors"
+ echo " -d- ==> do not display errors (default)"
+ echo " -h, --help ==> show this message"
+ exit 0
+endif
+
+set paper=$1
+if ( "$paper:e" == "" ) then
+ set base=$paper
+ set paper=${base}.tex
+else
+ set base=$paper:r
+endif
+
+if !(-f $paper) then
+ echo $paper does not exist\!
+ exit 1
+endif
+
+# set overfull = Overfull
+set overfull = NoOverfull
+echo ALL $overfull MESSAGES WILL BE SUPPRESSED
+# see Lamport page 177 for dealing with overfull boxes.
+# basically, do this:
+# \documentclass[12pt,draft]{article}
+# draft will mark the overfull boxes and the solution
+# will become obvious...
+
+# run latex. The cat /dev/null prevents
+# latex from stopping. Errors are reported to paper.log
+cat /dev/null | latex $paper | grep -v $overfull
+
+# determine if there was an error, by looking at paper.log:
+grep "Emergency stop" $base.log
+@ emergencyStop = ($status == 0)
+
+# Also find if no output produced:
+# Examine only the last line of the file to pick out only the
+# message produced by TeX, and not something else with the same
+# string.
+tail -1 $base.log | grep "No pages of output."
+@ noOutput = ($status == 0)
+
+if ($emergencyStop || $noOutput)then
+ # begin latexerrors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ echo create and display latex errors
+ beep&
+ set err = /tmp/`whoami`-$base:t
+ set tmperr = $err.tex
+
+ echo "\documentclass[12pt]{article}" > $tmperr
+ echo "\textwidth 7.5in" >> $tmperr
+ echo "\begin{document}" >> $tmperr
+ if ( $emergencyStop ) then
+ echo "Error(s) in tex file ($paper): " >> $tmperr
+ else if ( $noOutput ) then
+ echo "No output from tex file ($paper): " >> $tmperr
+ endif
+ echo "\begin{verbatim}" >> $tmperr
+
+ cat $base.log >> $tmperr
+
+ echo "\end{verbatim}" >> $tmperr
+ echo "\end{document}" >> $tmperr
+
+ # latex puts its generated files in the current directory, rather
+ # than the directory of the source file. So change to the
+ # temporary directory, and run latex with the path removed from the
+ # filename argument:
+ pushd /tmp
+ latex $err:t
+ popd
+
+ # Give the original latex file a valid dvi file containing the error log.
+ cp $err.dvi $base.dvi
+
+ # Make a dummy aux file. And also make a .aux.bak file. This
+ # solves the following:
+ # 1. Sometimes a run with errors results from or has produced
+ # a bad .aux file. This gets read in on the next run and
+ # an infinite error loop results unless the .aux file is
+ # deleted or replaced by something innocuous.
+ # 2. Latexmk is liable to make extra runs of latex after an
+ # error is produced. In simple cases, this can be avoided
+ # if the aux file is later than the tex file and the
+ # aux.bak file has the same contents.
+ echo "\relax" > $base.aux
+ echo "\relax" > $base.aux.bak
+
+ rm -f $err.aux $err.log $err.tex
+
+ if ( $displayErrors) then
+ # Popup a new window containing the error log
+ if ( $emergencyStop ) then
+ echo xdvi display shows the last page of the errors
+ set page = '+'
+ else
+ set page = ''
+ endif
+ xdvi $err.dvi $page &
+ sleep 2
+ endif
+ rm -f $err.dvi
+
+ exit 1
+ # end latexerrors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+else
+ echo Successful run
+ exit 0
+endif
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk b/Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk
new file mode 100644
index 00000000000..8e74f40c6e7
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk
@@ -0,0 +1,50 @@
+#! /bin/bash
+# pst2pdf_for_latexmk
+# PSTricks 2 PDF converter :
+# Usage:
+# pst2pdf_for_latexmk
+# produces PDF files for all files of the form *-fig*.tex
+# pst2pdf_for_latexmk <FILE>
+# only considers FILE-fig*.tex
+
+# Modified from pst2pdf distributed with pdftricks.sty to use latexmk
+
+# IT REQUIRES VERSION 3.21 OR HIGHER OF latexmk
+# See http://www.phys.psu.edu/~collins/software/latexmk/versions.html
+# The version on CTAN is not yet updated
+
+# For each pdf file will only be made if the tex source is out-of-date
+# This version of pst2pdf does not clean up generated files: they are
+# needed by latexmk to determine whether or not the pdf file is
+# out-of-date.
+#
+# To use this automatically with latexmk (linux/UNIX system assumed)
+# 1. Install this script (pst2pdf_for_latexmk) somewhere in your PATH
+# 2. Put a line like the following in an initialization file for latexmk:
+# $pdflatex = 'pdflatex %O %S; pst2pdf_for_latexmk %B';
+
+# 1 Oct 2007 John Collins: Remove path from latexmk
+# 28 Sep 2007 Herb Schulz processing steprs of figure files changed for no rotation and better BoundingBox
+# 27 Sep 2007 John Collins
+# 26 Sep 2007 John Collins
+
+Myname='Pst2pdf_for_latexmk'
+myname='pst2pdf_for_latexmk'
+
+echo "This is $myname modified to use latexmk, by John Collins"
+
+FILE=$1
+if test -z $FILE; then
+ FIGURES=`ls *-fig*.tex`;
+else
+ FIGURES=`ls -- $FILE-fig*.tex`;
+fi
+
+
+if test -z "$FIGURES"; then
+ echo $Myname: No files to process
+else
+ echo $Myname: Using latexmk to process: $FIGURES
+# latexmk -pdfdvi -ps- -dvi- -e '$dvipdf = q{dvips -E -o %B.eps %S && epstopdf %B.eps --outfile=%D}' $FIGURES
+ latexmk -pdfdvi -ps- -dvi- -e '$dvipdf = q{dvips -o %B.ps %S ; ps2pdf13 -dAutoRotatePages=/None %B.ps ; pdfcrop %B.pdf ; /bin/mv %B-crop.pdf %D}' $FIGURES
+fi
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk_README.txt b/Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk_README.txt
new file mode 100644
index 00000000000..5ca55862666
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/pst2pdf_for_latexmk_README.txt
@@ -0,0 +1,13 @@
+Pdftricks implementation for TeXShop.
+
+The files ``pdftricksmkrc'' and ``pst2pdf_for_latexmk'' (as well as latexmk, etc.) are stored in ~/Library/TeXShop/bin/
+
+The file pdftrciskmk.engine is stored in ~/Library/TeXShop/Engines/.
+
+When instructed to Typeset a the file TeXShop cd's to the tex files directory and calls pdftricksmk.engine passing the file name (with extension). This executes latexmk using the pdftricksmkrc file for initialization.
+
+The call to pdflatex in the rc file DOES use shell escape (just in case eps files are also being input using epstopdf) so you MUST use the [noshell] option for pdftricks (\usepackage[noshell]{pdftricks}) to avoid a run condition.
+
+The processing steps I use for the -fig* files differs from that used in the standard pdftricks (and what you used). We've discovered that the original processing sometimes rotates figures and also sometimes produces a BoundingBox that cuts off descenders on letters at the edge of the figure. (I've changed my pdftricks package to use these steps too and have let the authors of that package know.)
+
+So far it seems to work. I'll get to work on a pst-pdf package example but, now that I'm beginning to understand what is happening with your new extensions to latexmk, I also suspect it should be fairly easy to accomodate that package. I don't see a case where anyone would use both pdftricks and pst-pdf while I do see cases where eps images, included using epstopdf, will be mixed with pstricks type images.
diff --git a/Master/texmf-dist/doc/support/latexmk/extra-scripts/startacroread b/Master/texmf-dist/doc/support/latexmk/extra-scripts/startacroread
new file mode 100644
index 00000000000..a1e98fce6b6
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/extra-scripts/startacroread
@@ -0,0 +1,231 @@
+#!/bin/bash
+
+# -------------------------------------------------------------------
+#
+# Shell program to start an instance of "acroread" on localhost via
+# "pdfopen" and call "pdfopen" again every time when catching the SIGUSR1
+# signal. This provides the same behaviour as "xdvi" for reloading changed
+# files. Acrobat Reader doesn't come with a "watch file" option, hence
+# this workaround, sigh...
+#
+# Copyright 2005, Thorsten Bonow
+# ( thorsten.bonow at post.rwth-aachen.de ).
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# Description:
+#
+#
+#
+# Usage:
+#
+# startacrobat [ -h | --help ] [PDF document]
+#
+# Options:
+#
+# -h, --help Display this help message and exit.
+#
+# Known Bugs:
+#
+# No other instance of Acrobat Reader should be running: this script kills
+# all of them on exit!
+#
+# Revision History:
+#
+# 01/05/2005 Initial version, adapted from "startxpdf"
+# 28/08/2005 Adapted to "pdfopen" and "acrobat"
+# 01/14/2006 Use HUP or USR1 signal for update to be fully
+# compatible with latexmk 3.07 and 3.08
+# (modification by John Collins (collins at phys.psu.edu))
+#
+#
+# -------------------------------------------------------------------
+
+
+# -------------------------------------------------------------------
+# Constants
+# -------------------------------------------------------------------
+
+ PROGNAME=$(basename $0)
+ VERSION="0.95A"
+ ACRO_RELOAD_EXEC="pdfopen --file"
+ ACROBAT_EXEC="acroread"
+
+# -------------------------------------------------------------------
+# Functions
+# -------------------------------------------------------------------
+
+
+function clean_up
+{
+
+# -----------------------------------------------------------------------
+# Function to kill remote instance of acrobat
+# No arguments
+# -----------------------------------------------------------------------
+
+ return
+}
+
+
+function error_exit
+{
+
+# -----------------------------------------------------------------------
+# Function for exit due to fatal program error
+# Accepts 1 argument:
+# string containing descriptive error message
+# -----------------------------------------------------------------------
+
+
+ echo "${PROGNAME}: ${1:-"Unknown Error"}" >&2
+ clean_up
+ exit 1
+}
+
+
+function graceful_exit
+{
+
+# -----------------------------------------------------------------------
+# Function called for a graceful exit
+# No arguments
+# -----------------------------------------------------------------------
+
+ clean_up
+ exit
+}
+
+
+function usage
+{
+
+# -----------------------------------------------------------------------
+# Function to display usage message (does not exit)
+# No arguments
+# -----------------------------------------------------------------------
+
+ echo "Usage: ${PROGNAME} [-h | --help] [PDF document]"
+}
+
+
+function helptext
+{
+
+# -----------------------------------------------------------------------
+# Function to display help message for program
+# No arguments
+# -----------------------------------------------------------------------
+
+ local tab=$(echo -en "\t\t")
+
+ cat <<- -EOF-
+
+ ${PROGNAME} ver. ${VERSION}
+ Shell program to start an instance of "acroread" on localhost via
+ "acro-reload" and call "acro-reload" again every time when catching the
+ SIGUSR1 signal. This provides the same behaviour as "xdvi" for reloading
+ changed files. Acrobat Reader doesn't come with a "watch file" option,
+ hence this workaround, sigh...
+
+ $(usage)
+
+ Options:
+
+ -h, --help Display this help message and exit.
+
+
+
+
+-EOF-
+}
+
+
+function signal_handle
+{
+
+# -----------------------------------------------------------------------
+# Function to handle signals
+# Accepts 1 argument:
+# signal_spec
+# -----------------------------------------------------------------------
+
+ case $1 in
+ INT) echo "$PROGNAME: Program aborted by user" >&2
+ clean_up
+ exit
+ ;;
+ TERM) echo "$PROGNAME: Program terminated" >&2
+ clean_up
+ exit
+ ;;
+ USR1) echo "$PROGNAME: Reloading..." >&2
+ $ACRO_RELOAD_EXEC $PDF_FILE
+ ;;
+ *) error_exit "$PROGNAME: Terminating on unknown signal"
+ ;;
+ esac
+}
+
+
+# -------------------------------------------------------------------
+# Program starts here
+# -------------------------------------------------------------------
+
+
+##### Command Line Processing #####
+
+if [ "$1" = "--help" ]; then
+ helptext
+ graceful_exit
+fi
+
+while getopts ":h" opt; do
+ case $opt in
+
+ h ) helptext
+ graceful_exit ;;
+ * ) usage
+ clean_up
+ exit 1
+ esac
+done
+
+PDF_FILE="$1"
+
+##### Initialization And Setup #####
+
+# Trap TERM and INT signals and properly exit
+
+trap "signal_handle TERM" TERM
+trap "signal_handle INT" INT
+
+# Trap HUP and USR1 signals for reloading the PDF document
+# Convert to USR1
+# (Note HUP is used by gv, and USR1 by xdvi, so both signals have precedent)
+
+trap "signal_handle USR1" HUP USR1
+
+
+##### Main Logic #####
+
+$ACRO_RELOAD_EXEC $PDF_FILE
+
+while [ 1 ];
+ do
+ # sleeps again after being interrupted by SIGUSR1, breaks if Acrobat Reader is
+ # killed
+ sleep 1
+ eval pgrep "-f" "$ACROBAT_EXEC" ">/dev/null" || break
+done
+
+graceful_exit
+
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.1 b/Master/texmf-dist/doc/support/latexmk/latexmk.1
new file mode 100644
index 00000000000..aee2530b2c1
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.1
@@ -0,0 +1,1476 @@
+.TH LATEXMK 1L "28 September 2008" ""
+.SH NAME
+latexmk \- generate LaTeX document
+.SH SYNOPSIS
+.B latexmk [options] [file ...]
+.SH DESCRIPTION
+.I Latexmk
+completely automates the process of compiling a LaTeX document.
+Essentially, it is like a specialized relative of the general
+\fImake\fR utility, but one which determines dependencies
+automatically and has some other very useful features. In its basic
+mode of operation \fIlatexmk\fR is given the name of the primary
+source file for a document, and it issues the appropriate sequence of
+commands to generate a .dvi, .ps, .pdf and/or hardcopy version of the
+document.
+.PP
+\fILatexmk\fR can also be set to run continuously with a suitable
+previewer. In that case the LaTeX program, etc, are rerun whenever
+one of the source files is modified, and the previewer automatically
+updates the on-screen view of the compiled document.
+.PP
+\fILatexmk\fR determines which are the source files by examining the
+log file. When \fIlatexmk\fR is run, it examines properties of the
+source files, and if any have been changed since the last document
+generation, \fIlatexmk\fR will run the various LaTeX processing
+programs as necessary. In particular, it will repeat the run of LaTeX
+(or pdflatex) often enough to resolve all cross references; depending
+on the macro packages used. With some macro packages and document
+classes, four, or even more, runs may be needed. If necessary,
+\fIlatexmk\fR will also run bibtex and/or makeindex. In addition,
+\fIlatexmk\fR can be configured to generate other necessary files.
+For example, from an updated figure file it can automatically generate
+a file in encapsulated postscript or another suitable format for
+reading by LaTeX.
+.PP
+\fILatexmk\fR has two different previewing options. In the simple
+\fB-pv\fR option, a dvi, postscript or pdf previewer is automatically
+run after generating the dvi, postscript or pdf version of the
+document. The type of file to view is selected according to
+configuration settings and command line options.
+.PP
+The second previewing option is the powerful \fB-pvc\fR option
+(mnemonic: "preview continuously"). In this case, \fIlatexmk\fR runs
+continuously, regularly monitoring all the source files to see if any
+have changed. Every time a change is detected, \fIlatexmk\fR runs all
+the programs necessary to generate a new version of the document. A
+good previewer (like \fIgv\fR) will then automatically update its
+display. Thus the user can simply edit a file and, when the changes
+are written to disk, \fIlatexmk\fR completely automates the cycle of
+updating the .dvi (and possibly the .ps and .pdf) file, and refreshing
+the previewer's display. It's not quite WYSIWYG, but usefully close.
+.PP
+For other previewers, the user may have to manually make the previewer
+update its display, which can be (some versions of xdvi and gsview) as
+simple as forcing a redraw of its display.
+.PP
+\fILatexmk\fR has the ability to print a banner in gray diagonally
+across each page when making the postscript file. It can also, if
+needed, call an external program to do other postprocessing on the
+generated files.
+.PP
+\fILatexmk\fR is highly configurable, both from the command line and
+in configuration files, so that it can accommodate a wide variety of
+user needs and system configurations. Default values are set
+according to the operating system, so \fIlatexmk\fR often works
+without special configuration on MS-Windows, cygwin, Linux, OS-X, and
+other UNIX systems (notably Solaris).
+.PP
+A very annoying complication handled very reliably by \fILatexmk\fR,
+is that LaTeX is a multiple pass system. On each run, LaTeX reads in
+information generated on a previous run, for things like cross
+referencing and indexing. In the simplest cases, a second run of
+LaTeX suffices, and often the log file contains a message about the
+need for another pass. However, there is a wide variety of add-on
+macro packages to LaTeX, with a variety of behaviors. The result is
+to break simple-minded determinations of how many runs are needed and
+of which programs. In its new version, \fIlatexmk\fR has a highly
+general and efficient solution to these issues. The solution involves
+retaining between runs information on the source files, and a symptom
+is that \fIlatexmk\fR generates an extra file (with extension
+\fR.fdb_latexmk\fR, by default) that contains the source file
+information.
+
+.SH LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
+(All options can be introduced by single or double "-" characters,
+e.g., "latexmk -help" or "latexmk --help".)
+.TP
+.B file
+One or more files can be specified. If no files are specified,
+\fIlatexmk\fR will, by default, run on all files in the current working directory
+with a ".tex" extension. This behavior can be changed: see the
+description concerning the \fI@default_files\fR variable in the
+section "List of configuration variables usable in initialization
+files".
+.PP
+If a file is specified without an extension, then the ".tex" extension
+is automatically added, just as LaTeX does. Thus, if you specify:
+
+ latexmk foo
+
+then \fIlatexmk\fR will operate on the file "foo.tex".
+.TP
+.B -bm <message>
+A banner message to print diagonally across each page when converting
+the dvi file to postscript. The message must be a single argument on
+the command line so be careful with quoting spaces and such.
+
+Note that if the \fB-bm\fR option is specified, the \fB-ps\fR option is
+assumed.
+.TP
+.B -bi <intensity>
+How dark to print the banner message. A decimal number between 0 and 1.
+0 is black and 1 is white. The default is 0.95, which is OK unless your
+toner cartridge is getting low.
+.TP
+.B -bs <scale>
+A decimal number that specifies how large the banner message will be
+printed. Experimentation is necessary to get the right scale for your
+message, as a rule of thumb the scale should be about equal to 1100
+divided by the number of characters in the message. The default is 220.0
+which is just right for 5 character messages.
+.TP
+.B -commands
+List the commands used by \fIlatexmk\fR for processing files, and then
+exit.
+.TP
+.B -c
+Clean up (remove) all regeneratable files generated by \fIlatex\fR and
+\fIbibtex\fR except dvi, postscript and pdf. These files are a
+combination of log files, aux files, and those with extensions
+specified in the \fI@generated_exts\fR configuration variable. In addition,
+files with extensions by the \fI$clean_ext\fR configuration variable are
+removed. But the file containing a database of source file
+information is not removed.
+
+This cleanup is instead of a regular make. See the \fB-gg\fR option
+if you want to do a cleanup then a make.
+.TP
+.B -C
+Clean up (remove) all regeneratable files generated by \fIlatex\fR and
+\fIbibtex\fR. This is the same as the \fB-c\fR option with the
+addition of dvi, postscript and pdf files, and those with extensions
+in the \fI$clean_full_ext\fR configuration variable.
+
+This cleanup is instead of a regular make. See the \fB-gg\fR option
+if you want to do a cleanup than a make.
+.TP
+.B -CA
+Clean up (remove) absolutely all regeneratable files. This is the
+action specified by \fB-C\fR with the addition of deleting the file
+containing the database of source file information.
+
+This cleanup is instead of a regular make. It is the same as \fB-C
+-CF\fR. See the \fB-gg\fR option if you want to do a cleanup then a
+make.
+.TP
+.B -CF
+Remove the file containing the database of source file information,
+before doing the other actions requested.
+.TP
+.B -d
+Set draft mode. This prints the banner message "DRAFT" across your
+page when converting the dvi file to postscript. Size and intensity
+can be modified with the \fB-bs\fR and \fB-bi\fR options. The \fB-bm\fR
+option will override this option as this is really just a short way of
+specifying:
+
+ latexmk -bm DRAFT
+
+Note that if the \fB-d\fR option is specified, the \fB-ps\fR option is
+assumed.
+.TP
+.B -dF
+Dvi file filtering. The argument to this option is a filter which will
+generate a filtered dvi file with the extension ".dviF". All extra
+processing (e.g. conversion to postscript, preview, printing) will then
+be performed on this filtered dvi file.
+
+Example usage: To use dviselect to select only the even pages of the dvi file:
+
+ latexmk -dF 'dviselect even' foo.tex
+.TP
+.B -diagnostics
+Print detailed diagnostics during a run. This may help for debugging
+problems or to understand \fI.latexmk\fR's behavior in difficult
+situations.
+.TP
+.B -dvi
+Generate dvi version of document.
+.TP
+.B -dvi-
+Turn off generation of dvi version of document. (This may get
+overridden, if some other file is made (e.g., a .ps file) that is
+generated from the dvi file, or if no generated file at all is
+requested.)
+.TP
+.B -e <code>
+Execute the specified initialization code before processing. The code
+is \fIPerl\fR code of the same form as is used in \fIlatexmk\fR's
+initialization files -- for more details, see the information on the
+\fB-r\fR option, and the section about "Configuration/initialization
+(RC) files". The code is typically a sequence of assignment
+statements separated by semicolons.
+
+The code is executed when the \fB-e\fR option is encountered during
+\fIlatexmk\fR's parsing of its command line. See the \fB-r\fR option
+for a way of executing initialization code from a file. An error
+results in \fIlatexmk\fR stopping. Multiple instances of the \fB-r\fR
+and \fB-e\fR options can be used, and they are executed in the order
+they appear on the command line.
+
+Some care is needed to deal with proper quoting of special characters
+in the code on the command line. For example, suppose it is desired
+to set the latex command to use its -shell-escape option, then under
+UNIX/LINUX you could use the line
+
+ latexmk -e '$latex=q/latex %O -shell-escape %S/' file.tex
+
+(Note that the q/.../ construct is a \fIPerl\fR idiom equivalent to using
+single quotes. This is easier than arranging to get a quote character
+correctly escaped in a way that is independent of the shell and the
+operating-system.)
+.TP
+.B -f
+Force \fIlatexmk\fR to continue document processing despite errors.
+Normally, when \fIlatexmk\fR detects that LaTeX or another program has
+found an error which will not be resolved by further processing, no
+further processing is carried out.
+.TP
+.B -f-
+Turn off the forced processing-past-errors such as is set by the
+\fB-f\fR option. This could be used to override a setting in a
+configuration file.
+.TP
+.B -g
+Force \fIlatexmk\fR to process document fully, even under situations
+where \fIlatexmk\fR would normally decide that no changes in the
+source files have occurred since the previous run.
+This option is useful, for example, if you change some options and
+wish to reprocess the files.
+.TP
+.B -g-
+Turn off \fB-g\fR.
+.TP
+.B -gg
+"Super go mode" or "clean make": clean out generated files as if
+\fB-CA\fR had been given, and then do a regular make.
+.TP
+.B -h, -help
+Print help information.
+.TP
+.B -l
+Run in landscape mode, using the landscape mode for the previewers and
+the dvi to postscript converters. This option is not normally needed
+nowadays, since current previewers normally determine this information
+automatically.
+.TP
+.B -l-
+Turn off \fB-l\fR.
+.TP
+.B -new-viewer
+When in continuous-preview mode, always start a new viewer to view the
+generated file. By default, \fIlatexmk\fR will, in continuous-preview
+mode, test for a previously running previewer for the same file and
+not start a new one if a previous previewer is running. However, its
+test sometimes fails (notably if there is an already-running previewer
+that is viewing a file of the same name as the current file, but in a
+different directory). This option turns off the default behavior.
+.TP
+.B -new-viewer-
+The inverse of the \fB-new-viewer\fR option. It puts \fIlatexmk\fR
+in its normal behavior that in preview-continuous mode it checks for
+an already-running previewer.
+.TP
+.B -p
+Print out the document. By default it is
+the generated postscript file that is printed. But you can use the
+\fB-print=...\fR option to print the dvi or pdf files instead, and you
+can configure this in a start up file (by setting the
+\fI$print_type\fR variable).
+
+However, printing is enabled by default only under UNIX/LINUX systems,
+where the default is to use the lpr command. In general, the correct
+behavior for printing very much depends on your system's software. In
+particular, under MS-Windows you must have suitable program(s)
+available, and you must have configured the print commands used by
+\fIlatexmk\fR. This can be non-trivial. See the documentation on the
+\fI$lpr\fR, \fI$lpr_dvi\fR, and \fI$lpr_pdf\fR configuration variables
+to see how to set the commands for printing.
+
+This option is incompatible with the \fB-pv\fR and \fB-pvc\fR options,
+so it turns them off.
+.TP
+.B -pdf
+Generate pdf version of document using pdflatex.
+.TP
+.B -pdfdvi
+Generate pdf version of document from the dvi file, by default using dvipdf.
+.TP
+.B -pdfps
+Generate pdf version of document from the ps file, by default using
+ps2pdf.
+.TP
+.B -pdf-
+Turn off generation of pdf version of document.
+(This can be used to override a setting in a configuration file.
+It may get overridden if some other option requires the generation of
+a pdf file.)
+.TP
+.B -print=dvi, -print=ps, -print=pdf
+Define which kind of file is printed. This option also ensures that
+the requisite file is made, and turns on printing. The default is to
+print a postscript file.
+.TP
+.B -ps
+Generate postscript version of document.
+.TP
+.B -ps-
+Turn off generation of postscript version of document.
+This can be used to override a setting in a configuration file.
+(It may get overridden by some other option that requires a postscript
+file, for example a request for printing.)
+.TP
+.B -pF
+Postscript file filtering. The argument to this option is a filter
+which will generate a filtered postscript file with the extension
+".psF". All extra processing (e.g. preview, printing) will then be
+performed on this filtered postscript file.
+
+Example of usage: Use psnup to print two pages on the one page:
+
+ latexmk -ps -pF 'psnup -2' foo.tex
+
+or
+
+ latexmk -ps -pF "psnup -2" foo.tex
+
+Whether to use single or double quotes round the "psnup -2" will
+depend on your command interpreter, as used by the particular version
+of perl and the operating system on your computer.
+.TP
+.B -pv
+Run file previewer. If the \fB-view\fR option is used, this will select
+the kind of file to be previewed (dvi, ps or pdf).
+Otherwise the viewer views the "highest" kind of file selected, by the
+\fB-dvi\fR, \fB-ps\fR, \fB-pdf\fR, \fB-pdfps\fR options, in the
+order dvi, ps, pdf (low to high).
+If no file type has been selected, the dvi previewer will be used.
+This option is incompatible with the \fB-p\fR and \fB-pvc\fR options,
+so it turns them off.
+.TP
+.B -pv-
+Turn off \fB-pv\fR.
+.TP
+.B -pvc
+Run a file previewer and continually update the .dvi, .ps, and/or .pdf
+files whenever changes are made to source files (see the Description
+above). Which of these files is generated and which is viewed is
+governed by the other options, and is the same as for the \fB-pv\fR
+option.
+The preview-continuous option \fB-pvc\fR can only work with one file.
+So in this case you will normally only specify one filename on
+the command line. It is also incompatible with the
+\fB-p\fR and \fB-pv\fR options, so it turns these options off
+
+With a good previewer the display will be automatically updated.
+(Under \fIsome but not all\fR versions of UNIX/Linux "gv -watch" does
+this for postscript files; this can be set by a configuration
+variable. This would also work for pdf files except for an apparent
+bug in gv that causes an error when the newly updated pdf file is
+read.) Many other previewers will need a manual update.
+
+Important note: the acroread program on MS-Windows locks the pdf file,
+and prevents new versions being written, so it is a bad idea to use
+acroread to view pdf files in preview-continuous mode. It is better
+to use a dvi or ps viewer, as set by one of the \fB-view=dvi\fR and
+\fB-view=ps\fR options.
+
+There are some other methods for arranging an update, notably useful
+for many versions of xdvi and xpdf. These are best set in
+\fIlatexmk\fR's configuration; see below.
+
+Note that if \fIlatexmk\fR dies or is stopped by the user, the
+"forked" previewer will continue to run. Successive invocations with
+the \fB-pvc\fR option will not fork new previewers, but \fIlatexmk\fR
+will normally use the existing previewer. (At least this will happen
+when \fIlatexmk\fR is running under an operating system where it knows
+how to determine whether an existing previewer is running.)
+.TP
+.B -pvc-
+Turn off \fB-pvc\fR.
+.TP
+.B -quiet
+Same as -silent
+.TP
+.B -r <rcfile>
+Read the specified initialization file ("RC file") before processing.
+
+Be careful about the ordering: (1) Standard initialization files --
+see the section below on "Configuration/initialization (RC) files" --
+are read first. (2) Then the options on the command line are acted on
+in the order they are given. Therefore if an initialization file is
+specified by the \fB-r\fR option, it is read during this second step.
+Thus an initialization file specified with the \fB-r\fR option can
+override both the standard initialization files and \fIpreviously\fR
+specified options. But all of these can be overridden by \fIlater\fR
+options.
+
+The contents of the RC file just comprise a piece of code in the
+\fIPerl\fR programming language
+(typically a sequence of assignment statements); they are executed
+when the \fB-r\fR option is encountered during \fIlatexmk\fR's parsing
+of its command line. See the \fB-e\fR option for a way of giving
+initialization code directly on \fIlatexmk\fR's command line. An
+error results in \fIlatexmk\fR stopping. Multiple instances of the
+\fB-r\fR and \fB-e\fR options can be used, and they are executed in
+the order they appear on the command line.
+.TP
+.B -silent
+Run commands silently, i.e., with options that reduce the amount of
+diagnostics generated. For example, with the default settings for
+commands under UNIX, the command "latex -interaction=batchmode" is used
+for latex.
+
+Also reduce the number of informational messages that \fIlatexmk\fR
+generates.
+.TP
+.B -v, -version
+Print version number of \fIlatexmk\fR.
+.TP
+.B -verbose
+Opposite of \fB-silent\fR. This is the default setting.
+.TP
+.B -view=default, -view=dvi, -view=ps, -view=pdf
+Set the kind of file used when previewing is requested (e.g., by the
+\fB-pv\fR or \fB-pvc\fR switches). The default is to view the "highest"
+kind of requested file (in the order dvi, ps, pdf).
+.PP
+The preview-continuous option \fB-pvc\fR can only work with one file.
+So in this case you will normally only specify one filename on
+the command line.
+.PP
+Options \fB-p\fR, \fB-pv\fR and \fB-pvc\fR are mutually exclusive. So
+each of these options turns the others off.
+
+.SH EXAMPLES
+.nf
+.ta 2i
+% \fBlatexmk thesis\fR \fI# run latex enough times to resolve
+ cross-references\fR
+
+% \fBlatexmk -pvc -ps thesis\fR \fI# run latex enough times to resolve
+ cross-references, make a postscript
+ file, start a previewer. Then
+ watch for changes in the source
+ file thesis.tex and any files it
+ uses. After any changes rerun latex
+ the appropriate number of times and
+ remake the postscript file. If latex
+ encounters an error, latexmk will
+ keep running, watching for
+ source file changes.
+
+% \fBlatexmk -c\fR \fI# remove .aux, .log, .bbl, .blg, .dvi,
+ .pdf, .ps & .bbl files\fR
+
+
+.SH CONFIGURATION/INITIALIZATION (RC) FILES
+.PP
+\fILatexmk\fR can be customized using initialization files, which are
+read at startup in the following order:
+.PP
+1) The system RC file, if it exists.
+ On a UNIX system, \fIlatexmk\fR searches for following places for its
+system RC file, in the following order, and reads the first it finds:
+ "/opt/local/share/latexmk/LatexMk",
+ "/usr/local/share/latexmk/LatexMk",
+ "/usr/local/lib/latexmk/LatexMk".
+ On a MS-WINDOWS system it looks for "C:\\latexmk\\LatexMk".
+.PP
+2) The user's RC file, "$HOME/.latexmkrc", if it exists. Here $HOME
+is the value of the environment variable HOME. On UNIX and clones
+(including LINUX), this variable is set by the system; on MS-Windows,
+the user may choose to set it.
+.PP
+3) The RC file in the current working directory. This file can be
+named either "latexmkrc" or ".latexmkrc", and the first of these to be
+found is used, if any.
+.PP
+4) Any RC file(s) specified on the command line with the \fB-r\fR option.
+.PP
+Each RC file is a sequence of \fIPerl\fR commands. Naturally, a user can use
+this in creative ways. But for most purposes, one simply uses a
+sequence of assignment statements that override some of the built-in
+settings of \fILatexmk\fR. Straightforward cases can be handled
+without knowledge of the \fIPerl\fR language by using the examples in this
+document as templates. Comment lines are introduced by the "#"
+character.
+
+Note that command line options are obeyed in the order in which
+they are written; thus any RC file specified on the command line with
+the \fB-r\fR option can override previous options but can be itself
+overridden by later options on the command line. There is also the
+\fB-e\fR option, which allows initialization code to be specified in
+\fIlatexmk\fR's command line.
+
+.SH HOW TO SET VARIABLES IN INITIALIZATION FILES
+.PP
+The important variables that can be configured are described in the
+section "List of configuration variables usable in initialization
+files". Syntax for setting these variables is of the following forms:
+.PP
+ $bibtex = 'bibtex %O %B';
+.PP
+for the setting of a string variable,
+.PP
+ $preview_mode = 1;
+.PP
+for the setting of a numeric variable, and
+.PP
+ @default_files = ('paper', 'paper1');
+.PP
+for the setting of an array of strings. It is possible to append an
+item to an array variable as follows:
+
+ push @default_files, 'paper2';
+
+Note that simple "scalar" variables have names that begin with a $
+character and array variables have names that begin with a @
+character. Each statement ends with a semicolon.
+
+You can do much more complicated things, but for this you will need to
+consult a manual for the \fIPerl\fR programming language.
+
+
+
+.SH FORMAT OF COMMAND SPECIFICATIONS
+
+Some of the variables set the commands that \fIlatexmk\fR uses for
+carrying out its work, for example to generate a dvi file from a tex
+file or to view a postscript file. This section describes some
+important features of how the commands are specified.
+
+\fBPlaceholders\fR: Supposed you wanted \fIlatexmk\fR to use the
+command elatex in place of the regular latex command, and suppose
+moreover that you wanted to give it the option "--shell-escape". You
+could do this by the following setting:
+.PP
+ $latex = 'elatex --shell-escape %O %S';
+.PP
+The two items starting with the % character are placeholders. These
+are substituted by appropriate values before the command is run. Thus
+%S will be replaced by the source file that elatex will be applied to,
+and %O will be replaced by any options that \fIlatexmk\fR has decided
+to use for this command. (E.g., if you used the -silent option it
+would replace %O by "-interaction=batchmode".)
+
+The available placeholders are:
+.TP
+.B %B
+base of filename for current command. E.g., if a postscript file
+document.ps is being made from the dvi file document.dvi, then the
+basename is document.
+.TP
+.B %D
+destination file (e.g., the name of the postscript file when
+converting a dvi file to postscript).
+.TP
+.B %O
+options
+.TP
+.B %R
+root filename. This is the base name for the main tex file.
+.TP
+.B %S
+source file (e.g., the name of the dvi file when converting a dvi file
+to ps).
+.TP
+.B %T
+The name of the primary tex file.
+.PP
+The distinction between %B and %R needs a bit of care, since they are
+often the same, but not always. For example on a simple document, the
+basename of a bibtex run is the same as for the texfile. But in a
+document with several bibliographies, the bibliography files will have
+a variety of names. Since bibtex is invoked with the basename of the
+bibliography file, the setting for the bibtex command should therefore
+be
+.PP
+ $bibtex = 'bibtex %O %B';
+.PP
+Generally, you should use %B rather than %R. Similarly for most
+purposes, the name %T of the primary texfile is not a useful
+placeholder.
+
+See the default values in the section "List of configuration variables
+usable in initialization files" for what is normally the most
+appropriate usage.
+
+If you omit to supply any placeholders whatever in the specification
+of a command, \fIlatexmk\fR will supply what its author thinks are
+appropriate defaults. This gives compatibility with configuration
+files for previous versions of \fIlatexmk\fR, which didn't use
+placeholders.
+
+\fB"Detaching" a command\fR: Normally when \fIlatexmk\fR runs a
+command, it waits for the command to run to completion. This is
+appropriate for commands like latex, of course. But for previewers,
+the command should normally run detached, so that \fIlatexmk\fR gets
+the previewer running and then returns to its next task (or exits if
+there is nothing else to do). To achieve this effect of detaching a
+command, you need to precede the command name with "start ", as in
+.PP
+ $dvi_previewer = 'start xdvi %O %S';
+.PP
+This will be translated to whatever is appropriate for your operating
+system.
+
+Notes: (1) In some circumstances, \fIlatex\fR will always run a
+command detached. This is the case for a previewer in preview
+continuous mode, since otherwise previewing continuously makes no
+sense. (2) This precludes the possibility of running a command named
+start. (3) If the word start occurs more than once at the beginning
+of the command string, that is equivalent to having just one. (4)
+Under cygwin, some complications happen, since cygwin amounts to a
+complicated merging of UNIX and MS-Windows. See the source code for
+how I've handled the problem.
+
+\fBCommand names containing spaces\fR: Under MS-Windows it is common
+that the name of a command includes spaces, since software is often
+installed in a subdirectory of "C:\Program Files". Such command names
+should be enclosed in double quotes, as in
+.PP
+ $lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p %S';
+.PP
+\fBUsing MS-Windows file associations\fR: A useful trick under modern
+versions of MS-Windows (e.g., WinXP) is to use just the command
+'start' by itself:
+.PP
+ $dvi_previewer = 'start %S';
+.PP
+Under recent versions of MS-Windows, this will cause to be run
+whatever program the system has associated with dvi files. (The same
+applies for a postscript viewer and a pdf viewer.)
+
+\fBNot using a certain command\fR: If a command is not to be run, the
+command name NONE is used, as in
+.PP
+ $lpr = 'NONE lpr';
+.PP
+This typically is used when an appropriate command does not exist on
+your system. The string after the "NONE" is effectively a comment.
+
+\fBOptions to commands\fR:
+Setting the name of a command can be used not only for changing the
+name of the command called, but also to add options to command.
+Suppose you want \fIlatexmk\fR to use latex with source specials
+enabled. Then you might use the following line in an initialization
+file:
+.PP
+ $latex = 'latex --src-specials %O %S';
+.PP
+
+\fBAdvanced tricks\fR: Normally one specifies a single command for the
+commands invoked by \fIlatexmk\fR. Naturally, if there is some
+complicated additional processing you need to do in your special
+situation, you can write a script (or batch file) to do the
+processing, and then configure \fIlatexmk\fR to use your script in
+place of the standard program.
+
+It is also possible to configure \fIlatexmk\fR to run multiple
+commands. For example, if when running pdflatex to generate a pdf
+file from a tex file you need to run another program after pdflatex to
+perform some extra processing, you could do something like:
+
+ $pdflatex = 'pdflatex --shell-escape %O %S; pst2pdf_for_latexmk %B';
+
+This definition assumes you are using a UNIX-like system, so that the
+two commands to be run are separated by the semicolon in the middle of
+the string.
+
+
+.SH LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
+.PP
+Default values are indicated in brackets.
+.TP
+.B $banner [0]
+If nonzero, the banner message is printed across each page when
+converting the dvi file to postscript. Without modifying the variable
+\fI$banner_message\fR, this is equivalent to specifying the \fB-d\fR
+option.
+
+Note that if \fB$banner\fR is nonzero, the \fB$postscript_mode\fR is
+assumed and the postscript file is always generated, even if it is newer
+than the dvi file.
+.TP
+.B $banner_intensity [0.95]
+Equivalent to the \fB-bi\fR option, this is a decimal number between 0
+and 1 that specifies how dark to print the banner message. 0 is black,
+1 is white. The default is just right if your toner cartridge isn't
+running too low.
+.TP
+.B $banner_message ["DRAFT"]
+The banner message to print across each page when converting the dvi
+file to postscript. This is equivalent to the \fB-bm\fR option.
+.TP
+.B $banner_scale [220.0]
+A decimal number that specifies how large the banner message will be
+printed. Experimentation is necessary to get the right scale for your
+message, as a rule of thumb the scale should be about equal to 1100
+divided by the number of characters in the message. The Default is
+just right for 5 character messages. This is equivalent to the
+\fB-bs\fR option.
+.TP
+.B @BIBINPUTS
+This is an array variable, now mostly obsolete, that specifies
+directories where
+\fIlatexmk\fR should look for .bib files. By default it is set from
+the BIBINPUTS environment variable of the operating system. If that
+environment variable is not set, a single element list consisting of
+the current directory is set. The format of the directory names
+depends on your operating system, of course. Examples for setting
+this variable are:
+
+ @BIBINPUTS = ( ".", "C:\\bibfiles" );
+ @BIBINPUTS = ( ".", "\\\\server\\bibfiles" );
+ @BIBINPUTS = ( ".", "C:/bibfiles" );
+ @BIBINPUTS = ( ".", "//server/bibfiles" );
+ @BIBINPUTS = ( ".", "/usr/local/texmf/bibtex/bib" );
+
+Note that under MS Windows, either a forward slash "/" or a backward
+slash "\(rs" can be used to separate pathname components, so the first
+two and the second two examples are equivalent. Each backward slash
+should be doubled to avoid running afoul of \fIPerl\fR's rules for writing
+strings.
+.PP
+\fIImportant note:\fR This variable is now mostly obsolete in the
+current version of \fIlatexmk\fR,
+since it has a better method of searching for files using the
+kpsewhich command. However, if your system is an unusual one without
+the kpsewhich command, you may need to set the variable \fI@BIBINPUTS\fR.
+.TP
+.B $bibtex ["bibtex %O %S"]
+The BibTeX processing program.
+.TP
+.B $bibtex_silent_switch ["-terse"]
+\fBSwitch(es)\fR for the BibTeX processing program when silent mode is on.
+.TP
+.B $cleanup_mode [0]
+If nonzero, specifies cleanup mode: 1 for full cleanup, 2 for cleanup
+except for dvi, ps and pdf files, 3 for cleanup except for dep and aux
+files. (There is also extra cleaning as specified by the
+\fI$clean_ext\fR, \fI$clean_full_ext\fR and \fI@generated_exts\fR
+variables.)
+.PP
+This variable is equivalent to specifying one of
+the \fB-c\fR, \fB-c1\fR, or \fB-C\fR options. But there should be no need
+to set this variable from an RC file.
+.TP
+.B $clean_ext [""]
+Extra extensions of files for \fIlatexmk\fR to remove when any of the
+clean-up options (\fB-c\fR, \fB-c1\fR, or \fB-C\fR) is selected.
+The value of this variable is a string containing the extensions
+separated by spaces.
+.TP
+.B $clean_full_ext [""]
+Extra extensions of files for \fIlatexmk\fR to remove when the \fB-C\fR
+option is selected, i.e., extensions of files to remove when the .dvi,
+etc files are to be cleaned-up.
+.TP
+.B @cus_dep_list [()]
+Custom dependency list -- see section on "Custom Dependencies".
+.TP
+.B @default_files [("*.tex")]
+Default list of files to be processed.
+
+Normally, if no filenames are specified on the command line,
+\fIlatexmk\fR processes all tex files specified in the \fI@default_files\fR
+variable, which by default is set to all tex files ("*.tex") in the
+current directory. This is a convenience: just run \fIlatexmk\fR and
+it will process an appropriate set of files. But sometimes you want
+only some of these files to be processed. In this case you set the
+\fI@default_files\fR in an initialization file
+(e.g., the file "latexmkrc" in the current directory). Then if no
+files are specified on the command line then the files you specify by
+setting \fI@default_files\fR are processed.
+
+Three examples:
+
+ @default_files = ("paper_current");
+
+ @default_files = ("paper1", "paper2.tex");
+
+ @default_files = ("*.tex", "*.dtx");
+
+Note that more than file may be given, and that the default extension
+is ".tex". Wild cards are allowed. The parentheses are because
+\fI@default_files\fR is an array variable, i.e., a sequence of
+filename specifications is possible.
+.TP
+.B $dvi_filter [empty]
+The dvi file filter to be run on the newly produced dvi file before
+other processing. Equivalent to specifying the \fB-dF\fR option.
+.TP
+.B $dvi_mode [0]
+If nonzero, generate a dvi version of the document.
+Equivalent to the \fB-dvi\fR option.
+.TP
+.B $dvi_previewer ["start xdvi %O %S" under UNIX]
+The command to invoke a dvi-previewer.
+[Default is "start" under MS-WINDOWS; under more recent versions of
+Windows, this will cause to be run whatever command the system has
+associated with .dvi files.]
+.TP
+.B $dvi_previewer_landscape ["start xdvi %O %S"]
+The command to invoke a dvi-previewer in landscape mode.
+[Default is "start" under MS-WINDOWS; under more recent versions of
+Windows, this will cause to be run whatever command the system has
+associated with .dvi files.]
+.TP
+.B $dvipdf ["dvipdf %O %S %D"]
+Command to convert dvi to pdf file. A common reconfiguration is to
+use the dvipdfm command, which needs its arguments in a different order:
+
+ $dvipdf = "dvipdfm %O -o %D %S";
+
+WARNING: The default dvipdf script generates pdf files with bitmapped
+fonts, which do not look good when viewed by acroread. That script
+should be modified to give dvips the options "-P pdf" to ensure that
+type 1 fonts are used in the pdf file.
+.TP
+.B $dvips ["dvips %O -o %D %S"]
+The program to used as a filter to convert a .dvi file to a .ps file.
+If pdf is going to be generated from pdf, then the value of the
+$dvips_pdf_switch -- see below -- will be included in the options
+substituted for "%O".
+.TP
+.B $dvips_landscape ["dvips -tlandscape %O -o %D %S"]
+The program to used as a filter to convert a .dvi file to a .ps file
+in landscape mode.
+.TP
+.B $dvips_pdf_switch ["-P pdf"]
+Switch(es) for dvips program when pdf file is to be generated from
+ps file.
+.TP
+.B $dvips_silent_switch ["-q"]
+Switch(es) for dvips program when silent mode is on.
+.TP
+.B $dvi_update_command [""]
+When the dvi previewer is set to be updated by running a command, this
+is the command that is run. See the information for the variable
+\fI$dvi_update_method\fR for further information, and see information
+on the variable \fI$pdf_update_method\fR for an example for the
+analogous case of a pdf previewer.
+.TP
+.B $dvi_update_method [2 under UNIX, 1 under MS-Windows]
+How the dvi viewer updates its display when the dvi file has changed.
+The values here apply equally to the \fI$pdf_update_method\fR and to
+the \fI$ps_update_method\fR variables.
+ 0 => update is automatic,
+ 1=> manual update by user, which may only mean a mouse click on the
+viewer's window or may mean a more serious action.
+ 2 => Send the signal, whose number is in the variable
+\fI$dvi_update_signal\fR. The default value under UNIX is
+suitable for xdvi.
+ 3 => Viewer cannot do an update, because it locks the file. (As with
+acroread under MS-Windows.)
+ 4 => run a command to do the update. The command is specified by
+the variable \fI$dvi_update_command\fR.
+
+See information on the variable \fI$pdf_update_method\fR for an
+example of updating by command.
+.TP
+.B $dvi_update_signal [Under UNIX: SIGUSR1, which is a system-dependent value]
+The number of the signal that is sent to the dvi viewer when it is
+updated by sending a signal -- see the information on the variable
+\fI$dvi_update_method\fR. The default value is the one appropriate
+for xdvi on a UNIX system.
+.TP
+.B $fdb_ext ["fdb_latexmk"]
+The extension of the file which \fIlatexmk\fR generates to contain a
+database of information on source files. You will not normally need
+to change this.
+.TP
+.B $force_mode [0]
+If nonzero, continue processing past minor \fIlatex\fR errors
+including unrecognized cross references. Equivalent to specifying the
+\fB-f\fR option.
+.TP
+.B @generated_exts [( "aux", "bbl", "idx", "ind", "lof", "lot", "out", "toc", $fdb_ext )]
+This contains a list of extensions for files that are generated during
+a LaTeX run and that are read in by LaTeX in later runs, either
+directly or indirectly.
+
+This list has two uses: (a) to set the kinds of file to be deleted in
+a cleanup operation (with the \fB-c\fR, \fB-C\fR, \fB-CA\fR, \fB-g\fR
+and \fB-gg\fR options), and (b) in the determination of whether a
+rerun of (pdf)LaTeX is needed after a run that gives an error.
+
+(Normally, a change of a source file during a run should provoke a
+rerun. This includes a file generated by LaTeX, e.g., an aux file,
+that is read in on subsequent runs. But after a run that results in
+an error, a new run should occur until the user has made a change in
+the files. But the user may have corrected an error in a source .tex
+file during the run. So \fIlatexmk\fR needs to distinguish
+user-generated and automatically generated files; it determines the
+automatically generated files as those with extensions in the list in
+@generated_exts.)
+
+A convenient way to add an extra extension to the list, without losing
+the already defined ones is to use a push command in the line in an
+RC file. E.g.,
+
+ push @generated_exts, "end";
+
+adds the extension "end" to the list of predefined generated
+extensions. (This extension is used by the RevTeX package, for
+example.)
+.TP
+.B $go_mode [0]
+If nonzero, process files regardless of timestamps, and is then
+equivalent to the \fB-g\fR option.
+.TP
+.B %hash_calc_ignore_pattern
+\fB!!!This variable is for experts only!!!\fR
+
+The general rule \fIlatexmk\fR uses for determining when an extra run
+of some program is needed is that one of the source files has changed.
+But consider for example a latex package that causes an encapsulated
+postscript file (an "eps" file) to be made that is to be read in on
+the next run. The file contains a comment line giving its creation
+date and time. On the next run the time changes, \fIlatex\fR sees
+that the eps file has changed, and therefore reruns latex. This
+causes an infinite loop, only exited becaues \fIlatexmk\fR has a limit
+on the number of runs to guard against pathological situations.
+
+But the changing line has no real effect, since it is a comment. You
+can instruct \fIlatex\fR to ignore the offending line as follows:
+
+ $hash_calc_ignore_pattern{'eps'} = '^%%CreationDate: ';
+
+This creates a rule for files with extension \fI.eps\fR about lines to
+ignore. The left-hand side is a \fIPerl\fR idiom for setting an item
+in a hash. Note that the file extension is specified without a
+period. The value, on the right-hand side, is a string containing a
+regular expresssion. (See documentation on \fIPerl\fR for how they
+are to be specified in general.) This particular regular expression
+specifies that lines beginning with "%%CreationDate: " are to be
+ignored in deciding whether a file of the given extension \fI.eps\fR
+has changed.
+.TP
+.B $kpsewhich ["kpsewhich %S"]
+The program called to locate a source file when the name alone is not
+sufficient. Most filenames used by \fIlatexmk\fR have sufficient path
+information to be found directly. But sometimes, notably when
+.bib files are found from the log file of a bibtex run, the name of
+the file, but not its path is known. The program specified by
+$kpsewhich is used to find it.
+
+See also the \fI@BIBINPUTS\fR variable for another way that \fIlatexmk\fR
+also uses to try to locate files; it applies only in the case of .bib
+files.
+.TP
+.B $landscape_mode [0]
+If nonzero, run in landscape mode, using the landscape mode previewers and
+dvi to postscript converters. Equivalent to the \fB-l\fR option.
+Normally not needed with current previewers.
+.TP
+.B $latex ["latex %O %S"]
+The LaTeX processing program. Note that as with other programs, you
+can use this variable not just to change the name of the program used,
+but also specify options to the program. E.g.,
+
+ $latex = "latex --src-specials";
+.TP
+.B $latex_silent_switch ["-interaction=batchmode"]
+Switch(es) for the LaTeX processing program when silent mode is on.
+Under MS-Windows, the default value is changed to
+"-interaction=batchmode -c-style-errors", as used by MikTeX and fpTeX.
+.TP
+.B $lpr ["lpr %O %S" under UNIX/LINUX, \(dqNONE lpr\(dq under MS-WINDOWS]
+The command to print postscript files.
+
+Under MS-Windows (unlike UNIX/LINUX), there is no standard program for
+printing files. But there are ways you can do it. For example, if
+you have gsview installed, you could use it with the option "/p":
+
+ $lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
+
+If gsview is installed in a different directory, you will need to make
+the appropriate change. Note the combination of single and double
+quotes around the name. The single quotes specify that this is a
+string to be assigned to the configuration variable \fI$lpr\fR. The double
+quotes are part of the string passed to the operating system to get
+the command obeyed; this is necessary because one part of the command
+name ("Program Files") contains a space which would otherwise be
+misinterpreted.
+.TP
+.B $lpr_dvi ["NONE lpr_dvi"]
+The printing program to print dvi files.
+.TP
+.B $lpr_pdf ["NONE lpr_pdf"]
+The printing program to print pdf files.
+
+Under MS-Windows you could set this to use gsview, if it is installed,
+e.g.,
+
+ $lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
+
+If gsview is installed in a different directory, you will need to make
+the appropriate change. Note the double quotes around the name: this
+is necessary because one part of the command name ("Program Files")
+contains a space which would otherwise be misinterpreted.
+
+.TP
+.B $makeindex ["makeindex %O -o %D %S"]
+The index processing program.
+.TP
+.B $max_repeat [5]
+The maximum number of times \fIlatexmk\fR will run latex/pdflatex
+before deciding that there may be an infinite loop and that it needs
+to bail out, rather than rerunning latex/pdflatex again to resolve
+cross-references, etc. The default value covers all normal cases.
+
+(Note that the "etc" covers a lot of cases where one run of
+latex/pdflatex generates files to be read in on a later run.)
+.TP
+.B $new_viewer_always [0]
+This variable applies to \fIlatexmk\fR \fBonly\fR in
+continuous-preview mode. If \fI$new_viewer_always\fR is 0,
+\fIlatexmk\fR will check for a previously running previewer on the
+same file, and if one is running will not start a new one. If
+\fI$new_viewer_always\fR is non-zero, this check will be skipped, and
+\fIlatexmk\fR will behave as if no viewer is running.
+.TP
+.B $pdf_mode [0]
+If zero, do NOT generate a pdf version of the document.
+If equal to 1, generate a pdf version of the document using pdflatex.
+If equal to 2, generate a pdf version of the document from the ps
+file, by using the command specified by the \fI$ps2pdf\fR variable.
+If equal to 3, generate a pdf version of the document from the dvi
+file, by using the command specified by the \fI$dvipdf\fR variable.
+
+Equivalent to the \fB-pdf-\fR, \fB-pdf\fR, \fB-pdfdvi\fR,
+\fB-pdfps\fR options.
+.TP
+.B $pdflatex ["pdflatex %O %S"]
+The LaTeX processing program in the version that makes a pdf file instead
+of a dvi file.
+.TP
+.B $pdflatex_silent_switch ["-interaction=batchmode"]
+Switch(es) for the pdflatex program (specified in the variable
+\fI$pdflatex\fR when silent mode is on.
+Under MS-Windows, the default value is changed to
+"-interaction=batchmode -c-style-errors", as used by MikTeX and fpTeX.
+.TP
+.B $pdf_previewer ["start acroread %O %S"]
+The command to invoke a pdf-previewer.
+[Default is changed to "start" on MS-WINDOWS; under more recent versions of
+Windows, this will cause to be run whatever command the system has
+associated with .pdf files.]
+
+\fBWARNING\fR: Potential problem under MS-Windows:
+if acroread is used as the pdf previewer, and it is
+actually viewing a pdf file, the pdf file cannot be updated. Thus
+makes acroread a bad choice of previewer if you use \fIlatexmk\fR's
+previous-continuous mode (option \fB-pvc\fR) under MS-windows.
+This problem does not occur if ghostview, gv or gsview is used to
+view pdf files.
+.TP
+.B $pdf_update_command [""]
+When the pdf previewer is set to be updated by running a command, this
+is the command that is run. See the information for the variable
+\fI$pdf_update_method\fR.
+.TP
+.B $pdf_update_method [1 under UNIX, 3 under MS-Windows]
+How the pdf viewer updates its display when the pdf file has
+changed. See the information on the variable \fI$dvi_update_method\fR
+for the codes. (Note that information needs be changed slightly so
+that for the value 4, to run a command to do the update, the command
+is specified by the variable \fI$pdf_update_command\fR, and for the
+value 2, to specify update by signal, the signal is specified by
+\fI$pdf_update_signal\fR.)
+
+Note that acroread under MS-Windows (but not UNIX) locks the pdf file, so
+the default value is then 3.
+
+Arranging to use a command to get a previewer explicitly updated
+requires three variables to be set. For example:
+
+ $pdf_previewer = "start xpdf -remote %R %O %S";
+ $pdf_update_method = 4;
+ $pdf_update_command = "xpdf -remote %R -reload";
+
+The first setting arranges for the xpdf program to be used in its
+"remote server mode", with the server name specified as the rootname
+of the TeX file. The second setting arranges for updating to be done
+in response to a command, and the third setting sets the update command.
+
+.TP
+.B $pdf_update_signal [Under UNIX: SIGHUP, which is a system-dependent value]
+The number of the signal that is sent to the pdf viewer when it is
+updated by sending a signal -- see the information on the variable
+\fI$pdf_update_method\fR. The default value is the one appropriate
+for gv on a UNIX system.
+.TP
+.B $pid_position[1 under UNIX, -1 under MS-Windows]
+The variable \fI$pid_position\fR is used to
+specify which word in lines of the output from \fI$pscmd\fR
+corresponds to the process ID. The first word in the line is numbered
+0. The default value of 1 (2nd word in line) is correct for Solaris
+2.6 and Linux. Setting the variable to -1 is used to indicate that
+\fI$pscmd\fR is not to be used.
+.TP
+.B $postscript_mode [0]
+If nonzero, generate a postscript version of the document.
+Equivalent to the \fB-ps\fR option.
+.TP
+.B $preview_continuous_mode [0]
+If nonzero, run a previewer to view the document, and
+continue running \fIlatexmk\fR to keep .dvi up-to-date. Equivalent to
+the \fB-pvc\fR option.
+Which previewer is run depends on the other settings, see the command
+line options \fB-view=\fR, and the variable \fI$view\fR.
+.TP
+.B $preview_mode [0]
+If nonzero, run a previewer to preview the document.
+Equivalent to the \fB-pv\fR option.
+Which previewer is run depends on the other settings, see the command
+line options \fB-view=\fR, and the variable \fI$view\fR.
+.TP
+.B $printout_mode [0]
+If nonzero, print the document using \fIlpr\fR. Equivalent to the
+\fB-p\fR option. This is recommended \fBnot\fR to be set from an RC
+file, otherwise you could waste lots of paper.
+.TP
+.B $print_type = ["ps"]
+Type of file to printout: possibilities are "dvi", "none", "pdf", or "ps".
+.TP
+.B $pscmd
+Command used to get all the processes currently run by the user. The
+-pvc option uses the command specified by the variable \fI$pscmd\fR to
+determine if there is an already running previewer, and to find the
+process ID (needed if \fIlatexmk\fR needs to signal the previewer
+about file changes).
+
+Each line of the output of this command is assumed to correspond to
+one process. See the \fI$pid_position\fR variable for how the process
+number is determined.
+
+The default for \fIpscmd\fR is "NONE" under MS-Windows and cygwin
+(i.e., the command is not used), "ps --width 200 -f -u $ENV{USER}"
+under linux, "ps -ww -u $ENV{USER}" under darwin (Macintosh OS-X), and
+"ps -f -u $ENV{USER}" under other operating systems (including other
+flavors of UNIX). In these specifications "$ENV{USER}" is substituted
+by the username.
+.TP
+.B $ps2pdf ["ps2pdf %O %S %D"]
+Command to convert ps to pdf file.
+.TP
+.B $ps_filter [empty]
+The postscript file filter to be run on the newly produced postscript
+file before other processing. Equivalent to specifying the \fB-pF\fR
+option.
+.TP
+.B $ps_previewer ["start gv %O %S", but \(dqstart %O %S" under MS-WINDOWS]
+The command to invoke a ps-previewer. (The default under MS-WINDOWS
+will cause to be run whatever command the system has associated
+with .ps files.)
+
+Note that gv could be used with the -watch option updates its display
+whenever the postscript file changes, whereas ghostview does not.
+However, different versions of gv have slightly different ways of
+writing this option. You can configure this variable apppropriately.
+
+\fBWARNING\fR: Linux systems may have installed one (or more) versions
+of gv under different names, e.g., ggv, kghostview, etc, but perhaps
+not one called gv.
+.TP
+.B $ps_previewer_landscape ["start gv -swap %O %S", but \(dqstart %O %S" under MS-WINDOWS]
+The command to invoke a ps-previewer in landscape mode.
+.TP
+.B $ps_update_command [""]
+When the postscript previewer is set to be updated by running a command, this
+is the command that is run. See the information for the variable
+\fI$ps_update_method\fR.
+.TP
+.B $ps_update_method [0 under UNIX, 1 under MS-Windows]
+How the postscript viewer updates its display when the ps file has
+changed. See the information on the variable \fI$dvi_update_method\fR
+for the codes. (Note that information needs be changed slightly so
+that for the value 4, to run a command to do the update, the command
+is specified by the variable \fI$ps_update_command\fR, and for the
+value 2, to specify update by signal, the signal is specified by
+\fI$ps_update_signal\fR.)
+
+.TP
+.B $ps_update_signal [Under UNIX: SIGHUP, which is a system-dependent value]
+The number of the signal that is sent to the pdf viewer when it is
+updated by sending a signal -- see \fI$ps_update_method\fR. The
+default value is the one appropriate for gv on a UNIX system.
+.TP
+.B $sleep_time [2]
+The time to sleep (in seconds) between checking for source file
+changes when running the \fB-pvc\fR option.
+.TP
+.B $texfile_search [""]
+This is an obsolete variable, replaced by the \fI@default_files\fR
+variable.
+
+For backward compatibility, if you choose to set
+\fI$texfile_search\fR, it is a string of space-separated filenames, and
+then \fIlatexmk\fR replaces \fI@default_files\fR with the filenames in
+\fI$texfile_search\fR to which is added "*.tex".
+.TP
+.B $tmpdir [See below for default]
+Directory to store temporary files that \fIlatexmk\fR may generate while
+running.
+
+The default under MSWindows (including cygwin), is to set
+\fI$tmpdir\fR to the value of the first of whichever of the system
+environment variables TMPDIR or TEMP exists, otherwise to the current
+directory. Under other operating systems (expected to be UNIX/Linux,
+including OS-X), the default is the value of the system environment
+variable TMPDIR if it exists, otherwise "/tmp".
+.TP
+.B $view ["default"]
+Which kind of file is to be previewed if a previewer is used. The
+possible values are "default", "dvi", "ps", "pdf". The value
+of "default" means that the "highest" of the kinds of file generated is
+to be used (among dvi, ps and pdf).
+
+.SH CUSTOM DEPENDENCIES
+.PP
+In any RC file a set of custom dependencies can be set up to convert a
+file with one extension to a file with another. An example use of this
+would be to allow \fIlatexmk\fR to convert a \fI.fig\fR file to
+\fI.eps\fR to be included in the \fI.tex\fR file.
+
+The old method of configuring \fIlatexmk\fR was to directly manipulate
+the \fB@cus_dep_list\fR array that contains information defining the
+custom dependencies. This method still works. But now there are
+subroutines that allow convenient manipulations of the custom
+dependency list. These are
+
+ add_cus_dep( fromextension, toextension, must, subroutine )
+ remove_cus_dep( fromextension, toextension )
+ show_cus_dep()
+
+The custom dependency is a list of rules, each of which is specified
+as follow:
+.TP
+.B from extension:
+The extension of the file we are converting from (e.g. "fig").
+It is specified without a period.
+.TP
+.B to extension:
+The extension of the file we are converting to (e.g. "eps").
+It is specified without a period.
+.TP
+.B must:
+If non-zero, the file from which we are converting \fBmust\fR exist, if it
+doesn't exist \fIlatexmk\fR will give an error message and exit unless
+the \fB-f\fR option is specified. If \fImust\fR is zero and the file
+we are converting from doesn't exist, then no action is taken.
+.TP
+.B function:
+The name of the subroutine that \fIlatexmk\fR should call to perform the
+file conversion. The first argument to the subroutine is the base name
+of the file to be converted without any extension. The subroutines are
+declared in the syntax of \fIPerl\fR. The function should return 0 if
+it was successful and a nonzero number if it failed.
+.PP
+It is invoked whenever \fIlatexmk\fR detects that a run of
+latex/pdflatex needs to read a file, like a graphics file, whose
+extension is the to-extension of a custom dependency. Then
+\fIlatexmk\fR examines whether a file exists with the same name, but
+with the corresponding from-extension, as specified in the
+custom-dependency rule. If it does, then whenever the destination
+file (the one with the to-extension) is out-of-date with respect to
+the corresponding source file.
+
+To make the new destination file, the \fIPerl\fR subroutine specified in the
+rule is invoked, with an argument that is the base name of the files
+in question. Simple cases just involve a subroutine invoking an
+external program; this can be done by following the templates below,
+even by those without knowledge of the \fIPerl\fR programming language. Of
+course, experts could do something much more elaborate.
+
+One other item in each custom-dependency rule labelled "must" above
+specifies how the rule should be applied when the source file fails to
+exist.
+
+A simple and typical example of code in an initialization rcfile is
+
+ add_cus_dep( 'fig', 'eps', 0, 'fig2eps' );
+ sub fig2eps {
+ system("fig2dev -Leps $_[0].fig $_[0].eps");
+ }
+
+The first line adds a custom dependency that converts a file with
+extension "fig", as created by the xfig program, to an encapsulated
+postscript file, with extension "eps". The remaining lines define a
+subroutine that carries out the conversion. If a rule for converting
+"fig" to "eps" files already exists (e.g., from a previously read-in
+initialization file), the \fIlatexmk\fR will delete this rule before
+making the new one.
+
+Suppose \fIlatexmk\fR is using this rule to convert a file
+"figure.fig" to "figure.eps". Then it will invoke the fig2eps
+subroutine defined in the above code with a single argument "figure",
+which is the basename of each of the files (possibly with a path
+component). This argument is referred to by \fIPerl\fR as $_[0]. In
+the example above, the subroutine uses the \fIPerl\fR command system
+to invoke the program fig2dev. The double quotes around the string
+are a \fIPerl\fR idiom that signify that each string of the form of a
+variable name, $_[0] in this case, is to be substituted by its value.
+
+If the return value of the subroutine is non-zero, then \fIlatexmk\fR
+will assume an error occurred during the execution of the subroutine.
+In the above example, no explicit return value is given, and instead
+the return value is the value returned by the last (and only)
+statement, i.e., the invocation of system, which returns the value 0
+on success.
+
+If you use filenames with spaces in them, and if your LaTeX system and
+all other relevant software correctly handle such filenames, then you
+could put single quotes around filenames in the command line that is
+executed:
+
+ add_cus_dep( 'fig', 'eps', 0, 'fig2eps' );
+ sub fig2eps {
+ system("fig2dev -Lps '$_[0].fig' '$_[0].eps'");
+ }
+
+This causes the invocation of the \fIfig2dev\fR program to have quoted
+filenames; it should therefore work with filenames containing spaces.
+\fBHowever, not all software deals correctly with filenames that
+contain spaces. Moreover, the rules, if any, for quoting filenames
+vary between operating systems, command shells and individual pieces
+of software, so this code may not always work.\fR
+
+If you use pdflatex instead of latex, then you will probably prefer to
+convert your graphics files to pdf format, in which case you would
+replace the above code in an initialization file by
+
+ add_cus_dep( 'fig', 'pdf, 0, 'fig2pdf' );
+ sub fig2pdf {
+ system("fig2dev -Lpdf $_[0].fig $_[0].pdf");
+ }
+
+If you have some general custom dependencies defined in the system or
+user initialization file, you may find that for a particular project
+they are undesirable. So you might want to delete the unneeded ones.
+For example, you remove any "fig" to "eps" rule by the line
+
+ remove_cus_dep( 'fig', 'eps' );
+
+If you have complicated sets of custom dependencies, you may want to
+get a listing of the custom dependencies. This is done by using the
+line
+
+ show_cus_dep();
+
+in an initialization file.
+
+Another example of a custom dependency overcomes a limitation of
+\fIlatexmk\fR concerning index files. The only index-file conversion
+built-in to \fIlatexmk\fR is from an ".idx" file written on one run of
+latex/pdflatex to an ".ind" file to be read in on a subsequent run.
+But with the index.sty package you can create extra indexes with
+extensions that you configure. \fILatexmk\fR does not know how to
+deduce the extensions from the information it has. But you can easily
+write a custom dependency. For example if your latex file uses the
+command "\\newindex{special}{ndx}{nnd}{Special index}" you will need to
+convert files with the extension \fI.ndx\fR to \fI.nnd\fR. The
+following lines in an initialization RC file will cause this to
+happen:
+
+ add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
+ sub makendx2nnd {
+ system("makeindex -o $_[0].nnd $_[0].ndx");
+ }
+
+(You will need to modify this code if you use filenames
+with spaces in them, to provide correct quoting of the filenames.)
+
+Those of you with experience with Makefiles, will undoubtedly be
+concerned that the \fI.ndx\fR file is written during a run of
+latex/pdflatex and is always later than the \fI.nnd\fR last read in.
+Thus the \fI.nnd\fR appears to be perpetually out-of-date. This
+situation, of circular dependencies, is endemic to latex, and
+\fIlatexmk\fR in its current version works correctly with circular
+dependencies. It examines the contents of the files (by use of an md5
+checksum), and only does a remake when the file contents have actually
+changed.
+
+Of course if you choose to write random data to the \fI.nnd\fR (or and
+\fI.aux\fR file, etc) that changes on each new run, then you will have
+a problem. For real experts: See the \fI%hash_cal_ignore_pattern\fR
+if you have to deal with such problems.
+
+Glossaries can be dealt with similarly.
+
+.SH OLD METHOD OF DEFINING CUSTOM DEPENDENCIES
+In previous versions of \fIlatexmk\fR, the only method of defining
+custom dependencies was to directly manipulate the table of custom
+dependencies. This is contained in the \fB@cus_dep_list\fR array. It
+is an array of strings, and each string in the array has four items in
+it, each separated by a space, the from-extension, the to-extension,
+the "must" item, and the name of the subroutine for the custom
+dependency. These were all defined above.
+.PP
+An example of the old method of defining custom dependencies is as
+follows. It is the code in an RC file to ensure automatic conversion
+of \fI.fig\fR files to \fI.eps\fR files:
+
+ push @cus_dep_list, "fig eps 0 fig2eps";
+ sub fig2eps {
+ system("fig2dev -Lps $_[0].fig $_[0].eps");
+ }
+
+This method still works, and is equivalent to the earlier code using
+the add_cus_dep subroutine, except that it doesn't delete any previous
+custom-dependency for the same conversion. So the new method is
+preferable.
+
+.SH SEE ALSO
+latex(1), bibtex(1).
+.SH BUGS
+Sometimes a viewer (gv) tries to read an updated .ps or .pdf file
+after its creation is started but before the file is complete. Work
+around: manually refresh (or reopen) display. Or use one of the other
+previewers and update methods.
+
+(The following isn't really a bug, but concerns features of previewers.)
+Preview continuous mode only works perfectly with certain previewers:
+Xdvi on UNIX/LINUX works for dvi files.
+Gv on UNIX/LINUX works for both postscript and pdf.
+Ghostview on UNIX/LINUX needs a manual update (reopen); it views
+postscript and pdf.
+Gsview under MS-Windows works for both postscript and pdf,
+but only reads the updated file when its screen is refreshed.
+Acroread under UNIX/LINUX views pdf, but the file needs to be closed
+and reopened to view an updated version.
+Under MS-Windows, acroread locks its input file and so the
+pdf file cannot be updated. (Remedy: configure \fIlatexmk\fR to use gsview
+instead.)
+.SH THANKS TO
+Authors of previous versions. Many users with their feedback, and
+especially
+David Coppit (username david at node coppit.org) who made many useful
+suggestions that contributed to version 3, and Herbert Schulz.
+(Please note that the
+e-mail addresses are not written in their standard form to avoid being
+harvested by worms and viruses.)
+.SH AUTHOR
+Current version, by John Collins (username collins at node phys.psu.edu).
+(Version 4.01).
+
+It can be obtained from CTAN:
+<http://www.tug.org/tex-archive/support/latexmk/>, and from the
+author's website <http://www.phys.psu.edu/~collins/software/latexmk/>.
+.br
+Modifications and enhancements by Evan McLean (Version 2.0)
+.br
+Original script called "go" by David J. Musliner (RCS Version 3.2)
+
+\" LocalWords: fR fIlatexmk dvi ps fILatexmk pdflatex bibtex makeindex fB pv
+\" LocalWords: pvc fIgv xdvi gsview cygwin fdb TP tex bm bs fIlatex fIbibtex
+\" LocalWords: gg regeneratable dep exts dF dviF dviselect fI fR's lpr pdfps
+\" LocalWords: pdfdvi dvipdf pF psF psnup fIsome gv acroread xpdf rcfile cus
+\" LocalWords: batchmode latexmkrc elatex basename texfile WinXP BIBINPUTS
+\" LocalWords: kpsewhich BibTeX dtx dvipdfm dvips fpTeX MikTeX fBWARNING pid
+\" LocalWords: pscmd fIlpr fBnot ENV OSX SIGHUP tmpdir MSWindows tmp eps dev
+\" LocalWords: fImust fIperl Lps fIfig
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.bat b/Master/texmf-dist/doc/support/latexmk/latexmk.bat
new file mode 100755
index 00000000000..f119082adac
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.bat
@@ -0,0 +1,5 @@
+Rem Execute latexmk.pl, searching for it in the PATH
+Rem Assume perl is in the PATH. If not, you should replace 'perl' by
+Rem the full pathname of the perl executable, e.g., 'C:\perl\bin\perl.exe'
+
+perl -S latexmk.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
new file mode 100644
index 00000000000..1ff86560416
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.txt b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
new file mode 100644
index 00000000000..7c99e946497
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
@@ -0,0 +1,1772 @@
+
+NAME
+ latexmk - generate LaTeX document
+
+SYNOPSIS
+ latexmk [options] [file ...]
+
+DESCRIPTION
+ Latexmk completely automates the process of compiling a LaTeX document.
+ Essentially, it is like a specialized relative of the general make
+ utility, but one which determines dependencies automatically and has
+ some other very useful features. In its basic mode of operation
+ latexmk is given the name of the primary source file for a document,
+ and it issues the appropriate sequence of commands to generate a .dvi,
+ .ps, .pdf and/or hardcopy version of the document.
+
+ Latexmk can also be set to run continuously with a suitable previewer.
+ In that case the LaTeX program, etc, are rerun whenever one of the
+ source files is modified, and the previewer automatically updates the
+ on-screen view of the compiled document.
+
+ Latexmk determines which are the source files by examining the log
+ file. When latexmk is run, it examines properties of the source files,
+ and if any have been changed since the last document generation,
+ latexmk will run the various LaTeX processing programs as necessary.
+ In particular, it will repeat the run of LaTeX (or pdflatex) often
+ enough to resolve all cross references; depending on the macro packages
+ used. With some macro packages and document classes, four, or even
+ more, runs may be needed. If necessary, latexmk will also run bibtex
+ and/or makeindex. In addition, latexmk can be configured to generate
+ other necessary files. For example, from an updated figure file it can
+ automatically generate a file in encapsulated postscript or another
+ suitable format for reading by LaTeX.
+
+ Latexmk has two different previewing options. In the simple -pv
+ option, a dvi, postscript or pdf previewer is automatically run after
+ generating the dvi, postscript or pdf version of the document. The
+ type of file to view is selected according to configuration settings
+ and command line options.
+
+ The second previewing option is the powerful -pvc option (mnemonic:
+ "preview continuously"). In this case, latexmk runs continuously, reg-
+ ularly monitoring all the source files to see if any have changed.
+ Every time a change is detected, latexmk runs all the programs neces-
+ sary to generate a new version of the document. A good previewer (like
+ gv) will then automatically update its display. Thus the user can sim-
+ ply edit a file and, when the changes are written to disk, latexmk com-
+ pletely automates the cycle of updating the .dvi (and possibly the .ps
+ and .pdf) file, and refreshing the previewer's display. It's not quite
+ WYSIWYG, but usefully close.
+
+ For other previewers, the user may have to manually make the previewer
+ update its display, which can be (some versions of xdvi and gsview) as
+ simple as forcing a redraw of its display.
+
+ Latexmk has the ability to print a banner in gray diagonally across
+ each page when making the postscript file. It can also, if needed,
+ call an external program to do other postprocessing on the generated
+ files.
+
+
+
+
+ 1
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ Latexmk is highly configurable, both from the command line and in con-
+ figuration files, so that it can accommodate a wide variety of user
+ needs and system configurations. Default values are set according to
+ the operating system, so latexmk often works without special configura-
+ tion on MS-Windows, cygwin, Linux, OS-X, and other UNIX systems
+ (notably Solaris).
+
+ A very annoying complication handled very reliably by Latexmk, is that
+ LaTeX is a multiple pass system. On each run, LaTeX reads in informa-
+ tion generated on a previous run, for things like cross referencing and
+ indexing. In the simplest cases, a second run of LaTeX suffices, and
+ often the log file contains a message about the need for another pass.
+ However, there is a wide variety of add-on macro packages to LaTeX,
+ with a variety of behaviors. The result is to break simple-minded
+ determinations of how many runs are needed and of which programs. In
+ its new version, latexmk has a highly general and efficient solution to
+ these issues. The solution involves retaining between runs information
+ on the source files, and a symptom is that latexmk generates an extra
+ file (with extension .fdb_latexmk, by default) that contains the source
+ file information.
+
+
+LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
+ (All options can be introduced by single or double "-" characters,
+ e.g., "latexmk -help" or "latexmk --help".)
+
+ file One or more files can be specified. If no files are specified,
+ latexmk will, by default, run on all files in the current work-
+ ing directory with a ".tex" extension. This behavior can be
+ changed: see the description concerning the @default_files vari-
+ able in the section "List of configuration variables usable in
+ initialization files".
+
+ If a file is specified without an extension, then the ".tex" extension
+ is automatically added, just as LaTeX does. Thus, if you specify:
+
+ latexmk foo
+
+ then latexmk will operate on the file "foo.tex".
+
+ -bm <message>
+ A banner message to print diagonally across each page when con-
+ verting the dvi file to postscript. The message must be a sin-
+ gle argument on the command line so be careful with quoting
+ spaces and such.
+
+ Note that if the -bm option is specified, the -ps option is
+ assumed.
+
+ -bi <intensity>
+ How dark to print the banner message. A decimal number between
+ 0 and 1. 0 is black and 1 is white. The default is 0.95, which
+ is OK unless your toner cartridge is getting low.
+
+
+
+
+ 28 September 2008 2
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ -bs <scale>
+ A decimal number that specifies how large the banner message
+ will be printed. Experimentation is necessary to get the right
+ scale for your message, as a rule of thumb the scale should be
+ about equal to 1100 divided by the number of characters in the
+ message. The default is 220.0 which is just right for 5 charac-
+ ter messages.
+
+ -commands
+ List the commands used by latexmk for processing files, and then
+ exit.
+
+ -c Clean up (remove) all regeneratable files generated by latex and
+ bibtex except dvi, postscript and pdf. These files are a combi-
+ nation of log files, aux files, and those with extensions speci-
+ fied in the @generated_exts configuration variable. In addi-
+ tion, files with extensions by the $clean_ext configuration
+ variable are removed. But the file containing a database of
+ source file information is not removed.
+
+ This cleanup is instead of a regular make. See the -gg option
+ if you want to do a cleanup then a make.
+
+ -C Clean up (remove) all regeneratable files generated by latex and
+ bibtex. This is the same as the -c option with the addition of
+ dvi, postscript and pdf files, and those with extensions in the
+ $clean_full_ext configuration variable.
+
+ This cleanup is instead of a regular make. See the -gg option
+ if you want to do a cleanup than a make.
+
+ -CA Clean up (remove) absolutely all regeneratable files. This is
+ the action specified by -C with the addition of deleting the
+ file containing the database of source file information.
+
+ This cleanup is instead of a regular make. It is the same as -C
+ -CF. See the -gg option if you want to do a cleanup then a
+ make.
+
+ -CF Remove the file containing the database of source file informa-
+ tion, before doing the other actions requested.
+
+ -d Set draft mode. This prints the banner message "DRAFT" across
+ your page when converting the dvi file to postscript. Size and
+ intensity can be modified with the -bs and -bi options. The -bm
+ option will override this option as this is really just a short
+ way of specifying:
+
+ latexmk -bm DRAFT
+
+ Note that if the -d option is specified, the -ps option is
+ assumed.
+
+ -dF Dvi file filtering. The argument to this option is a filter
+ which will generate a filtered dvi file with the extension
+
+
+
+ 28 September 2008 3
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ ".dviF". All extra processing (e.g. conversion to postscript,
+ preview, printing) will then be performed on this filtered dvi
+ file.
+
+ Example usage: To use dviselect to select only the even pages of
+ the dvi file:
+
+ latexmk -dF 'dviselect even' foo.tex
+
+ -diagnostics
+ Print detailed diagnostics during a run. This may help for
+ debugging problems or to understand .latexmk's behavior in dif-
+ ficult situations.
+
+ -dvi Generate dvi version of document.
+
+ -dvi- Turn off generation of dvi version of document. (This may get
+ overridden, if some other file is made (e.g., a .ps file) that
+ is generated from the dvi file, or if no generated file at all
+ is requested.)
+
+ -e <code>
+ Execute the specified initialization code before processing.
+ The code is Perl code of the same form as is used in latexmk's
+ initialization files -- for more details, see the information on
+ the -r option, and the section about "Configuration/initializa-
+ tion (RC) files". The code is typically a sequence of assign-
+ ment statements separated by semicolons.
+
+ The code is executed when the -e option is encountered during
+ latexmk's parsing of its command line. See the -r option for a
+ way of executing initialization code from a file. An error
+ results in latexmk stopping. Multiple instances of the -r and
+ -e options can be used, and they are executed in the order they
+ appear on the command line.
+
+ Some care is needed to deal with proper quoting of special char-
+ acters in the code on the command line. For example, suppose it
+ is desired to set the latex command to use its -shell-escape
+ option, then under UNIX/LINUX you could use the line
+
+ latexmk -e '$latex=q/latex %O -shell-escape %S/' file.tex
+
+ (Note that the q/.../ construct is a Perl idiom equivalent to
+ using single quotes. This is easier than arranging to get a
+ quote character correctly escaped in a way that is independent
+ of the shell and the operating-system.)
+
+ -f Force latexmk to continue document processing despite errors.
+ Normally, when latexmk detects that LaTeX or another program has
+ found an error which will not be resolved by further processing,
+ no further processing is carried out.
+
+ -f- Turn off the forced processing-past-errors such as is set by the
+ -f option. This could be used to override a setting in a
+
+
+
+ 28 September 2008 4
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ configuration file.
+
+ -g Force latexmk to process document fully, even under situations
+ where latexmk would normally decide that no changes in the
+ source files have occurred since the previous run. This option
+ is useful, for example, if you change some options and wish to
+ reprocess the files.
+
+ -g- Turn off -g.
+
+ -gg "Super go mode" or "clean make": clean out generated files as if
+ -CA had been given, and then do a regular make.
+
+ -h, -help
+ Print help information.
+
+ -l Run in landscape mode, using the landscape mode for the preview-
+ ers and the dvi to postscript converters. This option is not
+ normally needed nowadays, since current previewers normally
+ determine this information automatically.
+
+ -l- Turn off -l.
+
+ -new-viewer
+ When in continuous-preview mode, always start a new viewer to
+ view the generated file. By default, latexmk will, in continu-
+ ous-preview mode, test for a previously running previewer for
+ the same file and not start a new one if a previous previewer is
+ running. However, its test sometimes fails (notably if there is
+ an already-running previewer that is viewing a file of the same
+ name as the current file, but in a different directory). This
+ option turns off the default behavior.
+
+ -new-viewer-
+ The inverse of the -new-viewer option. It puts latexmk in its
+ normal behavior that in preview-continuous mode it checks for an
+ already-running previewer.
+
+ -p Print out the document. By default it is the generated
+ postscript file that is printed. But you can use the -print=...
+ option to print the dvi or pdf files instead, and you can con-
+ figure this in a start up file (by setting the $print_type vari-
+ able).
+
+ However, printing is enabled by default only under UNIX/LINUX
+ systems, where the default is to use the lpr command. In gen-
+ eral, the correct behavior for printing very much depends on
+ your system's software. In particular, under MS-Windows you
+ must have suitable program(s) available, and you must have con-
+ figured the print commands used by latexmk. This can be non-
+ trivial. See the documentation on the $lpr, $lpr_dvi, and
+ $lpr_pdf configuration variables to see how to set the commands
+ for printing.
+
+ This option is incompatible with the -pv and -pvc options, so it
+
+
+
+ 28 September 2008 5
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ turns them off.
+
+ -pdf Generate pdf version of document using pdflatex.
+
+ -pdfdvi
+ Generate pdf version of document from the dvi file, by default
+ using dvipdf.
+
+ -pdfps Generate pdf version of document from the ps file, by default
+ using ps2pdf.
+
+ -pdf- Turn off generation of pdf version of document. (This can be
+ used to override a setting in a configuration file. It may get
+ overridden if some other option requires the generation of a pdf
+ file.)
+
+ -print=dvi, -print=ps, -print=pdf
+ Define which kind of file is printed. This option also ensures
+ that the requisite file is made, and turns on printing. The
+ default is to print a postscript file.
+
+ -ps Generate postscript version of document.
+
+ -ps- Turn off generation of postscript version of document. This can
+ be used to override a setting in a configuration file. (It may
+ get overridden by some other option that requires a postscript
+ file, for example a request for printing.)
+
+ -pF Postscript file filtering. The argument to this option is a
+ filter which will generate a filtered postscript file with the
+ extension ".psF". All extra processing (e.g. preview, printing)
+ will then be performed on this filtered postscript file.
+
+ Example of usage: Use psnup to print two pages on the one page:
+
+ latexmk -ps -pF 'psnup -2' foo.tex
+
+ or
+
+ latexmk -ps -pF "psnup -2" foo.tex
+
+ Whether to use single or double quotes round the "psnup -2" will
+ depend on your command interpreter, as used by the particular
+ version of perl and the operating system on your computer.
+
+ -pv Run file previewer. If the -view option is used, this will
+ select the kind of file to be previewed (dvi, ps or pdf). Oth-
+ erwise the viewer views the "highest" kind of file selected, by
+ the -dvi, -ps, -pdf, -pdfps options, in the order dvi, ps, pdf
+ (low to high). If no file type has been selected, the dvi pre-
+ viewer will be used. This option is incompatible with the -p
+ and -pvc options, so it turns them off.
+
+ -pv- Turn off -pv.
+
+
+
+
+ 28 September 2008 6
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ -pvc Run a file previewer and continually update the .dvi, .ps,
+ and/or .pdf files whenever changes are made to source files (see
+ the Description above). Which of these files is generated and
+ which is viewed is governed by the other options, and is the
+ same as for the -pv option. The preview-continuous option -pvc
+ can only work with one file. So in this case you will normally
+ only specify one filename on the command line. It is also
+ incompatible with the -p and -pv options, so it turns these
+ options off
+
+ With a good previewer the display will be automatically updated.
+ (Under some but not all versions of UNIX/Linux "gv -watch" does
+ this for postscript files; this can be set by a configuration
+ variable. This would also work for pdf files except for an
+ apparent bug in gv that causes an error when the newly updated
+ pdf file is read.) Many other previewers will need a manual
+ update.
+
+ Important note: the acroread program on MS-Windows locks the pdf
+ file, and prevents new versions being written, so it is a bad
+ idea to use acroread to view pdf files in preview-continuous
+ mode. It is better to use a dvi or ps viewer, as set by one of
+ the -view=dvi and -view=ps options.
+
+ There are some other methods for arranging an update, notably
+ useful for many versions of xdvi and xpdf. These are best set
+ in latexmk's configuration; see below.
+
+ Note that if latexmk dies or is stopped by the user, the
+ "forked" previewer will continue to run. Successive invocations
+ with the -pvc option will not fork new previewers, but latexmk
+ will normally use the existing previewer. (At least this will
+ happen when latexmk is running under an operating system where
+ it knows how to determine whether an existing previewer is run-
+ ning.)
+
+ -pvc- Turn off -pvc.
+
+ -quiet Same as -silent
+
+ -r <rcfile>
+ Read the specified initialization file ("RC file") before pro-
+ cessing.
+
+ Be careful about the ordering: (1) Standard initialization files
+ -- see the section below on "Configuration/initialization (RC)
+ files" -- are read first. (2) Then the options on the command
+ line are acted on in the order they are given. Therefore if an
+ initialization file is specified by the -r option, it is read
+ during this second step. Thus an initialization file specified
+ with the -r option can override both the standard initialization
+ files and previously specified options. But all of these can be
+ overridden by later options.
+
+ The contents of the RC file just comprise a piece of code in the
+
+
+
+ 28 September 2008 7
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ Perl programming language (typically a sequence of assignment
+ statements); they are executed when the -r option is encountered
+ during latexmk's parsing of its command line. See the -e option
+ for a way of giving initialization code directly on latexmk's
+ command line. An error results in latexmk stopping. Multiple
+ instances of the -r and -e options can be used, and they are
+ executed in the order they appear on the command line.
+
+ -silent
+ Run commands silently, i.e., with options that reduce the amount
+ of diagnostics generated. For example, with the default set-
+ tings for commands under UNIX, the command "latex -interac-
+ tion=batchmode" is used for latex.
+
+ Also reduce the number of informational messages that latexmk
+ generates.
+
+ -v, -version
+ Print version number of latexmk.
+
+ -verbose
+ Opposite of -silent. This is the default setting.
+
+ -view=default, -view=dvi, -view=ps, -view=pdf
+ Set the kind of file used when previewing is requested (e.g., by
+ the -pv or -pvc switches). The default is to view the "highest"
+ kind of requested file (in the order dvi, ps, pdf).
+
+ The preview-continuous option -pvc can only work with one file. So in
+ this case you will normally only specify one filename on the command
+ line.
+
+ Options -p, -pv and -pvc are mutually exclusive. So each of these
+ options turns the others off.
+
+
+EXAMPLES
+ % latexmk thesis # run latex enough times to resolve
+ cross-references
+
+ % latexmk -pvc -ps thesis# run latex enough times to resolve
+ cross-references, make a postscript
+ file, start a previewer. Then
+ watch for changes in the source
+ file thesis.tex and any files it
+ uses. After any changes rerun latex
+ the appropriate number of times and
+ remake the postscript file. If latex
+ encounters an error, latexmk will
+ keep running, watching for
+ source file changes.
+
+ % latexmk -c # remove .aux, .log, .bbl, .blg, .dvi,
+ .pdf, .ps & .bbl files
+
+
+
+
+ 28 September 2008 8
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+CONFIGURATION/INITIALIZATION (RC) FILES
+ Latexmk can be customized using initialization files, which are read at
+ startup in the following order:
+
+ 1) The system RC file, if it exists.
+ On a UNIX system, latexmk searches for following places for its sys-
+ tem RC file, in the following order, and reads the first it finds:
+ "/opt/local/share/latexmk/LatexMk",
+ "/usr/local/share/latexmk/LatexMk",
+ "/usr/local/lib/latexmk/LatexMk".
+ On a MS-WINDOWS system it looks for "C:\latexmk\LatexMk".
+
+ 2) The user's RC file, "$HOME/.latexmkrc", if it exists. Here $HOME is
+ the value of the environment variable HOME. On UNIX and clones
+ (including LINUX), this variable is set by the system; on MS-Windows,
+ the user may choose to set it.
+
+ 3) The RC file in the current working directory. This file can be
+ named either "latexmkrc" or ".latexmkrc", and the first of these to be
+ found is used, if any.
+
+ 4) Any RC file(s) specified on the command line with the -r option.
+
+ Each RC file is a sequence of Perl commands. Naturally, a user can use
+ this in creative ways. But for most purposes, one simply uses a
+ sequence of assignment statements that override some of the built-in
+ settings of Latexmk. Straightforward cases can be handled without
+ knowledge of the Perl language by using the examples in this document
+ as templates. Comment lines are introduced by the "#" character.
+
+ Note that command line options are obeyed in the order in which they
+ are written; thus any RC file specified on the command line with the -r
+ option can override previous options but can be itself overridden by
+ later options on the command line. There is also the -e option, which
+ allows initialization code to be specified in latexmk's command line.
+
+
+HOW TO SET VARIABLES IN INITIALIZATION FILES
+ The important variables that can be configured are described in the
+ section "List of configuration variables usable in initialization
+ files". Syntax for setting these variables is of the following forms:
+
+ $bibtex = 'bibtex %O %B';
+
+ for the setting of a string variable,
+
+ $preview_mode = 1;
+
+ for the setting of a numeric variable, and
+
+ @default_files = ('paper', 'paper1');
+
+ for the setting of an array of strings. It is possible to append an
+ item to an array variable as follows:
+
+
+
+
+ 28 September 2008 9
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ push @default_files, 'paper2';
+
+ Note that simple "scalar" variables have names that begin with a $
+ character and array variables have names that begin with a @ character.
+ Each statement ends with a semicolon.
+
+ You can do much more complicated things, but for this you will need to
+ consult a manual for the Perl programming language.
+
+
+
+
+FORMAT OF COMMAND SPECIFICATIONS
+ Some of the variables set the commands that latexmk uses for carrying
+ out its work, for example to generate a dvi file from a tex file or to
+ view a postscript file. This section describes some important features
+ of how the commands are specified.
+
+ Placeholders: Supposed you wanted latexmk to use the command elatex in
+ place of the regular latex command, and suppose moreover that you
+ wanted to give it the option "--shell-escape". You could do this by
+ the following setting:
+
+ $latex = 'elatex --shell-escape %O %S';
+
+ The two items starting with the % character are placeholders. These
+ are substituted by appropriate values before the command is run. Thus
+ %S will be replaced by the source file that elatex will be applied to,
+ and %O will be replaced by any options that latexmk has decided to use
+ for this command. (E.g., if you used the -silent option it would
+ replace %O by "-interaction=batchmode".)
+
+ The available placeholders are:
+
+ %B base of filename for current command. E.g., if a postscript
+ file document.ps is being made from the dvi file document.dvi,
+ then the basename is document.
+
+ %D destination file (e.g., the name of the postscript file when
+ converting a dvi file to postscript).
+
+ %O options
+
+ %R root filename. This is the base name for the main tex file.
+
+ %S source file (e.g., the name of the dvi file when converting a
+ dvi file to ps).
+
+ %T The name of the primary tex file.
+
+ The distinction between %B and %R needs a bit of care, since they are
+ often the same, but not always. For example on a simple document, the
+ basename of a bibtex run is the same as for the texfile. But in a doc-
+ ument with several bibliographies, the bibliography files will have a
+ variety of names. Since bibtex is invoked with the basename of the
+
+
+
+ 28 September 2008 10
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ bibliography file, the setting for the bibtex command should therefore
+ be
+
+ $bibtex = 'bibtex %O %B';
+
+ Generally, you should use %B rather than %R. Similarly for most pur-
+ poses, the name %T of the primary texfile is not a useful placeholder.
+
+ See the default values in the section "List of configuration variables
+ usable in initialization files" for what is normally the most appropri-
+ ate usage.
+
+ If you omit to supply any placeholders whatever in the specification of
+ a command, latexmk will supply what its author thinks are appropriate
+ defaults. This gives compatibility with configuration files for previ-
+ ous versions of latexmk, which didn't use placeholders.
+
+ "Detaching" a command: Normally when latexmk runs a command, it waits
+ for the command to run to completion. This is appropriate for commands
+ like latex, of course. But for previewers, the command should normally
+ run detached, so that latexmk gets the previewer running and then
+ returns to its next task (or exits if there is nothing else to do). To
+ achieve this effect of detaching a command, you need to precede the
+ command name with "start ", as in
+
+ $dvi_previewer = 'start xdvi %O %S';
+
+ This will be translated to whatever is appropriate for your operating
+ system.
+
+ Notes: (1) In some circumstances, latex will always run a command
+ detached. This is the case for a previewer in preview continuous mode,
+ since otherwise previewing continuously makes no sense. (2) This pre-
+ cludes the possibility of running a command named start. (3) If the
+ word start occurs more than once at the beginning of the command
+ string, that is equivalent to having just one. (4) Under cygwin, some
+ complications happen, since cygwin amounts to a complicated merging of
+ UNIX and MS-Windows. See the source code for how I've handled the
+ problem.
+
+ Command names containing spaces: Under MS-Windows it is common that the
+ name of a command includes spaces, since software is often installed in
+ a subdirectory of "C:Program Files". Such command names should be
+ enclosed in double quotes, as in
+
+ $lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p
+ %S';
+
+ Using MS-Windows file associations: A useful trick under modern ver-
+ sions of MS-Windows (e.g., WinXP) is to use just the command
+
+ $dvi_previewer = 'start %S';
+
+ Under recent versions of MS-Windows, this will cause to be run whatever
+ program the system has associated with dvi files. (The same applies
+
+
+
+ 28 September 2008 11
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ for a postscript viewer and a pdf viewer.)
+
+ Not using a certain command: If a command is not to be run, the command
+ name NONE is used, as in
+
+ $lpr = 'NONE lpr';
+
+ This typically is used when an appropriate command does not exist on
+ your system. The string after the "NONE" is effectively a comment.
+
+ Options to commands: Setting the name of a command can be used not only
+ for changing the name of the command called, but also to add options to
+ command. Suppose you want latexmk to use latex with source specials
+ enabled. Then you might use the following line in an initialization
+ file:
+
+ $latex = 'latex --src-specials %O %S';
+
+
+ Advanced tricks: Normally one specifies a single command for the com-
+ mands invoked by latexmk. Naturally, if there is some complicated
+ additional processing you need to do in your special situation, you can
+ write a script (or batch file) to do the processing, and then configure
+ latexmk to use your script in place of the standard program.
+
+ It is also possible to configure latexmk to run multiple commands. For
+ example, if when running pdflatex to generate a pdf file from a tex
+ file you need to run another program after pdflatex to perform some
+ extra processing, you could do something like:
+
+ $pdflatex = 'pdflatex --shell-escape %O %S; pst2pdf_for_latexmk
+ %B';
+
+ This definition assumes you are using a UNIX-like system, so that the
+ two commands to be run are separated by the semicolon in the middle of
+ the string.
+
+
+
+LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
+ Default values are indicated in brackets.
+
+ $banner [0]
+ If nonzero, the banner message is printed across each page when
+ converting the dvi file to postscript. Without modifying the
+ variable $banner_message, this is equivalent to specifying the
+ -d option.
+
+ Note that if $banner is nonzero, the $postscript_mode is assumed
+ and the postscript file is always generated, even if it is newer
+ than the dvi file.
+
+ $banner_intensity [0.95]
+ Equivalent to the -bi option, this is a decimal number between 0
+ and 1 that specifies how dark to print the banner message. 0 is
+
+
+
+ 28 September 2008 12
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ black, 1 is white. The default is just right if your toner car-
+ tridge isn't running too low.
+
+ $banner_message ["DRAFT"]
+ The banner message to print across each page when converting the
+ dvi file to postscript. This is equivalent to the -bm option.
+
+ $banner_scale [220.0]
+ A decimal number that specifies how large the banner message
+ will be printed. Experimentation is necessary to get the right
+ scale for your message, as a rule of thumb the scale should be
+ about equal to 1100 divided by the number of characters in the
+ message. The Default is just right for 5 character messages.
+ This is equivalent to the -bs option.
+
+ @BIBINPUTS
+ This is an array variable, now mostly obsolete, that specifies
+ directories where latexmk should look for .bib files. By
+ default it is set from the BIBINPUTS environment variable of the
+ operating system. If that environment variable is not set, a
+ single element list consisting of the current directory is set.
+ The format of the directory names depends on your operating sys-
+ tem, of course. Examples for setting this variable are:
+
+ @BIBINPUTS = ( ".", "C:\bibfiles" );
+ @BIBINPUTS = ( ".", "\\server\bibfiles" );
+ @BIBINPUTS = ( ".", "C:/bibfiles" );
+ @BIBINPUTS = ( ".", "//server/bibfiles" );
+ @BIBINPUTS = ( ".", "/usr/local/texmf/bibtex/bib" );
+
+ Note that under MS Windows, either a forward slash "/" or a
+ backward slash "\" can be used to separate pathname components,
+ so the first two and the second two examples are equivalent.
+ Each backward slash should be doubled to avoid running afoul of
+ Perl's rules for writing strings.
+
+ Important note: This variable is now mostly obsolete in the current
+ version of latexmk, since it has a better method of searching for files
+ using the kpsewhich command. However, if your system is an unusual one
+ without the kpsewhich command, you may need to set the variable @BIBIN-
+ PUTS.
+
+ $bibtex ["bibtex %O %S"]
+ The BibTeX processing program.
+
+ $bibtex_silent_switch ["-terse"]
+ Switch(es) for the BibTeX processing program when silent mode is
+ on.
+
+ $cleanup_mode [0]
+ If nonzero, specifies cleanup mode: 1 for full cleanup, 2 for
+ cleanup except for dvi, ps and pdf files, 3 for cleanup except
+ for dep and aux files. (There is also extra cleaning as speci-
+ fied by the $clean_ext, $clean_full_ext and @generated_exts
+ variables.)
+
+
+
+ 28 September 2008 13
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ This variable is equivalent to specifying one of the -c, -c1, or -C
+ options. But there should be no need to set this variable from an RC
+ file.
+
+ $clean_ext [""]
+ Extra extensions of files for latexmk to remove when any of the
+ clean-up options (-c, -c1, or -C) is selected. The value of
+ this variable is a string containing the extensions separated by
+ spaces.
+
+ $clean_full_ext [""]
+ Extra extensions of files for latexmk to remove when the -C
+ option is selected, i.e., extensions of files to remove when the
+ .dvi, etc files are to be cleaned-up.
+
+ @cus_dep_list [()]
+ Custom dependency list -- see section on "Custom Dependencies".
+
+ @default_files [("*.tex")]
+ Default list of files to be processed.
+
+ Normally, if no filenames are specified on the command line,
+ latexmk processes all tex files specified in the @default_files
+ variable, which by default is set to all tex files ("*.tex") in
+ the current directory. This is a convenience: just run latexmk
+ and it will process an appropriate set of files. But sometimes
+ you want only some of these files to be processed. In this case
+ you set the @default_files in an initialization file (e.g., the
+ file "latexmkrc" in the current directory). Then if no files
+ are specified on the command line then the files you specify by
+ setting @default_files are processed.
+
+ Three examples:
+
+ @default_files = ("paper_current");
+
+ @default_files = ("paper1", "paper2.tex");
+
+ @default_files = ("*.tex", "*.dtx");
+
+ Note that more than file may be given, and that the default
+ extension is ".tex". Wild cards are allowed. The parentheses
+ are because @default_files is an array variable, i.e., a
+ sequence of filename specifications is possible.
+
+ $dvi_filter [empty]
+ The dvi file filter to be run on the newly produced dvi file
+ before other processing. Equivalent to specifying the -dF
+ option.
+
+ $dvi_mode [0]
+ If nonzero, generate a dvi version of the document. Equivalent
+ to the -dvi option.
+
+ $dvi_previewer ["start xdvi %O %S" under UNIX]
+ The command to invoke a dvi-previewer. [Default is "start"
+ under MS-WINDOWS; under more recent versions of Windows, this
+
+
+
+ 28 September 2008 14
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ will cause to be run whatever command the system has associated
+ with .dvi files.]
+
+ $dvi_previewer_landscape ["start xdvi %O %S"]
+ The command to invoke a dvi-previewer in landscape mode.
+ [Default is "start" under MS-WINDOWS; under more recent versions
+ of Windows, this will cause to be run whatever command the sys-
+ tem has associated with .dvi files.]
+
+ $dvipdf ["dvipdf %O %S %D"]
+ Command to convert dvi to pdf file. A common reconfiguration is
+ to use the dvipdfm command, which needs its arguments in a dif-
+ ferent order:
+
+ $dvipdf = "dvipdfm %O -o %D %S";
+
+ WARNING: The default dvipdf script generates pdf files with
+ bitmapped fonts, which do not look good when viewed by acroread.
+ That script should be modified to give dvips the options "-P
+ pdf" to ensure that type 1 fonts are used in the pdf file.
+
+ $dvips ["dvips %O -o %D %S"]
+ The program to used as a filter to convert a .dvi file to a .ps
+ file. If pdf is going to be generated from pdf, then the value
+ of the $dvips_pdf_switch -- see below -- will be included in the
+ options substituted for "%O".
+
+ $dvips_landscape ["dvips -tlandscape %O -o %D %S"]
+ The program to used as a filter to convert a .dvi file to a .ps
+ file in landscape mode.
+
+ $dvips_pdf_switch ["-P pdf"]
+ Switch(es) for dvips program when pdf file is to be generated
+ from ps file.
+
+ $dvips_silent_switch ["-q"]
+ Switch(es) for dvips program when silent mode is on.
+
+ $dvi_update_command [""]
+ When the dvi previewer is set to be updated by running a com-
+ mand, this is the command that is run. See the information for
+ the variable $dvi_update_method for further information, and see
+ information on the variable $pdf_update_method for an example
+ for the analogous case of a pdf previewer.
+
+ $dvi_update_method [2 under UNIX, 1 under MS-Windows]
+ How the dvi viewer updates its display when the dvi file has
+ changed. The values here apply equally to the
+ $pdf_update_method and to the $ps_update_method variables.
+ 0 => update is automatic,
+ 1=> manual update by user, which may only mean a mouse click
+ on the viewer's window or may mean a more serious action.
+ 2 => Send the signal, whose number is in the variable
+ $dvi_update_signal. The default value under UNIX is suitable
+ for xdvi.
+ 3 => Viewer cannot do an update, because it locks the file.
+ (As with acroread under MS-Windows.)
+
+
+
+ 28 September 2008 15
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ 4 => run a command to do the update. The command is speci-
+ fied by the variable $dvi_update_command.
+
+ See information on the variable $pdf_update_method for an exam-
+ ple of updating by command.
+
+ $dvi_update_signal [Under UNIX: SIGUSR1, which is a system-dependent
+ value]
+ The number of the signal that is sent to the dvi viewer when it
+ is updated by sending a signal -- see the information on the
+ variable $dvi_update_method. The default value is the one
+ appropriate for xdvi on a UNIX system.
+
+ $fdb_ext ["fdb_latexmk"]
+ The extension of the file which latexmk generates to contain a
+ database of information on source files. You will not normally
+ need to change this.
+
+ $force_mode [0]
+ If nonzero, continue processing past minor latex errors includ-
+ ing unrecognized cross references. Equivalent to specifying the
+ -f option.
+
+ @generated_exts [( aux , bbl , idx , ind , lof , lot , out , toc ,
+ $fdb_ext )]
+ This contains a list of extensions for files that are generated
+ during a LaTeX run and that are read in by LaTeX in later runs,
+ either directly or indirectly.
+
+ This list has two uses: (a) to set the kinds of file to be
+ deleted in a cleanup operation (with the -c, -C, -CA, -g and -gg
+ options), and (b) in the determination of whether a rerun of
+ (pdf)LaTeX is needed after a run that gives an error.
+
+ (Normally, a change of a source file during a run should provoke
+ a rerun. This includes a file generated by LaTeX, e.g., an aux
+ file, that is read in on subsequent runs. But after a run that
+ results in an error, a new run should occur until the user has
+ made a change in the files. But the user may have corrected an
+ error in a source .tex file during the run. So latexmk needs to
+ distinguish user-generated and automatically generated files; it
+ determines the automatically generated files as those with
+ extensions in the list in @generated_exts.)
+
+ A convenient way to add an extra extension to the list, without
+ losing the already defined ones is to use a push command in the
+ line in an RC file. E.g.,
+
+ push @generated_exts, "end";
+
+ adds the extension "end" to the list of predefined generated
+ extensions. (This extension is used by the RevTeX package, for
+ example.)
+
+ $go_mode [0]
+ If nonzero, process files regardless of timestamps, and is then
+ equivalent to the -g option.
+
+
+
+ 28 September 2008 16
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ %hash_calc_ignore_pattern
+ !!!This variable is for experts only!!!
+
+ The general rule latexmk uses for determining when an extra run
+ of some program is needed is that one of the source files has
+ changed. But consider for example a latex package that causes
+ an encapsulated postscript file (an "eps" file) to be made that
+ is to be read in on the next run. The file contains a comment
+ line giving its creation date and time. On the next run the
+ time changes, latex sees that the eps file has changed, and
+ therefore reruns latex. This causes an infinite loop, only
+ exited becaues latexmk has a limit on the number of runs to
+ guard against pathological situations.
+
+ But the changing line has no real effect, since it is a comment.
+ You can instruct latex to ignore the offending line as follows:
+
+ $hash_calc_ignore_pattern{'eps'} = '^%%CreationDate: ';
+
+ This creates a rule for files with extension .eps about lines to
+ ignore. The left-hand side is a Perl idiom for setting an item
+ in a hash. Note that the file extension is specified without a
+ period. The value, on the right-hand side, is a string contain-
+ ing a regular expresssion. (See documentation on Perl for how
+ they are to be specified in general.) This particular regular
+ expression specifies that lines beginning with "%%CreationDate:
+ " are to be ignored in deciding whether a file of the given
+ extension .eps has changed.
+
+ $kpsewhich ["kpsewhich %S"]
+ The program called to locate a source file when the name alone
+ is not sufficient. Most filenames used by latexmk have suffi-
+ cient path information to be found directly. But sometimes,
+ notably when the file, but not its path is known. The program
+ specified by $kpsewhich is used to find it.
+
+ See also the @BIBINPUTS variable for another way that latexmk
+ also uses to try to locate files; it applies only in the case of
+ .bib files.
+
+ $landscape_mode [0]
+ If nonzero, run in landscape mode, using the landscape mode pre-
+ viewers and dvi to postscript converters. Equivalent to the -l
+ option. Normally not needed with current previewers.
+
+ $latex ["latex %O %S"]
+ The LaTeX processing program. Note that as with other programs,
+ you can use this variable not just to change the name of the
+ program used, but also specify options to the program. E.g.,
+
+ $latex = "latex --src-specials";
+
+ $latex_silent_switch ["-interaction=batchmode"]
+ Switch(es) for the LaTeX processing program when silent mode is
+ on. Under MS-Windows, the default value is changed to "-inter-
+ action=batchmode -c-style-errors", as used by MikTeX and fpTeX.
+
+
+
+
+ 28 September 2008 17
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ $lpr ["lpr %O %S" under UNIX/LINUX, "NONE lpr" under MS-WINDOWS]
+ The command to print postscript files.
+
+ Under MS-Windows (unlike UNIX/LINUX), there is no standard pro-
+ gram for printing files. But there are ways you can do it. For
+ example, if you have gsview installed, you could use it with the
+ option "/p":
+
+ $lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
+
+ If gsview is installed in a different directory, you will need
+ to make the appropriate change. Note the combination of single
+ and double quotes around the name. The single quotes specify
+ that this is a string to be assigned to the configuration vari-
+ able $lpr. The double quotes are part of the string passed to
+ the operating system to get the command obeyed; this is neces-
+ sary because one part of the command name ("Program Files") con-
+ tains a space which would otherwise be misinterpreted.
+
+ $lpr_dvi ["NONE lpr_dvi"]
+ The printing program to print dvi files.
+
+ $lpr_pdf ["NONE lpr_pdf"]
+ The printing program to print pdf files.
+
+ Under MS-Windows you could set this to use gsview, if it is
+ installed, e.g.,
+
+ $lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
+
+ If gsview is installed in a different directory, you will need
+ to make the appropriate change. Note the double quotes around
+ the name: this is necessary because one part of the command name
+ ("Program Files") contains a space which would otherwise be mis-
+ interpreted.
+
+
+ $makeindex ["makeindex %O -o %D %S"]
+ The index processing program.
+
+ $max_repeat [5]
+ The maximum number of times latexmk will run latex/pdflatex
+ before deciding that there may be an infinite loop and that it
+ needs to bail out, rather than rerunning latex/pdflatex again to
+ resolve cross-references, etc. The default value covers all
+ normal cases.
+
+ (Note that the "etc" covers a lot of cases where one run of
+ latex/pdflatex generates files to be read in on a later run.)
+
+ $new_viewer_always [0]
+ This variable applies to latexmk only in continuous-preview
+ mode. If $new_viewer_always is 0, latexmk will check for a pre-
+ viously running previewer on the same file, and if one is run-
+ ning will not start a new one. If $new_viewer_always is non-
+ zero, this check will be skipped, and latexmk will behave as if
+ no viewer is running.
+
+
+
+ 28 September 2008 18
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ $pdf_mode [0]
+ If zero, do NOT generate a pdf version of the document. If
+ equal to 1, generate a pdf version of the document using pdfla-
+ tex. If equal to 2, generate a pdf version of the document from
+ the ps file, by using the command specified by the $ps2pdf vari-
+ able. If equal to 3, generate a pdf version of the document
+ from the dvi file, by using the command specified by the $dvipdf
+ variable.
+
+ Equivalent to the -pdf-, -pdf, -pdfdvi, -pdfps options.
+
+ $pdflatex ["pdflatex %O %S"]
+ The LaTeX processing program in the version that makes a pdf
+ file instead of a dvi file.
+
+ $pdflatex_silent_switch ["-interaction=batchmode"]
+ Switch(es) for the pdflatex program (specified in the variable
+ $pdflatex when silent mode is on. Under MS-Windows, the default
+ value is changed to "-interaction=batchmode -c-style-errors", as
+ used by MikTeX and fpTeX.
+
+ $pdf_previewer ["start acroread %O %S"]
+ The command to invoke a pdf-previewer. [Default is changed to
+ "start" on MS-WINDOWS; under more recent versions of Windows,
+ this will cause to be run whatever command the system has asso-
+ ciated with .pdf files.]
+
+ WARNING: Potential problem under MS-Windows: if acroread is used
+ as the pdf previewer, and it is actually viewing a pdf file, the
+ pdf file cannot be updated. Thus makes acroread a bad choice of
+ previewer if you use latexmk's previous-continuous mode (option
+ -pvc) under MS-windows. This problem does not occur if
+ ghostview, gv or gsview is used to view pdf files.
+
+ $pdf_update_command [""]
+ When the pdf previewer is set to be updated by running a com-
+ mand, this is the command that is run. See the information for
+ the variable $pdf_update_method.
+
+ $pdf_update_method [1 under UNIX, 3 under MS-Windows]
+ How the pdf viewer updates its display when the pdf file has
+ changed. See the information on the variable $dvi_update_method
+ for the codes. (Note that information needs be changed slightly
+ so that for the value 4, to run a command to do the update, the
+ command is specified by the variable $pdf_update_command, and
+ for the value 2, to specify update by signal, the signal is
+ specified by $pdf_update_signal.)
+
+ Note that acroread under MS-Windows (but not UNIX) locks the pdf
+ file, so the default value is then 3.
+
+ Arranging to use a command to get a previewer explicitly updated
+ requires three variables to be set. For example:
+
+ $pdf_previewer = "start xpdf -remote %R %O %S";
+ $pdf_update_method = 4;
+ $pdf_update_command = "xpdf -remote %R -reload";
+
+
+
+ 28 September 2008 19
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ The first setting arranges for the xpdf program to be used in
+ its "remote server mode", with the server name specified as the
+ rootname of the TeX file. The second setting arranges for
+ updating to be done in response to a command, and the third set-
+ ting sets the update command.
+
+
+ $pdf_update_signal [Under UNIX: SIGHUP, which is a system-dependent
+ value]
+ The number of the signal that is sent to the pdf viewer when it
+ is updated by sending a signal -- see the information on the
+ variable $pdf_update_method. The default value is the one
+ appropriate for gv on a UNIX system.
+
+ $pid_position[1 under UNIX, -1 under MS-Windows]
+ The variable $pid_position is used to specify which word in
+ lines of the output from $pscmd corresponds to the process ID.
+ The first word in the line is numbered 0. The default value of
+ 1 (2nd word in line) is correct for Solaris 2.6 and Linux. Set-
+ ting the variable to -1 is used to indicate that $pscmd is not
+ to be used.
+
+ $postscript_mode [0]
+ If nonzero, generate a postscript version of the document.
+ Equivalent to the -ps option.
+
+ $preview_continuous_mode [0]
+ If nonzero, run a previewer to view the document, and continue
+ running latexmk to keep .dvi up-to-date. Equivalent to the -pvc
+ option. Which previewer is run depends on the other settings,
+ see the command line options -view=, and the variable $view.
+
+ $preview_mode [0]
+ If nonzero, run a previewer to preview the document. Equivalent
+ to the -pv option. Which previewer is run depends on the other
+ settings, see the command line options -view=, and the variable
+ $view.
+
+ $printout_mode [0]
+ If nonzero, print the document using lpr. Equivalent to the -p
+ option. This is recommended not to be set from an RC file, oth-
+ erwise you could waste lots of paper.
+
+ $print_type = ["ps"]
+ Type of file to printout: possibilities are "dvi", "none",
+ "pdf", or "ps".
+
+ $pscmd Command used to get all the processes currently run by the user.
+ The -pvc option uses the command specified by the variable
+ $pscmd to determine if there is an already running previewer,
+ and to find the process ID (needed if latexmk needs to signal
+ the previewer about file changes).
+
+ Each line of the output of this command is assumed to correspond
+ to one process. See the $pid_position variable for how the pro-
+ cess number is determined.
+
+
+
+
+ 28 September 2008 20
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ The default for pscmd is "NONE" under MS-Windows and cygwin
+ (i.e., the command is not used), "ps --width 200 -f -u
+ $ENV{USER}" under linux, "ps -ww -u $ENV{USER}" under darwin
+ (Macintosh OS-X), and "ps -f -u $ENV{USER}" under other operat-
+ ing systems (including other flavors of UNIX). In these speci-
+ fications "$ENV{USER}" is substituted by the username.
+
+ $ps2pdf ["ps2pdf %O %S %D"]
+ Command to convert ps to pdf file.
+
+ $ps_filter [empty]
+ The postscript file filter to be run on the newly produced
+ postscript file before other processing. Equivalent to specify-
+ ing the -pF option.
+
+ $ps_previewer ["start gv %O %S", but "start %O %S" under MS-WINDOWS]
+ The command to invoke a ps-previewer. (The default under MS-
+ WINDOWS will cause to be run whatever command the system has
+ associated with .ps files.)
+
+ Note that gv could be used with the -watch option updates its
+ display whenever the postscript file changes, whereas ghostview
+ does not. However, different versions of gv have slightly dif-
+ ferent ways of writing this option. You can configure this
+ variable apppropriately.
+
+ WARNING: Linux systems may have installed one (or more) versions
+ of gv under different names, e.g., ggv, kghostview, etc, but
+ perhaps not one called gv.
+
+ $ps_previewer_landscape ["start gv -swap %O %S", but "start %O %S"
+ under MS-WINDOWS]
+ The command to invoke a ps-previewer in landscape mode.
+
+ $ps_update_command [""]
+ When the postscript previewer is set to be updated by running a
+ command, this is the command that is run. See the information
+ for the variable $ps_update_method.
+
+ $ps_update_method [0 under UNIX, 1 under MS-Windows]
+ How the postscript viewer updates its display when the ps file
+ has changed. See the information on the variable
+ $dvi_update_method for the codes. (Note that information needs
+ be changed slightly so that for the value 4, to run a command to
+ do the update, the command is specified by the variable
+ $ps_update_command, and for the value 2, to specify update by
+ signal, the signal is specified by $ps_update_signal.)
+
+
+ $ps_update_signal [Under UNIX: SIGHUP, which is a system-dependent
+ value]
+ The number of the signal that is sent to the pdf viewer when it
+ is updated by sending a signal -- see $ps_update_method. The
+ default value is the one appropriate for gv on a UNIX system.
+
+ $sleep_time [2]
+ The time to sleep (in seconds) between checking for source file
+ changes when running the -pvc option.
+
+
+
+ 28 September 2008 21
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ $texfile_search [""]
+ This is an obsolete variable, replaced by the @default_files
+ variable.
+
+ For backward compatibility, if you choose to set $tex-
+ file_search, it is a string of space-separated filenames, and
+ then latexmk replaces @default_files with the filenames in $tex-
+ file_search to which is added "*.tex".
+
+ $tmpdir [See below for default]
+ Directory to store temporary files that latexmk may generate
+ while running.
+
+ The default under MSWindows (including cygwin), is to set
+ $tmpdir to the value of the first of whichever of the system
+ environment variables TMPDIR or TEMP exists, otherwise to the
+ current directory. Under other operating systems (expected to
+ be UNIX/Linux, including OS-X), the default is the value of the
+ system environment variable TMPDIR if it exists, otherwise
+ "/tmp".
+
+ $view ["default"]
+ Which kind of file is to be previewed if a previewer is used.
+ The possible values are "default", "dvi", "ps", "pdf". The
+ value of "default" means that the "highest" of the kinds of file
+ generated is to be used (among dvi, ps and pdf).
+
+
+CUSTOM DEPENDENCIES
+ In any RC file a set of custom dependencies can be set up to convert a
+ file with one extension to a file with another. An example use of this
+ would be to allow latexmk to convert a .fig file to .eps to be included
+ in the .tex file.
+
+ The old method of configuring latexmk was to directly manipulate the
+ @cus_dep_list array that contains information defining the custom
+ dependencies. This method still works. But now there are subroutines
+ that allow convenient manipulations of the custom dependency list.
+ These are
+
+ add_cus_dep( fromextension, toextension, must, subroutine )
+ remove_cus_dep( fromextension, toextension )
+ show_cus_dep()
+
+ The custom dependency is a list of rules, each of which is specified as
+ follow:
+
+ from extension:
+ The extension of the file we are converting from (e.g. "fig").
+ It is specified without a period.
+
+ to extension:
+ The extension of the file we are converting to (e.g. "eps"). It
+ is specified without a period.
+
+ must: If non-zero, the file from which we are converting must exist,
+ if it doesn't exist latexmk will give an error message and exit
+ unless the -f option is specified. If must is zero and the file
+
+
+
+ 28 September 2008 22
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ we are converting from doesn't exist, then no action is taken.
+
+ function:
+ The name of the subroutine that latexmk should call to perform
+ the file conversion. The first argument to the subroutine is
+ the base name of the file to be converted without any extension.
+ The subroutines are declared in the syntax of Perl. The func-
+ tion should return 0 if it was successful and a nonzero number
+ if it failed.
+
+ It is invoked whenever latexmk detects that a run of latex/pdflatex
+ needs to read a file, like a graphics file, whose extension is the to-
+ extension of a custom dependency. Then latexmk examines whether a file
+ exists with the same name, but with the corresponding from-extension,
+ as specified in the custom-dependency rule. If it does, then whenever
+ the destination file (the one with the to-extension) is out-of-date
+ with respect to the corresponding source file.
+
+ To make the new destination file, the Perl subroutine specified in the
+ rule is invoked, with an argument that is the base name of the files in
+ question. Simple cases just involve a subroutine invoking an external
+ program; this can be done by following the templates below, even by
+ those without knowledge of the Perl programming language. Of course,
+ experts could do something much more elaborate.
+
+ One other item in each custom-dependency rule labelled "must" above
+ specifies how the rule should be applied when the source file fails to
+ exist.
+
+ A simple and typical example of code in an initialization rcfile is
+
+ add_cus_dep( 'fig', 'eps', 0, 'fig2eps' );
+ sub fig2eps {
+ system("fig2dev -Leps $_[0].fig $_[0].eps");
+ }
+
+ The first line adds a custom dependency that converts a file with
+ extension "fig", as created by the xfig program, to an encapsulated
+ postscript file, with extension "eps". The remaining lines define a
+ subroutine that carries out the conversion. If a rule for converting
+ "fig" to "eps" files already exists (e.g., from a previously read-in
+ initialization file), the latexmk will delete this rule before making
+ the new one.
+
+ Suppose latexmk is using this rule to convert a file "figure.fig" to
+ "figure.eps". Then it will invoke the fig2eps subroutine defined in
+ the above code with a single argument "figure", which is the basename
+ of each of the files (possibly with a path component). This argument
+ is referred to by Perl as $_[0]. In the example above, the subroutine
+ uses the Perl command system to invoke the program fig2dev. The double
+ quotes around the string are a Perl idiom that signify that each string
+ of the form of a variable name, $_[0] in this case, is to be substi-
+ tuted by its value.
+
+ If the return value of the subroutine is non-zero, then latexmk will
+ assume an error occurred during the execution of the subroutine. In
+ the above example, no explicit return value is given, and instead the
+ return value is the value returned by the last (and only) statement,
+
+
+
+ 28 September 2008 23
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ i.e., the invocation of system, which returns the value 0 on success.
+
+ If you use filenames with spaces in them, and if your LaTeX system and
+ all other relevant software correctly handle such filenames, then you
+ could put single quotes around filenames in the command line that is
+ executed:
+
+ add_cus_dep( 'fig', 'eps', 0, 'fig2eps' );
+ sub fig2eps {
+ system("fig2dev -Lps '$_[0].fig' '$_[0].eps'");
+ }
+
+ This causes the invocation of the fig2dev program to have quoted file-
+ names; it should therefore work with filenames containing spaces. How-
+ ever, not all software deals correctly with filenames that contain
+ spaces. Moreover, the rules, if any, for quoting filenames vary
+ between operating systems, command shells and individual pieces of
+ software, so this code may not always work.
+
+ If you use pdflatex instead of latex, then you will probably prefer to
+ convert your graphics files to pdf format, in which case you would
+ replace the above code in an initialization file by
+
+ add_cus_dep( 'fig', 'pdf, 0, 'fig2pdf' );
+ sub fig2pdf {
+ system("fig2dev -Lpdf $_[0].fig $_[0].pdf");
+ }
+
+ If you have some general custom dependencies defined in the system or
+ user initialization file, you may find that for a particular project
+ they are undesirable. So you might want to delete the unneeded ones.
+ For example, you remove any "fig" to "eps" rule by the line
+
+ remove_cus_dep( 'fig', 'eps' );
+
+ If you have complicated sets of custom dependencies, you may want to
+ get a listing of the custom dependencies. This is done by using the
+ line
+
+ show_cus_dep();
+
+ in an initialization file.
+
+ Another example of a custom dependency overcomes a limitation of
+ latexmk concerning index files. The only index-file conversion built-
+ in to latexmk is from an ".idx" file written on one run of latex/pdfla-
+ tex to an ".ind" file to be read in on a subsequent run. But with the
+ index.sty package you can create extra indexes with extensions that you
+ configure. Latexmk does not know how to deduce the extensions from the
+ information it has. But you can easily write a custom dependency. For
+ example if your latex file uses the command "\newindex{spe-
+ cial}{ndx}{nnd}{Special index}" you will need to convert files with the
+ extension .ndx to .nnd. The following lines in an initialization RC
+ file will cause this to happen:
+
+ add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
+ sub makendx2nnd {
+ system("makeindex -o $_[0].nnd $_[0].ndx");
+
+
+
+ 28 September 2008 24
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ }
+
+ (You will need to modify this code if you use filenames with spaces in
+ them, to provide correct quoting of the filenames.)
+
+ Those of you with experience with Makefiles, will undoubtedly be con-
+ cerned that the .ndx file is written during a run of latex/pdflatex and
+ is always later than the .nnd last read in. Thus the .nnd appears to
+ be perpetually out-of-date. This situation, of circular dependencies,
+ is endemic to latex, and latexmk in its current version works correctly
+ with circular dependencies. It examines the contents of the files (by
+ use of an md5 checksum), and only does a remake when the file contents
+ have actually changed.
+
+ Of course if you choose to write random data to the .nnd (or and .aux
+ file, etc) that changes on each new run, then you will have a problem.
+ For real experts: See the %hash_cal_ignore_pattern if you have to deal
+ with such problems.
+
+ Glossaries can be dealt with similarly.
+
+
+OLD METHOD OF DEFINING CUSTOM DEPENDENCIES
+ In previous versions of latexmk, the only method of defining custom
+ dependencies was to directly manipulate the table of custom dependen-
+ cies. This is contained in the @cus_dep_list array. It is an array of
+ strings, and each string in the array has four items in it, each sepa-
+ rated by a space, the from-extension, the to-extension, the "must"
+ item, and the name of the subroutine for the custom dependency. These
+ were all defined above.
+
+ An example of the old method of defining custom dependencies is as fol-
+ lows. It is the code in an RC file to ensure automatic conversion of
+ .fig files to .eps files:
+
+ push @cus_dep_list, "fig eps 0 fig2eps";
+ sub fig2eps {
+ system("fig2dev -Lps $_[0].fig $_[0].eps");
+ }
+
+ This method still works, and is equivalent to the earlier code using
+ the add_cus_dep subroutine, except that it doesn't delete any previous
+ custom-dependency for the same conversion. So the new method is
+ preferable.
+
+
+SEE ALSO
+ latex(1), bibtex(1).
+
+BUGS
+ Sometimes a viewer (gv) tries to read an updated .ps or .pdf file after
+ its creation is started but before the file is complete. Work around:
+ manually refresh (or reopen) display. Or use one of the other preview-
+ ers and update methods.
+
+ (The following isn't really a bug, but concerns features of preview-
+ ers.) Preview continuous mode only works perfectly with certain pre-
+ viewers: Xdvi on UNIX/LINUX works for dvi files. Gv on UNIX/LINUX
+
+
+
+ 28 September 2008 25
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ works for both postscript and pdf. Ghostview on UNIX/LINUX needs a
+ manual update (reopen); it views postscript and pdf. Gsview under MS-
+ Windows works for both postscript and pdf, but only reads the updated
+ file when its screen is refreshed. Acroread under UNIX/LINUX views
+ pdf, but the file needs to be closed and reopened to view an updated
+ version. Under MS-Windows, acroread locks its input file and so the
+ pdf file cannot be updated. (Remedy: configure latexmk to use gsview
+ instead.)
+
+THANKS TO
+ Authors of previous versions. Many users with their feedback, and
+ especially David Coppit (username david at node coppit.org) who made
+ many useful suggestions that contributed to version 3, and Herbert
+ Schulz. (Please note that the e-mail addresses are not written in
+ their standard form to avoid being harvested by worms and viruses.)
+
+AUTHOR
+ Current version, by John Collins (username collins at node
+ phys.psu.edu). (Version 4.01).
+
+ It can be obtained from CTAN: <http://www.tug.org/tex-archive/sup-
+ port/latexmk/>, and from the author's website
+ <http://www.phys.psu.edu/~collins/software/latexmk/>.
+ Modifications and enhancements by Evan McLean (Version 2.0)
+ Original script called "go" by David J. Musliner (RCS Version 3.2)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 28 September 2008 26
+
+