1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674
|
\input texinfo @c -*-texinfo-*-
@c $Id: latex-mk.texi,v 1.77 2010/12/28 21:50:27 dan Exp $
@c %**start of header
@setfilename latex-mk.info
@settitle LaTeX-Mk
@c %**end of header
@include version.texi
@include prefix.texi
@dircategory LaTeX Project Tools
@direntry
* latex-mk: (latex-mk). Managing LaTeX documents
@end direntry
@ifinfo
This file documents LaTeX-Mk-@value{VERSION}
Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, 2010 Dan McMahill
@quotation
This code is derived from software written by Dan McMahill
This manual is derived from documentation written by Dan McMahill
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by Dan McMahill
4. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@end quotation
@end ifinfo
@titlepage
@title LaTeX-Mk
@subtitle For version @value{VERSION}, @value{UPDATED}
@author Dan McMahill
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010 Dan McMahill
@sp 2
@iftex
@smallformat
This code is derived from software written by Dan McMahill
This manual is derived from documentation written by Dan McMahill
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by Dan McMahill
4. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
@end smallformat
@end iftex
@end titlepage
@c Define an index of targets.
@defcodeindex tr
@c Define an index of variables.
@c @defcodeindex vn
@ifnottex
@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up
@top LaTeX-Mk
This file documents the LaTeX-Mk package. LaTeX-Mk is a
collection of Makefile fragments and shell scripts
for managing small to
large sized LaTeX projects.
This edition documents version @value{VERSION}.
@end ifnottex
@menu
* Introduction:: LaTeX-Mk's purpose
* Targets:: Available Targets
* Variables:: Variables
* HTML:: HTML Output Support
* Recursive:: Using LaTeX-Mk Recursively
* Obtaining:: How to get LaTeX-Mk
* Installation:: How to configure and install LaTeX-Mk
* Feedback:: How to contribute
* Alternatives:: Other similar tools
* History:: History
* Target Index:: Target Index
* Variable Index:: Variable Index
* General Index::
@end menu
@page
@contents
@node Introduction, Targets, Top, Top
@chapter Introduction
LaTeX-Mk is a tool for managing small to large sized LaTeX projects.
The typical LaTeX-Mk input file is simply a series of variable
definitions
in a @file{Makefile} for the project. After creating a simple
@file{Makefile} the user can easily perform all required steps to
do such tasks as: preview the document, print the document, or produce a
PDF file. LaTeX-Mk will keep track of files that have changed and how
to run the various programs that are needed to produce the output.
As a quick example, consider a project which has a single LaTeX file,
@file{mydoc.tex}, as its input. To produce a @file{.pdf} file you might
use the following sequence of commands:
@example
latex mydoc.tex
latex mydoc.tex
latex mydoc.tex
dvips -Ppdf -j0 -o mydoc.ps mydoc.dvi
ps2pdf mydoc.ps mydoc.pdf
@end example
The triple invocation of @samp{latex} is to ensure that all references
have been properly resolved and any page layout changes due to inserting
the references have been accounted for. The sequence of commands isn't
horrible, but it still is several commands and one of them,
@samp{dvips}, has some flags to remember. To use LaTeX-Mk for this
project, you would create a @file{Makefile} that contains the following.
@example
NAME=mydoc
include @value{PREFIX}/share/latex-mk/latex.gmk
@end example
@cindex make, differences between GNU and BSD
@cindex GNU make, versus BSD make
@cindex BSD make, versus GNU make
@cindex include, Makefile syntax for
Note that the @code{include @value{PREFIX}/share/latex-mk/latex.gmk} is the
syntax for GNU @samp{make}. If you are using BSD @samp{make} you would
replace the include line with
@code{.include "@value{PREFIX}/share/latex-mk/latex.mk"}. In both examples,
you would replace @code{@value{PREFIX}} with the installation prefix
on your system. For the remainder of this document we will use the BSD
style of include in the examples.
Now to create a @file{.pdf} file you simply run
@samp{make pdf}. For larger projects which may need to run programs to
export drawings to Postscript files for inclusion or run BibTeX to
generate bibliographies, the generation of @file{.pdf} (or other) files
becomes increasingly complicated to run manually. With LaTeX-Mk, such
operations are still very simple.
As a more complicated example, consider a project whose LaTeX input
is broken apart in to many @file{.tex} files which are all included by
@file{mydoc.tex}. Also suppose the project
includes a bibliography and a large number of figures created with the
Tgif program. An example @file{Makefile} for this project might look
like:
@example
NAME= mydoc
TEXSRCS= ch1.tex ch2.tex ch3.tex refs.tex
BIBTEXSRCS= mybib.bib
TGIFDIRS= tgif_figs
.include "@value{PREFIX}/share/latex-mk/latex.mk"
@end example
In this example is it assumed that all of the Tgif figures reside in a
subdirectory called @file{tgif_figs}. When the user issues a
@samp{make} command, all of the steps required to reformat the document
are taken. Because of the dependency structure imposed by @samp{make},
only the steps which need to be taken are done. This avoids
re-exporting a large number of figures which may have not changed, but
ensures that files which need processing are processed.
Hopefully this introduction has provided an adequate example for how
LaTeX-Mk can simplify the management of LaTeX based documents. The
LaTeX-Mk system is simple enough for small projects and powerful enough
for large projects. The remainder of this manual will provide complete
documentation on the use of LaTeX-Mk as well as configuration and
installation instructions.
@node Targets, Variables, Introduction, Top
@chapter Targets
LaTeX-Mk provides a fixed set of targets, the argument to the
@samp{make} command, for all projects. The default target is
@samp{view} whose ultimate goal is to provide an on-screen preview of
the formatted document. For additional information on the @samp{make}
program, please refer to the documentation for your copy of
@samp{make}.
@section Base Targets
The targets provided by LaTeX-Mk are:
@deffn Target clean
@trindex clean
Cleans the current working directory by removing all LaTeX output and
other output files created during processing of the project. In
addition, emacs @file{~} files are removed.
@end deffn
@deffn Target dist
@trindex dist
Creates a @file{.tar.gz} file containing an archive of the project.
It contains the source files and additionally some generated files
which are generated with tools which someone else may not have
installed. For example, any tgif drawings are included both in tgif
@file{.obj} form as well as encapsulated Postscript (or PDF if you are
using pdflatex). For a multiple document project, a master @file{.tar.gz}
file is created containing the entire project as well as smaller
@file{.tar.gz} files for each document.
@end deffn
@deffn Target dvi
@trindex dvi
Performs all processing required to produce the @file{.dvi} file for the
project.
@end deffn
@deffn Target html
@trindex html
Performs all processing required to produce HTML output for the
project.
@end deffn
@deffn Target pdf
@trindex pdf
Performs all processing required to produce a PDF (Portable Document
Format) file, @file{.pdf}, for the project.
@end deffn
@deffn Target print
@trindex print
Sends the processed document to the printer.
@end deffn
@deffn Target ps
@trindex ps
Performs all processing required to produce a Postscript
file, @file{.ps}, for the project.
@end deffn
@deffn Target rtf
@trindex rtf
Performs all processing required to produce a RTF (Rich Text
Format) file, @file{.rtf}, for the project. Please note that
the ability of LaTex to RTF converters to work correctly is
somewhat limited. Your mileage may vary.
@end deffn
@deffn Target show-var
@trindex show-var
This target is used to help debug users Makefiles as well as the
LaTeX-Mk system. This target displays the value of the variable whose
name is given by the variable VARNAME. For example:
@example
make show-var VARNAME=TEXSRCS
@end example
will display the value of the @code{TEXSRCS} variable.
@end deffn
@deffn Target view
@trindex view
Previews the @file{.dvi} file.
@end deffn
@deffn Target viewpdf
@trindex viewpdf
Previews the PDF (@file{.pdf}) file.
@end deffn
@deffn Target viewps
@trindex viewps
Previews the Postscript (@file{.ps}) file.
@end deffn
@section Draft Targets
LaTeX-Mk supports adding a DRAFT watermark and timestamp for the
Postscript, PDF, and printed output. To produce the draft versions,
simply append @code{-draft} to the target. The currently supported draft
targets are:
@deffn Target pdf-draft
@trindex pdf-draft
Draft version of the @code{pdf} target.
@end deffn
@deffn Target ps-draft
@trindex ps-draft
Draft version of the @code{ps} target.
@end deffn
@deffn Target print-draft
@trindex print-draft
Draft version of the @code{print} target.
@end deffn
@deffn Target viewpdf-draft
@trindex viewpdf-draft
Draft version of the @code{viewpdf} target.
@end deffn
@deffn Target viewps-draft
@trindex viewps-draft
Draft version of the @code{viewps} target.
@end deffn
@section Per Document Targets
LaTeX-Mk supports multiple top level documents in a single directory
controlled by a single makefile. For each top level document specified
in the @code{NAME} variable (more on variables later), there will be a
set of targets defined which are specific to the document. The per
document targets are:
@deffn Target print_<name>
@trindex print_<name>
Prints the Postscript file @file{<name>.ps}.
@end deffn
@deffn Target view_<name>
@trindex view_<name>
Previews the DVI file @file{<name>.dvi}.
@end deffn
@deffn Target viewpdf_<name>
@trindex viewpdf_<name>
Previews the PDF file @file{<name>.pdf}.
@end deffn
@deffn Target viewps_<name>
@trindex viewps_<name>
Previews the Postscript file @file{<name>.ps}.
@end deffn
In addition, draft versions of these targets exist:
@deffn Target print_<name>-draft
@trindex print_<name>-draft
Draft version of the @code{print_<name>} target.
@end deffn
@deffn Target ps_<name>-draft
@trindex ps_<name>-draft
Draft version of the @code{ps_<name>} target.
@end deffn
@deffn Target view_<name>-draft
@trindex view_<name>-draft
Draft version of the @code{view_<name>} target.
@end deffn
@deffn Target viewpdf_<name>-draft
@trindex viewpdf_<name>-draft
Draft version of the @code{viewpdf_<name>} target.
@end deffn
@deffn Target viewps_<name>-draft
@trindex viewps_<name>-draft
Draft version of the @code{viewps_<name>} target.
@end deffn
@node Variables, HTML, Targets, Top
@chapter Variables
The variables used by LaTeX-Mk can be categorized roughly into two
groups. The first set of variables are typically set during the
installation of LaTeX-Mk and these defaults used for all projects.
These variables can be overridden on a per-user or per-project basis for
maximum flexibility. The second set of variables are set by the user on
a per-project basis.
@section Site Configuration Variables
This section documents the variables which are typically set on a
site-wide or user-wide basis.
@subsection Site and User Configuration File
@defvar MAKECONF
This variable is set to the location of the site-wide configuration
file. If this file exists, it is sourced at the beginning of the
LaTeX-Mk code. Default is @file{$@{sysconfdir@}/latek-mk.conf} for BSD make and
@file{$@{sysconfdir@}/latex-gmk.conf} for GNU make. This is where system administrators
can set system wide configuration variables. Any variables defined
here should be defined using @code{VARIABLE?= "new value"}
instead of @code{VARIABLE= "new value"} so that individual users
can easily override the setting. The default setting may be
changed during configuration of the package using the
@code{--with-mkconf} and @code{--with-gmkconf} flags to
@code{configure}. The @code{sysconfdir} directory can be specified
to @code{configure} with the @code{--sysconfdir=} option.
@end defvar
@defvar USER_MAKECONF
This variable is set to the location of a users personal configuration
file. If this file exists, it is sourced at the beginning of the
LaTeX-Mk code. Default is @file{$HOME/.latex-mk.conf} for BSD make and
@file{$HOME/.latex-gmk.conf} for GNU make. This file is sourced before
the file specified by @code{MAKECONF}. The default setting may be
changed during configuration of the package using the
@code{--with-usermkconf} and @code{--with-usergmkconf} flags to
@code{configure}.
@end defvar
@subsection Generic Project Variables
This section documents the variables which are typically set on a
site-wide or user-wide basis. In a typical installation these variables
do not need to be explicitly set as they will take on reasonable
defaults.
@defvar BIBTEX
The bibtex executible. Defaults to @samp{bibtex}.
@end defvar
@defvar BIBTEX_ENV
Deprecated. Actually this variable did not work correctly anyway.
Use LATEX_ENV to set variables for both LaTeX and bibTeX runs.
@end defvar
@defvar BIBTEX_FLAGS
A list of flags to be passed to the BIBTEX executible.
Defaults to @samp{}.
@end defvar
@defvar CONVERT
The image file format conversion executible which is
part of the ImageMagick (@url{http://imagemagick.org/})
suite.
Defaults to @samp{convert}.
@end defvar
@defvar DVIPDFM
The executible which produces PDF files from @file{.dvi} files.
Defaults to @samp{dvipdfm}. Note that the default behavior is to use
DVIPS to produce Postscript and then PS2PDF to produce a PDF file. To
use DVIPDFM to directly produce PDF from DVI, set the USE_DVIPDFM
variable.
@end defvar
@defvar DVIPDFM_ENV
A list of variables to be set in the environment when DVIPDFM is
executed.
Defaults to @samp{}.
@end defvar
@defvar DVIPDFM_FLAGS
A list of flags to be passed to the DVIPDFM executible.
Defaults to @samp{}.
To set flags on a per-document
basis, you can use @code{<docname>_DVIPDFM_FLAGS}
where @code{<docname>} is the name of the document.
@end defvar
@defvar DVIPDFM_LANDSCAPE_FLAGS
A list of flags to be added to DVIPDFM_FLAGS when the LANDSCAPE variable
is set.
Defaults to @samp{-l}.
@end defvar
@defvar DVIPS
The executible which produces Postscript files from @file{.dvi} files.
Defaults to @samp{dvips}.
@end defvar
@defvar DVIPS_ENV
A list of variables to be set in the environment when DVIPS is
executed.
Defaults to @samp{}.
@end defvar
@defvar DVIPS_FLAGS
A list of flags to be passed to the DVIPS executible.
Defaults to @samp{-j0}. Note: versions of latex-mk
prior to 1.2 used @samp{-Ppdf -j0} as the default. If
you wish to maintain this behavior on latex-mk-1.2 and
newer, you will need to set this variable in your site or
user configuration file.
To set flags on a per-document
basis, you can use @code{<docname>_DVIPS_FLAGS}
where @code{<docname>} is the name of the document.
@end defvar
@defvar DVIPS_LANDSCAPE_FLAGS
A list of flags to be added to DVIPS_FLAGS when the LANDSCAPE variable
is set.
Defaults to @samp{-t landscape}.
@end defvar
@defvar GV
The executible which previews Postscript files.
Defaults to @samp{gv}.
@end defvar
@defvar GV_FLAGS
A list of flags to be passed to the GV executible.
Defaults to @samp{}.
@end defvar
@defvar GV_LANDSCAPE_FLAGS
A list of flags to be added to GV_FLAGS when the LANDSCAPE variable
is set.
Defaults to @samp{-landscape}.
@end defvar
@defvar GZCAT
The gzcat file decompression utility.
Defaults to @samp{gzcat}.
@end defvar
@defvar GZIP
The gzip file compression utility.
Defaults to @samp{gzip}.
@end defvar
@defvar HEVEA
The Hevea executible.
Defaults to @samp{hevea}.
@end defvar
@defvar HEVEA_ENV
A list of variables to be set in the environment when HEVEA
or IMAGEN is run. For example:
@example
HEVEA_ENV+= TEXINPUTS=.:/home/usr/tex:
@end example
Defaults to @samp{}.
@end defvar
@defvar HEVEA_FLAGS
A list of flags to be passed to the HEVEA executible.
Defaults to @samp{-fix}.
@end defvar
@defvar IMAGEN
The imagen executible (part of HeVeA).
Defaults to @samp{imagen}.
@end defvar
@defvar JPG2EPS
The command to convert a JPEG file
to an Encapsulated Postscript (EPS) file.
Defaults to @samp{$@{CONVERT@}}.
@end defvar
@defvar LATEX
The LaTeX executible.
Defaults to @samp{latex}.
@end defvar
@defvar LATEX_ENV
A list of variables to be set in the environment when LATEX
is run. For example:
@example
LATEX_ENV+= TEXINPUTS=.:/home/usr/tex:
@end example
Defaults to @samp{}.
@end defvar
@defvar LATEX_FLAGS
A list of flags to be passed to the LATEX executible.
Defaults to @samp{}.
@end defvar
@defvar LATEX2HTML
The LaTex2HTML executible.
Defaults to @samp{latex2html}.
@end defvar
@defvar LATEX2HTML_ENV
A list of variables to be set in the environment when LATEX2HTML
is run. For example:
@example
LATEX2HTML_ENV+= TEXINPUTS=.:/home/usr/tex:
@end example
Defaults to @samp{}.
@end defvar
@defvar LATEX2HTML_FLAGS
A list of flags to be passed to the LATEX2HTML executible.
Defaults to @samp{-image_type png -local_icons -show_section_numbers}.
@end defvar
@defvar LATEX2RTF
The LaTex2rtf executible.
Defaults to @samp{latex2rtf}.
@end defvar
@defvar LATEX2RTF_ENV
A list of variables to be set in the environment when LATEX2RTF
is run.
@end defvar
@defvar LATEX2RTF_FLAGS
A list of flags to be passed to the LATEX2RTF executible.
Defaults to @samp{}.
@end defvar
@defvar LPR
The executible which spools Postscript files to a printer.
Defaults to @samp{lpr}.
@end defvar
@defvar LPR_FLAGS
A list of flags to be passed to the LPR executible.
For example:
@example
LPR_FLAGS= -Pbeernuts
@end example
Defaults to @samp{}.
@end defvar
@defvar MAKEGLS
The executible used to make glossaries.
Defaults to @samp{makeindex}.
@end defvar
@defvar MAKEGLS_FLAGS
A list of flags to be passed to the MAKEGLS executible.
Defaults to @samp{}.
@end defvar
@defvar MAKEIDX
The makeindex executible.
Defaults to @samp{makeindex}.
@end defvar
@defvar MAKEIDX_FLAGS
A list of flags to be passed to the MAKEIDX executible.
Defaults to @samp{}.
@end defvar
@defvar MPOST
The METApost executible.
Defaults to @samp{mpost}.
@end defvar
@defvar MPOST_FLAGS
A list of flags to be passed to the MPOST executible.
Defaults to @samp{}.
@end defvar
@defvar PDFLATEX
The PDFLaTeX executible.
Defaults to @samp{pdflatex}.
@end defvar
@defvar PDFLATEX_ENV
A list of variables to be set in the environment when PDFLATEX
is run. For example:
@example
PDFLATEX_ENV+= TEXINPUTS=.:/home/usr/tex:
@end example
Defaults to @samp{}.
@end defvar
@defvar PDFLATEX_FLAGS
A list of flags to be passed to the PDFLATEX executible.
Defaults to @samp{}.
@end defvar
@defvar PNG2EPS
The command to convert a Portable Network Graphic (PNG) file
to an Encapsulated Postscript (EPS) file.
Defaults to @samp{$@{CONVERT@}}.
@end defvar
@defvar POST_BIBTEX_HOOK
If this variable is set to the name of an executible, then LaTeX-Mk will
run this program/script immediately after a BibTeX run. This hook
provides the ability to do post-processing of the BibTeX output prior to
the final LaTeX run(s). This feature is likely to be of interest to
advanced users only. The program/script is run in the same environment
as specified by LATEX_ENV and is given the project name as an argument.
For example if your @file{Makefile} contains
@example
NAME= mydoc
POST_BIBTEX_HOOK= ./my_bib_fixup
@end example
then the after BibTeX is run, @samp{./my_bib_fixup mydoc} will be run.
POST_BIBTEX_HOOK defaults to @samp{}.
@end defvar
@defvar PS2PDF
The executible which produces PDF (@file{.pdf}) files from Postscript
(@file{.ps}) files.
Defaults to @samp{ps2pdf}.
@end defvar
@defvar PS2PDF_FLAGS
A list of flags to be passed to the PS2PDF executible.
Defaults to @samp{}.
@end defvar
@defvar TAR
The tar tape archiver utility.
Defaults to @samp{tar}.
@end defvar
@defvar TEX2PAGE
The tex2page executible.
Defaults to @samp{tex2page}.
@end defvar
@defvar TEX2PAGE_ENV
A list of variables to be set in the environment when TEX2PAGE
is run. For example:
@example
TEX2PAGE_ENV+= TEXINPUTS=.:/home/usr/tex:
@end example
Defaults to @samp{}.
@end defvar
@defvar TEX2PAGE_FLAGS
A list of flags to be passed to the TEX2PAGE executible.
Defaults to @samp{}.
@end defvar
@defvar USE_DVIPDFM
When set, this variable causes the DVIPDFM program to be used to
directly generate @file{.pdf} files from the @file{.dvi} files instead
of using DVIPS to generate a Postscript file and then PS2PDF to convert
the Postscript to PDF. Please note that the use of this option
currently precludes the generation of the -draft versions of PDF files.
@end defvar
@defvar USE_HEVEA
When set, this variable causes the HEVEA program to be used to
generate HTML output.
@end defvar
@defvar USE_LATEX2HTML
When set, this variable causes the LATEX2HTML program to be used to
generate HTML output.
@end defvar
@defvar USE_PDFLATEX
When set, this variable causes the PDFLATEX program to be used to
directly generate @file{.pdf} files from the @file{.tex} files instead
of using LATEX to generate a @file{.dvi} file, DVIPS to generate a
Postscript file and then PS2PDF to convert
the Postscript to PDF. Please note that the use of this option
currently precludes the generation of the -draft versions of PDF files.
@end defvar
@defvar USE_TEX2PAGE
When set, this variable causes the TEX2PAGE program to be used to
generate HTML output.
@end defvar
@defvar VIEWPDF
The executible which previews @file{.pdf} files.
Defaults to @samp{gv}.
@end defvar
@defvar VIEWPDF_FLAGS
A list of flags to be passed to the VIEWPDF executible.
Defaults to @samp{}.
@end defvar
@defvar VIEWPDF_LANDSCAPE_FLAGS
A list of flags to be added to VIEWPDF_FLAGS when the LANDSCAPE variable
is set.
Defaults to @samp{-landscape}.
@end defvar
@defvar XDVI
The executible which previews @file{.dvi} files.
Defaults to @samp{xdvi}.
@end defvar
@defvar XDVI_FLAGS
A list of flags to be passed to the XDVI executible.
Defaults to @samp{}.
@end defvar
@defvar XDVI_LANDSCAPE_FLAGS
A list of flags to be added to XDVI_FLAGS when the LANDSCAPE variable
is set.
Defaults to @samp{-paper usr}.
@end defvar
@subsection Lgrind Site Configuration Variables
This section documents the variables related to lgrind source code
processing. Lgrind is a source code formatter which takes source
code files in various programming languages and formats them for
inclusion in a LaTeX document.
@defvar LGRIND
The lgrind executible used for formatting source code for inclusion
into a LaTeX document.
Defaults to @samp{lgrind}.
@end defvar
@defvar LGRIND_FLAGS
A list of flags to be passed to the LGRIND executible.
For example:
@example
LGRIND_FLAGS= -i -t 4 -d /my/private/lgrindef
@end example
Defaults to @samp{-i}.
@end defvar
@subsection Tgif Site Configuration Variables
This section documents the variables related to Tgif file processing.
Tgif (@url{http://bourbon.usc.edu:8001/tgif/tgif.html})
is a nice vector drawing program which works well with LaTeX.
Please note that LaTeX-Mk requires that all Tgif files use the extension
@file{.obj}.
@defvar TGIF
The tgif executible.
Defaults to @samp{tgif}.
@end defvar
@defvar TGIF_FLAGS
A list of flags to be passed to the TGIF executible to cause it to print
to a file. These flags will be used for both PDF and EPS export.
Defaults to @samp{-color -print}.
@end defvar
@defvar TGIF_EPS_FLAGS
A list of flags to be passed to the TGIF executible when exporting to
an encapsulated Postscript, @file{.eps}, file.
Defaults to @samp{-eps}.
@end defvar
@defvar TGIF_PDF_FLAGS
A list of flags to be passed to the TGIF executible when exporting to
a PDF, @file{.pdf}, file.
Defaults to @samp{-pdf}.
@end defvar
@subsection Xfig Site Configuration Variables
This section documents the variables related to Xfig file processing.
Please note that LaTeX-Mk requires that all Xfig files use the extension
@file{.fig}.
@defvar FIG2DEV
The executible which can convert xfig @file{.fig} files to encapsulated
Postscript @file{.eps} files.
Defaults to @code{fig2dev}.
@end defvar
@defvar FIG2DEV_FLAGS
A list of flags to be passed to the FIG2DEV executible to cause it to print
to a file. These flags will be used for both PDF and EPS export.
Defaults to @samp{}.
@end defvar
@defvar FIG2DEV_EPS_FLAGS
A list of flags to be passed to the FIG2DEV executible when exporting to
an encapsulated Postscript, @file{.eps}, file.
Defaults to @samp{-L eps}.
@end defvar
@defvar FIG2DEV_PDF_FLAGS
A list of flags to be passed to the FIG2DEV executible when exporting to
a PDF, @file{.pdf}, file.
Defaults to @samp{-L pdf}.
@end defvar
@section Per-Project Variables
This section documents variables which can be set in project Makefiles
to accommodate other dependencies which may be added.
@subsection Required Variables
Every project must define the @code{NAME} variable.
@defvar NAME
Name of the project. The top level LaTeX input file is assumed to be
called @file{<NAME>.tex}. For projects which have multiple documents,
you would list the top level name for each document here.
For example, if you have a single document, @file{mydoc}, you would use
@example
NAME= mydoc
@end example
and if you have multiple documents, @file{mydoc1}, @file{mydoc2},
and @file{mydoc3}, you would use
@example
NAME= mydoc1 mydoc2 mydoc3
@end example
@end defvar
@subsection Generic Variables
The variables described in this section affect all of the top level
documents listed in the @code{NAME} variable. This is useful for
listing common dependencies like a header or style file used by all
documents. To list dependencies which are specific to one of the top
level documents, you can use the variable @code{<docname>_<VARNAME>}
where @code{<docname>} is the name of the document and @code{<VARNAME>}
is the name of the variable. For example,
@example
NAME= doc1 doc2
TEXSRCS= header.tex
doc1_TEXSRCS= intro1.tex body1.tex conclusions.tex
@end example
defines a project with two top level documents, @code{doc1} and
@code{doc2}. Both documents depend on @file{header.tex} and in
addition, @code{doc1} depends on @file{intro1.tex}, @file{body1.tex},
and @code{conclusions.tex}. More information on the @code{TEXSRCS}
variable is given later.
@defvar BIBTEXSRCS
All files listed in this variable are assumed to be BibTeX input files.
Listing files in this variable will cause a dependency to be
added to the top level project and BibTeX will be run on these files as
needed.
@end defvar
@defvar CLEAN_FILES
Files listed in this variable will be removed when the @code{clean}
target is made. When setting this variable in a @file{Makefile}, the
@code{+=} syntax should be used to append to this variable. For
example:
@example
CLEAN_FILES+= my_leftover_file foo.bak
@end example
will add @file{my_leftover_file} and @file{foo.bak} to the list of files
to be removed when @samp{make clean} is run.
@end defvar
@defvar EXTRA_DIST
Files listed in this variable will be added to the archive file created
with the @code{dist} target.
@example
EXTRA_DIST+= README.txt
@end example
@end defvar
@defvar OTHER
Files listed in this variable will be added to the dependency list for
the @file{.dvi} file. For example if you want to add all @file{.eps}
and @file{.epsi}
files in a particular directory as well as some @file{.png} files
from another directory to the dependency list, then using BSD
make, you could add:
@cindex make, differences between GNU and BSD
@cindex GNU make, versus BSD make
@cindex BSD make, versus GNU make
@cindex wildcard, Makefile syntax for
@example
OTHER_EPS!= ls eps/*.eps*
OTHER+= $(OTHER_EPS)
OTHER_PNG!= ls png/*.png
OTHER+= $(OTHER_PNG:.png=.eps)
CLEAN_FILES+= $(OTHER_PNG:.png=.eps)
@end example
If you are using GNU make, you would use
@example
OTHER_EPS= $(wildcard eps/*.eps*)
OTHER+= $(OTHER_EPS)
OTHER_PNG= $(wildcard png/*.png)
OTHER+= $(OTHER_PNG:.png=.eps)
CLEAN_FILES+= $(OTHER_PNG:.png=.eps)
@end example
@end defvar
@defvar TEXSRCS
All files listed in this variable are assumed to be LaTeX input files.
Listing files in this variable will cause a dependency to be
added to the top level project. All LaTeX files used in the project
should be listed in this variable with the exception of the top level
LaTeX file which is automatically included by LaTeX-Mk.
@end defvar
@subsection Per-Project Lgrind Variables
@defvar LGRINDSRCS
All files listed in this variable are assumed to be source code files
to be processed by lgrind.
Listing files in this variable will cause a dependency to be
added to the top level project and will cause these files to be
automatically re-formatted as required.
@end defvar
@defvar LGRINDDIRS
A list of directories containing source code can be listed in this
variable. All files found in those directories which have extensions
will be formated using lgrind. Files without a @file{.*} extension
will be ignored.
These files will be added to the top
level dependency list and will be
automatically re-formatted as required.
@end defvar
@defvar foo_LGRIND_FLAGS
This variable sets specific flags which should be passed to lgrind
when processing the source file @file{foo}. For example,
@example
mymodule.v_LGRIND_FLAGS= -lverilog
@end example
If @file{foo} is a directory which has been listed in LGRINDDIRS, then
foo_LGRIND_FLAGS will be used for all files in the specified
directory. You can define flags for an entire directory and then
override it for a single file if needed. For example, suppose you
want to use 4 as the tab width for all sources in the directory
@file{srcs} except for @file{srcs/funny.c} where you want to use a tab
width of 8. You would achieve this with
@example
srcs_LGRIND_FLAGS= -t 4
srcs/funny.c_LGRIND_FLAGS= -t 8
@end example
@end defvar
@subsection Per-Project META-post Variables
@defvar MPOSTSRCS
All files listed in this variable are assumed to be META-post @file{.mp}
files. Listing files in this variable will cause a dependency to be
added to the top level project and will cause these files to be
automatically re-exported to Postscript and/or PDF as required.
@end defvar
@defvar MPOSTDIRS
A list of directories containing META-post figured can be listed in this
variable. All @file{.mp} files found in those directories are assumed
to be META-post @file{.mp} files. These files will be added to the top
level dependency list and will be
automatically re-exported to Postscript and/or PDF as required.
@end defvar
@defvar MPOST_TWICE
By default META-post is run once for each of its input files. Setting
this variable will cause META-post to run twice on each input file.
Some figures may require this and I haven't figured out if there is a
way to automatically make this determination like there is with LaTeX.
@end defvar
@subsection Per-Project Tgif Variables
@defvar TGIFSRCS
All files listed in this variable are assumed to be tgif @file{.obj}
files. Listing files in this variable will cause a dependency to be
added to the top level project and will cause these files to be
automatically re-exported to Postscript as required.
@end defvar
@defvar TGIFDIRS
A list of directories containing tgif drawings can be listed in this
variable. All @file{.obj} files found in those directories are assumed
to be tgif @file{.obj} files. These files will be added to the top
level dependency list and will be
automatically re-exported to Postscript as required.
@end defvar
@subsection Per-Project Xfig Variables
@defvar XFIGSRCS
All files listed in this variable are assumed to be xfig @file{.fig}
files. Listing files in this variable will cause a dependency to be
added to the top level project and will cause these files to be
automatically re-exported to Postscript as required.
@end defvar
@defvar XFIGDIRS
A list of directories containing xfig drawings can be listed in this
variable. All @file{.fig} files found in those directories are assumed
to be xfig @file{.fig} files. These files will be added to the top
level dependency list and will be
automatically re-exported to Postscript as required.
@end defvar
@node HTML, Recursive, Variables, Top
@chapter HTML Output
LaTeX-Mk includes support for generating HTML output. Currently
Latex2HTML (see @url{http://www.latex2html.org}), HeVeA (see
@url{http://para.inria.fr/~maranget/hevea/}), or tex2page
(see @url{http://www.ccs.neu.edu/home/dorai/tex2page/})
can be used for producing
an HTML version of your document. The selection of which program to
use is done with the USE_HEVEA, USE_LATEX2HTML, and USE_TEX2PAGE
variables. Simply
define one of these in your @file{$@{sysconfdir@}/latex-mk.conf} file
(for site-wide configuration) or @file{$HOME/.latex-mk.conf} (for
per-user configuration). If you are using GNU make, the variable would
be set in @file{$@{sysconfdir@}/latex-gmk.conf} or
@file{$HOME/.latex-gmk.conf} instead. You can also override this
setting in your project @file{Makefile}. For example, to use Latex2HTML,
add
@example
USE_LATEX2HTML= yes
@end example
to your configuration file or to your project @file{Makefile}.
To generate HTML output, simply run @samp{make html}. The HTML output
along with any image files will be placed in a subdirectory called
@file{$@{NAME@}.html_dir}. For example, if you have a project with two
top level documents, your @file{Makefile} might look like:
@example
NAME= doc1 doc2
.include "/usr/pkg/share/latex-mk/latex.mk"
@end example
After running @samp{make html}, you will have two new subdirectories
called @file{doc1.html_dir} and @file{doc2.html_dir} containing HTML
versions of the two documents.
To keep track of which files have been generated during the conversion,
a temporary file, @file{$@{NAME@}.www_files} gets created and all
generated files are recorded there. This allows the output produced by
HeVeA to be moved to the correct subdirectory as well as allowing
@samp{make clean} to work.
The HTML generation is still new and there are probably some bugs to
work out. Please submit bug reports. There are also some features
which may be useful that have not been integrated. For example the
program @file{hacha} could be used for breaking the HeVeA output into
several smaller files.
@node Recursive, Obtaining, HTML, Top
@chapter Using LaTeX-Mk Recursively
In some cases you may wish to organize multiple documents into their
own subdirectories but still be able to build all of them with a
single make call. This is supported in LaTeX-Mk via the use of the
@file{latex.subdir.mk} makefile fragment. To use recursion, create a
@file{Makefile}, in your top level directory which looks something
like the following example.
@example
SUBDIR+= project1
SUBDIR+= project2
SUBDIR+= project3
.include "@value{PREFIX}/share/latex-mk/latex.subdir.mk"
@end example
Now create your usual LaTeX-Mk Makefiles in the @file{project1},
@file{project2}, and @file{project3} subdirectories. Additional
subdirectories are added to the @code{SUBDIR} variable. Multiple
levels of subdirectories make be used. Please note that currently the
use of both @file{latex.mk} and @file{latex.subdir.mk} in a single
Makefile is not supported.
@node Obtaining, Installation, Recursive, Top
@chapter Obtaining LaTeX-Mk
The latest information and version of LaTeX-Mk can be found on the main
LaTeX-Mk
web site at @url{http://latex-mk.sourceforge.net}.
A package for the NetBSD operating system (see @url{http://www.NetBSD.org} for
information about NetBSD)
exists at
@url{ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/print/latex-mk/README.html}.
A port for the FreeBSD operating system (see @url{http://www.FreeBSD.org} for
information about FreeBSD)
exists at
@url{http://www.freshports.org/misc/latex-mk}.
@node Installation, Feedback, Obtaining, Top
@comment node-name, next, previous, up
@chapter Installing LaTeX-Mk
@section System Requirements
To configure and install LaTeX-Mk, you will need a Unix-like operating
system or shell with a compatible make program. In addition, to use
LaTeX-Mk, you will require:
@enumerate
@item
@code{latex}. The development of LaTeX-Mk was done using Thomas Esser's
@TeX{} distribution, teTeX, version 1.0.7. More information on teTeX can
be found at @url{http://www.tug.org/tetex/}.
@item
Either GNU make version 3.80 or higher or a BSD make program.
For information on GNU make, see
@url{http://www.gnu.org/software/make/}. For information on the NetBSD
operating system (which of course includes BSD make), see
@url{http://www.netbsd.org}. If you wish to install BSD make on a
non-BSD system, you can try downloading one of the bmake snapshots from
files area of the LaTeX-Mk sourceforge project page at
@url{http://www.sourceforge.net/projects/latex-mk}.
The GNU make version requirement is firm. LaTeX-Mk will not work
with versions of GNU make prior to 3.80. It is highly unlikely that
LaTeX-Mk will be ported to older GNU make versions due to the lack of
some important features in older versions.
@end enumerate
@section Installation
Installation of LaTeX-Mk consists of three steps: configuration,
building, and installing. In a typical installation, this is as simple
as
@example
./configure
make
make install
@end example
This will configure LaTeX-Mk with the defaults, create the final files
to be installed, and install them in the proper location. The
@file{configure} script is a standard GNU autoconf script. The most
common option is the @samp{--prefix=<installation prefix>} option. This
causes LaTeX-Mk to use @code{<installation prefix>} as the base
directory for the installation.
Running @code{configure --help} will give a list of the available
configuration options. The ones which are specific to LaTeX-Mk, as
opposed to being generic configure options are listed here.
@code{--with-mkconf=<mkconf>}: this option changes the default system
configuration file for BSD make. This file defaults to
@file{$@{sysconfdir@}/latex-mk.conf}.
@code{--with-gmkconf=<gmkconf>}: this option changes the default system
configuration file for GNU make. This file defaults to
@file{$@{sysconfdir@}/latex-gmk.conf}.
@code{--with-usermkconf=<usermkconf>}: this option changes the default
user
configuration file for BSD make. This file defaults to
@file{$HOME/.latex-mk.conf}.
@code{--with-usergmkconf=<usergmkconf>}: this option changes the
default user
configuration file for GNU make. This file defaults to
@file{$HOME/.latex-gmk.conf}.
@node Feedback, Alternatives, Installation, Top
@chapter Feedback
@comment node-name, next, previous, up
@cindex BUGS, reporting
@cindex Reporting BUGS
@cindex E-mail, bug reports
To report bugs, provide feedback, suggest new features, etc. visit the
LaTeX-Mk Project management page at
@url{http://www.sourceforge.net/projects/latex-mk} or send email to the
author at @email{danmc@@users.sourceforge.net}.
For information on the current version of LaTeX-Mk, visit the LaTeX-Mk
homepage at @url{http://latex-mk.sourceforge.net}.
@node Alternatives, History, Feedback, Top
@chapter Alternatives
@cindex alternatives to LaTeX-Mk
There are a few tools which are somewhat similar to LaTeX-Mk. I have
not reviewed them in any detail and thus am unable to comment on how similar
or different they are compared to LaTeX-Mk.
@enumerate
@item "mk" @url{http://www.servalys.nl/scripts/}
@end enumerate
@comment node-name, next, previous, up
@node History, Target Index, Alternatives, Top
@chapter History
@section The Dark Ages
In the beginning I used a WYSIWYG word processor from a large software
vendor in the Pacific Northwest of the US. It worked for short papers,
it was horrible for medium to long documents, painful for equations,
and painful for figures. Then I learned LaTeX and life was much much
better.
@section The Giant Per-Project Makefile
In graduate school, a friend showed me a makefile he had set up for his
thesis. It contained all sorts of targets and some intelligence about
running LaTeX multiple times for resolving references. I made a
modified version of that for my thesis and even wrote a book
where I used yet another modified version of that makefile. This
approach was much better than doing everything by hand because I had
added a lot of functionality over my friends makefile. In particular,
my new makefile automatically dealt with tgif figures and I had many
many figures in the thesis and the book.
Despite the utility of the large customized makefile I had, it was not
maintainable in the sense that every time I started a new document, I'd
end up with another copy of a very large makefile to maintain. If I
fixed a bug in one, I'd have several other documents in progress which
needed updating.
@section Enter LaTeX-Mk
For those of you familiar with the build system used by the BSD
operating systems, you'll know that for each program, there is a very
simple makefile which lists the source files along with a couple of
other variables which can optionally be set. Then a system makefile
called @file{bsd.prog.mk} is included. That included makefile
fragment has all the code required to provide all the standard targets,
sets up the various compiler flags and correctly handles all the
dependencies. It is maintainable because the bulk of the code is common
and only needs to be maintained in one place.
Being inspired by the BSD style makefile approach, I converted my most
up to date giant per-project makefile into an @code{include}-able makefile
fragment and spent some time defining the interface a bit more
generically than I'd done in the past. Since that time I've used the
result, LaTeX-Mk, for the last few documents at school, some papers I've
worked on since then and also for work related documentation. So far,
the makefile framework has proven to be very useful and a big time saver
for me. Since I believe in open-source software I felt it was
appropriate to document my efforts and provide a packaged solution that
others could also use.
@section The Modern Era of LaTeX-Mk
@c ********************************************************
@c ********************** VERSION 0.9 *********************
@c ********************************************************
@subsection Version 0.9
Released on 2002-10-09, this was the first public
release of LaTeX-Mk. My reason for using 0.9 instead of 1.0 is that
LaTeX-Mk had not been tested or used much by others yet. Even though it
works well for me, as with any product I'm sure others will quickly
find other ways to use it that I had not anticipated. My goal is to
collect feedback over the first few months of public consumption and
come out with a 1.0 version which incorporates the primary improvements.
@c ********************************************************
@c ********************** VERSION 0.9.1 *******************
@c ********************************************************
@subsection Version 0.9.1
This is a bug fix version released on 2002-10-29.
The significant changes over the previous
version are:
@itemize @bullet
@item
Per-document Xfig dependencies are now supported. This was an oversight
in the previous version.
@item
A big non-portable GNU make hack has been removed. Starting with this
@cindex GNU make, version required
version of LaTeX-Mk, you will need version 3.80 or newer of GNU make
(run @code{gmake --version} to check your GNU make version) if you are
using the GNU make interface to LaTeX-Mk. The new implementation is
much cleaner and should continue to work with all newer versions of GNU
make.
@item
The history section of the manual was added.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.0 *********************
@c ********************************************************
@subsection Version 1.0
This is the long awaited 1.0 release! Hopefully LaTeX-Mk can be considered
production/stable at this point. This release was made on 2003-02-26.
The significant changes/additions over the previous version are:
@itemize @bullet
@item Support for dvipdfm
(see @url{http://gaspra.kettering.edu/dvipdfm}) is
included. By setting the USE_DVIPDFM variable, the
@code{dvipdfm} program can be used to
generate @file{.pdf} files from the @file{.dvi} file generated by LaTeX.
@item Support for PDFLaTeX is
included. By setting the USE_PDFLATEX variable, the
@code{pdflatex} program can be used to
generate @file{.pdf} files directly from the TeX sources.
@item A testsuite is now included. This has resulted in the fixing of a handful of small
bugs and should greatly contribute to the reliability and stability of this tool.
@item Bugs related to processing multiple directories listed in TGIFDIRS and XFIGDIRS have
been fixed.
@item Bugs related to per-project processing of foo_TGIFDIRS and foo_XFIGDIRS have been fixed.
@item A bug in @code{latex-mk} relating to BibTeX has been
fixed. Previously, after a BibTeX run, @code{latex-mk} failed to run
LaTeX the correct number of times.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.1 *********************
@c ********************************************************
@subsection Version 1.1
This is the "HTML Support" release. Version 1.1 was released on 2003-06-15.
The significant changes/additions over the previous version are:
@itemize @bullet
@item Support for HTML output. Either LaTeX2HTML or HeVeA may be used.
@item Fixed a bug where bibtex was not run sometimes when it needed to
be run. This problem showed up with some versions of LaTeX.
@item Added a POST_BIBTEX_HOOK variable which specifies a program to be
run after a BibTeX run. This gives users the ability to insert an
additional processing step if desired.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.2 *********************
@c ********************************************************
@subsection Version 1.2
Version 1.2 was released on 2004-03-21.
The significant changes/additions over the previous version are:
@itemize @bullet
@item Fixed a bug which prevented the POST_BIBTEX_HOOK hook from
actually doing anything.
@item Dropped -Ppdf from the default DVIPS_FLAGS. Users who wish
to keep -Ppdf as part of DVIPS_FLAGS can add it to the site configuration file,
user configuration file, or project Makefile.
@item Added DVIPDFM_ENV variable for running @code{dvipdfm} inside
a customized environment.
@item Preliminary Rich Text Format (RTF) output support.
The new @code{rtf} target will use @code{latex2rtf} to produce an
RTF version of your document. Use this when sending your documents
to the text-formatter-challenged.
@item Fixed a bug where a list of figures, list of tables, and
table of contents were sometimes not fully up to date in the final
output.
@item Added support for using ImageMagick to convert JPEG and PNG
files to EPS for inclusion in a document.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.3 *********************
@c ********************************************************
@subsection Version 1.3
Version 1.3 was released on 2004-05-29.
The significant changes/additions over the previous version are:
@itemize @bullet
@item Fixed a bug which prevented BibTeX from being run in the case
where the source document did not have explicit \cite@{@} commands
but rather used \nocite@{@}. Bug report #927068.
@item Fixed some file names in the examples/ directory to avoid a
file name clash on file systems which are not case sensitive. This
should fix a long standing bug where latex-mk would not build under
cygwin. Bug report #946216.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.4 *********************
@c ********************************************************
@subsection Version 1.4
Version 1.4 was released on 2005-10-04.
The significant changes/additions over the previous version are:
@itemize @bullet
@item Added support for lgrind.
@item Added a @code{dist} target for creating a distribution archive
of all source files.
@item Added support for using tex2page for html output.
@item When using pdflatex, directly convert tgif and xfig drawings
to PDF instead of to encapsulated Postscript.
@item When using pdflatex, do not create @file{.dvi} files as part
of the default target.
@item Added a LANDSCAPE variable which when set will add landscape
flags to various tools.
@item Make the default flag for exporting xfig drawings to encapsulated
Postscript be @code{-L eps} instead of @code{-L ps}.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.5 *********************
@c ********************************************************
@subsection Version 1.5
@itemize @bullet
@item When using tex2page or HeVeA for html output, do not force the
running of LaTeX. With latex2html, LaTeX will still be run because
latex2html makes use of the @file{.aux} files generated by LaTeX.
@item Fixed a bug where if the BibTeX input file was modified LaTeX would
be run again but not BibTeX.
@item Added a @code{--tex2page} mode for @code{latex-mk} (the script) which
allows @code{latex-mk} to run tex2page the appropriate number
of times to resolves all references.
@item Improve the cleaning of tex2page generated output.
@item Added @file{latex.subdir.mk} to support recursive builds.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.6 *********************
@c ********************************************************
@subsection Version 1.6
@itemize @bullet
@item Fix a syntax error in the (not used yet) ieee-copyout script.
@item Fix a bug in the @code{latex-mk} script when BibTeX is used.
@item Add quoting of command names in the BSD makefiles. This will
properly deal with pathnames to the programs which contain spaces.
Currently GNU make will not properly deal with this.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.7 *********************
@c ********************************************************
@subsection Version 1.7
@itemize @bullet
@item Added support for makeindex. Suggested by Antoine Reilles who provided a preliminary
patch.
@item Added a @code{--help} flag to the @code{latex-mk} script and documented the script a bit more
there. It seems that some users are using the @code{latex-mk} script only and not the makefile
system. Suggested by Reuben Thomas.
@item Added the ability in the @code{latex-mk} script to work with a read only current directory
and use the TEXMFOUTPUT environment variable to control where the real output goes.
Suggested by Reuben Thomas.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.8 *********************
@c ********************************************************
@subsection Version 1.8
@itemize @bullet
@item Fix a syntax error in the @code{latex-mk} script which showed up with some shells.
@item Fix a bug in the @code{latex-mk} script where some of the @file{.old} files that are used
for determining when to re-run various tools were not being cleaned up properly.
@item Add a few more files which latex and makeindex may generate to the list of files
removed by the @code{clean} target.
@item Add a testsuite entry for the @code{clean} target.
@item Improve the makefile testsuite robustness. In particular it now deals with
the bmake program having different names (make, bmake, bsdmake, etc).
@item Improve and expand the testsuite for the @code{latex-mk} script.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.9 *********************
@c ********************************************************
@subsection Version 1.9
@itemize @bullet
@item Added support for per-document DVIPS_FLAGS and DVIPDFM_FLAGS.
@item Avoided the use of hardcoded csh in some scripts.
@item Removed claims of a BIBTEX_ENV variable in the documentation.
It didn't do anything.
@item Added METAPOST support.
@item Fixed a bug when using BibTeX and PDFLaTeX at the same time.
@item Added glossary support.
@item Fixed a bug with GNU make draft output.
@item Put the actual installation prefix into the manual.
@item Avoid a case which caused the testsuite to hang.
@item Expanded the testsuite and fixed some bugs in the testsuite.
@item Fix a bug in cleaning xfig and tgif output.
@end itemize
@c ********************************************************
@c ********************** VERSION 1.9.1 *******************
@c ********************************************************
@subsection Version 1.9.1
@itemize @bullet
@item Fixed a bug in the @code{clean} target when METAPOST is in use.
@end itemize
@c ********************************************************
@c ********************** VERSION 2.0 *********************
@c ********************************************************
@subsection Version 2.0
@itemize @bullet
@item Added support for the bibunits LaTeX package.
@item Fixed a bug where PDFLATEX_FLAGS was not being
properly passed down to the latex-mk script when
bibtex was in use.
@item Fixed a bug where exporting Xfig figures to PDF actually
produced postscript instead of PDF.
@end itemize
@c ********************************************************
@c ********************** VERSION 2.1 *********************
@c ********************************************************
@subsection Version 2.1
@itemize @bullet
@item Fixed a bug in the quoting of lgrind related variables. The
result is that the clean target didn't quite work right.
@item Improved quoting in the latex-mk script to better handle
the case of a file name with spaces in it.
@end itemize
@c ********************************************************
@c ******************* end of history *********************
@c ********************************************************
@page
@node Target Index, Variable Index, History, Top
@unnumbered Target Index
@printindex tr
@page
@node Variable Index, General Index, Target Index, Top
@unnumbered Variable Index
@printindex vr
@page
@node General Index, , Variable Index, Top
@unnumbered General Index
@printindex cp
@bye
|