summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/extra-scripts/README-latexmk-scripts
blob: 0f67cb114dce3d8cc00728ff758ee22d5b5c5808 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Auxiliary scripts for latexmk
=============================

John Collins (collins at phys.psu.edu)
23 Jun 2010

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 with the same command-line
    syntax as dvipdf.

    To get latexmk to use dvipdfm or dvipdfmx to convert dvi files to
    pdf files, it USED to be necessary to configure latexmk to use one
    of these scripts.  But since v. 4.01, latexmk has more flexible
    configuration methods.  Currently, to use dvipdfm, just put the
    following in one of latexmk's initialization files (e.g.,
    ~/.latexmkrc):

         $dvipdf = "dvipdfm %O -o %D %S";

    (To use dvipdfmx, just change the string dvipdfm to dvipdfmx.)
    The command specified here is used when latexmk is requested to
    make pdf files by conversion from dvi files, e.g., by the
    latexmk's command-line option -pdfdvi.

    But I leave the scripts here.  For OLD versions of latexmk, you
    would have used the configuration line 

         $dvipdf = 'dvipdfm_call';     #OBSOLETE
    or
         $dvipdf = 'dvipdfmx_call';    #OBSOLETE
    
    These still work, but they are obsolete.    

    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.

6.  completion.bash

    Bash script by Christoph Junghans that implements a bash
    completion function for latexmk.