pax_global_header00006660000000000000000000000064126564175410014525gustar00rootroot0000000000000052 comment=81c541174ca7a96a4ccd8cc826583da7bcee36c7 latex-make-2.2.2/000077500000000000000000000000001265641754100135605ustar00rootroot00000000000000latex-make-2.2.2/.gitignore000066400000000000000000000006211265641754100155470ustar00rootroot00000000000000/config.mk /ctan/latex-make.zip /ctan/latex-make/ /src/*.sty /src/*.py /src/*.cfg /src/LaTeX.mk /src/LaTeX.mk.conf /src/stamp.latex-make /src/figlatex.pdf /src/latex-make.pdf /src/texdepends.pdf /examples/example.pdf /examples/bin/ /examples/*.sty /examples/LaTeX.mk # LaTeX files *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.out *.toc *.pdf.mk *.pdftex *.pdftex_t *.subfig.mk *_[1-9].fig *_[1-9].svg latex-make-2.2.2/COPYING000066400000000000000000000354231265641754100146220ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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 latex-make-2.2.2/Changelog000066400000000000000000000115671265641754100154040ustar00rootroot000000000000002016-02-09 2.2.2 Vincent Danjean (4): * Improve display when calling LaTeX-Make-local-install * Fix BSD/MacOSX comptatibility bug * Fix configure for MacOSX * Update version in *all* files 2016-02-09 2.2.1 Vincent Danjean (3): * Configure script display current installation if found * Add --update configure flag * Update version 2016-02-08 2.2.0 Vincent Danjean (18): * Improve install doc * Add a gitignore * Detect the system utilities version at run-time * Fix typo in ctan README * Avoid non portable "echo -n" construct * Allow installing LaTeX-Make locally * prefix and texmf_prefix are required at build time * Fill missing entries in Changelog * Add support to test version is updated everywhere * Allow to uninstall LaTeX-Make local copy * Use the 'install' mechanism to compile the example * Add test for graphicspath support in example.tex * remove unused part of examples/Makefile * Ignore installed files in examples/ * Fix dependency on LaTeX.mk in src/ * Avoid at most the requirement of using Make to install the package * Update README * Update version 2014-10-10 2.1.19.1 Vincent Danjean (2): * Update README doc and fix zip generation for CTAN * Minor version for CTAN stuff only 2014-10-09 2.1.19 Jim Paris (1): * Fix improperly escaped regexp in filterlatex.py Tomasz Buchert (1): * \ifpdf does not work with XeTeX or XeLaTeX Vincent Danjean (8): * add a rule for .fig->.pdf and silent LaTeX.mk when no *.tex files are present * Fix latexfilter.py * Call texhash if required * Fix locale for greping output * Add a script to detect valid TDS * Merge branch 'xetex' * Speedup improvement * New version 2.1.19 2012-06-09 2.1.18 Vincent Danjean (5): * update fink md5sum * Cleanup Changelog * Fix bug when creating subfigs * Add a 'make check' in the main Makefile * New version 2.1.18 2012-06-06 2.1.17 Mattieu Gallet (5): * Ajout du support SVG * amélioration de la doc + ajout d'un SVG dans l'exemple * commit avec latexfilter et figdepth en Python * integration * oubli d'un code de debug Vincent Danjean (6): * fix fink md5sum * Fix dist generation with git * Clean whitespaces Changelog * Merge branch 'wip' * Fix quoting bug in LaTeX.mk * Bump Version 2011-09-25 Matthieu Gallet * New release 2.1.16 * add support for svg files 2009-11-08 Vincent Danjean * New release 2.1.15 * really allow building dist with git * not empty tarball for this release :-) 2009-10-27 Vincent Danjean * New release 2.1.14 * Fix fink packaging * allow building dist with git 2009-09-29 Vincent Danjean * New release 2.1.13 * Fix bug in installation paths 2009-09-29 Vincent Danjean * New release 2.1.12 * Fix bugs * Add support for 'nomencl' package * Better documentation (typo, about fink, ...) * Release on CTAN 2007-03-06 Vincent Danjean * New release 2.1.11 * Bug fix in managing per document add-variables * Load all needed flavors (and not only global flavors) * Fix build dependencies for fink 2006-11-16 Vincent Danjean * New release 2.1.10 2006-11-14 Vincent Danjean * Improve MacOSX installer : - check that teTeX is installed where we want before installing LaTeX-Make - Add teTeX bin in the installer PATH if needed 2006-05-17 Vincent Danjean * Use the 'scripts' TeX dir 2006-04-25 Arnaud Legrand * Bug Fix in texdepends. Trailing spaces caused some misalignment in Figures. 2006-04-25 Vincent Danjean * Improve INSTALL, README and MacOSX documentation * fix Makefile typo (thanks Erik Saule) * New release 2.1.8 2006-04-19 Vincent Danjean * Enforce the use of \includegraphics instead of \epsfig with fig2dev (needed on MacOSX) * Add requirement files * Add text for MacOSX install * New release 2.1.7 2006-04-19 Arnaud Legrand * Correct english typos in the doc * New release 2.1.6 2006-04-19 Vincent Danjean * MacOSX Uninstaller 2006-04-14 Vincent Danjean * MacOSX Installer 2006-04-04 Vincent Danjean * Remove non-free exemples from sources * New release 2.1.5 2006-04-03 Vincent Danjean * Yet another rename (suggestion from debian-devel approved by Martin and Alvin) * New release 2.1.4 2006-03-29 Vincent Danjean * Rename the package due to suggestions on debian-devel * New release 2.1.3 2006-03-24 Vincent Danjean * First version of the doc (waiting for patches to be improved ;-) ) * New release 2.1.2 2006-03-09 Vincent Danjean * Getting rid of naughty spaces that cause bad alignments * repack with this modifications * New release 2.1.1 2006-03-09 Vincent Danjean * move LaTeX.mk to LaTeX-mk.dtx (soon a documentation ;-) ) * add warning about unsupported FIGSRC: in subfig files * correction of LaTeX.mk for index/glossary support * New release 2.1 2006-03-09 Vincent Danjean * Rewrote LaTeX.mk Lots of variables have changed their name, hence the 2.0 version Expect some incompatibilities from previous versions if using special variables.. * New release 2.0 latex-make-2.2.2/INSTALL000066400000000000000000000123531265641754100146150ustar00rootroot00000000000000INSTALLATION: ============= Full installation: ------------------ Prefer a package from your distribution if available ("apt-get install latex-make" on Debian/Ubuntu) Manual Installation: Basic Steps ******************************** 1) get the sources (tar.gz) and unpack them 2) go to the new directory and type: ./configure # You will get the list of all configurated TDS on your system # Choose the one that fit you best, generally something in # /usr/local without suffix such as -dist, -config, -var, ... # for example, most MacOS X should select /usr/local/texlive/texmf-local # For PREFIX, the default /usr/local is generally correct [edit config.mk if selected default values are wrong] make make check # optional [sudo] make install Manual Installation: Detailled Information ****************************************** This package installs: * TeX files in $(texmf_prefix) a standard TDS is assumed here: see http://www.tug.org/twg/tds/ (with scripts in $(texmf_prefix)/scripts/latex-make) * a symbolic link for the Makefile snipset in $(prefix)/include (to $(texmf_prefix)/scripts/latex-make) Default values are generated by the configure script and stored into the config.mk file that you can edit. You can make a default install with: make install To install LaTeX-Make conforming to the FHS, you can type: ./configure --prefix=/usr --texmf-prefix= && make install To install in HOME directory, you can use: ./configure --prefix=$HOME --texmf-prefix=$HOME/texmf && make install In this case, to not forget to invoke make(1) with the '-I' option: make -I${HOME}/include ... If you want to install the required files in a directory containing a LaTeX document (so that compiling in this directory does not need the installation of this package), please refers to the README file. The provided 'configure' script will list the currently configurated TDS in your system. You can use it to choose a correct TDS. For example, MacOS X users using texlive will probably choose /usr/local/texlive/texmf-local Building main files: -------------------- If you just want to get main files (Makefile snipset, scripts and LaTeX style), go to the src/ directory and type 'make' (or 'make doc' if you also want the documentation) The example/ directory contains a very small example of what can be done with this software. [to be improved, patches welcome] REQUIREMENTS: ============= General: -------- In order to work, LaTeX Make requires: - GNU Make (>= 3.81) type "make --version" to check - a relatively recent LaTeX distribution (teTeX 3.0 should work, TeXLive >= 2005 also) If using figlatex, LaTeX Make also needs: - inkscape (>= 0.48.2) for converting svg files - transfig (>= 3.2.4) for the fig2dev command type "transfig -V" to check - ghostscript that is called by fig2dev type "gs --version" to check Notes for MacOS X users: ------------------------ [I'm not sure these notes are up-to-date. Patches welcome] make 3.81 ********* make 3.81 is included at least with XCode 4 and 10.6 Snow Leopard. Otherwise, you need to install it with MacPorts, Fink or to manually recompile it. The latter is easy: 1) get the sources (tar.gz) and unpack them 2) go to the new directory and type: ./configure --prefix=/usr/local make sudo make install 3) add /usr/local/bin in your PATH Note that you can choose another prefix if you like (for example /usr/local/make-3.81). Setup your PATH accordingly in this case. inkscape 0.48.2 *************** Inkscape can be downloaded from the official site (http://inkscape.org/). However, the binary must be in the path. An easy way is to create a file /usr/bin/inkscape (don't forget to chmod a+x this file) with: #!/bin/sh /Applications/Inkscape.app/Contents/Resources/bin/inkscape $* teTeX ***** teTeX can be installed with the Darwin port[1]. Note: the installer requires that /usr/local/teTeX/share/texmf.local is a valid TeX Directory Structure[2]. This is the case with the Darwin port. A very simple way to install a complete LaTeX distribution is to install MacTex (http://www.tug.org/mactex/). LaTeX addons are located in ~/Library/texmf. transfig ******** The transfig package in the stable fink[3] distribution is compiled with an deprecated option. In consequence, fig2dev uses \epsfig instead of \includegraphics in its generated files. One of the three workaround can be used: 1) add \let\epsfig=\includegraphics at the begining of your document (just after the \begin{document}) Of course, this will not work if you were using the deprecated epsfig package. 2) use the transfig-graphicx package from the unstable fink[3] distribution 3) recompile the transfig package without "DDEPSFIG = -DEPSFIG" (look in the applied patch and remove the removal of XCOMM for the line "XCOMM DDEPSFIG = -DEPSFIG" for the file fig2dev/Imakefile) ghostscript *********** The ghostscript package can be found in the stable fink[3] distribution. [1]: http://darwinports.opendarwin.org/ [2]: http://www.tug.org/twg/tds/ [3]: http://fink.sourceforge.net/index.php latex-make-2.2.2/MacOSX/000077500000000000000000000000001265641754100146525ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/Makefile000066400000000000000000000021641265641754100163150ustar00rootroot00000000000000 include Makefile.config PACKAGES=latex-make.pkg uninstall-latex-make.pkg DISK=LaTeX-Make-rw.dmg FINALDISK=LaTeX-Make-$(VERSION)-$(PACKAGE_SUBVER).dmg VOLUME=LaTeX Make SUBDIRS=$(basename $(PACKAGES)) all: $(FINALDISK) .PHONY: distclean clean all .PHONY: $(addsuffix -distclean,$(SUBDIRS)) $(addsuffix -clean,$(SUBDIRS)) $(addsuffix -distclean,$(SUBDIRS)): %-distclean: $(MAKE) -C $* distclean $(addsuffix -clean,$(SUBDIRS)): %-clean: $(MAKE) -C $* clean distclean:: clean $(addsuffix -distclean,$(SUBDIRS)) distclean:: $(RM) -r $(FINALDISK) clean:: $(addsuffix -clean,$(SUBDIRS)) clean:: $(RM) $(DISK) $(PACKAGES) $(PACKAGES): %.pkg: $(MAKE) -C $* $@ ln -s $*/$@ $@ $(DISK): $(PACKAGES) -$(RM) $@ hdiutil create -size 5m -fs HFS+ -volname "$(VOLUME)" $@ hdiutil attach $@ DEST=$$(hdiutil attach $@ | sed -e '/Apple_HFS/s/.*Apple_HFS[[:space:]]*//p;d') ; \ cp ../COPYING "$$DEST" && \ cp -r $(PACKAGES) "$$DEST" DEV=$$(hdiutil attach $@ | sed -e '1s/[[:space:]].*//p;d') ; \ hdiutil detach $$DEV $(FINALDISK): $(DISK) -$(RM) $@ hdiutil convert $< -format UDZO -o $@ hdiutil internet-enable -yes $@ cp $@ .. latex-make-2.2.2/MacOSX/Makefile.config000066400000000000000000000003251265641754100175560ustar00rootroot00000000000000 PACKAGE_SUBVER=1 PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker VERSION=$(shell cat $(wildcard ../VERSION ../../VERSION) | head -n 1 | sed -e 's/.*(\(.*\)).*/\1/') latex-make-2.2.2/MacOSX/fink/000077500000000000000000000000001265641754100156015ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/fink/README000066400000000000000000000015631265641754100164660ustar00rootroot00000000000000First, you need a GNU Make >= 3.81 You can look at your version with "make --version" GNU Make 3.80 _DOES NOT WORK_ Update: fink has make 3.81 now. To update GNU Make, you can look at https://sourceforge.net/tracker/index.php?func=detail&aid=1603950&group_id=17203&atid=414256 Download make.patch and make.info Then, type: sudo cp make.patch make.info /sw/fink/dists/local/main/finkinfo/ fink index fink build make fink install make Once you have a correct GNU Make, to build and install LaTeX-Make, you have to : sudo cp latex-make.info /sw/fink/dists/local/main/finkinfo/latex-make.info fink index fink build latex-make fink install latex-make Note: as latex-make.info needs to have the md5sum of the source package, it is not possible to include in a release the latex-make.info corresponding to this release. You will always need to get the last latex-make.info from svn... latex-make-2.2.2/MacOSX/fink/latex-make.info000066400000000000000000000012511265641754100205050ustar00rootroot00000000000000Package: latex-make Version: 2.1.17 Source-MD5: 189a97e0a490e51e666c649d7777bbb2 Revision: 1 Source: http://gforge.inria.fr/frs/download.php/30893/%n-%v.tar.gz Maintainer: Vincent Danjean HomePage: http://gforge.inria.fr/projects/latex-utils/ License: OSI-Approved DocFiles: INSTALL Changelog COPYING README Depends: tetex-texmf, tetex-base BuildDepends: make (>= 3.81-1) Description: Easy compiling of LaTeX documents CompileScript: << #! /bin/sh -ev export LC_ALL=C make << InstallScript: << #! /bin/sh -ev export LC_ALL=C make install prefix=%p DESTDIR=%d << PostInstScript: << texhash %p/share/texmf << PostRmScript: << texhash %p/share/texmf << latex-make-2.2.2/MacOSX/latex-make/000077500000000000000000000000001265641754100167025ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/latex-make/Install_resources/000077500000000000000000000000001265641754100224025ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/latex-make/Install_resources/English.lproj/000077500000000000000000000000001265641754100251205ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/latex-make/Install_resources/English.lproj/InstallationCheck.strings000066400000000000000000000010061265641754100321270ustar00rootroot00000000000000"17" = "kpsepath in not in your PATH. Please, check that your LaTeX installation can be used from a terminal."; "18" = "kpsepath does not report /usr/local/texlive/texmf-local/tex as a TeX directory. Please, change your default LaTeX installation (MacTeX or TeXLive should work) or install LaTeX-Make from sources to fit your LaTeX installation."; "19" = "This software requires at least GNU make 3.81 but 'make' is not in your PATH. If not done, install Xcode from apple website (and enable 'command line tools')."; latex-make-2.2.2/MacOSX/latex-make/Install_resources/InstallationCheck000077500000000000000000000012071265641754100257270ustar00rootroot00000000000000#!/bin/sh if [ ! -x "$(which kpsepath)" ]; then exit 113 fi texmf_root=/usr/local/texlive/texmf-local CLEAN_REP=0 if [ -d "$texmf_root" ]; then CLEAN_REP="$texmf_root" PREV_REP="$(dirname "$CLEAN_REP")" while [ ! -d "$PREV_REP" ]; do CLEAN_REP="$PREV_REP" PREV_REP="$(dirname "$PREV_REP")" done mkdir -p "$texmf_root" fi RET=0 kpsepath tex | tr ':' '\n' | sed -e 's/^!!//' | while read d ; do \ cd $d 2>/dev/null && pwd done | grep -q -s "^$texmf_root/tex\$" || RET=1 if [ "$RET" = 1 ]; then test x"$CLEAN_REP" != "x" && rm -r "$CLEAN_REP" fi test "$RET" = 1 && exit 114 if [ ! -x "$(which kpsepath)" ]; then exit 115 fi exit 0 latex-make-2.2.2/MacOSX/latex-make/Install_resources/postflight000077500000000000000000000003401265641754100245100ustar00rootroot00000000000000#!/bin/sh if [ ! -x "$(which texhash)" ]; then TEXDIR=/usr/local/teTeX/bin/$(uname -p)-apple-darwin-current if [ -d "$TEXDIR" ]; then PATH="$TEXDIR:$PATH" fi fi texhash /usr/local/teTeX/share/texmf.local || true latex-make-2.2.2/MacOSX/latex-make/Makefile000066400000000000000000000014041265641754100203410ustar00rootroot00000000000000 all: package include ../package.mk package: $(PACKAGE_NAME).pkg $(PACKAGE_NAME).pkg: Info.plist Description.plist \ Install_resources/License.txt Install_resources/License.txt \ Install_resources/Welcome.txt Package_contents Package_contents: $(RM) -r $@ $(MAKE) -C ../.. install DESTDIR=$(CURDIR)/$@ \ texmf_prefix='/usr/local/texlive/texmf-local' \ prefix='/usr/local' Install_resources/License.txt: ../../COPYING cp $< $@ Install_resources/Welcome.txt: plist/Welcome.txt.start ../../INSTALL cat plist/Welcome.txt.start > $@ sed -e '/REQUIREMENTS/,$$p;d' < ../../INSTALL >> $@ .PHONY: distclean clean all package clean:: $(RM) -r Package_contents Info.plist \ Description.plist \ Install_resources/License.txt \ Install_resources/Welcome.txt latex-make-2.2.2/MacOSX/latex-make/plist/000077500000000000000000000000001265641754100200355ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/latex-make/plist/Description.plist.in000066400000000000000000000007471265641754100240120ustar00rootroot00000000000000 IFPkgDescriptionDeleteWarning IFPkgDescriptionDescription LaTeX Make for Mac OS X with TeXLive/MacTeX IFPkgDescriptionTitle LaTeX Make IFPkgDescriptionVersion @VERSION@ latex-make-2.2.2/MacOSX/latex-make/plist/Info.plist.in000066400000000000000000000024171265641754100224160ustar00rootroot00000000000000 CFBundleGetInfoString LaTeX Make @VERSION@ CFBundleIdentifier com.inria.gforge.latex-utils.latex-make CFBundleName LaTeX Make CFBundleShortVersionString @VERSION@ IFMajorVersion 0 IFMinorVersion 0 IFPkgFlagAllowBackRev IFPkgFlagAuthorizationAction RootAuthorization IFPkgFlagDefaultLocation / IFPkgFlagInstallFat IFPkgFlagIsRequired IFPkgFlagOverwritePermissions IFPkgFlagRelocatable IFPkgFlagRestartAction NoRestart IFPkgFlagRootVolumeOnly IFPkgFlagUpdateInstalledLanguages IFPkgFlagUseUserMask IFPkgFormatVersion 0.10000000149011612 latex-make-2.2.2/MacOSX/latex-make/plist/Welcome.txt.start000066400000000000000000000006321265641754100233260ustar00rootroot00000000000000Welcome to the LaTeX Make Installation Program. You will be guided through the steps necessary to install this software. Several other softwares are needed in order that LaTeX Make works. Here is the relevant part of the INSTALL file from the distribution. Please, take a look at the "Notes for MacOS X users" at the end of the text. ====================================================================== latex-make-2.2.2/MacOSX/package.mk000066400000000000000000000007221265641754100165770ustar00rootroot00000000000000 include ../Makefile.config PACKAGE_NAME=$(notdir $(CURDIR)) package: $(PACKAGE_NAME).pkg $(PACKAGE_NAME).pkg: Package_contents Install_resources Info.plist Description.plist $(PACKAGEMAKER) -build -v \ -p "$@" \ -f Package_contents \ -r Install_resources \ -i Info.plist \ -d Description.plist %.plist: plist/%.plist.in sed -e 's/@VERSION@/$(VERSION)/g' < $< > $@ clean:: $(RM) -r $(PACKAGE_NAME).pkg distclean:: clean .PHONY: distclean clean latex-make-2.2.2/MacOSX/uninstall-latex-make/000077500000000000000000000000001265641754100207115ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/uninstall-latex-make/Install_resources/000077500000000000000000000000001265641754100244115ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/uninstall-latex-make/Install_resources/English.lproj/000077500000000000000000000000001265641754100271275ustar00rootroot00000000000000InstallationCheck.strings000066400000000000000000000000751265641754100340640ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/uninstall-latex-make/Install_resources/English.lproj"16" = "LaTeX Make is not installed. I cannot uninstall it"; latex-make-2.2.2/MacOSX/uninstall-latex-make/Install_resources/InstallationCheck000066400000000000000000000001171265641754100277320ustar00rootroot00000000000000#!/bin/sh if [ ! -d /Library/Receipts/latex-make.pkg ]; then exit 112 fi latex-make-2.2.2/MacOSX/uninstall-latex-make/Install_resources/Welcome.txt000066400000000000000000000004301265641754100265420ustar00rootroot00000000000000Welcome to the LaTeX Make Uninstallation Program. You will be guided through the steps necessary to uninstall LaTeX Make. Note that due to a limitation in the MacOS X installer, you need to *install* this uninstaller in order to remove the LaTeX Make package from your software. latex-make-2.2.2/MacOSX/uninstall-latex-make/Install_resources/postflight000077500000000000000000000012041265641754100265170ustar00rootroot00000000000000#!/bin/sh set -e lsbom -s /Library/Receipts/latex-make.pkg/Contents/Archive.bom | \ while read file ; do rm /$file || true done rmdir /usr/local/teTeX/share/texmf.local/doc/latex/latex-make || true rmdir /usr/local/teTeX/share/texmf.local/tex/latex/latex-make || true rmdir /usr/local/teTeX/share/texmf.local/scripts/latex-make || true rm -r /Library/Receipts/latex-make.pkg rm -r /Library/Receipts/uninstall-latex-make.pkg if [ ! -x "$(which texhash)" ]; then TEXDIR=/usr/local/teTeX/bin/$(uname -p)-apple-darwin-current if [ -d "$TEXDIR" ]; then PATH="$TEXDIR:$PATH" fi fi texhash /usr/local/teTeX/share/texmf.local || true latex-make-2.2.2/MacOSX/uninstall-latex-make/Makefile000066400000000000000000000003551265641754100223540ustar00rootroot00000000000000 all: package include ../package.mk $(PACKAGE_NAME).pkg: Info.plist Description.plist Package_contents Package_contents: mkdir $@ .PHONY: distclean clean all package clean:: $(RM) -r Info.plist Description.plist Package_contents latex-make-2.2.2/MacOSX/uninstall-latex-make/plist/000077500000000000000000000000001265641754100220445ustar00rootroot00000000000000latex-make-2.2.2/MacOSX/uninstall-latex-make/plist/Description.plist.in000066400000000000000000000007531265641754100260160ustar00rootroot00000000000000 IFPkgDescriptionDeleteWarning IFPkgDescriptionDescription LaTeX Make Uninstaller for Mac OS X IFPkgDescriptionTitle LaTeX Make Uninstaller IFPkgDescriptionVersion @VERSION@ latex-make-2.2.2/MacOSX/uninstall-latex-make/plist/Info.plist.in000066400000000000000000000024631265641754100244260ustar00rootroot00000000000000 CFBundleGetInfoString LaTeX Make Uninstaller @VERSION@ CFBundleIdentifier com.inria.gforge.latex-utils.latex-make.uninstaller CFBundleName LaTeX Make Uninstaller CFBundleShortVersionString @VERSION@ IFMajorVersion 0 IFMinorVersion 0 IFPkgFlagAllowBackRev IFPkgFlagAuthorizationAction RootAuthorization IFPkgFlagDefaultLocation / IFPkgFlagInstallFat IFPkgFlagIsRequired IFPkgFlagOverwritePermissions IFPkgFlagRelocatable IFPkgFlagRestartAction NoRestart IFPkgFlagRootVolumeOnly IFPkgFlagUpdateInstalledLanguages IFPkgFlagUseUserMask IFPkgFormatVersion 0.10000000149011612 latex-make-2.2.2/Makefile000066400000000000000000000027431265641754100152260ustar00rootroot00000000000000ifeq ($(filter else-if,$(.FEATURES)),) $(error GNU Make 3.81 or latter needed. Please, update your software.) exit 1 endif .PHONY: all install clean distclean dist ctan -include config.mk PKGNAME=latex-make all: $(MAKE) -C src doc check: all $(MAKE) -C examples install: all $(MAKE) -C src $@ clean distclean:: -$(MAKE) -C examples $@ -$(MAKE) -C MacOSX $@ -$(MAKE) -C ctan $@ $(MAKE) -C src $@ distclean:: $(RM) config.mk VERSION=$(shell cat VERSION) check-version: @echo 'grep "[0-9] v" src/*.dtx | grep -v " v$(VERSION)"' @if grep "[0-9] v" src/*.dtx | grep -v " v$(VERSION)"; then \ printf "\nSome versions have not been updated. Aborting.\n\n" ; \ exit 1 ;\ fi @echo 'head -1 Changelog | grep -v " $(VERSION)"' @if head -1 Changelog | grep -v " $(VERSION)"; then \ printf "\nChangelog have not been updated. Aborting.\n\n" ; \ exit 1 ;\ fi dist: check-version if [ -d .svn ]; then \ $(MAKE) dist-svn; \ elif [ -d .git ]; then \ $(MAKE) dist-git; \ else \ echo "No way to build dist without SCM"; \ exit 1; \ fi $(MAKE) dist-ctan dist-svn: if [ "$$(svn st)" != "" ] ;then svn st ; exit 1 ; fi svn export . $(PKGNAME)-$(VERSION) tar cvzf $(PKGNAME)-$(VERSION).tar.gz $(PKGNAME)-$(VERSION) rm -rf $(PKGNAME)-$(VERSION) dist-git: if ! LC_ALL=C git status | grep -sq '^nothing to commit' ; then git status ; exit 1 ; fi git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ HEAD | gzip -9 > $(PKGNAME)-$(VERSION).tar.gz dist-ctan: $(MAKE) -C ctan latex-make-2.2.2/README000066400000000000000000000012231265641754100144360ustar00rootroot00000000000000 To install LaTeX-Make system-wide or on an user account, please refer to the INSTALL file. The LaTeX-Make software can also be installed within the directory of a LaTeX document. This is usefull if your document is under SVN or Git and if some users did not installed LaTeX-Make. So, if you LaTeX document is in the $DIR directory, you need to copy, at least: * LaTeX.mk in $DIR * texdepends.sty and figlatex.sty in $DIR * gensubfig.py, svg2dev.py, svgdepth.py, figdepth.py, gensubfig.py, and latexfilter.py in $DIR/bin or $DIR This can be done by creating a Makefile with 'include LaTeX.mk' in it and using the 'LaTeX-Make-local-install' Make target. latex-make-2.2.2/VERSION000066400000000000000000000000061265641754100146240ustar00rootroot000000000000002.2.2 latex-make-2.2.2/configure000077500000000000000000000144521265641754100154750ustar00rootroot00000000000000#!/bin/bash prefix=/usr/local texmf_prefix= usage() { cat <&2 "Error: $1" echo 1>&2 usage 1>&2 exit 1 } cleanup-path() { #1 path local dir="$1" local motif rep dir2 if [ -z "$dir" ]; then return; fi dir="$dir/" motif="//" rep="/" dir2="${dir/$motif/$rep}" while test "$dir2" != "$dir"; do dir="$dir2" dir2=${dir/$motif/$rep} done motif="/./" rep="/" dir2="${dir/$motif/$rep}" while test "$dir2" != "$dir"; do dir="$dir2" dir2=${dir/$motif/$rep} done dir2="$(echo "$dir" | sed -E -e 's,[^/]+/\.\./,,')" while test "$dir2" != "$dir"; do dir="$dir2" dir2="$(echo "$dir" | sed -E -e 's,[^/]+/\.\./,,')" done dir="${dir%/}" echo "$dir" } getopt -T >/dev/null 2>&1 if [ $? == 4 ]; then TMP="$(getopt --shell bash --options h \ --name "$(basename "$0")" \ --longoptions help,prefix:,texmf-prefix:,update,no-update \ -- "$@")" if [ $? != 0 ]; then usage 1>&2 exit 1 fi eval set -- "$TMP" fi cur_prefix="$(make --no-print-directory --quiet -f detect-current-prefix.mk)" TDS_current="$(kpsewhich -format texmfscripts LaTeX.mk | sed -e 's,/scripts/latex-make/LaTeX.mk$,,p;d')" TDS_current="$(cleanup-path "$TDS_current")" SETUP= update() { SETUP=1 if [ -n "$cur_prefix" ]; then prefix="$cur_prefix" fi if [ -n "$TDS_current" ]; then texmf_prefix="$TDS_current" fi } while [ $# != 0 ]; do case "$1" in --prefix=*) prefix="${1#--prefix=}" ;; --prefix) prefix="$2" ; shift;; --texmf-prefix=*) texmf_prefix="${1#--texmf-prefix=}" ;; --texmf-prefix) texmf_prefix="$2" ; shift;; --update) update;; --no-update) ;; --) shift; break ;; --help|-h) usage ; exit 0 ;; -*) error "Unknown option '$1'" ;; *) error "Invalid argument '$1'" ;; esac shift SETUP=1 done if [ $# != 0 ]; then error "Invalid argument '$1'" fi if [ "$(uname -s)" != Linux -a -z "$SETUP" ]; then update fi find-default-TDS() { local dir local TDS_default= local TDS_default_fb= for dir in "$@"; do case "$dir" in *-local) if [ -z "$TDS_default" ]; then TDS_default="$dir" else if [ "$(echo "$dir" | wc -c)" -lt "$(echo "$TDS_default" | wc -c)" ]; then TDS_default="$dir" fi fi ;; *) if [ -z "$TDS_default_fb" ]; then TDS_default_fb="$dir" else if [ "$(echo "$dir" | wc -c)" -lt "$(echo "$TDS_default_fb" | wc -c)" ]; then TDS_default_fb="$dir" fi fi ;; esac done if [ -z "$TDS_default" ]; then TDS_default="$TDS_default_fb" fi echo "$TDS_default" } print-TDS() { # 1:starttoken declare -a loc declare -a home declare -a mid declare -a end declare -a all declare -a defs1 declare -a defs2 while read dir; do dir="$(cleanup-path "$dir/")" case "$dir" in "") ;; *"/."*) end=("${end[@]}" "$dir");; *"/local/"*|*"/opt/"*) loc=("${loc[@]}" "$dir");; *"/etc/"*) end=("${end[@]}" "$dir");; *"/var/"*) end=("${end[@]}" "$dir");; "${HOME}"*) home=("${home[@]}" "$dir");; *) mid=("${mid[@]}" "$dir");; esac done < <(kpsepath tex \ | tr ':' '\n' \ | sed -e 's/^!!//' -e 's,/*$,,' \ | sed -e 's,/tex$,,p;d') trie() { local -a var eval 'var=( "${'"$1"'[@]}" )' for d in "${var[@]}"; do echo $d done | sort } OLD_IFS="$IFS" IFS=" " all=( $(trie loc) $(trie mid) $(trie home) $(trie end) ) defs1=( $(trie loc) ) defs2=( $(trie mid) ) IFS="$OLD_IFS" TDS_default="$(find-default-TDS "${defs1[@]}")" if [ -z "$TDS_default" ]; then TDS_default="$(find-default-TDS "${defs2[@]}")" fi if [ -z "$TDS_default" ]; then TDS_default="${texmf_prefix:-$prefix/share/texmf}" fi if [ -z "$texmf_prefix" ]; then texmf_prefix="$TDS_default" fi local rflag uflag cflag dflag aflag pdir local cur="$(cleanup-path "$texmf_prefix")" for dir in "${all[@]}" // ; do rflag="" uflag="" cflag="" dflag="" aflag="" if [ "$dir" == '//' ]; then if [ "$cur" == '//' ]; then continue fi dir="$cur" fi if [ "$dir" == "$TDS_default" ]; then dflag="*" fi if [ "$dir" == "$cur" ]; then aflag="@" cur='//' fi if [ "$dir" == "$TDS_current" ]; then cflag="+" fi if [ -e "$dir" ]; then pdir="$dir" else uflag="U" pdir="$(dirname "$dir")" while [ ! -d "$pdir" ]; do pdir="$(dirname "$pdir")" done fi if [ ! -w "$pdir" ]; then rflag="R" fi printf "%s[%1s%1s%1s%1s%1s] %s\n" "$1" "$aflag" "$dflag" "$cflag" "$rflag" "$uflag" "$dir" done echo "### Current configuration" > config.mk echo "prefix=$prefix" >> config.mk echo "texmf_prefix=$texmf_prefix" >> config.mk } cat < $@/README FORCE: .phony: FORCE all ctan clean distclean clean: $(RM) -r $(ARCHIVE_NAME) distclean: clean $(RM) $(ARCHIVE_NAME).zip latex-make-2.2.2/ctan/README000066400000000000000000000046621265641754100153750ustar00rootroot00000000000000 +------------------------------+ | The LaTeX-Make system | +------------------------------+ @VERSION@ DESCRIPTION =========== This package provides several tools that aim to simplify the compilation of LaTeX documents: * LaTeX.mk: a Makefile snippet to help compiling LaTeX documents in DVI, PDF, PS, ... format. Dependencies are automatically tracked: one should be able to compile documents with a one-line Makefile containing 'include LaTeX.mk'. Complex documents (with multiple bibliographies, indexes, glossaries, ...) should be correctly managed. * figlatex.sty: a LaTeX package to easily insert xfig figures (with \includegraphics{file.fig}). It can interact with LaTeX.mk so that the latter automatically invokes transfig if needed. * And various helper tools for LaTeX.mk Homepage: http://gforge.inria.fr/projects/latex-utils/ License type: gpl INSTALLATION: ============= Once generated, the following files need to be installed: * *.sty, *.cfg Main LaTeX package files. Should be installed into TEXMF/tex/latex/latex-make/ where TEXMF is a base of a TeX Directory Structure for your TeX installation; * *.py Helper scripts used by LaTeX.mk. They should be installed into TEXMF/scripts/latex-make/ * LaTeX.mk: This is the Makefile snipset to include into your main Makefile. To avoid the need to hardcode the path of LaTeX.mk in the 'include' directive of the Makefile, LaTeX.mk must be installed in a default search directory of GNUMake such as PREFIX/include, /usr/local/include, /usr/include/, etc. See your GNUMake documentation for the list of such search directories; In order to be able to also use the 'LaTeX-Make-local-install' target, LaTeX.mk must also be installed into TEXMF/scripts/latex-make/ *and* the two lines with "FIXME" at the end of this file must be updated with the TEXMF installation path. * *.pdf Documentation that can be installed into TEXMF/doc/latex/latex-make/ REQUIREMENTS: ============= In order to work, LaTeX Make requires: - GNU Make (>= 3.81) type "make --version" to check - a relatively recent LaTeX distribution (teTeX 3.0 should work, TeXLive >= 2005 also) If using figlatex, LaTeX Make also needs: - inkscape (>= 0.48.2) for converting svg files - transfig (>= 3.2.4) for the fig2dev command type "transfig -V" to check - ghostscript that is called by fig2dev type "gs --version" to check latex-make-2.2.2/detect-current-prefix.mk000066400000000000000000000002001265641754100203240ustar00rootroot00000000000000all: -include LaTeX.mk all: @echo $(patsubst %/include/LaTeX.mk,%,$(filter %/include/LaTeX.mk,$(lastword $(MAKEFILE_LIST)))) latex-make-2.2.2/examples/000077500000000000000000000000001265641754100153765ustar00rootroot00000000000000latex-make-2.2.2/examples/Makefile000066400000000000000000000006121265641754100170350ustar00rootroot00000000000000 #COMPATIBILITY=true all: example.pdf example.pdf: example.ps: traces-tsi.pdf_DEPENDS = eps/paje.pdf clean:: $(RM) eps/paje.pdf include $(CURDIR)/LaTeX.mk clean:: $(RM) $(BIB_SLAVES) distclean:: $(MAKE) LaTeX-Make-local-uninstall $(CURDIR)/LaTeX.mk: $(MAKE) -C ../src $(MAKE) -f ../src/LaTeX.mk LaTeX-Make-local-install _LaTeX_Make_BINORIGDIR=../src _LaTeX_Make_TEXORIGDIR=../src latex-make-2.2.2/examples/eps/000077500000000000000000000000001265641754100161655ustar00rootroot00000000000000latex-make-2.2.2/examples/eps/img.pdf000066400000000000000000000033651265641754100174430ustar00rootroot00000000000000%PDF-1.5 % 3 0 obj << /Length 4 0 R /Filter /FlateDecode >> stream x+*O4PH/VЯ0Up B@@ endstream endobj 4 0 obj 28 endobj 2 0 obj << /ExtGState << /a0 << /CA 1 /ca 1 >> >> /XObject << /x5 5 0 R >> >> endobj 6 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 20 20 ] /Contents 3 0 R /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources 2 0 R >> endobj 5 0 obj << /Length 8 0 R /Filter /FlateDecode /Type /XObject /Subtype /Form /BBox [ 0 0 20 20 ] /Resources 7 0 R >> stream x+*22PA(˥h^_ab endstream endobj 8 0 obj 37 endobj 7 0 obj << /ExtGState << /a0 << /CA 1 /ca 1 >> >> /XObject << /x9 9 0 R >> >> endobj 9 0 obj << /Length 10 0 R /Filter /FlateDecode /Type /XObject /Subtype /Image /Width 20 /Height 20 /ColorSpace /DeviceGray /Interpolate true /BitsPerComponent 8 >> stream xu 7 12u:HSFQ4;Wʭo™xxm1QV+!>ڍ\ii',ћ3: ẋ|$===^#l>]tj=jhQOgR&C4a[nGKs-[jW?>Hh endstream endobj 10 0 obj 186 endobj 1 0 obj << /Type /Pages /Kids [ 6 0 R ] /Count 1 >> endobj 11 0 obj << /Creator (cairo 1.14.6 (http://cairographics.org)) /Producer (cairo 1.14.6 (http://cairographics.org)) >> endobj 12 0 obj << /Type /Catalog /Pages 1 0 R >> endobj xref 0 13 0000000000 65535 f 0000001189 00000 n 0000000141 00000 n 0000000015 00000 n 0000000120 00000 n 0000000453 00000 n 0000000241 00000 n 0000000667 00000 n 0000000646 00000 n 0000000767 00000 n 0000001166 00000 n 0000001254 00000 n 0000001382 00000 n trailer << /Size 13 /Root 12 0 R /Info 11 0 R >> startxref 1435 %%EOF latex-make-2.2.2/examples/example.tex000066400000000000000000000063361265641754100175630ustar00rootroot00000000000000 \documentclass[10pt,a4paper]{article} %\usepackage[debug]{texdepends} \usepackage{color} \usepackage{pdfswitch} %\usepackage{texgraphicx}% to include .fig files \usepackage{figlatex}% to include .fig files \graphicspath{{fig/}{eps/}} %\usepackage{graphicx}% \usepackage{subfigure}% \usepackage{subfigure}% \usepackage{boxedminipage}% \author{Vincent Danjean} \title{Example} \date{} \begin{document} \maketitle \section{Introduction} \renewcommand{\subfigtopskip}{1pt} % \renewcommand{\subfigcapskip}{0pt} % %\renewcommand{\subfigcapmargin}{0pt} % \renewcommand{\subfigbottomskip}{5pt} % \newcommand{\goodgap}{% \hspace{\subfigtopskip}% \hspace{\subfigbottomskip}% } \renewcommand{\topfraction}{1} \renewcommand{\bottomfraction}{1} \renewcommand{\textfraction}{0.1} \includegraphics[scale=0.5]{fig/simple.fig} \begin{figure}[htb] %\vspace{-0.7cm} \centering % \subfigure[Run]{ \label{fig:newact-block.1} \includegraphics[scale=0.5,subfig=1]{nab-a.fig} % }%\goodgap %$\Rightarrow$ % \subfigure[Blocking syscall]{ \label{fig:newact-block.2} \includegraphics[scale=0.5,subfig=2]{fig/nab-a.fig} % } \\ % \subfigure[Waking up]{ \label{fig:newact-block.3} \includegraphics[scale=0.5,subfig=3]{subrep/nab-b.fig} % }%\goodgap %$\Rightarrow$ % \subfigure[Ru]{ \label{fig:newact-block.4} %\includegraphics[scale=0.7]{newact-block_4.fig} \includegraphics[scale=0.5,subfig=4]{fig/subrep/nab-b.fig} % } % \subfigure[Rest]{ \label{fig:newact-block.5} \includegraphics[scale=0.5,subfig=5]{fig2/nab-c.fig} % } \label{fig:newact-block.6} \includegraphics[scale=0.5,subfig=5]{fig2/subrep2/nab-d.fig} \begin{boxedminipage}{\linewidth} \small \begin{description} \item[\ref{fig:newact-block.1}] The user-level thread~$1$ is running onto an activation~$A$ bounded to a processor. \item[\ref{fig:newact-block.2}] The thread~$1$ makes a system call blocking the activation~$A$. Another activation~$B$ is launched which runs another user-level thread~$2$. \item[\ref{fig:newact-block.3}] An interrupt occurs. The blocked activation $A$ will be able to wake up (when requested by the application). \item[\ref{fig:newact-block.4}] The activation $B$ is used to send the unblocking notice event with an upcall. The user thread scheduler put the thread~$1$ in the ready-to-run thread queue. \item[\ref{fig:newact-block.5}] When the user thread scheduler wants to restart the unblocked thread, it saves the currently running thread state and discard the current activation in favor of the unblocked thread activation. \end{description} To limit the number of activations, unblocked activations are rescheduled instead of new ones when a thread blocks (state \ref{fig:newact-block.2}). \end{boxedminipage} %\vspace{-0.4cm} \caption{Blocking System Call} \label{fig:newact-block} %\vspace{-0.9cm} \end{figure} \begin{figure} \includegraphics[subfig=2,scale=0.5]{fig/logo.svg} \end{figure} \begin{figure} \includegraphics[subfig=1,scale=0.5]{fig/logo.svg} \end{figure} \begin{figure} \includegraphics[subfig=3,width=\linewidth]{fig/logo.svg} \end{figure} % test \graphicspath support \includegraphics{img.pdf} \end{document} latex-make-2.2.2/examples/fig/000077500000000000000000000000001265641754100161435ustar00rootroot00000000000000latex-make-2.2.2/examples/fig/logo.subfig000066400000000000000000000000451265641754100203030ustar00rootroot00000000000000logo_latex logo_cnrs ex_text ex_rect latex-make-2.2.2/examples/fig/logo.svg000066400000000000000000001106771265641754100176400ustar00rootroot00000000000000 image/svg+xml texte LaTeX $\frac{\delta}{\epsilon}$ latex-make-2.2.2/examples/fig/nab-a.fig000066400000000000000000000077661265641754100176300ustar00rootroot00000000000000#FIG 3.2 Landscape Center Metric A4 50.00 Single -2 1200 2 6 2925 2925 3375 3825 3 2 0 1 0 0 30 0 -1 0.000 0 0 0 6 3135 2925 2985 3075 3285 3285 2985 3465 3285 3675 3135 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 4050 2925 4470 3825 3 2 0 1 0 0 50 0 -1 0.000 0 0 0 6 4260 2925 4110 3075 4410 3285 4110 3465 4410 3675 4260 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3600 2925 4005 3825 3 2 0 1 0 0 15 0 -1 0.000 0 0 0 6 3810 2925 3660 3075 3960 3285 3660 3465 3960 3675 3810 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3465 2925 3870 3825 3 2 0 1 0 0 25 0 -1 0.000 0 0 0 6 3675 2925 3525 3075 3825 3285 3525 3465 3825 3675 3675 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2295 2925 2700 3825 3 2 0 1 0 0 55 0 -1 0.000 0 0 0 6 2490 2925 2340 3075 2640 3285 2340 3465 2640 3675 2490 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2745 2925 3150 3825 3 2 0 1 0 0 35 0 -1 0.000 0 0 0 6 2955 2925 2805 3075 3105 3285 2805 3465 3105 3675 2955 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 3375 5625 318 318 3057 5625 3693 5625 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 2475 5625 318 318 2157 5625 2793 5625 1 4 0 1 0 0 50 0 41 0.000 1 0.0000 3378 7875 318 318 3060 7875 3696 7875 1 4 0 3 0 0 20 0 -1 0.000 1 0.0000 3378 5625 318 318 3060 5625 3696 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 2703 5625 318 318 2385 5625 3021 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 3693 5625 318 318 3375 5625 4011 5625 1 4 0 3 0 0 60 0 -1 0.000 1 0.0000 2918 5639 318 318 2600 5639 3236 5639 2 1 2 1 0 0 10 0 -1 10.000 0 0 -1 0 0 2 450 4725 1575 4725 2 1 0 2 0 0 20 0 -1 0.000 0 0 -1 0 0 3 3375 5175 2475 4500 2475 4050 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 2475 5175 2475 4500 2475 4050 2 1 2 1 0 0 50 0 -1 10.000 0 0 -1 0 0 2 1575 4725 4725 4725 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 3375 5175 3150 4500 3150 4050 2 4 0 1 0 0 50 0 -1 0.000 0 0 7 0 0 5 4725 4725 4725 2475 2025 2475 2025 4725 4725 4725 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 4725 7200 4725 4725 2025 4725 2025 7200 4725 7200 2 1 0 1 0 7 20 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 4 0 1 0 0 80 0 10 0.000 0 0 7 0 0 5 2835 6975 2115 6975 2115 2655 2835 2655 2835 6975 2 1 0 1 0 7 30 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 1 0 2 0 7 40 0 -1 0.000 0 0 -1 1 0 4 2 1 3.00 90.00 120.00 2790 7380 2565 6930 2790 7155 2565 6480 2 1 0 2 0 0 25 0 -1 0.000 0 0 -1 0 0 3 2700 5175 2925 4500 2925 4050 2 1 0 1 0 7 25 0 -1 0.000 0 0 -1 0 0 3 2700 6075 2700 6750 3375 7425 2 4 0 1 0 0 90 0 10 0.000 0 0 7 0 0 5 4050 6975 3330 6975 3330 2655 4050 2655 4050 6975 2 1 0 2 0 0 60 0 -1 0.000 0 0 -1 0 0 3 2925 5175 2925 4500 2925 4050 2 1 0 1 0 7 60 0 -1 0.000 0 0 -1 0 0 3 2925 6075 2925 6750 3375 7425 2 4 0 1 0 -1 60 0 -1 0.000 0 0 7 0 0 5 3285 6975 2565 6975 2565 2655 3285 2655 3285 6975 4 1 0 55 0 0 16 0.0000 2 165 120 2700 2925 1\001 4 1 0 10 0 0 25 0.0000 2 255 255 1350 5175 K\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 5625 E\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 6075 R\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 6525 N\001 4 1 0 10 0 0 25 0.0000 2 255 210 1350 7425 L\001 4 1 0 10 0 0 25 0.0000 2 255 195 1350 3600 S\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 4500 R\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 4050 E\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 3150 U\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 6975 E\001 4 2 0 10 0 0 22 0.0000 2 225 1425 1800 7965 Processors\001 4 1 0 30 0 0 16 0.0000 2 165 165 3375 5670 B\001 4 1 0 30 0 0 16 0.0000 2 165 180 2475 5715 A\001 4 1 0 30 0 0 16 0.0000 2 165 120 3375 2925 2\001 4 1 0 10 0 0 16 0.0000 2 165 180 3375 5670 A\001 4 1 0 30 0 1 60 0.0000 2 600 600 2520 6390 B\001 4 1 0 50 0 0 16 0.0000 2 165 120 4500 2925 3\001 4 1 0 15 0 0 16 0.0000 2 165 120 4050 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3150 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3870 2925 1\001 4 1 0 25 0 0 16 0.0000 2 165 165 2700 5670 B\001 4 1 0 25 0 0 16 0.0000 2 165 180 3690 5670 A\001 4 1 0 60 0 0 16 0.0000 2 165 120 3150 2925 1\001 4 1 0 60 0 0 16 0.0000 2 165 180 2925 5715 A\001 latex-make-2.2.2/examples/fig/nab-a.subfig000066400000000000000000000001031265641754100203140ustar00rootroot0000000000000010 15 20 50 55 30 50 55 80 30 40 50 55 80 25 35 50 90 15 35 50 60 latex-make-2.2.2/examples/fig/simple.fig000066400000000000000000000003711265641754100201240ustar00rootroot00000000000000#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 8925 6600 8925 2175 2175 2175 2175 6600 8925 6600 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 10875 7875 10875 3525 4650 3525 4650 7875 10875 7875 latex-make-2.2.2/examples/fig/subrep/000077500000000000000000000000001265641754100174435ustar00rootroot00000000000000latex-make-2.2.2/examples/fig/subrep/nab-b.fig000066400000000000000000000077661265641754100211310ustar00rootroot00000000000000#FIG 3.2 Landscape Center Metric A4 50.00 Single -2 1200 2 6 2925 2925 3375 3825 3 2 0 1 0 0 30 0 -1 0.000 0 0 0 6 3135 2925 2985 3075 3285 3285 2985 3465 3285 3675 3135 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 4050 2925 4470 3825 3 2 0 1 0 0 50 0 -1 0.000 0 0 0 6 4260 2925 4110 3075 4410 3285 4110 3465 4410 3675 4260 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3600 2925 4005 3825 3 2 0 1 0 0 15 0 -1 0.000 0 0 0 6 3810 2925 3660 3075 3960 3285 3660 3465 3960 3675 3810 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3465 2925 3870 3825 3 2 0 1 0 0 25 0 -1 0.000 0 0 0 6 3675 2925 3525 3075 3825 3285 3525 3465 3825 3675 3675 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2295 2925 2700 3825 3 2 0 1 0 0 55 0 -1 0.000 0 0 0 6 2490 2925 2340 3075 2640 3285 2340 3465 2640 3675 2490 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2745 2925 3150 3825 3 2 0 1 0 0 35 0 -1 0.000 0 0 0 6 2955 2925 2805 3075 3105 3285 2805 3465 3105 3675 2955 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 3375 5625 318 318 3057 5625 3693 5625 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 2475 5625 318 318 2157 5625 2793 5625 1 4 0 1 0 0 50 0 41 0.000 1 0.0000 3378 7875 318 318 3060 7875 3696 7875 1 4 0 3 0 0 20 0 -1 0.000 1 0.0000 3378 5625 318 318 3060 5625 3696 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 2703 5625 318 318 2385 5625 3021 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 3693 5625 318 318 3375 5625 4011 5625 1 4 0 3 0 0 60 0 -1 0.000 1 0.0000 2918 5639 318 318 2600 5639 3236 5639 2 1 2 1 0 0 10 0 -1 10.000 0 0 -1 0 0 2 450 4725 1575 4725 2 1 0 2 0 0 20 0 -1 0.000 0 0 -1 0 0 3 3375 5175 2475 4500 2475 4050 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 2475 5175 2475 4500 2475 4050 2 1 2 1 0 0 50 0 -1 10.000 0 0 -1 0 0 2 1575 4725 4725 4725 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 3375 5175 3150 4500 3150 4050 2 4 0 1 0 0 50 0 -1 0.000 0 0 7 0 0 5 4725 4725 4725 2475 2025 2475 2025 4725 4725 4725 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 4725 7200 4725 4725 2025 4725 2025 7200 4725 7200 2 1 0 1 0 7 20 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 4 0 1 0 0 80 0 10 0.000 0 0 7 0 0 5 2835 6975 2115 6975 2115 2655 2835 2655 2835 6975 2 1 0 1 0 7 30 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 1 0 2 0 7 40 0 -1 0.000 0 0 -1 1 0 4 2 1 3.00 90.00 120.00 2790 7380 2565 6930 2790 7155 2565 6480 2 1 0 2 0 0 25 0 -1 0.000 0 0 -1 0 0 3 2700 5175 2925 4500 2925 4050 2 1 0 1 0 7 25 0 -1 0.000 0 0 -1 0 0 3 2700 6075 2700 6750 3375 7425 2 4 0 1 0 0 90 0 10 0.000 0 0 7 0 0 5 4050 6975 3330 6975 3330 2655 4050 2655 4050 6975 2 1 0 2 0 0 60 0 -1 0.000 0 0 -1 0 0 3 2925 5175 2925 4500 2925 4050 2 1 0 1 0 7 60 0 -1 0.000 0 0 -1 0 0 3 2925 6075 2925 6750 3375 7425 2 4 0 1 0 -1 60 0 -1 0.000 0 0 7 0 0 5 3285 6975 2565 6975 2565 2655 3285 2655 3285 6975 4 1 0 55 0 0 16 0.0000 2 165 120 2700 2925 1\001 4 1 0 10 0 0 25 0.0000 2 255 255 1350 5175 K\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 5625 E\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 6075 R\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 6525 N\001 4 1 0 10 0 0 25 0.0000 2 255 210 1350 7425 L\001 4 1 0 10 0 0 25 0.0000 2 255 195 1350 3600 S\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 4500 R\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 4050 E\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 3150 U\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 6975 E\001 4 2 0 10 0 0 22 0.0000 2 225 1425 1800 7965 Processors\001 4 1 0 30 0 0 16 0.0000 2 165 165 3375 5670 B\001 4 1 0 30 0 0 16 0.0000 2 165 180 2475 5715 A\001 4 1 0 30 0 0 16 0.0000 2 165 120 3375 2925 2\001 4 1 0 10 0 0 16 0.0000 2 165 180 3375 5670 A\001 4 1 0 30 0 1 60 0.0000 2 600 600 2520 6390 B\001 4 1 0 50 0 0 16 0.0000 2 165 120 4500 2925 3\001 4 1 0 15 0 0 16 0.0000 2 165 120 4050 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3150 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3870 2925 1\001 4 1 0 25 0 0 16 0.0000 2 165 165 2700 5670 B\001 4 1 0 25 0 0 16 0.0000 2 165 180 3690 5670 A\001 4 1 0 60 0 0 16 0.0000 2 165 120 3150 2925 1\001 4 1 0 60 0 0 16 0.0000 2 165 180 2925 5715 A\001 latex-make-2.2.2/examples/fig/subrep/nab-b.subfig000066400000000000000000000001031265641754100216150ustar00rootroot0000000000000010 15 20 50 55 30 50 55 80 30 40 50 55 80 25 35 50 90 15 35 50 60 latex-make-2.2.2/examples/fig2/000077500000000000000000000000001265641754100162255ustar00rootroot00000000000000latex-make-2.2.2/examples/fig2/nab-c.fig000066400000000000000000000077661265641754100177140ustar00rootroot00000000000000#FIG 3.2 Landscape Center Metric A4 50.00 Single -2 1200 2 6 2925 2925 3375 3825 3 2 0 1 0 0 30 0 -1 0.000 0 0 0 6 3135 2925 2985 3075 3285 3285 2985 3465 3285 3675 3135 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 4050 2925 4470 3825 3 2 0 1 0 0 50 0 -1 0.000 0 0 0 6 4260 2925 4110 3075 4410 3285 4110 3465 4410 3675 4260 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3600 2925 4005 3825 3 2 0 1 0 0 15 0 -1 0.000 0 0 0 6 3810 2925 3660 3075 3960 3285 3660 3465 3960 3675 3810 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3465 2925 3870 3825 3 2 0 1 0 0 25 0 -1 0.000 0 0 0 6 3675 2925 3525 3075 3825 3285 3525 3465 3825 3675 3675 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2295 2925 2700 3825 3 2 0 1 0 0 55 0 -1 0.000 0 0 0 6 2490 2925 2340 3075 2640 3285 2340 3465 2640 3675 2490 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2745 2925 3150 3825 3 2 0 1 0 0 35 0 -1 0.000 0 0 0 6 2955 2925 2805 3075 3105 3285 2805 3465 3105 3675 2955 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 3375 5625 318 318 3057 5625 3693 5625 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 2475 5625 318 318 2157 5625 2793 5625 1 4 0 1 0 0 50 0 41 0.000 1 0.0000 3378 7875 318 318 3060 7875 3696 7875 1 4 0 3 0 0 20 0 -1 0.000 1 0.0000 3378 5625 318 318 3060 5625 3696 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 2703 5625 318 318 2385 5625 3021 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 3693 5625 318 318 3375 5625 4011 5625 1 4 0 3 0 0 60 0 -1 0.000 1 0.0000 2918 5639 318 318 2600 5639 3236 5639 2 1 2 1 0 0 10 0 -1 10.000 0 0 -1 0 0 2 450 4725 1575 4725 2 1 0 2 0 0 20 0 -1 0.000 0 0 -1 0 0 3 3375 5175 2475 4500 2475 4050 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 2475 5175 2475 4500 2475 4050 2 1 2 1 0 0 50 0 -1 10.000 0 0 -1 0 0 2 1575 4725 4725 4725 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 3375 5175 3150 4500 3150 4050 2 4 0 1 0 0 50 0 -1 0.000 0 0 7 0 0 5 4725 4725 4725 2475 2025 2475 2025 4725 4725 4725 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 4725 7200 4725 4725 2025 4725 2025 7200 4725 7200 2 1 0 1 0 7 20 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 4 0 1 0 0 80 0 10 0.000 0 0 7 0 0 5 2835 6975 2115 6975 2115 2655 2835 2655 2835 6975 2 1 0 1 0 7 30 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 1 0 2 0 7 40 0 -1 0.000 0 0 -1 1 0 4 2 1 3.00 90.00 120.00 2790 7380 2565 6930 2790 7155 2565 6480 2 1 0 2 0 0 25 0 -1 0.000 0 0 -1 0 0 3 2700 5175 2925 4500 2925 4050 2 1 0 1 0 7 25 0 -1 0.000 0 0 -1 0 0 3 2700 6075 2700 6750 3375 7425 2 4 0 1 0 0 90 0 10 0.000 0 0 7 0 0 5 4050 6975 3330 6975 3330 2655 4050 2655 4050 6975 2 1 0 2 0 0 60 0 -1 0.000 0 0 -1 0 0 3 2925 5175 2925 4500 2925 4050 2 1 0 1 0 7 60 0 -1 0.000 0 0 -1 0 0 3 2925 6075 2925 6750 3375 7425 2 4 0 1 0 -1 60 0 -1 0.000 0 0 7 0 0 5 3285 6975 2565 6975 2565 2655 3285 2655 3285 6975 4 1 0 55 0 0 16 0.0000 2 165 120 2700 2925 1\001 4 1 0 10 0 0 25 0.0000 2 255 255 1350 5175 K\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 5625 E\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 6075 R\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 6525 N\001 4 1 0 10 0 0 25 0.0000 2 255 210 1350 7425 L\001 4 1 0 10 0 0 25 0.0000 2 255 195 1350 3600 S\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 4500 R\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 4050 E\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 3150 U\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 6975 E\001 4 2 0 10 0 0 22 0.0000 2 225 1425 1800 7965 Processors\001 4 1 0 30 0 0 16 0.0000 2 165 165 3375 5670 B\001 4 1 0 30 0 0 16 0.0000 2 165 180 2475 5715 A\001 4 1 0 30 0 0 16 0.0000 2 165 120 3375 2925 2\001 4 1 0 10 0 0 16 0.0000 2 165 180 3375 5670 A\001 4 1 0 30 0 1 60 0.0000 2 600 600 2520 6390 B\001 4 1 0 50 0 0 16 0.0000 2 165 120 4500 2925 3\001 4 1 0 15 0 0 16 0.0000 2 165 120 4050 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3150 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3870 2925 1\001 4 1 0 25 0 0 16 0.0000 2 165 165 2700 5670 B\001 4 1 0 25 0 0 16 0.0000 2 165 180 3690 5670 A\001 4 1 0 60 0 0 16 0.0000 2 165 120 3150 2925 1\001 4 1 0 60 0 0 16 0.0000 2 165 180 2925 5715 A\001 latex-make-2.2.2/examples/fig2/nab-c.subfig000066400000000000000000000001031265641754100204000ustar00rootroot0000000000000010 15 20 50 55 30 50 55 80 30 40 50 55 80 25 35 50 90 15 35 50 60 latex-make-2.2.2/examples/fig2/subrep2/000077500000000000000000000000001265641754100176075ustar00rootroot00000000000000latex-make-2.2.2/examples/fig2/subrep2/nab-d.fig000066400000000000000000000077661265641754100212770ustar00rootroot00000000000000#FIG 3.2 Landscape Center Metric A4 50.00 Single -2 1200 2 6 2925 2925 3375 3825 3 2 0 1 0 0 30 0 -1 0.000 0 0 0 6 3135 2925 2985 3075 3285 3285 2985 3465 3285 3675 3135 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 4050 2925 4470 3825 3 2 0 1 0 0 50 0 -1 0.000 0 0 0 6 4260 2925 4110 3075 4410 3285 4110 3465 4410 3675 4260 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3600 2925 4005 3825 3 2 0 1 0 0 15 0 -1 0.000 0 0 0 6 3810 2925 3660 3075 3960 3285 3660 3465 3960 3675 3810 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 3465 2925 3870 3825 3 2 0 1 0 0 25 0 -1 0.000 0 0 0 6 3675 2925 3525 3075 3825 3285 3525 3465 3825 3675 3675 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2295 2925 2700 3825 3 2 0 1 0 0 55 0 -1 0.000 0 0 0 6 2490 2925 2340 3075 2640 3285 2340 3465 2640 3675 2490 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 6 2745 2925 3150 3825 3 2 0 1 0 0 35 0 -1 0.000 0 0 0 6 2955 2925 2805 3075 3105 3285 2805 3465 3105 3675 2955 3825 0.000 -1.000 -1.000 -1.000 -1.000 0.000 -6 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 3375 5625 318 318 3057 5625 3693 5625 1 4 0 3 0 0 30 0 -1 0.000 1 0.0000 2475 5625 318 318 2157 5625 2793 5625 1 4 0 1 0 0 50 0 41 0.000 1 0.0000 3378 7875 318 318 3060 7875 3696 7875 1 4 0 3 0 0 20 0 -1 0.000 1 0.0000 3378 5625 318 318 3060 5625 3696 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 2703 5625 318 318 2385 5625 3021 5625 1 4 0 3 0 0 25 0 -1 0.000 1 0.0000 3693 5625 318 318 3375 5625 4011 5625 1 4 0 3 0 0 60 0 -1 0.000 1 0.0000 2918 5639 318 318 2600 5639 3236 5639 2 1 2 1 0 0 10 0 -1 10.000 0 0 -1 0 0 2 450 4725 1575 4725 2 1 0 2 0 0 20 0 -1 0.000 0 0 -1 0 0 3 3375 5175 2475 4500 2475 4050 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 2475 5175 2475 4500 2475 4050 2 1 2 1 0 0 50 0 -1 10.000 0 0 -1 0 0 2 1575 4725 4725 4725 2 1 0 2 0 0 30 0 -1 0.000 0 0 -1 0 0 3 3375 5175 3150 4500 3150 4050 2 4 0 1 0 0 50 0 -1 0.000 0 0 7 0 0 5 4725 4725 4725 2475 2025 2475 2025 4725 4725 4725 2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 4725 7200 4725 4725 2025 4725 2025 7200 4725 7200 2 1 0 1 0 7 20 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 4 0 1 0 0 80 0 10 0.000 0 0 7 0 0 5 2835 6975 2115 6975 2115 2655 2835 2655 2835 6975 2 1 0 1 0 7 30 0 -1 0.000 0 0 -1 0 0 2 3375 6075 3375 7425 2 1 0 2 0 7 40 0 -1 0.000 0 0 -1 1 0 4 2 1 3.00 90.00 120.00 2790 7380 2565 6930 2790 7155 2565 6480 2 1 0 2 0 0 25 0 -1 0.000 0 0 -1 0 0 3 2700 5175 2925 4500 2925 4050 2 1 0 1 0 7 25 0 -1 0.000 0 0 -1 0 0 3 2700 6075 2700 6750 3375 7425 2 4 0 1 0 0 90 0 10 0.000 0 0 7 0 0 5 4050 6975 3330 6975 3330 2655 4050 2655 4050 6975 2 1 0 2 0 0 60 0 -1 0.000 0 0 -1 0 0 3 2925 5175 2925 4500 2925 4050 2 1 0 1 0 7 60 0 -1 0.000 0 0 -1 0 0 3 2925 6075 2925 6750 3375 7425 2 4 0 1 0 -1 60 0 -1 0.000 0 0 7 0 0 5 3285 6975 2565 6975 2565 2655 3285 2655 3285 6975 4 1 0 55 0 0 16 0.0000 2 165 120 2700 2925 1\001 4 1 0 10 0 0 25 0.0000 2 255 255 1350 5175 K\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 5625 E\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 6075 R\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 6525 N\001 4 1 0 10 0 0 25 0.0000 2 255 210 1350 7425 L\001 4 1 0 10 0 0 25 0.0000 2 255 195 1350 3600 S\001 4 1 0 10 0 0 25 0.0000 2 255 240 1350 4500 R\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 4050 E\001 4 1 0 10 0 0 25 0.0000 2 255 270 1350 3150 U\001 4 1 0 10 0 0 25 0.0000 2 255 225 1350 6975 E\001 4 2 0 10 0 0 22 0.0000 2 225 1425 1800 7965 Processors\001 4 1 0 30 0 0 16 0.0000 2 165 165 3375 5670 B\001 4 1 0 30 0 0 16 0.0000 2 165 180 2475 5715 A\001 4 1 0 30 0 0 16 0.0000 2 165 120 3375 2925 2\001 4 1 0 10 0 0 16 0.0000 2 165 180 3375 5670 A\001 4 1 0 30 0 1 60 0.0000 2 600 600 2520 6390 B\001 4 1 0 50 0 0 16 0.0000 2 165 120 4500 2925 3\001 4 1 0 15 0 0 16 0.0000 2 165 120 4050 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3150 2925 2\001 4 1 0 25 0 0 16 0.0000 2 165 120 3870 2925 1\001 4 1 0 25 0 0 16 0.0000 2 165 165 2700 5670 B\001 4 1 0 25 0 0 16 0.0000 2 165 180 3690 5670 A\001 4 1 0 60 0 0 16 0.0000 2 165 120 3150 2925 1\001 4 1 0 60 0 0 16 0.0000 2 165 180 2925 5715 A\001 latex-make-2.2.2/examples/fig2/subrep2/nab-d.subfig000066400000000000000000000001031265641754100217630ustar00rootroot0000000000000010 15 20 50 55 30 50 55 80 30 40 50 55 80 25 35 50 90 15 35 50 60 latex-make-2.2.2/src/000077500000000000000000000000001265641754100143475ustar00rootroot00000000000000latex-make-2.2.2/src/Makefile000066400000000000000000000045061265641754100160140ustar00rootroot00000000000000 ####[ Check Software ]################################################ ifeq ($(filter else-if,$(.FEATURES)),) $(error GNU Make 3.81 needed. Please, update your software.) exit 1 endif ####[ Default installation ]########################################## -include ../config.mk prefix ?= /usr/local texmf_prefix ?= $(prefix)/share/texmf PKGNAME=latex-make INCLUDEDIR=$(prefix)/include LATEXDIR=$(texmf_prefix)/tex/latex/$(PKGNAME) LATEXCFGDIR=$(texmf_prefix)/tex/latex/$(PKGNAME) DOCDIR=$(texmf_prefix)/doc/latex/$(PKGNAME) SCRIPTSDIR=$(texmf_prefix)/scripts/$(PKGNAME) SCRIPTS=figdepth.py gensubfig.py svg2dev.py svgdepth.py latexfilter.py INCFILES=LaTeX.mk STYFILES= *.sty CFGFILES= *.cfg DOCFILES= *.pdf ####[ Targets ]###################################################### all: generate .PHONY: all generate install SCRIPTS=figdepth.py gensubfig.py svg2dev.py svgdepth.py latexfilter.py GENFILES= figlatex.sty figlatex.cfg texgraphicx.sty \ pdfswitch.sty texdepends.sty \ LaTeX.mk LaTeX.mk.conf $(SCRIPTS) DTX_SOURCES=$(wildcard *.dtx) generate: $(GENFILES) install: $(GENFILES) doc install -d $(DESTDIR)$(LATEXDIR) install -m 644 $(STYFILES) $(DESTDIR)$(LATEXDIR) install -d $(DESTDIR)$(LATEXCFGDIR) install -m 644 $(CFGFILES) $(DESTDIR)$(LATEXCFGDIR) install -d $(DESTDIR)$(SCRIPTSDIR) install -m 755 $(SCRIPTS) $(DESTDIR)$(SCRIPTSDIR) install -m 644 $(INCFILES) $(DESTDIR)$(SCRIPTSDIR) install -d $(DESTDIR)$(INCLUDEDIR) ln -sf $(SCRIPTSDIR)/LaTeX.mk $(DESTDIR)$(INCLUDEDIR)/ install -d $(DESTDIR)$(DOCDIR) install -m 644 $(DOCFILES) $(DESTDIR)$(DOCDIR) if [ -f $(texmf_prefix)/ls-R ]; then texhash $(texmf_prefix) ; fi $(GENFILES): stamp.latex-make stamp.latex-make $(CURDIR)/LaTeX.mk: latex-make.ins $(DTX_SOURCES) latex latex-make.ins chmod +x $(SCRIPTS) touch $@ sed -i.bak \ -e 's|^\(_LaTeX_Make_BINORIGDIR=\).*|\1$(SCRIPTSDIR)|' \ -e 's|^\(_LaTeX_Make_TEXORIGDIR=\).*|\1$(LATEXDIR)|' \ LaTeX.mk $(RM) LaTeX.mk.bak distclean:: $(RM) $(GENFILES) stamp.latex-make clean:: $(RM) latex-make.log doc: pdf LU_MASTERS=figlatex texdepends latex-make #pdfswitch texdepends DEPENDS=LaTeX.mk $(SCRIPTS) latex-make_MAIN=latex-make.dtx figlatex_MAIN=figlatex.dtx texdepends_MAIN=texdepends.dtx #LATEX=latex -v # Force using local LaTeX.mk and not system-wide LaTeX.mk if already installed include $(CURDIR)/LaTeX.mk latex-make-2.2.2/src/figlatex.dtx000066400000000000000000000401121265641754100166710ustar00rootroot00000000000000% \iffalse meta-comment %% %% File: figlatex.dtx Copyright (C) 2002--2005 V. Danjean, A. Legrand %% Vincent.Danjean@ens-lyon.org %% Arnaud.Legrand@ens-lyon.org %% %% 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. %% % %<*dtx> \ProvidesFile{figlatex.dtx} % %\NeedsTeXFormat{LaTeX2e}% %\ProvidesPackage{figlatex}% % \ProvidesFile{figlatex.cfg}% % \ProvidesPackage{texgraphicx}% % \fi % \ProvidesFile{figlatex.dtx} [2016/02/09 v2.2.2 include fig and svg in LaTeX] % \iffalse %<*driver> \documentclass{ltxdoc} \usepackage[latin1]{inputenc} \usepackage[french,english]{babel} \NoAutoSpaceBeforeFDP \EnableCrossrefs \CodelineIndex \RecordChanges \setcounter{IndexColumns}{2} % make a twocolumn index \setlength{\columnseprule}{0pt} % no rules between columns ... \setlength{\columnsep}{2em} % ... but more spacing instead. \setcounter{unbalance}{4} \setlength{\IndexMin}{100pt} %%%%\OnlyDescription % uncomment this line to suppress printing the source code \makeatletter % don't show underfull hboxes in index/glossary: \g@addto@macro{\IndexParms}{\hbadness=10000} \g@addto@macro{\GlossaryParms}{\hbadness=10000} \makeatother \begin{document} \DocInput{figlatex.dtx} \PrintIndex \PrintChanges \end{document} % % \fi % % \GetFileInfo{figlatex.dtx} % % \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ } % \DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global} % \DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,% % \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi,\loop,\do} % \DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,% % \vbox,\vtop,\vcenter} % \DoNotIndex{\@empty,\immediate,\write} % \DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup} % \DoNotIndex{\divide,\advance,\multiply,\count,\dimen} % \DoNotIndex{\relax,\space,\string} % \DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,% % \closein,\closeout} % \DoNotIndex{\catcode,\endinput} % \DoNotIndex{\jobname,\message,\read,\the,\noexpand} % \DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss} % \DoNotIndex{\m@ne,\z@,\@m,\z@skip,\@ne,\tw@,\p@} % \DoNotIndex{\DeclareRobustCommand,\DeclareOption,\newcommand,\newcommand*} % \DoNotIndex{\newcount,\newif,\newlinechar,\newread,\newtoks,\newwrite} % \DoNotIndex{\dp,\wd,\ht,\vss,\unskip,\ifthenelse} % % \DoNotIndex{\@filef@und,\@nameddef,\@tempa} % \DoNotIndex{\define@key,\equal,\ExecuteOptions} % \DoNotIndex{\filename@area,\filename@base,\filename@ext,\filename@parse} % \DoNotIndex{\Gin@exclamation,\Gin@getbase,\Gin@scalex,\Gin@scaley} % \DoNotIndex{\Gread@eps,\Gread@pdf,\Gscale@box} % \DoNotIndex{\IfFileExists,\ifpdf,\input,\InputIfFileExists} % \DoNotIndex{\MessageBreak,\PackageWarning,\PackageWarningNoLine} % \DoNotIndex{\ProcessOptions,\RequirePackage,\typeout} % \DoNotIndex{} % \DoNotIndex{} % % \title{The \textsf{figlatex} package\thanks{This file % has version number \fileversion, last % revised \filedate.}} % \author{Arnaud \textsc{Legrand}\and Vincent \textsc{Danjean}} % \date{\filedate} % \maketitle % \begin{abstract} % This package allows \LaTeX\space to load XFig and SVG figures (or % subfigures) with the |\includegraphics| command. % \end{abstract} % \CheckSum{217} % % \changes{v0.1.1}{2005/03/28}{Version 0.1.1 at last} % \changes{v0.1.2}{2005/03/29}{Manage index/glossary} % \changes{v0.1.3}{2008/01/28}{Better support for subfig with texdepends} % \changes{v0.1.4}{2011/09/25}{Support for svg with texdepends} % % \makeatletter % \def\SpecialOptionIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (option)\encapchar usage}% % \index{options:\levelchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \def\SpecialFileIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (file)\encapchar usage}% % \index{files:\levelchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \def\SpecialMainOptionIndex#1{\@bsphack\special@index{#1\actualchar % {\string\ttfamily\space#1} % (option)\encapchar main}% % \special@index{options:\levelchar{% % \string\ttfamily\space#1}\encapchar % main}\@esphack} % \def\option{\begingroup % \catcode`\\12 % \MakePrivateLetters \mym@cro@ \iffalse} % \long\def\mym@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist % \edef\saved@macroname{\string#2}% % \def\makelabel##1{\llap{##1}}% % \if@inlabel % \let\@tempa\@empty \count@\macro@cnt % \loop \ifnum\count@>\z@ % \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat % \edef\makelabel##1{\llap{\vtop to\baselineskip % {\@tempa\hbox{##1}\vss}}}% % \advance \macro@cnt \@ne % \else \macro@cnt\@ne \fi % \edef\@tempa{\noexpand\item[% % #1% % \noexpand\PrintMacroName % \else % \noexpand\PrintEnvName % \fi % {\string#2}]}% % \@tempa % \global\advance\c@CodelineNo\@ne % #1% % \SpecialMainIndex{#2}\nobreak % \DoNotIndex{#2}% % \else % \SpecialMainOptionIndex{#2}\nobreak % \fi % \global\advance\c@CodelineNo\m@ne % \ignorespaces} % \let\endoption \endtrivlist % \def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@Option} % \def\Describe@Option#1{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialOptionIndex{#1}\@esphack\ignorespaces} % \def\DescribeFile{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@Option} % \def\Describe@File#1{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialFileIndex{#1}\@esphack\ignorespaces} % \makeatother % \MakeShortVerb{\|} % % \section{Introduction} % % \subsection{General} % \DescribeMacro{\includegraphics} % This package allows to load XFig figures from \LaTeX\space sources with % the |\includegraphics| command from the |graphicx| package: % \begin{verbatim} % \includegraphics[width=\linewidth]{myfig.fig} % \end{verbatim} % % This package does not convert by itself XFig figures (see package % |texdepends| for that). It only diverts the loading functions so % that \LaTeX\space includes the |.pstex_t| or the |.pdftex_t|. % % \subsection{Options} % Available options for this package: % \begin{description} % \item[debug~:] \DescribeOption{debug}more messages written while compiling % \item[compatibility~:] \DescribeOption{compatibility}old versions of |pdflatex| do not allow % to declare a PDF file with |\DeclareGraphicsRule| that has not the % |.pdf| extension. In such cases, this package uses the extension % |.pdf| instead of |.pdftex| for PDF created from XFig figures. % \end{description} % % \DescribeFile{figlatex.cfg} % \DescribeMacro{\compatibility} % \DescribeMacro{\debug} % When the package is loaded, it tries to read a |figlatex.cfg| % file. This file can contains |\compatibility| and/or |\debug| to % enable theses options site wide. % % \subsection{Subfigures} % % Sometimes, several figures made with XFig should be similar. It is % possible to make only one XFig figure and then create subfigures % which contains only a subset of the depths of the original figure. % % \StopEventually{ % } % \section{Implementation} % % \subsection{figlatex} % \begin{macrocode} %<*package> % \end{macrocode} % % Options definitions % \begin{option}{compatibility} % \begin{macrocode} \newif\ifFL@compatibility \DeclareOption{compatibility}{% %\PackageWarning{figlatex}{option compatibility}% \global\FL@compatibilitytrue% } % \end{macrocode} % \end{option} % \begin{option}{debug} % \begin{macrocode} \newif\ifFL@debug \DeclareOption{debug}{% \global\FL@debugtrue% } % \end{macrocode} % \end{option} % % We load the config file if it exists. % Commands for the config file are local. % \begin{macrocode} { % \end{macrocode} % \begin{macro}{\compatibility} % \begin{macrocode} \def\compatibility{% \ExecuteOptions{compatibility}% } % \end{macrocode} % \end{macro} % \begin{macro}{\debug} % \begin{macrocode} \def\debug{% \ExecuteOptions{debug}% } % \end{macrocode} % \end{macro} % \begin{macrocode} \InputIfFileExists{figlatex.cfg}{% \typeout{***************************************^^J% * Local config file figlatex.cfg used *^^J% ***************************************} }{% \typeout{Found no configuration file for figlatex} } } % \end{macrocode} % Run the options % \begin{macrocode} \ProcessOptions % \end{macrocode} % and requires some packages % \begin{macrocode} \RequirePackage{ifpdf} \RequirePackage{graphicx} % \end{macrocode} % XFig uses heavily the color package % \begin{macrocode} \RequirePackage{color} \RequirePackage{epstopdf} % \end{macrocode} % \begin{macro}{\FL@dmessage} % Write the message only if debug is set % \begin{macrocode} \def\FL@dmessage#1{% \ifFL@debug% \message{#1}% \fi% } % \end{macrocode} % \end{macro} % \begin{macro}{\Ginclude@rawtex} % |.pstex_t| or |.pdftex_t| are loaded with |\input| % \begin{macrocode} \def\Ginclude@rawtex#1{% \FL@dmessage{<#1>}% \bgroup% \def\@tempa{!}% \ifx\Gin@scaley\@tempa% \let\Gin@scaley\Gin@scalex% \else% \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi% \fi% \hbox{% \Gscale@box{\Gin@scalex}[\Gin@scaley]{% \def\Gin@scalex{1}% \let\Gin@scaley\Gin@exclamation% needed for pdflatex \FL@dmessage{}% \input{#1}}}% \egroup} % \end{macrocode} % \end{macro} % \begin{macro}{\Ginclude@figtex} % |.fig| are loaded with |\includegraphics| after modifying the name % \begin{macrocode} \def\Ginclude@figtex#1{% \message{<#1>}% \bgroup% \xdef\FL@filename{#1}% \filename@parse{\FL@filename}% \xdef\FL@filename{\filename@area\filename@base.\FL@figext}% \FL@dmessage{<****loading fig \FL@filename>}% \FL@includerawtexgraphics[]{\FL@filename}% \egroup} % \end{macrocode} % \end{macro} % \begin{macro}{\Gread@figtex} % |.fig| bounding box is the same as the corresponding |.pstex_t| or |.pdftex_t| % \begin{macrocode} \newcommand{\Gread@figtex}[1]{% %\typeout{Oh, file exists #1}% \Gread@rawtex{#1}% } % \end{macrocode} % \end{macro} % \begin{macro}{\Ginclude@svgtex} % |.svg| are loaded with |\includegraphics| after modifying the name % \begin{macrocode} \def\Ginclude@svgtex#1{% \message{<#1>}% \bgroup% \xdef\FL@filename{#1}% \filename@parse{\FL@filename}% \xdef\FL@filename{\filename@area\filename@base.\FL@svgext}% \FL@dmessage{<****loading svg \FL@filename>}% \FL@includerawtexgraphics[]{\FL@filename}% \egroup} % \end{macrocode} % \end{macro} % \begin{macro}{\Gread@svgtex} % |.svg| bounding box is the same as the corresponding |.pstex_t| or |.pdftex_t| % \begin{macrocode} \newcommand{\Gread@svgtex}[1]{% %\typeout{Oh, file exists #1}% \Gread@rawtex{#1}% } % \end{macrocode} % \end{macro} % Declare the right things depending whether we build a DVI or a PDF file. % \begin{macrocode} \ifpdf % \end{macrocode} % PDF part % \begin{macrocode} \def\FL@figext{pdftex_t}% \def\FL@svgext{pdftex_t}% % \end{macrocode} % To read bounding box information: % \begin{macrocode} \let\Gread@rawtex\Gread@pdf% \DeclareGraphicsRule{.pdftex}{pdf}{*}{}% \ifFL@compatibility% \PackageWarningNoLine{figlatex}{Compatibility mode enabled for old LaTeX \MessageBreak Using .pdf extension for pdftex files}% \DeclareGraphicsRule{.pdftex_t}{rawtex}{.pdf}{}% \DeclareGraphicsRule{.fig}{figtex}{.pdf}{}% \DeclareGraphicsRule{.svg}{svgtex}{.pdf}{}% \else% \DeclareGraphicsRule{.pdftex_t}{rawtex}{.pdftex}{}% \DeclareGraphicsRule{.fig}{figtex}{.pdftex}{}% \DeclareGraphicsRule{.svg}{svgtex}{.pdftex}{}% \fi% \else % \end{macrocode} % DVI part % \begin{macrocode} \def\FL@figext{pstex_t}% \def\FL@svgext{pstex_t}% % \end{macrocode} % To read bounding box information: % \begin{macrocode} \let\Gread@rawtex\Gread@eps% \DeclareGraphicsRule{.pstex}{eps}{*}{}% \DeclareGraphicsRule{.pstex_t}{rawtex}{.pstex}{}% \DeclareGraphicsRule{.fig}{figtex}{.pstex}{}% \DeclareGraphicsRule{.svg}{svgtex}{.pstex}{}% \fi % \end{macrocode} % This command is not really necessary here (code could be added in % |\Ginclude@figtex|). However, it's very convinient for the % |texdepends| package. % \begin{macrocode} \newcommand{\FL@includerawtexgraphics}[2][]{% \includegraphics[#1]{#2}% } % \end{macrocode} % Addition of the |subfig=name| key for the options of the % |\includegraphicx[..]{..}| macro. % \begin{macrocode} \def\FL@exclamation{!}% \let\FL@subfig@name\FL@exclamation% \define@key{Gin}{subfig}{% \def\FL@subfig@name{#1}% } \def\FL@sepdefault{_}% % \end{macrocode} % We should ckeck if the \#1 file exists (XXX.subfig) % This is not yet done but texdepends divert this macro % to record the dependency % \begin{macrocode} \def\FL@subfig@check#1{% } % \end{macrocode} % We divert |\Gin@getbase| to modify the file name if the |subfig| key % is used. % \begin{macrocode} \def\FL@Gin@getbase#1{% \ifx\FL@subfig@name\FL@exclamation% \else% \ifthenelse{\equal{#1}{.fig}}{% % If we're including a subfig \IfFileExists{\filename@area\filename@base#1}{% % If the original .fig file exists, just change the name so that % it comprises the full path. \filename@parse{\@filef@und}% % Remove potential trailing spage at the end of the extension \def\filename@ext{fig}% % Check if the subfig file exists \FL@subfig@check{\filename@area\filename@base.subfig}% }{% % Else, write a warning (LaTeX will warn as well but it doesn't % hurt) \PackageWarning{figlatex}{No file '\filename@area\filename@base#1'}% } % Add the subfig suffix to the fig name. \edef\filename@base{\filename@base\FL@sepdefault\FL@subfig@name}% }{% }% \ifthenelse{\equal{#1}{.svg}}{% % If we're including a subfig \IfFileExists{\filename@area\filename@base#1}{% % If the original .svg file exists, just change the name so that % it comprises the full path. \filename@parse{\@filef@und}% % Remove potential trailing spage at the end of the extension \def\filename@ext{svg}% % Check if the subfig file exists \FL@subfig@check{\filename@area\filename@base.subfig}% }{% % Else, write a warning (LaTeX will warn as well but it doesn't % hurt) \PackageWarning{figlatex}{No file '\filename@area\filename@base#1'}% } % Add the subfig suffix to the svg name. \edef\filename@base{\filename@base\FL@sepdefault\FL@subfig@name}% }{% }% \fi% \FL@orig@Gin@getbase{#1}% } \let\FL@orig@Gin@getbase\Gin@getbase \let\Gin@getbase\FL@Gin@getbase %\@namedef{Gin@rule@.fig}#1{% %} % \end{macrocode} % \begin{macrocode} % % \end{macrocode} % The sample config file |figlatex.cfg|\ldots % \begin{macrocode} %<*config> % \end{macrocode} % \begin{macrocode} %\compatibility %\debug % \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \subsection{texgraphicx} % \begin{macrocode} %<*compat> % \end{macrocode} % |texgraphicx.sty| is only a wrapper arround |figlatex.sty|. % \begin{macrocode} \PackageWarning{texgraphicx}{'texgraphicx' is now deprecated\MessageBreak% Please, consider switching to 'figlatex' package\MessageBreak} \RequirePackage{figlatex} \ProcessOptions % \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \Finale \endinput latex-make-2.2.2/src/latex-make.dtx000066400000000000000000002207751265641754100171350ustar00rootroot00000000000000% \iffalse meta-comment % %<*dtx> \ProvidesFile{latex-make.dtx} [2016/02/09 v2.2.2 Makefile for LaTeX] % % \fi % \iffalse %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage{a4wide} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{palatino} \usepackage{pdfswitch} \usepackage{array} \usepackage{tabularx} \usepackage{boxedminipage} \EnableCrossrefs \CodelineIndex \RecordChanges \setcounter{IndexColumns}{2} % make a twocolumn index \setlength{\columnseprule}{0pt} % no rules between columns ... \setlength{\columnsep}{2em} % ... but more spacing instead. \setcounter{unbalance}{4} \setlength{\IndexMin}{100pt} %%%%\OnlyDescription % uncomment this line to suppress printing the source code \makeatletter % don't show underfull hboxes in index/glossary: \g@addto@macro{\IndexParms}{\hbadness=10000} \g@addto@macro{\GlossaryParms}{\hbadness=10000} \makeatother \newenvironment{source}[1][.8\linewidth]{% \begin{center}% \begin{boxedminipage}[c]{#1}\tt% \vspace{1em}% \hspace{2em}\begin{minipage}[c]{#1}\tt% }{% \end{minipage}% \vspace{1em}% \end{boxedminipage}% \end{center}% } \sloppy \begin{document} \DocInput{latex-make.dtx} \PrintIndex \PrintChanges \end{document} % % \fi % % \GetFileInfo{latex-make.dtx} % % \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ } % \DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global} % \DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,% % \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi,\loop,\do} % \DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,% % \vbox,\vtop,\vcenter} % \DoNotIndex{\@empty,\immediate,\write} % \DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup} % \DoNotIndex{\divide,\advance,\multiply,\count,\dimen} % \DoNotIndex{\relax,\space,\string} % \DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,% % \closein,\closeout} % \DoNotIndex{\catcode,\endinput} % \DoNotIndex{\jobname,\message,\read,\the,\noexpand} % \DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss} % \DoNotIndex{\m@ne,\z@,\@m,\z@skip,\@ne,\tw@,\p@} % \DoNotIndex{\DeclareRobustCommand,\DeclareOption,\newcommand,\newcommand*} % \DoNotIndex{\newcount,\newif,\newlinechar,\newread,\newtoks,\newwrite} % \DoNotIndex{\dp,\wd,\ht,\vss,\unskip,\ifthenelse} % % \DoNotIndex{\@filef@und,\@nameddef,\@tempa} % \DoNotIndex{\define@key,\equal,\ExecuteOptions} % \DoNotIndex{\filename@area,\filename@base,\filename@ext,\filename@parse} % \DoNotIndex{\Gin@exclamation,\Gin@getbase,\Gin@scalex,\Gin@scaley} % \DoNotIndex{\Gread@eps,\Gread@pdf,\Gscale@box} % \DoNotIndex{\IfFileExists,\ifpdf,\input,\InputIfFileExists} % \DoNotIndex{\MessageBreak,\PackageWarning,\PackageWarningNoLine} % \DoNotIndex{\ProcessOptions,\RequirePackage,\typeout} % \DoNotIndex{\(,\),\.,\1,\t,\n,\^^J} % \catcode\endlinechar 12\DoNotIndex{\ % }\catcode\endlinechar 10{} % \catcode`\$=12 % \DoNotIndex{\$} % \catcode`\$=3 % \DoNotIndex{\DeclareGraphicsExtensions,\DeclareGraphicsRule} % % % \title{The \LaTeX.mk Makefile\\ % and related script tools\thanks{This file % has version number \fileversion, last % revised \filedate.}} % \author{Vincent \textsc{Danjean} \and Arnaud \textsc{Legrand}} % \date{\filedate} % \maketitle % \begin{abstract} % This package allows to compile all kind and complex \LaTeX\space % documents with the help of a Makefile. Dependencies are % automatically tracked with the help of the |texdepends.sty| package. % \end{abstract} % \CheckSum{323} % % \changes{v2.0.0}{2006/03/09}{First autocommented version} % \changes{v2.1.0}{2008/01/28}{That's the question} % \changes{v2.1.1}{2009/11/08}{Improve error message} % \changes{v2.1.2}{2012/03/17}{Switch from perl to python} % % \makeatletter % \def\SpecialOptionIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (option)\encapchar usage}% % \index{options:\levelchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \def\SpecialFileIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (file)\encapchar usage}% % \index{files:\levelchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \def\SpecialMainOptionIndex#1{\@bsphack\special@index{#1\actualchar % {\string\ttfamily\space#1} % (option)\encapchar main}% % \special@index{options:\levelchar{% % \string\ttfamily\space#1}\encapchar % main}\@esphack} % \def\option{\begingroup % \catcode`\\12 % \MakePrivateLetters \mym@cro@ \iffalse} % \long\def\mym@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist % \edef\saved@macroname{\string#2}% % \def\makelabel##1{\llap{##1}}% % \if@inlabel % \let\@tempa\@empty \count@\macro@cnt % \loop \ifnum\count@>\z@ % \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat % \edef\makelabel##1{\llap{\vtop to\baselineskip % {\@tempa\hbox{##1}\vss}}}% % \advance \macro@cnt \@ne % \else \macro@cnt\@ne \fi % \edef\@tempa{\noexpand\item[% % #1% % \noexpand\PrintMacroName % \else % \noexpand\PrintEnvName % \fi % {\string#2}]}% % \@tempa % \global\advance\c@CodelineNo\@ne % #1% % \SpecialMainIndex{#2}\nobreak % \DoNotIndex{#2}% % \else % \SpecialMainOptionIndex{#2}\nobreak % \fi % \global\advance\c@CodelineNo\m@ne % \ignorespaces} % \let\endoption \endtrivlist % \def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@Option} % \def\Describe@Option#1{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialOptionIndex{#1}\@esphack\ignorespaces} % \def\DescribeFile{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@Option} % \def\Describe@File#1{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialFileIndex{#1}\@esphack\ignorespaces} % \makeatother % \MakeShortVerb{\|} % % \tableofcontents % \newpage % \section{Introduction} % % |latex-make| is a collection of \LaTeX{} packages, scripts and % Makefile fragments that allows to easily compile \LaTeX{} documents. % The best feature is that \textbf{\emph{dependencies are % automatically tracked}}\footnote{Dependencies are tracked with % the help of the |texdepend.sty| package that is automatically % loaded: no need to specify it with |\textbackslash usepackage\{\}| % in your documents.}. % \par % These tools can be used to compile small \LaTeX{} documents % as well as big ones (such as, for example, a thesis with summary, tables of % contents, list of figures, list of tabulars, multiple indexes and % multiple bibliographies). % % \section{Quick start} % % \subsection{First (and often last) step} % When you want to use |latex-make|, most of the time you have to % create a |Makefile| with the only line: \par % \begin{source} % include LaTeX.mk % \end{source} % % Then, the following targets are available: |dvi|, |ps|, |pdf|, % \emph{file}|.dvi|, \emph{file}|.ps|, \emph{file}|.pdf|, etc., % |clean| and |distclean|. % \par % % All \LaTeX{} documents of the current directory should be compilable % with respect to their dependencies. If something fails, please, % provide me the smallest example you can create to show me what is % wrong. % \par\medskip % % \paragraph{Tip:} % If you change the dependencies inside your document (for example, if % you change |\include{first}| into |\include{second}|), you may have % to type |make distclean| before being able to recompile your % document. Else, |make| can fail, trying to build or found the old % |first.tex| file. % \paragraph{Shared work} % If you work with other people that do not have installed (and do not % want to install) \LaTeX-Make, you can use the % |LaTeX-Make-local-install| target in |LaTeX.mk| to install required % files locally in the current directory. You can them commit these % files into your control version system so all co-authors will be % able to use \LaTeX-Make without installing it. % However, note that: % \begin{itemize} % \item you wont beneficit of an update of \LaTeX-Make in your system % (you will continue to use the locally installed files) % \item there is no support for upgrading locally installed files (but % reexecuting the installation should do a correct upgrade most of % the time) % \end{itemize} % \subsection{Customization} % Of course, lots of things can be customized. Here are the most % useful ones. Look at the section \ref{sec:reference} for more detailed % and complete possibilities. % \par % Customization is done through variables in the |Makefile| set % \emph{before} including |LaTeX.mk|. Setting them after can sometimes % work, but not always and it is not supported.\par % % \newcommand{\variable}[4][\texttt]{% % \paragraph*{#3}% % \addcontentsline{toc}{subsubsection}{#3}% % \hfill \hbox{#1{\textbf{#2}}}\par\medskip% % \textbf{Example:}\hspace{1em} |#4|\par\medskip } % % \variable{LU\_MASTERS}% % {Which \LaTeX{} documents to compile}% % {LU\_MASTERS=figlatex texdepends latex-make}% % This variable contains the basename of the \LaTeX{} documents to % compile. \par % If not set, |LaTeX.mk| looks for all |*.tex| files containing the % |\documentclass| command. % % \variable[]{\emph{master}\texttt{\_MAIN}}% % {Which \LaTeX{} main source for a document}% % {figlatex\_MAIN=figlatex.dtx}% % There is one such variable per documents declared in |LU_MASTERS|. % It contains the file against which the |latex| (or |pdflatex|, etc.) % program must be run. \par % If not set, \emph{master}|.tex| is used. % % \variable{LU\_FLAVORS}% % {Which flavors must be compiled}% % {LU\_FLAVORS=DVI DVIPDF}% % A flavor can be see as a kind of document (postscript, PDF, DVI, % etc.) and the way to create it. For example, a PDF document can be % created directly from the |.tex| file (with |pdflatex|), from a % |.dvi| file (with |dvipdfm|) or from a postscript file (with % |ps2pdf|). This would be three different flavors. % \par % Some flavors are already defined in |LaTeX.mk|. Other flavors can be % defined by the user (see section~\ref{sec:def_flavors}). The list of % predefined flavors can be see in the table~\ref{tab:flavors}. A % flavor can depend on another. For example, the flavor creating a % postscript file from a DVI file depends on the flavor creating a DVI % file from a \LaTeX{} file. This is automatically handled. % \par % If not set, |PS| and |PDF| are used (and |DVI| due to |PS|). %\def\extrarowheight{2pt} % \begin{table}[htbp] % \centering % % \begin{tabular}{|c|c|l|l|} % \hline % Flavor & dependency & program variable & Transformation \\ % \hline \hline % DVI & & LATEX & |.tex| $\Rightarrow$ |.dvi| \\ % \hline % PS & DVI & DVIPS & |.dvi| $\Rightarrow$ |.ps| \\ % \hline % PDF & & PDFLATEX & |.tex| $\Rightarrow$ |.pdf| \\ % \hline % DVIPDF & DVI & DVIPDFM & |.dvi| $\Rightarrow$ |.pdf| \\ % \hline % \end{tabular} % \par\smallskip % \begin{minipage}[t]{0.8\linewidth} % \em For example, the |DVI| flavor transforms a |*.tex| file into % a |*.dvi| file with the |Makefile| command % |$(LATEX) $(LATEX\_OPTIONS)| % \end{minipage} % % \caption{Predefined flavors} % \label{tab:flavors} % % \end{table} % % \variable[]{\emph{prog}/\emph{prog}\texttt{\_OPTIONS}} % {Which programs are called and with which options}% % { % \begin{minipage}[t]{0.5\linewidth} % DVIPS=dvips\\DVIPS\_OPTIONS=-t a4 % \end{minipage} % } % Each flavor has a program variable name that is used by |LaTeX.mk| % to run the program. Another variable with the suffix |\_OPTIONS| is % also provided if needed. See the table~\ref{tab:flavors} the look % for the program variable name associated to the predefined flavors. % \par % Other programs are also run in the same manner. For example, the % |makeindex| program is run from |LaTeX.mk| with the help of the % variables |MAKEINDEX| and |MAKEINDEX_OPTIONS|. % % \variable[]{\emph{master}\texttt{\_}\emph{prog}/\emph{master}\texttt{\_}\emph{prog}\texttt{\_OPTIONS}} % {Per target programs and options}% % { % \begin{minipage}[t]{0.5\linewidth} % figlatex\_DVIPS=dvips\\ % figlatex\_DVIPS\_OPTIONS=-t a4 % \end{minipage} % } % Note that, if defined, \emph{master}\texttt{\_}\emph{prog} will % \textbf{\emph{replace}} \emph{prog} whereas % \emph{master}\texttt{\_}\emph{prog}\texttt{\_OPTIONS} will % \textbf{\emph{be added to}} \emph{prog}\texttt{\_OPTIONS} (see % section \ref{sec:variables} for more details). % % \variable[]{\texttt{DEPENDS}/\emph{master}\texttt{\_DEPENDS}} % {Global and per target dependencies}% % { % \begin{minipage}[t]{0.5\linewidth} % DEPENDS=texdepends.sty\\ % figlatex\_DEPENDS=figlatex.tex % \end{minipage} % } % All flavor targets will depend to theses files. This should not be % used as dependencies are automatically tracked. % %\section{Reference manual} %\label{sec:reference} % % \subsection{Flavors} % \subsubsection{What is a flavor ?} % A flavor can be see as a kind of document (postscript, PDF, DVI, % etc.) and the way to create it. Several property are attached to % each flavor. Currently, there exists two kinds of flavors: % \begin{description} % \item[TEX-flavors:] these flavors are used to compile a % \texttt{*.tex} file into a target. A \LaTeX{} compiler % (\texttt{latex}, \texttt{pdflatex}, etc.) is used; % \item[DVI-flavors:] these flavors are used to compile a file % produced by a TEX-flavors into an other file. Examples of such % flavors are all the ones converting a DVI file into another format % (postscript, PDF, etc.). % \end{description} % Several properties are attached to each flavors. Most are common, a % few a specific to the kind of the flavor. % \begin{description} % \item[Name:] the name of the flavor. It is used to declare dependencies % between flavors (see below). It also used to tell which flavor % should be compiled for each document (see the \texttt{FLAVORS} % variables); % \item[Program variable name:] name of the variable that will be used % to run the program of this flavor. This name is used for the % program and also for the options (variable with the % \texttt{\_OPTIONS} suffix); % \item[Target extension:] extension of the target of the flavor. The % dot must be added if wanted; % \item[Master target:] if not empty, all documents registered for the % flavor will be built when this master target is called; % \item[XFig extensions to clean (\emph{TEX-flavor only}):] files % extensions of figures that will be cleaned for the \texttt{clean} % target. Generally, there is \texttt{.pstex\_t .pstex} when using % \texttt{latex} and \texttt{.pdftex\_t .pdftex} when using % \texttt{pdflatex}; % \item[Dependency \emph{DVI-flavor only}:] name of the TEX-flavor the % one depends upon. % \end{description} % % \subsubsection{Defining a new flavor} % \label{sec:def_flavors} % To define a new flavor named \texttt{NAME}, one just have to declare % a \texttt{lu-define-flavor-NAME} that calls and evaluates the % \texttt{lu-create-flavor} with the right parameters, ie: % \begin{itemize} % \item name of the flavor; % \item kind of flavor (\texttt{tex} or \texttt{dvi}); % \item program variable name; % \item target extension; % \item master target; % \item XFig extensions to clean \emph{or} TEX-flavor to depend upon. % \end{itemize} % % \par % % For example, \texttt{LaTeX.mk} already defines: % \paragraph{DVI flavor} % \begin{source}[0.9\linewidth] % define lu-define-flavor-DVI\\ % \hspace*{2ex}\$\$(eval \$\$(call lu-create-flavor,DVI,tex,LATEX,.dvi,dvi,\textbackslash\\ % \hspace*{4ex}.pstex\_t .pstex))\\ % endef % \end{source} % \subparagraph{Tip:} the \texttt{LATEX} program variable name means % that the program called will be the one in the \texttt{LATEX} % variable and that options in the \texttt{LATEX\_OPTIONS} variable % will be used. % % \paragraph{PDF flavor} % \begin{source}[0.9\linewidth] % define lu-define-flavor-PDF\\ % \hspace*{2ex}\$\$(eval \$\$(call lu-create-flavor,PDF,tex,PDFLATEX,.pdf,pdf,\textbackslash\\ % \hspace*{4ex}.pdftex\_t .\$\$(\_LU\_PDFTEX\_EXT)))\\ % endef % \end{source} % % \paragraph{PS flavor} % \begin{source}[0.9\linewidth] % define lu-define-flavor-PS\\ % \hspace*{2ex}\$\$(eval \$\$(call lu-create-flavor,PS,dvi,DVIPS,.ps,ps,DVI))\\ % endef % \end{source} % \subparagraph{Tip:} for DVI-flavors, the program will be invoked with % with the option \texttt{-o \emph{target}} and with the name of the % file source in argument. % % \paragraph{DVIPDF flavor} % \begin{source}[0.9\linewidth] % define lu-define-flavor-DVIPDF\\ % \hspace*{2ex}\$\$(eval \$\$(call lu-create-flavor,DVIPDF,dvi,DVIPDFM,.pdf,pdf,DVI))\\ % endef % \end{source} % % % \subsection{Variables} % \label{sec:variables} % \texttt{LaTeX.mk} use a generic mechanism to manage variables, so % that lots of thing can easily be customized per document and/or per % flavor. % \subsubsection{Two kind of variables} % \texttt{LaTeX.mk} distinguish two kind of variables. The first one % (called SET-variable) is for variables where only \emph{one} value % can be set. For example, this is the case for a variable that % contain the name of a program to launch. The second one (called % ADD-variable) is for variables where values can be cumulative. For % example, this will be the case for the options of a program. % \par % % For each variable used by \texttt{LaTeX.mk}, there exists several % variables that can be set in the Makefile so that the value will be % used for all documents, only for one document, only for one flavor, % etc. % % \newcounter{nbvars}% % \newenvironment{descvars}{% % \par % \noindent% % \bgroup% % \setcounter{nbvars}{0}% % \renewcommand{\emph}[1]{{\it ##1}} % \renewcommand{\variable}[3][;]{% % \stepcounter{nbvars}% % \arabic{nbvars}&\textbf{##2}&##3##1\\% % } % \begin{tabular}{clp{0.5\linewidth}} % }{% % \end{tabular} % \egroup % \par\medskip % } % % \paragraph{SET-variable.} For each SET-variable \texttt{\emph{NAME}}, we % can find in the Makfile: % \begin{descvars} % \variable{\texttt{LU\_\emph{target}\_\emph{NAME}}}{per document % and per flavor value}% % \variable{\texttt{TD\_\emph{target}\_\emph{NAME}}}{per document % and per flavor value filled by the \texttt{texdepends} \LaTeX{} % package}% % \variable{\texttt{LU\_\emph{master}\_\emph{NAME}}}{per document % value}% % \variable{\texttt{\emph{master}\_\emph{NAME}}}{per document % value}% % \variable{\texttt{LU\_FLAVOR\_\emph{flavor}\_\emph{NAME}}}{per % flavor value}% % \variable{\texttt{LU\_\emph{NAME}}}{global value}% % \variable{\texttt{\emph{NAME}}}{global value}% % \variable[.]{\texttt{\_LU\_\ldots\emph{NAME}}}{internal % \texttt{LaTeX.mk} default values}% % \end{descvars} % The first set variable will be used. % % \subparagraph{Tip:} in case of flavor context or document context, % only relevant variables will be checked. For example, the % SET-variable \texttt{MAIN} that give the main source of the document % will be evaluated in document context, so only 4, 5, 6, 7 and 8 will % be used (and I cannot see any real interest in using 6 or 7 for this % variable). % % \subparagraph{Tip2:} in case of context of index (when building % indexes or glossary), there exists several other variables per index % to add to this list (mainly ending with \texttt{\_{\it kind}\_{\it % indexname}\_{\it NAME}} or \texttt{\_{\it kind}\_{\it NAME}}). % Refer to the sources if you really need them. % % \paragraph{ADD-variable.} An ADD-variable is cumulative. The user % can replace or add any values per document, per flavor, etc. % \begin{descvars} % \variable{\texttt{LU\_\emph{target}\_\emph{NAME}}}{replacing per % document and per flavor values}% % \variable{\texttt{\emph{target}\_\emph{NAME}}}{cumulative per % document and per flavor values}% % \variable{\texttt{LU\_\emph{master}\_\emph{NAME}}}{replacing per % document values}% % \variable{\texttt{\emph{master}\_\emph{NAME}}}{cumulative per % document values}% % \variable{\texttt{LU\_FLAVOR\_\emph{flavor}\_\emph{NAME}}}{replacing % per flavor values}% % \variable{\texttt{FLAVOR\_\emph{flavor}\_\emph{NAME}}}{cumulative % per flavor values}% % \variable{\texttt{LU\_\emph{NAME}}}{replacing global values}% % \variable{\texttt{\emph{NAME}}}{cumulative global values}% % \end{descvars} % \subparagraph{Tip:} if not defined, \texttt{LU\_\emph{variable}} % defaults to ``\texttt{\$(\emph{variable}) % \$(\_LU\_\emph{variable})}'' and \texttt{\_LU\_\emph{variable}} % contains default values managed by \texttt{LaTeX.mk} and the % \texttt{texdepends} \LaTeX{} package. % \subparagraph{Example:} the ADD-variable \texttt{FLAVORS} is invoked % in document context to know which flavors needs to be build for each % document. This means that \texttt{LU\_{\it master}\_FLAVORS} will be % used. % \begin{source} % \# We override default value for MASTERS\\ % LU\_MASTERS=foo bar baz\\ % \# By default, only the DVIPDF flavor will be build\\ % FLAVORS=DVIPDF\\ % ~\\ % bar\_FLAVORS=PS\\ % LU\_baz\_FLAVORS=PDF\\ % \# there will be rules to build\\ % \# * foo.dvi and foo.pdf\\ % \# ~ (the DVIPDF flavor depends on the DVI flavor)\\ % \# * bar.dvi, bar.pdf and bar.ps\\ % \# ~ (the PS flavor is added to global flavors)\\ % \# * baz.pdf\\ % \# ~ (the PDF flavor will be the only one for baz) % include LaTeX.mk % \end{source} % \subsubsection{List of used variables} % Here are most of the variables used by \texttt{LaTeX.mk}. Users % should only have to sometimes managed the first ones. The latter are % described here for information only (and are subject to % modifications). Please, report a bug if some of them are not % correctly pickup by the \texttt{texdepends} \LaTeX{} package and % \texttt{LaTeX.mk}. % % \newenvironment{describevars}{% % \par % \noindent% % \bgroup% % \renewcommand{\emph}[1]{{\it ##1}}% % \newcommand{\default}[1]{\newline\textbf{Default: }##1} % \renewcommand{\variable}[4]{% % \textbf{\texttt{##1}}&##2&##3&##4\\% % } % \begin{tabular}{cccp{0.5\linewidth}} % Name & Kind &% % \multicolumn{1}{m{4em}}{\begin{center}Context of % use\end{center}} & % \multicolumn{1}{c}{Description} \\ % \hline % \hline % }{% % \end{tabular} % \egroup % \par\medskip % } % % \begin{describevars} % \variable{MASTERS}{ADD}{Global}{List of documents to compile. % These values will be used as jobname. \default{basename of % \texttt{*.tex} files containing the \texttt{\textbackslash % documentclass} pattern}}% % \variable{FLAVORS}{ADD}{Document}{List of flavors for each % document. \default{\texttt{PS PDF}}}% % \variable{MAIN}{SET}{Document}{Master \texttt{tex} source % file\default{\texttt{\emph{master}.tex}}}% % \variable{DEPENDS}{ADD}{Target}{List of dependencies}% % \variable{\emph{progvarname}}{SET}{Target}{Program to launch for % the corresponding flavor}% % \variable{\emph{progvarname}\_OPTIONS}{ADD}{Target}{Options to use % when building the target}% % \variable{STYLE}{SET}{Index}{Name of the index/glossary style file % to use (\texttt{.ist}, etc.)}% % \hline % \variable{TARGET}{SET}{Index}{Name of the index/glossary file to % produce (\texttt{.ind}, \texttt{.gls}, etc.)}% % \variable{SRC}{SET}{Index}{Name of the index/glossary file source % (\texttt{.idx}, \texttt{.glo}, etc.)}% % \variable{FIGURES}{ADD}{Target}{Lists of figures included}% % \variable{BIBFILES}{ADD}{Target}{Lists of bibliography files used % (\texttt{.bib})}% % \variable{BIBSTYLES}{ADD}{Target}{Lists of bibliography style % files used (\texttt{.bst})}% % \variable{BBLFILES}{ADD}{Target}{Lists of built bibliography files % (\texttt{.bbl})}% % \variable{INPUT}{ADD}{Target}{Lists of input files (\texttt{.cls}, % \texttt{.sty}, \texttt{.tex}, etc.)}% % \variable{OUTPUTS}{ADD}{Target}{Lists of output files % (\texttt{.aux}, etc.)}% % \variable{GRAPHICSPATH}{ADD}{Target}{\texttt{\textbackslash % graphicspath\{\}} arguments}% % \variable{GPATH}{ADD}{Target}{List of directories from % \texttt{GRAPHICSPATH} without \texttt{\{} and \texttt{\}}, % separated by spaces}% % \variable{INDEXES}{ADD}{Target}{Kinds of index (\texttt{INDEX}, % \texttt{GLOSS}, etc.)}% % \variable{INDEXES\_\emph{kind}}{ADD}{Target}{List of indexes or % glossaries}% % \variable{WATCHFILES}{ADD}{Target}{List of files that trigger a % rebuild if modified (\texttt{.aux}, etc.)}% % \variable{REQUIRED}{ADD}{Target}{List of new dependencies found by % the \texttt{texdepends} \LaTeX{} package}% % \variable{MAX\_REC}{SET}{Target}{Maximum level of recursion % authorized}% % \variable{REBUILD\_RULES}{ADD}{Target}{List of rebuild rules to % use (can be modified by the \texttt{texdepends} \LaTeX{} % package}% % \variable{EXT}{SET}{Flavor}{Target file extension of the flavor}% % \variable{DEPFLAVOR}{SET}{Flavor}{TEX-flavor a DVI-flavor depend % upon}% % \variable{CLEANFIGEXT}{ADD}{Flavor}{Extensions of figure files to % remove on clean}% % \end{describevars} % % \newpage % \section{FAQ} % % \newenvironment{question}[2]{ % \subsection{#1} % \texttt{}\llap{$\Rightarrow$ \quad }\emph{#2}\par\bigskip}{ % } % % \begin{question}{No rule to make target `LU\_WATCH\_FILES\_SAVE'}{When % using |LaTeX.mk|, I got the error:\\ % |make[1]: *** No rule to make target `LU\_WATCH\_FILES\_SAVE'. Stop.|} % % |make| is called in such a way that does not allow correct recursive % calls. As one can not know by advance how many times \LaTeX{}, % bib\TeX{}, etc. will need to be run, |latex-make| use recursive % invocations of |make|. This means that in the |LaTeX.mk| makefile, % there exist rules such as: % \begin{source} % \$(MAKE) INTERNAL\_VARIABLE=value internal\_target % \end{source} % In order |latex-make| to work, this invocation of |make| must read % the same rules and variable definitions as the main one. This means % that calling "|make -f LaTeX.mk foo.pdf|" in a directory with only % |foo.tex| will not work. Recursive invocations of make will not load % |LaTeX.mk|, will search for a |Makefile| in the current directory % and will complain about being unable to build the % |LU_WATCH_FILES_SAVE| internal target. % % \par\medskip % The solution is to call |make| so that recursive invocations will % read the same variables and rules. For example:\\ % |make -f LaTeX.mk MAKE="make -f LaTeX.mk" foo.pdf|\\ % or (if there is no |Makefile| in the directory):\\ % |env MAKEFILES=LaTeX.mk make foo.pdf|\\ % % \end{question} % % \StopEventually{ % } % \newpage % \section{Implementation} % % \subsection{LaTeX.mk} % \begin{macrocode} %<*makefile> ####[ Check Software ]################################################ ifeq ($(filter else-if,$(.FEATURES)),) $(error GNU Make 3.81 needed. Please, update your software.) exit 1 endif # Some people want to call our Makefile snippet with # make -f LaTeX.mk # This should not work as $(MAKE) is call recursively and will not read # LaTeX.mk again. We cannot just add LaTeX.mk to MAKEFILES as LaTeX.mk # should be read AFTER a standard Makefile (if any) that can define some # variables (LU_MASTERS, ...) that LaTeX.mk must see. # So I introduce an HACK here that try to workaround the situation. Keep in # mind that this hack is not perfect and does not handle all cases # (for example, "make -f my_latex_config.mk -f LaTeX.mk" will not recurse # correctly) ifeq ($(foreach m,$(MAKEFILES), $(m)) $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) # We are the first file read after the ones from MAKEFILES # So we assume we are read due to "-f LaTeX.mk" LU_LaTeX.mk_NAME := $(lastword $(MAKEFILE_LIST)) # Is this Makefile correctly read for recursive calls ? ifeq ($(findstring -f $(LU_LaTeX.mk_NAME),$(MAKE)),) $(info ********************************************************************************) $(info Warning: $(LU_LaTeX.mk_NAME) called directly. I suppose that you run:) $(info Warning: $(MAKE) -f $(LU_LaTeX.mk_NAME) $(MAKECMDGOALS)) $(info Warning: or something similar that does not allow recursive invocation of make) $(info Warning: ) $(info Warning: Trying to enable a workaround. This ACK will be disabled in a future) $(info Warning: release. Consider using another syntax, for example:) $(info Warning: $(MAKE) -f $(LU_LaTeX.mk_NAME) MAKE="$(MAKE) -f $(LU_LaTeX.mk_NAME)" $(MAKECMDGOALS)) $(info ********************************************************************************) MAKE+= -f $(LU_LaTeX.mk_NAME) endif endif ####[ Configuration ]################################################ # list of messages categories to display LU_SHOW ?= warning #info debug debug-vars # Select GNU/BSD/MACOSX utils (cp, rm, mv, ...) LU_UTILS ?= $(shell ( /bin/cp --heelp > /dev/null 2>&1 && echo GNU ) || echo BSD ) export LU_UTILS ####[ End of configuration ]################################################ # Modifying the remaining of this document may endanger you life!!! ;) #--------------------------------------------------------------------- # Controling verbosity ifdef VERB MAK_VERB := $(VERB) else #MAK_VERB := verbose #MAK_VERB := normal MAK_VERB := quiet #MAK_VERB := silent endif #--------------------------------------------------------------------- # MAK_VERB -> verbosity ifeq ($(MAK_VERB),verbose) COMMON_PREFIX = echo " ======> building " $@ "<======" ; \ printf "%s $(@F) due to:$(foreach file,$?,\n * $(file))\n" $1; # COMMON_HIDE :=# COMMON_CLEAN :=# SHOW_LATEX:=true else ifeq ($(MAK_VERB),normal) COMMON_PREFIX =# COMMON_HIDE := @ COMMON_CLEAN :=# SHOW_LATEX:=true else ifeq ($(MAK_VERB),quiet) COMMON_PREFIX = @ echo " ======> building " $@ "<======" ; # echo "due to $?" ; COMMON_HIDE := @ COMMON_CLEAN :=# SHOW_LATEX:= else # silent COMMON_PREFIX = @ COMMON_HIDE := @ COMMON_CLEAN := @ SHOW_LATEX:= endif endif endif #--------------------------------------------------------------------- # Old LaTeX have limitations _LU_PDFTEX_EXT ?= pdftex ######################################################################### # Utilities LU_CP=$(LU_CP_$(LU_UTILS)) LU_MV=$(LU_MV_$(LU_UTILS)) LU_RM=$(LU_RM_$(LU_UTILS)) LU_CP_GNU ?= cp -a -- LU_MV_GNU ?= mv -- LU_RM_GNU ?= rm -f -- LU_CP_BSD ?= cp -p LU_MV_BSD ?= mv LU_RM_BSD ?= rm -f LU_CP_MACOSX ?= /bin/cp -p LU_MV_MACOSX ?= /bin/mv LU_RM_MACOSX ?= /bin/rm -f lu-show=\ $(if $(filter $(LU_SHOW),$(1)), \ $(if $(2), \ $(if $(filter-out $(2),$(MAKELEVEL)),,$(3)), \ $(3))) lu-show-infos=\ $(if $(filter $(LU_SHOW),$(1)), \ $(if $(2), \ $(if $(filter-out $(2),$(MAKELEVEL)),,$(warning $(3))), \ $(warning $(3)))) lu-show-rules=$(call lu-show-infos,info,0,$(1)) lu-show-flavors=$(call lu-show-infos,info,0,$(1)) lu-show-var=$(call lu-show-infos,debug-vars,, * Set $(1)=$($(1))) lu-show-read-var=$(eval $(call lu-show-infos,debug-vars,, Reading $(1) in $(2) ctx: $(3)))$(3) lu-show-readone-var=$(eval $(call lu-show-infos,debug-vars,, Reading $(1) for $(2) [one value]: $(3)))$(3) lu-show-set-var=$(call lu-show-infos,debug-vars,, * Setting $(1) for $(2) to value: $(3)) lu-show-add-var=$(call lu-show-infos,debug-vars,, * Adding to $(1) for $(2) values: $(value 3)) lu-show-add-var2=$(call lu-show-infos,warning,, * Adding to $(1) for $(2) values: $(value 3)) lu-save-file=$(call lu-show,debug,,echo "saving $1" ;) \ if [ -f "$1" ];then $(LU_CP) "$1" "$2" ;else $(LU_RM) "$2" ;fi lu-cmprestaure-file=\ if cmp -s "$1" "$2"; then \ $(LU_MV) "$2" "$1" ; \ $(call lu-show,debug,,echo "$1" not modified ;) \ else \ $(call lu-show,debug,,echo "$1" modified ;) \ if [ -f "$2" -o -f "$1" ]; then \ $(RM) -- "$2" ; \ $3 \ fi ; \ fi lu-clean=$(if $(strip $(1)),$(RM) $(1)) define lu-bug # description $$(warning Internal error: $(1)) $$(error You probably found a bug. Please, report it.) endef ######################################################################### ######################################################################### ######################################################################### ######################################################################### ################## ######################### ################## Variables ######################### ################## ######################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### # # _LU_FLAVORS_DEFINED : list of available flavors # _LU_FLAV_*_'flavname' : per flavor variables # where * can be : # PROGNAME : variable name for programme (and .._OPTIONS for options) # EXT : extension of created file # TARGETNAME : global target # DEPFLAVOR : flavor to depend upon # CLEANFIGEXT : extensions to clean for fig figures _LU_FLAVORS_DEFINED = $(_LU_FLAVORS_DEFINED_TEX) $(_LU_FLAVORS_DEFINED_DVI) # INDEXES_TYPES = GLOSS INDEX # INDEXES_INDEX = name1 ... # INDEXES_GLOSS = name2 ... # INDEX_name1_SRC # GLOSS_name2_SRC define _lu-getvalues# 1:VAR 2:CTX (no inheritage) $(if $(filter-out undefined,$(origin LU_$2$1)),$(LU_$2$1),$($2$1) $(_LU_$2$1_MK) $(TD_$2$1)) endef define lu-define-addvar # 1:suffix_fnname 2:CTX 3:disp-debug 4:nb_args 5:inherited_ctx 6:ctx-build-depend define lu-addtovar$1 # 1:VAR 2:... $4: value _LU_$2$$1_MK+=$$($4) $$(call lu-show-add-var,$$1,$3,$$(value $4)) endef define lu-def-addvar-inherited-ctx$1 # 1:VAR 2:... $6 _LU_$2$$1_INHERITED_CTX=$$(sort \ $$(foreach ctx,$5,$$(ctx) $$(if $$(filter-out undefined,$$(origin \ LU_$$(ctx)$$1)),,\ $$(_LU_$$(ctx)$$1_INHERITED_CTX)))) $$$$(call lu-show-var,_LU_$2$$1_INHERITED_CTX) endef define lu-getvalues$1# 1:VAR 2:... $$(if $$(filter-out undefined,$$(origin _LU_$2$$1_INHERITED_CTX)),,$$(eval \ $$(call lu-def-addvar-inherited-ctx$1,$$1,$$2,$$3,$$4,$$5,$$6)\ ))$$(call lu-show-read-var,$$1,$3,$$(foreach ctx,\ $(if $2,$2,GLOBAL) $$(if $$(filter-out undefined,$$(origin LU_$2$$1)),,\ $$(_LU_$2$$1_INHERITED_CTX))\ ,$$(call _lu-getvalues,$$1,$$(filter-out GLOBAL,$$(ctx))))) endef endef # Global variable # VAR (DEPENDS) $(eval $(call lu-define-addvar,-global,,global,2)) # Per flavor variable # FLAVOR_$2_VAR (FLAVOR_DVI_DEPENDS) # 2: flavor name # Inherit from VAR (DEPENDS) $(eval $(call lu-define-addvar,-flavor,FLAVOR_$$2_,flavor $$2,3,\ GLOBAL,\ $$(eval $$(call lu-def-addvar-inherited-ctx-global,$$1)) \ )) # Per master variable # $2_VAR (source_DEPENDS) # 2: master name # Inherit from VAR (DEPENDS) $(eval $(call lu-define-addvar,-master,$$2_,master $$2,3,\ GLOBAL,\ $$(eval $$(call lu-def-addvar-inherited-ctx-global,$$1)) \ )) # Per target variable # $2$(EXT of $3)_VAR (source.dvi_DEPENDS) # 2: master name # 3: flavor name # Inherit from $2_VAR FLAVOR_$3_VAR (source_DEPENDS FLAVOR_DVI_DEPENDS) $(eval $(call lu-define-addvar,,$$2$$(call lu-getvalue-flavor,EXT,$$3)_,target $$2$$(call lu-getvalue-flavor,EXT,$$3),4,\ $$2_ FLAVOR_$$3_,\ $$(eval $$(call lu-def-addvar-inherited-ctx-master,$$1,$$2)) \ $$(eval $$(call lu-def-addvar-inherited-ctx-flavor,$$1,$$3)) \ )) # Per index/glossary variable # $(2)_$(3)_VAR (INDEX_source_DEPENDS) # 2: type (INDEX, GLOSS, ...) # 3: index name # Inherit from VAR (DEPENDS) $(eval $(call lu-define-addvar,-global-index,$$2_$$3_,index $$3[$$2],4,\ GLOBAL,\ $$(eval $$(call lu-def-addvar-inherited-ctx-global,$$1)) \ )) # Per master and per index/glossary variable # $(2)_$(3)_$(4)_VAR (source_INDEX_source_DEPENDS) # 2: master name # 3: type (INDEX, GLOSS, ...) # 4: index name # Inherit from $2_VAR $3_$4_VAR (source_DEPENDS INDEX_source_DEPENDS) $(eval $(call lu-define-addvar,-master-index,$$2_$$3_$$4_,index $$2/$$4[$$3],5,\ $$2_ $$3_$$4_,\ $$(eval $$(call lu-def-addvar-inherited-ctx-master,$$1,$$2)) \ $$(eval $$(call lu-def-addvar-inherited-ctx-global-index,$$1,$$3,$$4)) \ )) # Per target and per index/glossary variable # $(2)$(EXT of $3)_$(4)_$(5)_VAR (source.dvi_INDEX_source_DEPENDS) # 2: master name # 3: flavor name # 4: type (INDEX, GLOSS, ...) # 5: index name # Inherit from $2$(EXT of $3)_VAR $(2)_$(3)_$(4)_VAR # (source.dvi_DEPENDS source_INDEX_source_DEPENDS) $(eval $(call lu-define-addvar,-index,$$2$$(call lu-getvalue-flavor,EXT,$$3)_$$4_$$5_,index $$2$$(call lu-getvalue-flavor,EXT,$$3)/$$5[$$4],6,\ $$2$$(call lu-getvalue-flavor,EXT,$$3)_ $$2_$$4_$$5_,\ $$(eval $$(call lu-def-addvar-inherited-ctx,$$1,$$2,$$3)) \ $$(eval $$(call lu-def-addvar-inherited-ctx-master-index,$$1,$$2,$$4,$$5)) \ )) define lu-setvar-global # 1:name 2:value _LU_$(1) ?= $(2) $$(eval $$(call lu-show-set-var,$(1),global,$(2))) endef define lu-setvar-flavor # 1:name 2:flavor 3:value _LU_FLAVOR_$(2)_$(1) ?= $(3) $$(eval $$(call lu-show-set-var,$(1),flavor $(2),$(3))) endef define lu-setvar-master # 1:name 2:master 3:value _LU_$(2)_$(1) ?= $(3) $$(eval $$(call lu-show-set-var,$(1),master $(2),$(3))) endef define lu-setvar # 1:name 2:master 3:flavor 4:value _LU_$(2)$$(call lu-getvalue-flavor,EXT,$(3))_$(1)=$(4) $$(eval $$(call lu-show-set-var,$(1),master/flavor $(2)/$(3),$(4))) endef define lu-getvalue # 1:name 2:master 3:flavor $(call lu-show-readone-var,$(1),master/flavor $(2)/$(3),$(or \ $(LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(1)), \ $(TD_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(1)), \ $(LU_$(2)_$(1)), \ $($(2)_$(1)), \ $(LU_FLAVOR_$(3)_$(1)), \ $(LU_$(1)), \ $($(1)), \ $(_LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(1)), \ $(_LU_$(2)_$(1)), \ $(_LU_FLAVOR_$(3)_$(1)), \ $(_LU_$(1))\ )) endef define lu-getvalue-flavor # 1:name 2:flavor $(call lu-show-readone-var,$(1),flavor $(2),$(or \ $(LU_FLAVOR_$(2)_$(1)), \ $(LU_$(1)), \ $($(1)), \ $(_LU_FLAVOR_$(2)_$(1)), \ $(_LU_$(1))\ )) endef define lu-getvalue-master # 1:name 2:master $(call lu-show-readone-var,$(1),master $(2),$(or \ $(LU_$(2)_$(1)), \ $($(2)_$(1)), \ $(LU_$(1)), \ $($(1)), \ $(_LU_$(2)_$(1)), \ $(_LU_$(1))\ )) endef define lu-getvalue-index # 1:name 2:master 3:flavor 4:type 5:indexname $(call lu-show-readone-var,$(1),master/flavor/index $(2)/$(3)/[$(4)]$(5),$(or \ $(LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(4)_$(5)_$(1)), \ $(LU_$(2)_$(4)_$(5)_$(1)), \ $(TD_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(4)_$(5)_$(1)), \ $($(2)_$(4)_$(5)_$(1)), \ $(LU_$(4)_$(5)_$(1)), \ $($(4)_$(5)_$(1)), \ $(LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(4)_$(1)), \ $(LU_$(2)_$(4)_$(1)), \ $($(2)_$(4)_$(1)), \ $(LU_$(4)_$(1)), \ $($(4)_$(1)), \ $(LU_$(2)_$(1)), \ $($(2)_$(1)), \ $(LU_FLAVOR_$(3)_$(1)), \ $(LU_$(1)), \ $($(1)), \ $(_LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(4)_$(5)_$(1)), \ $(_LU_$(2)_$(4)_$(5)_$(1)), \ $(_LU_$(4)_$(5)_$(1)), \ $(_LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(4)_$(1)), \ $(_LU_$(2)_$(4)_$(1)), \ $(_LU_FLAVOR_$(3)_$(4)_$(1)), \ $(_LU_$(4)_$(1)), \ $(_LU_$(2)$(call lu-getvalue-flavor,EXT,$(3))_$(1)), \ $(_LU_$(2)_$(1)), \ $(_LU_FLAVOR_$(3)_$(1)), \ $(_LU_$(1))\ )) endef define lu-call-prog # 1:varname 2:master 3:flavor [4:index] $(call lu-getvalue,$(1),$(2),$(3)) $(call lu-getvalues,$(1)_OPTIONS,$(2),$(3)) endef define lu-call-prog-index # 1:varname 2:master 3:flavor 4:type 5:indexname $(call lu-getvalue$(if $(4),-index),$(1),$(2),$(3),$(4),$(5)) \ $(call lu-getvalues$(if $(4),-index),$(1)_OPTIONS,$(2),$(3),$(4),$(5)) endef define lu-call-prog-flavor # 1:master 2:flavor $(call lu-call-prog,$(call lu-getvalue,VARPROG,$(1),$(2)),$(1),$(2)) endef ######################################################################### ######################################################################### ######################################################################### ######################################################################### ################## ######################### ################## Global variables ######################### ################## ######################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### # Globals variables $(eval $(call lu-setvar-global,LATEX,latex)) $(eval $(call lu-setvar-global,PDFLATEX,pdflatex)) $(eval $(call lu-setvar-global,DVIPS,dvips)) $(eval $(call lu-setvar-global,DVIPDFM,dvipdfm)) $(eval $(call lu-setvar-global,BIBTEX,bibtex)) #$(eval $(call lu-setvar-global,MPOST,TEX="$(LATEX)" mpost)) $(eval $(call lu-setvar-global,FIG2DEV,fig2dev)) #$(eval $(call lu-setvar-global,SVG2DEV,svg2dev)) $(eval $(call lu-setvar-global,EPSTOPDF,epstopdf)) $(eval $(call lu-setvar-global,MAKEINDEX,makeindex)) # Look for local version, then texmfscript, then in PATH of our program # At each location, we prefer with suffix than without define _lu_which # VARNAME progname ifeq ($(origin _LU_$(1)_DEFAULT), undefined) _LU_$(1)_DEFAULT := $$(firstword $$(wildcard \ $$(addprefix bin/,$(2) $$(basename $(2))) \ $$(addprefix ./,$(2) $$(basename $(2))) \ $$(shell kpsewhich -format texmfscripts $(2)) \ $$(shell kpsewhich -format texmfscripts $$(basename $(2))) \ $$(foreach dir,$$(subst :, ,$$(PATH)), \ $$(dir)/$(2) $$(dir)/$$(basename $(2))) \ ) $(2)) export _LU_$(1)_DEFAULT endif $$(eval $$(call lu-setvar-global,$(1),$$(_LU_$(1)_DEFAULT))) endef $(eval $(call _lu_which,GENSUBFIG,gensubfig.py)) $(eval $(call _lu_which,FIGDEPTH,figdepth.py)) $(eval $(call _lu_which,GENSUBSVG,gensubfig.py)) $(eval $(call _lu_which,SVGDEPTH,svgdepth.py)) $(eval $(call _lu_which,SVG2DEV,svg2dev.py)) $(eval $(call _lu_which,LATEXFILTER,latexfilter.py)) # Rules to use to check if the build document (dvi or pdf) is up-to-date # This can be overruled per document manually and/or automatically #REBUILD_RULES ?= latex texdepends bibtopic bibtopic_undefined_references $(eval $(call lu-addtovar-global,REBUILD_RULES,latex texdepends)) # Default maximum recursion level $(eval $(call lu-setvar-global,MAX_REC,6)) ######################################################################### ######################################################################### ######################################################################### ######################################################################### ################## ######################### ################## Flavors ######################### ################## ######################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### define lu-create-texflavor # 1:name 2:tex_prog 3:file_ext # 4:master_cible 5:fig_extention_to_clean _LU_FLAVORS_DEFINED_TEX += $(1) $(eval $(call lu-setvar-flavor,VARPROG,$(1),$(2))) $(eval $(call lu-setvar-flavor,EXT,$(1),$(3))) $(eval $(call lu-setvar-flavor,TARGETNAME,$(1),$(4))) $(eval $(call lu-addtovar-flavor,CLEANFIGEXT,$(1),$(5))) $(eval $(call lu-addtovar-flavor,CLEANSVGEXT,$(1),$(5))) endef define lu-create-dviflavor # 1:name 2:dvi_prog 3:file_ext # 4:master_cible 5:tex_flavor_depend $$(eval $$(call lu-define-flavor,$(5))) _LU_FLAVORS_DEFINED_DVI += $(1) $(eval $(call lu-setvar-flavor,VARPROG,$(1),$(2))) $(eval $(call lu-setvar-flavor,EXT,$(1),$(3))) $(eval $(call lu-setvar-flavor,TARGETNAME,$(1),$(4))) $(eval $(call lu-setvar-flavor,DEPFLAVOR,$(1),$(5))) endef define lu-create-flavor # 1:name 2:type 3..7:options $$(if $$(filter $(1),$(_LU_FLAVORS_DEFINED)), \ $$(call lu-show-flavors,Flavor $(1) already defined), \ $$(call lu-show-flavors,Creating flavor $(1) ($(2))) \ $$(eval $$(call lu-create-$(2)flavor,$(1),$(3),$(4),$(5),$(6),$(7)))) endef define lu-define-flavor # 1:name $$(eval $$(call lu-define-flavor-$(1))) endef define lu-flavor-rules # 1:name $$(call lu-show-flavors,Defining rules for flavor $(1)) $$(if $$(call lu-getvalue-flavor,TARGETNAME,$(1)), \ $$(call lu-getvalue-flavor,TARGETNAME,$(1)): \ $$(call lu-getvalues-flavor,TARGETS,$(1))) $$(if $$(call lu-getvalue-flavor,TARGETNAME,$(1)), \ .PHONY: $$(call lu-getvalue-flavor,TARGETNAME,$(1))) endef define lu-define-flavor-DVI # $$(eval $$(call lu-create-flavor,DVI,tex,LATEX,.dvi,dvi,\ .pstex_t .pstex)) endef define lu-define-flavor-PDF # $$(eval $$(call lu-create-flavor,PDF,tex,PDFLATEX,.pdf,pdf,\ .pdftex_t .$$(_LU_PDFTEX_EXT))) endef define lu-define-flavor-PS # $$(eval $$(call lu-create-flavor,PS,dvi,DVIPS,.ps,ps,DVI)) endef define lu-define-flavor-DVIPDF # $$(eval $$(call lu-create-flavor,DVIPDF,dvi,DVIPDFM,.pdf,pdf,DVI)) endef $(eval $(call lu-addtovar-global,FLAVORS,PDF PS)) ######################################################################### ######################################################################### ######################################################################### ######################################################################### ################## ######################### ################## Masters ######################### ################## ######################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### ######################################################################### define _lu-do-latex # 1:master 2:flavor 3:source.tex 4:ext(.dvi/.pdf) exec 3>&1; \ run() { \ printf "Running:" 1>&3 ; \ for arg; do \ printf "%s" " '$$arg'" 1>&3 ; \ done ; echo 1>&3 ; \ "$$@" ; \ }; \ doit() { \ $(RM) -v "$(1)$(4)_FAILED" \ "$(1)$(4)_NEED_REBUILD" \ "$(1)$(4).mk" ;\ ( echo X | \ run $(call lu-call-prog-flavor,$(1),$(2)) \ --interaction errorstopmode \ --jobname "$(1)" \ '\RequirePackage[extension='"$(4)"']{texdepends}\input'"{$(3)}" || \ touch "$(1)$(4)_FAILED" ; \ if grep -sq '^! LaTeX Error:' "$(1).log" ; then \ touch "$(1)$(4)_FAILED" ; \ fi \ ) | $(call lu-call-prog,LATEXFILTER,$(1),$(2)) ; \ NO_TEXDEPENDS_FILE=0 ;\ if [ ! -f "$(1)$(4).mk" ]; then \ NO_TEXDEPENDS_FILE=1 ;\ fi ;\ sed -e 's,\\openout[0-9]* = `\(.*\)'"'.,TD_$(1)$(4)_OUTPUTS += \1,p;d" \ "$(1).log" >> "$(1)$(4).mk" ;\ if [ -f "$(1)$(4)_FAILED" ]; then \ echo "*************************************" ;\ echo "Building $(1)$(4) fails" ;\ echo "*************************************" ;\ echo "Here are the last lines of the log file" ;\ echo "If this is not enought, try to" ;\ echo "call 'make' with 'VERB=verbose' option" ;\ echo "*************************************" ;\ echo "==> Last lines in $(1).log <==" ; \ sed -e '/^[?] X$$/,$$d' \ -e '/^Here is how much of TeX'"'"'s memory you used:$$/,$$d' \ < "$(1).log" | tail -n 20; \ return 1; \ fi; \ if [ "$$NO_TEXDEPENDS_FILE" = 1 ]; then \ echo "*************************************" ;\ echo "texdepends does not seems be loaded" ;\ echo "Either your (La)TeX installation is wrong or you found a bug." ;\ echo "If so, please, report it (with the result of shell command 'kpsepath tex')";\ echo "Aborting compilation" ;\ echo "*************************************" ;\ touch "$(1)$(4)_FAILED" ; \ return 1 ;\ fi ;\ }; doit endef .PHONY: clean-build-fig ########################################################## define lu-master-texflavor-index-vars # MASTER FLAVOR TYPE INDEX ext(.dvi/.pdf) $$(call lu-show-rules,Setting flavor index vars for $(1)/$(2)/[$(3)]$(4)) $$(eval $$(call lu-addtovar,DEPENDS,$(1),$(2), \ $$(call lu-getvalue-index,TARGET,$(1),$(2),$(3),$(4)))) $$(eval $$(call lu-addtovar,WATCHFILES,$(1),$(2), \ $$(call lu-getvalue-index,SRC,$(1),$(2),$(3),$(4)))) endef #################################################### define lu-master-texflavor-index-rules # MASTER FLAVOR TYPE INDEX ext(.dvi/.pdf) $$(call lu-show-rules,Setting flavor index rules for $(1)/$(2)/[$(3)]$(4)) $$(if $$(_LU_DEF_IND_$$(call lu-getvalue-index,TARGET,$(1),$(2),$(3),$(4))), \ $$(call lu-show-rules,=> Skipping: already defined in flavor $$(_LU_DEF_IND_$$(call lu-getvalue-index,TARGET,$(1),$(2),$(3),$(4)))), \ $$(eval $$(call _lu-master-texflavor-index-rules\ ,$(1),$(2),$(3),$(4),$(5),$$(call lu-getvalue-index,TARGET,$(1),$(2),$(3),$(4))))) endef define _lu-master-texflavor-index-rules # MASTER FLAVOR TYPE INDEX ext TARGET $(6): \ $$(call lu-getvalue-index,SRC,$(1),$(2),$(3),$(4)) \ $$(wildcard $$(call lu-getvalue-index,STYLE,$(1),$(2),$(3),$(4))) $$(COMMON_PREFIX)$$(call lu-call-prog-index,MAKEINDEX,$(1),$(2),$(3),$(4)) \ $$(addprefix -s ,$$(call lu-getvalue-index,STYLE,$(1),$(2),$(3),$(4))) \ -o $$@ $$< _LU_DEF_IND_$(6)=$(2) clean:: $$(call lu-clean,$$(call lu-getvalue-index,TARGET,$(1),$(2),$(3),$(4)) \ $$(addsuffix .ilg,$$(basename \ $$(call lu-getvalue-index,SRC,$(1),$(2),$(3),$(4))))) endef #################################################### define lu-master-texflavor-index # MASTER FLAVOR INDEX ext(.dvi/.pdf) $$(eval $$(call lu-master-texflavor-index-vars,$(1),$(2),$(3),$(4))) $$(eval $$(call lu-master-texflavor-index-rules,$(1),$(2),$(3),$(4))) endef ########################################################## ########################################################## define lu-master-texflavor-vars # MASTER FLAVOR ext(.dvi/.pdf) $$(call lu-show-rules,Setting flavor vars for $(1)/$(2)) -include $(1)$(3).mk $$(eval $$(call lu-addtovar,DEPENDS,$(1),$(2), \ $$(call lu-getvalues,FIGURES,$(1),$(2)) \ $$(call lu-getvalues,BIBFILES,$(1),$(2)) \ $$(wildcard $$(call lu-getvalues,INPUTS,$(1),$(2))) \ $$(wildcard $$(call lu-getvalues,BIBSTYLES,$(1),$(2))) \ $$(call lu-getvalues,BBLFILES,$(1),$(2))\ )) $$(eval $$(call lu-addtovar-flavor,TARGETS,$(2),$(1)$(3))) $$(eval $$(call lu-addtovar,GPATH,$(1),$(2), \ $$(subst },,$$(subst {,,$$(subst }{, ,\ $$(call lu-getvalue,GRAPHICSPATH,$(1),$(2))))))) $$(if $$(sort $$(call lu-getvalues,SUBFIGS,$(1),$(2))), \ $$(eval include $$(addsuffix .mk,$$(sort \ $$(call lu-getvalues,SUBFIGS,$(1),$(2)))))) $$(eval $$(call lu-addtovar,WATCHFILES,$(1),$(2), \ $$(filter %.aux, $$(call lu-getvalues,OUTPUTS,$(1),$(2))))) $$(foreach type,$$(call lu-getvalues,INDEXES,$(1),$(2)), \ $$(foreach index,$$(call lu-getvalues,INDEXES_$$(type),$(1),$(2)), \ $$(eval $$(call lu-master-texflavor-index-vars,$(1),$(2),$$(type),$$(index),$(3))))) endef #################################################### define lu-master-texflavor-rules # MASTER FLAVOR ext(.dvi/.pdf) $$(call lu-show-rules,Defining flavor rules for $(1)/$(2)) $$(call lu-getvalues,BBLFILES,$(1),$(2)): \ $$(sort $$(call lu-getvalues,BIBFILES,$(1),$(2)) \ $$(wildcard $$(call lu-getvalues,BIBSTYLES,$(1),$(2)))) $(1)$(3): %$(3): \ $$(call lu-getvalues,DEPENDS,$(1),$(2)) \ $$(call lu-getvalues,REQUIRED,$(1),$(2)) \ $$(if $$(wildcard $(1)$(3)_FAILED),LU_FORCE,) \ $$(if $$(wildcard $(1)$(3)_NEED_REBUILD),LU_FORCE,) \ $$(if $$(wildcard $(1)$(3)_NEED_REBUILD_IN_PROGRESS),LU_FORCE,) $$(if $$(filter-out $$(LU_REC_LEVEL),$$(call lu-getvalue,MAX_REC,$(1),$(2))),, \ $$(warning *********************************) \ $$(warning *********************************) \ $$(warning *********************************) \ $$(warning Stopping generation of $$@) \ $$(warning I got max recursion level $$(LU_$(1)_$(2)_MAX_REC)) \ $$(warning Set LU_$(1)_$(2)_MAX_REC, LU_MAX_REC_$(1) or LU_MAX_REC if you need it) \ $$(warning *********************************) \ $$(warning *********************************) \ $$(warning *********************************) \ $$(error Aborting generation of $$@)) $$(MAKE) LU_REC_MASTER="$(1)" LU_REC_FLAVOR="$(2)" LU_REC_TARGET="$$@"\ LU_WATCH_FILES_SAVE $$(COMMON_PREFIX)$$(call _lu-do-latex\ ,$(1),$(2),$$(call lu-getvalue-master,MAIN,$(1)),$(3)) $$(MAKE) LU_REC_MASTER="$(1)" LU_REC_FLAVOR="$(2)" LU_REC_TARGET="$$@"\ LU_WATCH_FILES_RESTORE $$(MAKE) LU_REC_MASTER="$(1)" LU_REC_FLAVOR="$(2)" LU_REC_TARGET="$$@"\ $(1)$(3)_NEED_REBUILD ifneq ($(LU_REC_TARGET),) $(1)$(3)_NEED_REBUILD_IN_PROGRESS: $$(COMMON_HIDE)touch $(1)$(3)_NEED_REBUILD_IN_PROGRESS $$(addprefix LU_rebuild_,$$(call lu-getvalues,REBUILD_RULES,$(1),$(2))): \ $(1)$(3)_NEED_REBUILD_IN_PROGRESS .PHONY: $(1)$(3)_NEED_REBUILD $(1)$(3)_NEED_REBUILD: \ $(1)$(3)_NEED_REBUILD_IN_PROGRESS \ $$(addprefix LU_rebuild_,$$(call lu-getvalues,REBUILD_RULES,$(1),$(2))) $$(COMMON_HIDE)$(RM) $(1)$(3)_NEED_REBUILD_IN_PROGRESS $$(COMMON_HIDE)if [ -f "$(1)$(3)_NEED_REBUILD" ];then\ echo "********************************************" ;\ echo "*********** New build needed ***************" ;\ echo "********************************************" ;\ cat "$(1)$(3)_NEED_REBUILD" ; \ echo "********************************************" ;\ fi $$(MAKE) LU_REC_LEVEL=$$(shell expr $$(LU_REC_LEVEL) + 1) \ $$(LU_REC_TARGET) endif clean-build-fig:: $$(call lu-clean,$$(foreach fig, \ $$(basename $$(wildcard $$(filter %.fig, \ $$(call lu-getvalues,FIGURES,$(1),$(2))))), \ $$(addprefix $$(fig),$$(call lu-getvalues-flavor,CLEANFIGEXT,$(2))))) $$(call lu-clean,$$(foreach svg, \ $$(basename $$(wildcard $$(filter %.svg, \ $$(call lu-getvalues,FIGURES,$(1),$(2))))), \ $$(addprefix $$(svg),$$(call lu-getvalues-flavor,CLEANSVGEXT,$(2))))) clean:: clean-build-fig $$(call lu-clean,$$(call lu-getvalues,OUTPUTS,$(1),$(2)) \ $$(call lu-getvalues,BBLFILES,$(1),$(2)) \ $$(addsuffix .mk,$$(call lu-getvalues,SUBFIGS,$(1),$(2))) \ $$(patsubst %.bbl,%.blg,$$(call lu-getvalues,BBLFILES,$(1),$(2)))) $$(call lu-clean,$$(wildcard $(1).log)) distclean:: $$(call lu-clean,$$(wildcard $(1)$(3) $(1)$(3)_FAILED \ $(1)$(3)_NEED_REBUILD $(1)$(3)_NEED_REBUILD_IN_PROGRESS)) $$(foreach type,$$(call lu-getvalues,INDEXES,$(1),$(2)), \ $$(foreach index,$$(call lu-getvalues,INDEXES_$$(type),$(1),$(2)), \ $$(eval $$(call lu-master-texflavor-index-rules,$(1),$(2),$$(type),$$(index),$(3))))) endef #################################################### define lu-master-texflavor # MASTER FLAVOR ext(.dvi/.pdf) $$(eval $$(call lu-master-texflavor-vars,$(1),$(2),$(3))) $$(eval $$(call lu-master-texflavor-rules,$(1),$(2),$(3))) endef ########################################################## ########################################################## define lu-master-dviflavor-vars # MASTER FLAVOR ext(.ps) $$(call lu-show-rules,Setting flavor vars for \ $(1)/$(2)/$$(call lu-getvalue-flavor,DEPFLAVOR,$(2))) # $$(eval $$(call lu-addvar,VARPROG,$(1),$(2))) # $$(eval $$(call lu-addvar,$$(call lu-getvalue,VARPROG,$(1),$(2)),$(1),$(2))) $$(eval $$(call lu-addtovar-flavor,TARGETS,$(2),$(1)$(3))) endef #################################################### define lu-master-dviflavor-rules # MASTER FLAVOR ext(.ps) $$(call lu-show-rules,Defining flavor rules for \ $(1)/$(2)/$$(call lu-getvalue-flavor,DEPFLAVOR,$(2))) $(1)$(3): %$(3): %$$(call lu-getvalue-flavor,EXT,$$(call lu-getvalue-flavor,DEPFLAVOR,$(2))) $$(call lu-call-prog-flavor,$(1),$(2)) -o $$@ $$< distclean:: $$(call lu-clean,$$(wildcard $(1)$(3))) endef #################################################### define lu-master-dviflavor # MASTER FLAVOR ext(.ps) $$(eval $$(call lu-master-dviflavor-vars,$(1),$(2),$(3))) $$(eval $$(call lu-master-dviflavor-rules,$(1),$(2),$(3))) endef ########################################################## ########################################################## define lu-master-vars # MASTER $$(call lu-show-rules,Setting vars for $(1)) $$(eval $$(call lu-setvar-master,MAIN,$(1),$(1).tex)) $$(eval $$(call lu-addtovar-master,DEPENDS,$(1),\ $$(call lu-getvalue-master,MAIN,$(1)))) _LU_$(1)_DVI_FLAVORS=$$(filter $$(_LU_FLAVORS_DEFINED_DVI),\ $$(sort $$(call lu-getvalues-master,FLAVORS,$(1)))) _LU_$(1)_TEX_FLAVORS=$$(filter $$(_LU_FLAVORS_DEFINED_TEX),\ $$(sort $$(call lu-getvalues-master,FLAVORS,$(1)) \ $$(LU_REC_FLAVOR) \ $$(foreach dvi,$$(call lu-getvalues-master,FLAVORS,$(1)), \ $$(call lu-getvalue-flavor,DEPFLAVOR,$$(dvi))))) $$(foreach flav,$$(_LU_$(1)_TEX_FLAVORS), $$(eval $$(call \ lu-master-texflavor-vars,$(1),$$(flav),$$(call lu-getvalue-flavor,EXT,$$(flav))))) $$(foreach flav,$$(_LU_$(1)_DVI_FLAVORS), $$(eval $$(call \ lu-master-dviflavor-vars,$(1),$$(flav),$$(call lu-getvalue-flavor,EXT,$$(flav))))) endef #################################################### define lu-master-rules # MASTER $$(call lu-show-rules,Defining rules for $(1)) $$(foreach flav,$$(_LU_$(1)_TEX_FLAVORS), $$(eval $$(call \ lu-master-texflavor-rules,$(1),$$(flav),$$(call lu-getvalue-flavor,EXT,$$(flav))))) $$(foreach flav,$$(_LU_$(1)_DVI_FLAVORS), $$(eval $$(call \ lu-master-dviflavor-rules,$(1),$$(flav),$$(call lu-getvalue-flavor,EXT,$$(flav))))) endef #################################################### define lu-master # MASTER $$(eval $$(call lu-master-vars,$(1))) $$(eval $$(call lu-master-rules,$(1))) endef ########################################################## #$(warning $(call LU_RULES,example)) $(eval $(call lu-addtovar-global,MASTERS,\ $$(shell grep -l '\\documentclass' *.tex 2>/dev/null | sed -e 's/\.tex$$$$//'))) ifneq ($(LU_REC_TARGET),) _LU_DEF_MASTERS = $(LU_REC_MASTER) _LU_DEF_FLAVORS = $(LU_REC_FLAVOR) $(FLAV_DEPFLAVOR_$(LU_REC_FLAVOR)) else _LU_DEF_MASTERS = $(call lu-getvalues-global,MASTERS) _LU_DEF_FLAVORS = $(sort $(foreach master,$(_LU_DEF_MASTERS),\ $(call lu-getvalues-master,FLAVORS,$(master)))) endif $(foreach flav, $(_LU_DEF_FLAVORS), $(eval $(call lu-define-flavor,$(flav)))) $(foreach master, $(_LU_DEF_MASTERS), $(eval $(call lu-master-vars,$(master)))) $(foreach flav, $(_LU_FLAVORS_DEFINED), $(eval $(call lu-flavor-rules,$(flav)))) $(foreach master, $(_LU_DEF_MASTERS), $(eval $(call lu-master-rules,$(master)))) ##################################################################"" # Gestion des subfigs %< $$@' \ -s $*.subfig $*.fig < $^ > $@ %MAKEFILE %< $$@' \ -s $*.subfig $*.svg < $^ > $@ %MAKEFILE clean:: $(call lu-clean,$(FIGS2CREATE_LIST)) $(call lu-clean,$(FIGS2CREATE_LIST:%.fig=%.pstex)) $(call lu-clean,$(FIGS2CREATE_LIST:%.fig=%.pstex_t)) $(call lu-clean,$(FIGS2CREATE_LIST:%.fig=%.$(_LU_PDFTEX_EXT))) $(call lu-clean,$(FIGS2CREATE_LIST:%.fig=%.pdftex_t)) $(call lu-clean,$(FIGS2CREATE_LIST:%.svg=%.pstex)) $(call lu-clean,$(FIGS2CREATE_LIST:%.svg=%.pstex_t)) $(call lu-clean,$(FIGS2CREATE_LIST:%.svg=%.$(_LU_PDFTEX_EXT))) $(call lu-clean,$(FIGS2CREATE_LIST:%.svg=%.pdftex_t)) .PHONY: LU_FORCE clean distclean LU_FORCE: @echo "Previous compilation failed. Rerun needed" #$(warning $(MAKEFILE)) distclean:: clean %< $@ %MAKEFILE ######################################################################### # Les flavors LU_REC_LEVEL ?= 1 ifneq ($(LU_REC_TARGET),) export LU_REC_FLAVOR export LU_REC_MASTER export LU_REC_TARGET export LU_REC_LEVEL LU_REC_LOGFILE=$(LU_REC_MASTER).log LU_REC_GENFILE=$(LU_REC_MASTER)$(call lu-getvalue-flavor,EXT,$(LU_REC_FLAVOR)) lu-rebuild-head=$(info *** Checking rebuild with rule '$(subst LU_rebuild_,,$@)') lu-rebuild-needed=echo $(1) >> "$(LU_REC_GENFILE)_NEED_REBUILD" ; .PHONY: $(addprefix LU_rebuild_,latex texdepends bibtex) LU_rebuild_latex: $(call lu-rebuild-head) $(COMMON_HIDE)if grep -sq 'Rerun to get'\ "$(LU_REC_LOGFILE)" ; then \ $(call lu-rebuild-needed\ ,"$@: new run needed (LaTeX message 'Rerun to get...')") \ fi LU_rebuild_texdepends: $(call lu-rebuild-head) $(COMMON_HIDE)if grep -sq '^Package texdepends Warning: .* Check dependencies again.$$'\ "$(LU_REC_LOGFILE)" ; then \ $(call lu-rebuild-needed,"$@: new depends required") \ fi LU_rebuild_bibtopic: $(call lu-rebuild-head) % % \end{macrocode} % This part is not needed: already checked with the |lu_rebuild_latex| rule % \begin{macrocode} %<*notused> $(COMMON_HIDE)if grep -sq 'Rerun to get indentation of bibitems right'\ "$(LU_REC_LOGFILE)" ; then \ $(call lu-rebuild-needed,"$@: new run needed") \ fi $(COMMON_HIDE)if grep -sq 'Rerun to get cross-references right'\ "$(LU_REC_LOGFILE)" ; then \ $(call lu-rebuild-needed,"$@: new run needed") \ fi % %<*makefile> $(COMMON_HIDE)sed -e '/^Package bibtopic Warning: Please (re)run BibTeX on the file(s):$$/,/^(bibtopic) *and after that rerun LaTeX./{s/^(bibtopic) *\([^ ]*\)$$/\1/p};d' \ "$(LU_REC_LOGFILE)" | while read file ; do \ touch $$file.aux ; \ $(call lu-rebuild-needed,"bibtopic: $$file.bbl outdated") \ done LU_rebuild_bibtopic_undefined_references: $(call lu-rebuild-head) $(COMMON_HIDE)if grep -sq 'There were undefined references'\ "$(MASTER_$(LU_REC_MASTER)).log" ; then \ $(call lu-rebuild-needed,"$@: new run needed") \ fi .PHONY: LU_WATCH_FILES_SAVE LU_WATCH_FILES_RESTORE LU_WATCH_FILES_SAVE: $(COMMON_HIDE)$(foreach file, $(sort \ $(call lu-getvalues,WATCHFILES,$(LU_REC_MASTER),$(LU_REC_FLAVOR))), \ $(call lu-save-file,$(file),$(file).orig);) LU_WATCH_FILES_RESTORE: $(COMMON_HIDE)$(foreach file, $(sort \ $(call lu-getvalues,WATCHFILES,$(LU_REC_MASTER),$(LU_REC_FLAVOR))), \ $(call lu-cmprestaure-file,"$(file)","$(file).orig",\ echo "New $(file) file" >> $(LU_REC_GENFILE)_NEED_REBUILD;\ );) endif %<> LaTeX.mk @echo "_LaTeX-Make-local-install-done:" >> LaTeX.mk @echo " @echo " >> LaTeX.mk @echo " @echo 'You must remove (at least) the locally installed LaTeX.mk file if you wish to'" >> LaTeX.mk @echo " @echo 'restart the installation.'" >> LaTeX.mk @echo " @echo 'You can try \"make LaTeX-Make-local-uninstall\"'" >> LaTeX.mk @echo " @echo " >> LaTeX.mk @echo " @exit 1" >> LaTeX.mk @echo @echo "=> All LaTeX-Make files are locally copied" @echo % % \end{macrocode} % \subsection{figdepth} % % \begin{macrocode} %<*figdepth> #!/usr/bin/env python #coding=utf8 """ stdin : the original xfig file stdout : the output xfig file args : all depths we want to keep """ import optparse import os.path import sys def main(): parser = optparse.OptionParser() (options, args) = parser.parse_args() depths_to_keep = set() for arg in args: depths_to_keep.add(arg) comment = '' display = True def show(depth, line): if depth in depths_to_keep: print comment+line, return True else: return False for line in sys.stdin: if line[0] == '#': comment += line continue if line[0] in "\t ": if display: print line else: Fld = line.split(' ', 9999) if not Fld[0] or Fld[0] not in ('1', '2', '3', '4', '5'): print comment+line display = True elif Fld[0] == '4': display = show(Fld[3], line) else: display = show(Fld[6], line) comment = '' if __name__ == "__main__": main() % % \end{macrocode} % \subsection{gensubfig} % \begin{macrocode} %<*gensubfig> #!/usr/bin/env python #coding=utf8 """ Arguments passes : - fichier image (image.fig ou image.svg) - -s fichier subfig (image.subfig) - -p chemin du script pour generer les sous-images (svgdepth.py ou figdepth.py) Sortie standard : - makefile pour creer les sous-images (au format .fig ou .svg), et pour les supprimer """ from optparse import OptionParser import os.path def main(): parser = OptionParser(usage='usage: %prog [options] svg file', description='Creates a\ Makefile generating subfigures using figdepth.py or svgdepth.py') parser.add_option("-s", "--subfig", dest="subfig", help="subfig file") parser.add_option("-p", "--depth", dest="depth", help="full path of depth script") (options, args) = parser.parse_args() if len(args) < 1: parser.error("incorrect number of arguments") if not options.subfig: parser.error("no subfig file specified") if not options.depth: parser.error("no depth script specified") (root, ext) = os.path.splitext(args[0]) sf_name = options.subfig ds_name = options.depth varname = '%s_FIGS' % root.upper() subfigs = [] for line in open(options.subfig, 'r'): t = line.find('#') # looking for comments if t > -1: line = line[0:t] # remove comments... line = line.strip() #remove blank chars if line == '': continue subfigs.append(line) count = 1 for subfig in subfigs: print "%s_%d%s: %s%s %s" % (root, count, ext, root, ext, sf_name) print "\t%s %s" % (ds_name, subfig) print "" count += 1 print "%s := $(foreach n, " % varname, count = 1 for subfig in subfigs: print '%d ' % count, count += 1 print ", %s_$(n)%s)" % (root, ext) print "FILES_TO_DISTCLEAN += $(%s)" % varname print "FIGS2CREATE_LIST += $(%s)" % varname print "$(TEMPORAIRE): $(%s)" % varname print "$(TEMPORAIRE): $(%s)" % varname if __name__ == "__main__": main() % % \end{macrocode} % \subsection{svg2dev} % \begin{macrocode} %<*svg2dev> #!/usr/bin/env python #coding=utf8 from optparse import OptionParser import shutil import subprocess svg2eps = 'inkscape %s -z -C --export-eps=%s --export-latex' svg2pdf = 'inkscape %s -z -C --export-pdf=%s --export-latex' def create_image(input_filename, output_filename, mode): subprocess.Popen(mode % (input_filename, output_filename), stdout=subprocess.PIPE, shell=True).communicate()[0] n1 = output_filename + '_tex' n2 = output_filename + '_t' shutil.move(n1, n2) def main(): parser = OptionParser() parser.add_option("-L", "--format", dest="outputFormat", metavar="FORMAT", help="output format", default="spstex") parser.add_option("-p", "--portrait", dest="portrait", help="dummy arg") (options, args) = parser.parse_args() if len(args) != 2: return (input_filename, output_filename) = args fmt = options.outputFormat portrait = options.portrait if fmt == 'eps': create_image(input_filename, output_filename, svg2eps) elif fmt == 'spstex' or fmt == 'pstex': create_image(input_filename, output_filename, svg2eps) elif fmt == 'spstex_t' or fmt == 'pstex_t': pass elif fmt == 'spdftex' or fmt == 'pdftex': create_image(input_filename, output_filename, svg2pdf) elif fmt == 'spdftex_t' or fmt == 'pdftex_t': pass if __name__ == "__main__": main() % % \end{macrocode} % \subsection{latexfilter} % |latexfilter.py| is a small python program that hides most of the output % of \TeX/\LaTeX{} output. It only display info, warnings, errors % and underfull/overfull hbox/vbox. % \begin{macrocode} %<*latexfilter> #!/usr/bin/env python #coding=utf8 """ stdin : the original xfig file stdout : the output xfig file args : all depths we want to keep """ from __future__ import print_function import optparse import os.path import re import sys def main(): parser = optparse.OptionParser() (options, args) = parser.parse_args() display = 0 in_display = 0 start_line = '' warnerror_re = re.compile(r"^(LaTeX|Package|Class)( (.*))? (Warning:|Error:)") fullbox_re = re.compile(r"^(Underfull|Overfull) \\[hv]box") accu = '' for line in sys.stdin: if display > 0: display -= 1 if line[0:4].lower() in ('info', 'warn') or line[0:5].lower() == 'error': display = 0 line_groups = warnerror_re.match(line) if line_groups: start_line = line_groups.group(3) if not start_line: start_line = '' if line_groups.group(2): start_line = "(" + start_line + ")" display = 1 in_display = 1 elif (start_line != '') and (line[0:len(start_line)] == start_line): display = 1 elif line == "\n": in_display = 0 elif line[0:4] == 'Chap': display = 1 elif fullbox_re.match(line): display = 2 if display: print(accu, end="") accu = line elif in_display: print(accu[0:-1], end="") accu = line if __name__ == "__main__": main() % % \end{macrocode} % \subsection{svgdepth} % \begin{macrocode} %<*svgdepth> #!/usr/bin/env python #coding=utf8 import sys import xml.parsers.expat layers = [] for arg in sys.argv: layers.append(arg) parser = xml.parsers.expat.ParserCreate() class XmlParser(object): def __init__(self, layers): self.state_stack = [True] self.last_state = True self.layers = layers def XmlDeclHandler(self, version, encoding, standalone): sys.stdout.write("\n" % (version, encoding)) def StartDoctypeDeclHandler(self, doctypeName, systemId, publicId, has_internal_subset): if publicId != None: sys.stdout.write("\n" %\ (doctypeName, publicId, systemId)) else: sys.stdout.write("\n" % (doctypeName, systemId)) def StartElementHandler(self, name, attributes): if name.lower() == 'g': r = self.last_state and ('id' not in attributes or \ attributes['id'] in self.layers) self.last_state = r self.state_stack.append(r) if not self.last_state: return s = "" for k, v in attributes.items(): s += ' %s="%s"' % (k, v) sys.stdout.write("<%s%s>" % (name, s)) def EndElementHandler(self, name): r = self.last_state if name.lower() == 'g': self.state_stack = self.state_stack[0:-1] self.last_state = self.state_stack[-1] if not r: return sys.stdout.write("" % (name)) def CharacterDataHandler(self, data): if not self.last_state: return sys.stdout.write(data) my_parser = XmlParser(layers) parser.XmlDeclHandler = my_parser.XmlDeclHandler parser.StartDoctypeDeclHandler = my_parser.StartDoctypeDeclHandler parser.StartElementHandler = my_parser.StartElementHandler parser.EndElementHandler = my_parser.EndElementHandler parser.CharacterDataHandler = my_parser.CharacterDataHandler for line in sys.stdin: parser.Parse(line, False) parser.Parse('', True) % % \end{macrocode} % \Finale \endinput latex-make-2.2.2/src/latex-make.ins000066400000000000000000000045571265641754100171250ustar00rootroot00000000000000\NeedsTeXFormat{LaTeX2e} \ProvidesFile{latex-make.ins}[2005/03/28 v1.1 Installation script for latex-make package] \def\batchfile{latex-make.ins} \input docstrip \ifx\generate\undefined \Msg{**********************************************} \Msg{* This installation requires docstrip} \Msg{* version 2.4 or later.} \Msg{* An older version of docstrip has been input} \Msg{**********************************************} \errhelp{Move or rename old docstrip.tex and get a newer one.} \errmessage{Old docstrip in input path} \batchmode \csname @@end\endcsname\end \fi \askforoverwritefalse \keepsilent \catcode`\^^I=12 \generate{ \file{figlatex.sty}{\from{figlatex.dtx}{package}} \file{figlatex.cfg}{\from{figlatex.dtx}{config}} \file{texgraphicx.sty}{\from{figlatex.dtx}{compat}} \file{pdfswitch.sty}{\from{pdfswitch.dtx}{package}} \file{texdepends.sty}{\from{texdepends.dtx}{package}} \nopreamble \nopostamble \file{LaTeX.mk}{\from{latex-make.dtx}{makefile}} \file{LaTeX.mk.conf}{\from{latex-make.dtx}{makefile-config}} \file{figdepth.py}{\from{latex-make.dtx}{figdepth}} \file{gensubfig.py}{\from{latex-make.dtx}{gensubfig}} \file{latexfilter.py}{\from{latex-make.dtx}{latexfilter}} \file{svg2dev.py}{\from{latex-make.dtx}{svg2dev}} \file{svgdepth.py}{\from{latex-make.dtx}{svgdepth}} } \catcode`\^^I=10 \Msg{***************************************************************} \Msg{*} \Msg{* \space Copy the files listed below into a TeX searchable directory.} \Msg{* \@spaces figlatex.sty} \Msg{* \@spaces figlatex.cfg} \Msg{* \@spaces texgraphicx.sty} \Msg{* \@spaces pdfswitch.sty} \Msg{* \@spaces texdepends.sty} \Msg{* \space Copy the files listed below into a Make searchable directory} \Msg{* \space (as /usr/include or current directory)} \Msg{* \@spaces LaTeX.mk} \Msg{* \space Make executable the files listed below and install them in the current} \Msg{* \space directory, in a 'bin' subdirectory, in a scripts directory of a searchable} \Msg{* \space TeX Directory Structure, or in your PATH} \Msg{* \@spaces figdepth.py} \Msg{* \@spaces gensubfig.py} \Msg{* \@spaces latexfilter.py} \Msg{* \@spaces svg2dev.py} \Msg{* \@spaces svgdepth.py} \Msg{*} \Msg{* \space To get latex-make documentation,} \Msg{* \@spaces make doc (for A4 PDF) or} \Msg{* \@spaces make dvi.} \Msg{*} \Msg{***************************************************************} \endinput latex-make-2.2.2/src/pdfswitch.dtx000066400000000000000000000122171265641754100170660ustar00rootroot00000000000000% \iffalse meta-comment %% %% File: pdfswitch.dtx Copyright (C) 2002--2016 V. Danjean, A. Legrand %% Vincent.Danjean@ens-lyon.org %% Arnaud.Legrand@ens-lyon.org %% %% 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. %% % %<*dtx> \ProvidesFile{pdfswitch.dtx} % %\NeedsTeXFormat{LaTeX2e}% %\ProvidesPackage{pdfswitch}% % \fi % \ProvidesFile{pdfswitch.dtx} [2016/02/09 v2.2.2 Automatic switch between pdf and ps] %<*package> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SWITCH FOR PDFLATEX or LATEX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% \RequirePackage{ae,aeguill} \RequirePackage{color} \RequirePackage{ifthen} \RequirePackage{ifpdf} \newboolean{nocolor@pdfswitch} \setboolean{nocolor@pdfswitch}{false} \DeclareOption{nocolor}{\setboolean{nocolor@pdfswitch}{true}} \newboolean{backref@pdfswitch} \setboolean{backref@pdfswitch}{false} \DeclareOption{backref}{\setboolean{backref@pdfswitch}{true}} \newboolean{pagebackref@pdfswitch} \setboolean{pagebackref@pdfswitch}{false} \DeclareOption{pagebackref}{\setboolean{pagebackref@pdfswitch}{true}} \newboolean{noborder@pdfswitch} \setboolean{noborder@pdfswitch}{false} \DeclareOption{noborder}{\setboolean{noborder@pdfswitch}{true}} \newboolean{plainpages@pdfswitch} \setboolean{plainpages@pdfswitch}{false} \DeclareOption{plainpages}{\setboolean{plainpages@pdfswitch}{true}} \ProcessOptions \definecolor{pdfurlcolor}{rgb}{0,0,0.6} \definecolor{pdfcitecolor}{rgb}{0,0.6,0} \definecolor{pdflinkcolor}{rgb}{0.6,0,0} %%%%%%%%%%%%%%%%%%%%%%%%% graphicx and thumbpdf %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifpdf \usepackage[pdftex]{graphicx} %%% graphics for pdfLaTeX \DeclareGraphicsExtensions{.pdf} %%% standard extension for included graphics \usepackage[pdftex]{thumbpdf} %%% thumbnails for pdflatex \else \usepackage[dvips]{graphicx} %%% graphics for dvips \DeclareGraphicsExtensions{.eps} %%% standard extension for included graphics %\usepackage[ps2pdf]{thumbpdf} %%% thumbnails for ps2pdf \fi %%%%%%%%%%%%%%%%%%%%%%%%% Basic options for hyperref %%%%%%%%%%%%%%%%%%%%%%%%% \ifpdf \edef\keys@pdfswitch{% pdftex, %%% hyper-references for pdflatex bookmarks=true,% %%% generate bookmarks ... bookmarksnumbered=true,% %%% ... with numbers hypertexnames=false,% %%% needed for correct links to figures !!! breaklinks=true% %%% break links if exceeding a single line } \else \edef\keys@pdfswitch{% ps2pdf, %%% hyper-references for ps2pdf bookmarks=true,% %%% generate bookmarks ... bookmarksnumbered=true,% %%% ... with numbers hypertexnames=false,% %%% needed for correct links to figures !!! breaklinks=true,% %%% breaks lines, but links are very small pdfborder={0 0 11.0} %%% border-width of frames will %%% be multiplied with 0.009 by ps2pdf } \fi \ifthenelse{\boolean{nocolor@pdfswitch}}{% \edef\keys@pdfswitch{\keys@pdfswitch,colorlinks=false}% }{ \edef\keys@pdfswitch{\keys@pdfswitch,colorlinks=true,% citecolor=pdfcitecolor, urlcolor=pdfurlcolor, linkcolor=pdflinkcolor, linkbordercolor={1 1 1}}% } \ifthenelse{\boolean{plainpages@pdfswitch}}{% }{ \edef\keys@pdfswitch{\keys@pdfswitch,plainpages=false}% } \ifthenelse{\boolean{noborder@pdfswitch}}{% \edef\keys@pdfswitch{\keys@pdfswitch,pdfborder={0 0 0}}% }{} \ifthenelse{\boolean{backref@pdfswitch}}{% \edef\keys@pdfswitch{\keys@pdfswitch,backref}% }{} \ifthenelse{\boolean{pagebackref@pdfswitch}}{% \edef\keys@pdfswitch{\keys@pdfswitch,pagebackref}% }{} \usepackage[\keys@pdfswitch]{hyperref} %%%%%%%%%%%%%%%%%%%%%%%%% HyperSetup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifpdf \AtBeginDocument{ \hypersetup{ pdfauthor = {\@author}, pdftitle = {\@title}, pdfsubject = {\@ifundefined{@subject}{}{\@subject}}, pdfkeywords = {\@ifundefined{@keywords}{}{\@keywords}} } } %%% pdfcreator, pdfproducer, and Creation Date are automatically set by pdflatex !!! \pdfadjustspacing=1 %%% force LaTeX-like character spacing \else \AtBeginDocument{ % \hypersetup{ % pdfauthor = {\@author}, % pdftitle = {\@title}, % pdfsubject = {\@ifundefined{@subject}{}{\@subject}}, % pdfkeywords = {\@ifundefined{@keywords}{}{\@keywords}}, % pdfcreator = {LaTeX with hyperref package}, % pdfproducer = {dvips + ps2pdf} % } } \fi % latex-make-2.2.2/src/texdepends.dtx000066400000000000000000000756211265641754100172460ustar00rootroot00000000000000% \iffalse meta-comment %% %% File: texdepends.dtx Copyright (C) 2004--2011 V. Danjean %% Vincent.Danjean@ens-lyon.org %% Modified by Matthieu Gallet %% Matthieu.Gallet@ens-lyon.org %% %% 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. %% % %<*dtx> \ProvidesFile{texdepends.dtx} % %\NeedsTeXFormat{LaTeX2e}% %\ProvidesPackage{texdepends}% % \fi % \ProvidesFile{texdepends.dtx} [2016/02/09 v2.2.2 Automatic depends generation] % \iffalse %<*driver> \documentclass{ltxdoc} \usepackage[latin1]{inputenc} \usepackage[french,english]{babel} \usepackage{pdfswitch} \NoAutoSpaceBeforeFDP \EnableCrossrefs \CodelineIndex \RecordChanges \setcounter{IndexColumns}{2} % make a twocolumn index \setlength{\columnseprule}{0pt} % no rules between columns ... \setlength{\columnsep}{2em} % ... but more spacing instead. \setcounter{unbalance}{4} \setlength{\IndexMin}{100pt} %%%%\OnlyDescription % uncomment this line to suppress printing the source code \makeatletter % don't show underfull hboxes in index/glossary: \g@addto@macro{\IndexParms}{\hbadness=10000} \g@addto@macro{\GlossaryParms}{\hbadness=10000} \makeatother \begin{document} \DocInput{texdepends.dtx} \PrintIndex \PrintChanges \end{document} % % \fi % % \GetFileInfo{texdepends.dtx} % % \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ } % \DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global} % \DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,% % \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi,\loop,\do} % \DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,% % \vbox,\vtop,\vcenter} % \DoNotIndex{\@empty,\immediate,\write} % \DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup} % \DoNotIndex{\divide,\advance,\multiply,\count,\dimen} % \DoNotIndex{\relax,\space,\string} % \DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,% % \closein,\closeout} % \DoNotIndex{\catcode,\endinput} % \DoNotIndex{\jobname,\message,\read,\the,\noexpand} % \DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss} % \DoNotIndex{\m@ne,\z@,\@m,\z@skip,\@ne,\tw@,\p@} % \DoNotIndex{\DeclareRobustCommand,\DeclareOption,\newcommand,\newcommand*} % \DoNotIndex{\newcount,\newif,\newlinechar,\newread,\newtoks,\newwrite} % \DoNotIndex{\dp,\wd,\ht,\vss,\unskip,\ifthenelse} % % \DoNotIndex{\@filef@und,\@nameddef,\@tempa} % \DoNotIndex{\define@key,\equal,\ExecuteOptions} % \DoNotIndex{\filename@area,\filename@base,\filename@ext,\filename@parse} % \DoNotIndex{\Gin@exclamation,\Gin@getbase,\Gin@scalex,\Gin@scaley} % \DoNotIndex{\Gread@eps,\Gread@pdf,\Gscale@box} % \DoNotIndex{\IfFileExists,\ifpdf,\input,\InputIfFileExists} % \DoNotIndex{\MessageBreak,\PackageWarning,\PackageWarningNoLine} % \DoNotIndex{\ProcessOptions,\RequirePackage,\typeout} % \DoNotIndex{} % \DoNotIndex{} % % \title{The \textsf{texdepends} package\thanks{This file % has version number \fileversion, last % revised \filedate.}} % \author{Vincent \textsc{Danjean}} % \date{\filedate} % \maketitle % \begin{abstract} % This package allows \LaTeX\space to automatically generate % dependencies while compiling documents. % \end{abstract} % \CheckSum{785} % % \changes{v1.0.1}{2005/03/22}{Version 1.0.1 at last} % \changes{v1.0.2}{2005/10/22}{Add support for package index.sty} % \changes{v1.1.0}{2005/11/05}{Manage index/glossary} % \changes{v1.1.0}{2005/11/05}{Rewrite of the package} % \changes{v1.2.0}{2008/01/28}{Better management of subfig files} % \changes{v1.3.0}{2011/09/25}{Management of svg files} % % \makeatletter % \def\SpecialOptionIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (option)\encapchar usage}% % \index{options:\levelchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \def\SpecialFileIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (file)\encapchar usage}% % \index{files:\levelchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \def\SpecialMainOptionIndex#1{\@bsphack\special@index{#1\actualchar % {\string\ttfamily\space#1} % (option)\encapchar main}% % \special@index{options:\levelchar{% % \string\ttfamily\space#1}\encapchar % main}\@esphack} % \def\option{\begingroup % \catcode`\\12 % \MakePrivateLetters \mym@cro@ \iffalse} % \long\def\mym@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist % \edef\saved@macroname{\string#2}% % \def\makelabel##1{\llap{##1}}% % \if@inlabel % \let\@tempa\@empty \count@\macro@cnt % \loop \ifnum\count@>\z@ % \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat % \edef\makelabel##1{\llap{\vtop to\baselineskip % {\@tempa\hbox{##1}\vss}}}% % \advance \macro@cnt \@ne % \else \macro@cnt\@ne \fi % \edef\@tempa{\noexpand\item[% % #1% % \noexpand\PrintMacroName % \else % \noexpand\PrintEnvName % \fi % {\string#2}]}% % \@tempa % \global\advance\c@CodelineNo\@ne % #1% % \SpecialMainIndex{#2}\nobreak % \DoNotIndex{#2}% % \else % \SpecialMainOptionIndex{#2}\nobreak % \fi % \global\advance\c@CodelineNo\m@ne % \ignorespaces} % \let\endoption \endtrivlist % \def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@Option} % \def\Describe@Option#1{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialOptionIndex{#1}\@esphack\ignorespaces} % \def\DescribeFile{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@Option} % \def\Describe@File#1{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialFileIndex{#1}\@esphack\ignorespaces} % \makeatother % \MakeShortVerb{\|} % % \tableofcontents % \section{Introduction} % This package automatically generates dependancies on \LaTeX\ files and % packages, figures, bibliography files, glossary and index files. The % generated file is then used by a Makefile to handle dependancies. % \StopEventually{ % } % \section{Implementation of texdepends} % \subsection{Options} % \begin{macrocode} %<*package> % \end{macrocode} % |texdepends| is easier to write with the |ifthen| package. % \begin{macrocode} \RequirePackage{ifthen} % \end{macrocode} % \begin{option}{debug} % The debug option (enable debug messages, useful for debuging) % \begin{macrocode} \newboolean{TD@debug} \newcommand{\TD@option@debug}[1][true]{% %\PackageWarningNoLine{texdepends}{Setting debug to #1} \setboolean{TD@debug}{#1}% }% % \end{macrocode} % \end{option} % \begin{option}{extension} % The extension option. We can use it to let |texdepends| % know whether we compile a dvi or a pdf file. % \begin{macrocode} \def\TD@option@extension[#1]{% %\PackageWarningNoLine{texdepends}{Using extention #1} \def\TD@extention{#1}% }% % \end{macrocode} % \end{option} % Managing options with specific code. Using the |keyval| % package could be a solution, but this would add one more dependency. % \begin{macrocode} \def\TD@option@split#1=#2=#3\relax{% \def\TD@option@name{#1}% \ifx\TD@option@name\@empty\else \expandafter\let\expandafter\TD@option@cmd \csname TD@option@\TD@option@name\endcsname %\PackageWarningNoLine{texdepends}{1: '#1', 2: '#2', 3: '#3'} \ifx\TD@option@cmd\relax \@unknownoptionerror% \else \ifx\@empty#3\@empty \TD@option@cmd\relax% \else \def\TD@option@value{#2}% \TD@option@cmd[\TD@option@value]% \fi \fi \fi }% % \end{macrocode} % All option are managed by the same code. % \begin{macrocode} \DeclareOption*{% %\PackageWarningNoLine{texdepends}{Option \CurrentOption}% \expandafter\TD@option@split\CurrentOption==\relax% }% % \end{macrocode} % So lets process options % \begin{macrocode} \ProcessOptions % \end{macrocode} % If the |extension| option is not used, we try to find ourselves % the good extension based on TeX engine or mode. % \begin{macrocode} \ifthenelse{\isundefined{\TD@extention}}{% \PackageWarningNoLine{texdepends}{No extension given: detecting it}% \RequirePackage{ifxetex,ifpdf}% \ifxetex% \PackageWarningNoLine{textdepends}{Detected XeTeX: using .pdf}% \def\TD@extention{.pdf}% \else\ifpdf% \PackageWarningNoLine{texdepends}{Detected PDF mode: using .pdf}% \def\TD@extention{.pdf}% \else% \PackageWarningNoLine{texdepends}{Detected DVI mode. Using .dvi}% \def\TD@extention{.dvi}% \fi\fi% }{}% % \end{macrocode} % % \subsection{Tools} % Some macros to help development % \subsubsection{Debug/info wrapper} % \begin{macro}{\TD@warning} % To write a warning % \begin{macrocode} \newcommand{\TD@warning}[1]{% \PackageWarningNoLine{texdepends}{#1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@warningLine} % To write a warning with line info % \begin{macrocode} \newcommand{\TD@warningLine}[1]{% \PackageWarning{texdepends}{#1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@info} % To write an info (as a warning if the |debug| option is set % \begin{macrocode} \newcommand{\TD@info}[1]{% \ifthenelse{\boolean{TD@debug}}{% \PackageWarningNoLine{texdepends}{#1}% }{% \PackageInfo{texdepends}{#1}% }% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@debug} % To write a message if the |debug| option is set % \begin{macrocode} \newcommand{\TD@debug}[1]{% \ifthenelse{\boolean{TD@debug}}{% \PackageWarningNoLine{texdepends}{#1}% }{% }% }% % \end{macrocode} % \end{macro} % \subsubsection{Writing dependencies} % We open the file where we will write dependencies and other infos. % \begin{macrocode} \newwrite\TD@write \TD@info{Writing info in '\jobname\TD@extention.mk'} \immediate\openout\TD@write\jobname\TD@extention.mk% % \end{macrocode} % And we define a few macro to write in this file % % \begin{macro}{\TD@print} % We write something in the file % \begin{macrocode} \def\TD@print#1{% \immediate\write\TD@write{#1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printClass} % We need a class % \begin{macrocode} \def\TD@printClass#1{% \TD@print{TD_\jobname\TD@extention _INPUTS\space += #1.cls}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printPackage} % We need a package % \begin{macrocode} \def\TD@printPackage#1{% \TD@print{TD_\jobname\TD@extention _INPUTS\space += #1.sty}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printInput} % We need a (\LaTeX) file % \begin{macrocode} \def\TD@printInput#1{% \TD@print{TD_\jobname\TD@extention _INPUTS\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printFig} % We need an |XFig| file % \begin{macrocode} \def\TD@printFig#1{% \TD@print{TD_\jobname\TD@extention _FIGURES\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printSubfig} % Web need a subfig file (see figlatex.dtx) % \begin{macrocode} \def\TD@printSubfig#1{% \TD@print{TD_\jobname\TD@extention _SUBFIGS\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printRequiredFile} % A file is missing. |texdepend| will try to skip it this time, % but it will be needed at the next compilation % \begin{macrocode} \def\TD@printRequiredFile#1{% \TD@print{TD_\jobname\TD@extention _REQUIRED\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\RequireFile} % LaTeX users can directly declare a dependencie % \begin{macrocode} \let\RequireFile\TD@printRequiredFile % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printOut} % We write in a file % \begin{macrocode} \def\TD@printOut#1{% \TD@print{TD_\jobname\TD@extention _OUTPUTS\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printGraphicspath} % We modify the graphicspath % \begin{macrocode} \def\TD@printGraphicspath#1{% \TD@print{TD_\jobname\TD@extention _GRAPHICSPATH\space := #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printBibfile} % We use a bibfile (|*.bib|) % \begin{macrocode} \def\TD@printBibfile#1{% \TD@print{TD_\jobname\TD@extention _BIBFILES\space += #1.bib}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printBibstyle} % We use a bibstyle file (|*.bst|) % \begin{macrocode} \def\TD@printBibstyle#1{% \TD@print{TD_\jobname\TD@extention _BIBSTYLES\space += #1.bst}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printBblfile} % We use a bibliography file (|*.bbl|) % \begin{macrocode} \def\TD@printBblfile#1{% \TD@print{TD_\jobname\TD@extention _BBLFILES\space += #1.bbl}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printRebuildRule} % We need a specific rule in the |Makefile| to check if a % rebuild is needed % \begin{macrocode} \def\TD@printRebuildRule#1{% \TD@print{TD_\jobname\TD@extention _REBUILD_RULES\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printIndex} % We use a new index % \begin{macrocode} \def\TD@printIndex#1{% \TD@print{TD_\jobname\TD@extention _INDEXES\space += INDEX}% \TD@print{TD_\jobname\TD@extention _INDEXES_INDEX\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printIndexSource} % The index file filled by \LaTeX % \begin{macrocode} \def\TD@printIndexSource#1#2{% \TD@print{TD_\jobname\TD@extention _INDEX_#1_SRC\space = #2}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printIndexTarget} % And the index file read by \LaTeX{} after |makeindex| % processing % \begin{macrocode} \def\TD@printIndexTarget#1#2{% \TD@print{TD_\jobname\TD@extention _INDEX_#1_TARGET\space = #2}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printIndexStyle} % The index style to be used with |makeindex| (never % called for now) % \begin{macrocode} \def\TD@printIndexStyle#1#2{% \TD@print{TD_\jobname\TD@extention _INDEX_#1_STYLE\space = #2}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printGlossary} % And the same things for glossary. Its name % \begin{macrocode} \def\TD@printGlossary#1{% \TD@print{TD_\jobname\TD@extention _INDEXES += GLOSS}% \TD@print{TD_\jobname\TD@extention _INDEXES_GLOSS\space += #1}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printGlossarySource} % The glossary file filled by \LaTeX % \begin{macrocode} \def\TD@printGlossarySource#1#2{% \TD@print{TD_\jobname\TD@extention _GLOSS_#1_SRC\space = #2}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printGlossaryTarget} % And the glossary file read by \LaTeX{} after |makeindex| % processing % \begin{macrocode} \def\TD@printGlossaryTarget#1#2{% \TD@print{TD_\jobname\TD@extention _GLOSS_#1_TARGET\space = #2}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printGlossaryStyle} % The glossary style to be used with |makeindex| (never % called for now) % \begin{macrocode} \def\TD@printGlossaryStyle#1#2{% \TD@print{TD_\jobname\TD@extention _GLOSS_#1_STYLE\space = #2}% }% % \end{macrocode} % \end{macro} % % \subsubsection{Diverting a macro} % \begin{macro}{\TD@switch} % |\TD@switch| replace the macro |\#1| by the macro |\TD@#1|. The % original macro is stored in the |\TD@orig@#1| macro. Nothing is done % if |\#1| is already |\TD@#1| (that is if |\TD@switch| is called % severall times with the same argument) % \begin{macrocode} \def\TD@switch#1{% \expandafter\let\expandafter\TD@local@old\csname#1\endcsname% \expandafter\let\expandafter\TD@local@new\csname TD@#1\endcsname% \ifx\TD@local@old\TD@local@new \PackageWarning{texdepends}{#1 already redefined. Skipping it.}% \else \ifx\TD@local@old\relax \TD@warning{Diverting empty macro '#1' \MessageBreak% Probably a bug in texdepends.sty}% \else \TD@info{Diverting macro '#1'}% \fi \expandafter\let\csname TD@orig@#1\endcsname\TD@local@old% \expandafter\let\csname#1\endcsname\TD@local@new% \fi }% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@docswitch} % Sometimes, we want the diversion to be delayed until the start of % the document. % \begin{macrocode} \def\TD@docswitchlist{}% \def\TD@docswitch#1{% \TD@info{Registering macro '#1' for diversion}% \ifx\TD@docswitchlist\@empty% \xdef\TD@docswitchlist{#1}% \else% \xdef\TD@docswitchlist{\TD@docswitchlist,#1}% \fi% }% \AtBeginDocument{% \TD@info{Diverting registered macros...}% \@for\TD@cmd:=\TD@docswitchlist\do{% \TD@switch{\TD@cmd}% }% \TD@info{Divertions done}% }% % \end{macrocode} % \end{macro} % % \begin{macro}{\TD@PackagePreDivert} % \begin{macro}{\TD@PackagePostDivert} % And then, two macros to insert command just before or after % loading a package. The first argument is the name of the package % we want to add an hook before or after, and then there is the % definition of the hook that will be called. Four parameters (|#1|, % \ldots, |#4|) are available (the same as the |@onefilewithoptions| % \LaTeX{} macro, ie package name, options, and the two remaining ;-)). % \begin{macrocode} \def\TD@PackagePreDivert#1{% \expandafter\def\csname TD@PackageStart@#1\endcsname ##1##2##3##4% }% \def\TD@PackagePostDivert#1{% \expandafter\def\csname TD@PackageEnd@#1\endcsname ##1##2##3##4% }% % \end{macrocode} % \end{macro} % \end{macro} % % \subsubsection{Initialisation} % We need to be loaded \emph{before} \string\documentclass % \begin{macrocode} \ifx\documentclass\@twoclasseserror \PackageError{texdepends}{texdepends needs to be loaded BEFORE \string\documentclass \MessageBreak Use \string\RequirePackage\space instead of \string\usepackage \MessageBreak as the later is not allowed before \string\documentclass} \fi % \end{macrocode} % And we write the first dependency (upon ourself) % \begin{macrocode} \TD@printPackage{texdepends} % \end{macrocode} % We write default graphicspath (is this really needed ?) % \begin{macrocode} \TD@printGraphicspath{{.}} % \end{macrocode} % % \subsubsection{Warning upon missing figures} % \begin{macro}{\TD@depends} % \begin{macro}{\TD@dependsWarning} % \begin{macro}{\TD@missingDepends} % If some figures are missing, |\TD@missingDepends| will be called so % that a warning will be displayed at the end of the % compilation. Figures should be generated before the next run. % \begin{macrocode} \def\TD@depends{}% \def\TD@dependsWarning{% \PackageWarningNoLine{texdepends}{Figure(s) missing. Check dependencies again}% }% \def\TD@missingDepends{% \global\let\TD@depends\TD@dependsWarning% }% \AtEndDocument{% \TD@depends% }% % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \subsection{Diversion of \LaTeX{} macros} % % \subsubsection{Class and package loading} % \begin{macro}{\TD@@fileswith@pti@ns} % \begin{macro}{\TD@@@fileswith@pti@ns} % Diverting |\@fileswith@pti@ns| and |@@fileswith@pti@ns| so that we % can track class loading. Package are tracked with an other macro % (see just after). % \begin{macrocode} \def\TD@@fileswith@pti@ns#1[#2]#3[#4]{% \ifx#1\@clsextension \TD@printClass{#3} \fi \TD@orig@@fileswith@pti@ns{#1}[#2]{#3}[#4]% }% \let\TD@@@fileswith@pti@ns\TD@@fileswith@pti@ns \TD@switch{@fileswith@pti@ns}% \TD@switch{@@fileswith@pti@ns}% % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\TD@@onefilewithoptions} % By diverting |\@onefilewithoptions|, we can track all loaded % packages. We write the dependency, and we look at the loaded package % to see if we need some special requirements % \begin{macrocode} \def\TD@@onefilewithoptions#1[#2][#3]#4{% \TD@printPackage{#1}% \ifthenelse{\equal{#1}{texdepends}}{% % \end{macrocode} % The |texdepends| package is special : we know it has already been % loaded (we are running code in it) but perhaps \LaTeX{} does not % know it. So we try to honor the |debug| option. % \begin{macrocode} \TD@debug{Package '#1' detected} \@for\TD@package@option:=#2\do{% \ifthenelse{\expandafter\isundefined\csname TD@option@\TD@package@option\endcsname}{ \TD@warningLine{Ignoring unknown option '\TD@package@option'} }{ \ifthenelse{% \equal{\TD@package@option}{debug}% %\OR\equal{\TD@package@option}{debug}% }{ \csname TD@option@\TD@package@option\endcsname% }{ \TD@warningLine{Ignoring option '\TD@package@option' \MessageBreak #1 already loaded } } } } }{% \expandafter\let\expandafter\TD@divert \csname TD@PackageStart@#1\endcsname \ifx\TD@divert\relax \TD@debug{No preamble for package #1} \else \TD@info{Preamble for package #1} \TD@divert{#1}{#2}{#3}{#4}% \fi \TD@orig@@onefilewithoptions{#1}[#2][#3]{#4}% \expandafter\let\expandafter\TD@divert \csname TD@PackageEnd@#1\endcsname \ifx\TD@divert\relax \TD@debug{No postamble for package #1} \else \TD@info{Postamble for package #1} \TD@divert{#1}{#2}{#3}{#4}% \fi }% }% \TD@switch{@onefilewithoptions}% % \end{macrocode} % \end{macro} % % \subsubsection{Tracking input files} % \begin{macro}{\TD@@iinput} % \begin{macro}{\TD@@input@} % |\@iinput| and |\@input@| are diverted to track loaded files % \begin{macrocode} \def\TD@@iinput#1{% \TD@printInput{#1}% \TD@orig@@iinput{#1}}% \def\TD@@input@#1{% \IfFileExists{#1}{% \TD@printInput{#1}% }{}% \TD@orig@@input@{#1}}% \TD@switch{@iinput}% \TD@switch{@input@}% \def\TD@verbatiminput#1{% \TD@printInput{#1}% \TD@orig@verbatiminput{#1}}% \TD@PackagePostDivert{verbatim}{% \TD@switch{verbatiminput}}% % \end{macrocode} % \end{macro} % \end{macro} % % \subsubsection{Tracking output files} % \begin{macro}{\TD@openout} % \begin{macro}{\TD@poenout@eq} % \begin{macro}{\TD@poenout@noeq} % Note: that does not work. Currently, we parse the log file instead % of using this. If someone has ideas\ldots % \begin{macrocode} \let\TD@orig@openout\openout \def\TD@openout#1{% \@ifnextchar={\TD@openout@eq#1}{\TD@openout@noeq#1}} \def\TD@openout@eq#1=#2.#3{% \TD@printOut{#2.#3}% \TD@orig@openout#1=#2.#3% }% \def\TD@openout@noeq#1#2.#3{% \TD@printOut{#2.#3}% \TD@orig@openout#1#2.#3% }% %\TD@switch{openout} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \subsubsection{Tracking bibliography files} % \begin{macrocode} \def\TD@bibli@bbl{% \TD@printBblfile{\jobname}% \global\let\TD@bibli@bbl\relax% }% \def\TD@bibli@files#1{% \TD@bibli@bbl% \@for\TD@bibfile:=#1\do{% \TD@printBibfile{\TD@bibfile}% }% } \def\TD@bibli@style#1{% \TD@bibli@bbl% %\@for\TD@bibstyle:=#1\do{% % \TD@printBibstyle{\TD@bibstyle}% %} \TD@printBibstyle{#1}% } \def\TD@bibliography#1{% \TD@bibli@files{#1}% \TD@orig@bibliography{#1}% }% \def\TD@bibliographystyle#1{% \TD@bibli@style{#1}% \TD@orig@bibliographystyle{#1}% }% \TD@docswitch{bibliography}% \TD@switch{bibliographystyle}% % \end{macrocode} % \subsubsection{Glossary and index files} % \begin{macrocode} \def\TD@makeindex{% \TD@printIndex{\jobname}% \TD@printIndexSource{\jobname}{\jobname.idx}% \TD@orig@makeindex% }% \def\TD@makeglossary{% \TD@printGlossary{\jobname}% \TD@printGlossarySource{\jobname}{\jobname.glo}% \TD@orig@makeglossary% }% \TD@switch{makeindex}% \TD@switch{makeglossary}% % \end{macrocode} % \subsection{Diversion of package's macros} % \subsubsection{Package graphics} % \begin{macrocode} \def\TD@Gin@getbase#1{% \TD@orig@Gin@getbase{#1}% \ifx\Gin@ext\relax% \else% \TD@printFig{\Gin@base\Gin@ext}% \fi% }% \def\TD@Ginclude@eps#1{% \IfFileExists{#1}{% \TD@orig@Ginclude@eps{#1}% }{% \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% \TD@printRequiredFile{#1}% }% }% \def\TD@Ginclude@pdf#1{% \IfFileExists{#1}{% \TD@orig@Ginclude@pdf{#1}% }{% \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% \TD@printRequiredFile{#1}% }% }% \def\TD@graphicspath#1{% \TD@printGraphicspath{#1}% \TD@orig@graphicspath{#1}% }% \def\TD@Gread@eps#1{% \IfFileExists{#1}{% %\PackageWarning{texdepends}{Gread File '#1' exists}% \TD@orig@Gread@eps{#1}% }{% \PackageWarning{texdepends}{No '#1' file \MessageBreak using 1 for graphic dimensions}% \setbox\@tempboxa\hbox{\relax}% \def\Gin@llx{1}\let\Gin@lly\Gin@llx \Gin@defaultbp\Gin@urx{\wd\@tempboxa}% \Gin@defaultbp\Gin@ury{\ht\@tempboxa}% }% }% \def\TD@Gread@pdf#1{% \IfFileExists{#1}{% %\PackageWarning{texdepends}{Gread File '#1' exists}% \TD@orig@Gread@pdf{#1}% }{% \PackageWarning{texdepends}{No '#1' file \MessageBreak using 1 for graphic dimensions}% \setbox\@tempboxa\hbox{\relax}% \def\Gin@llx{1}\let\Gin@lly\Gin@llx \Gin@defaultbp\Gin@urx{\wd\@tempboxa}% \Gin@defaultbp\Gin@ury{\ht\@tempboxa}% }% }% \TD@PackagePostDivert{graphics}{% \TD@switch{graphicspath}% \TD@docswitch{Gin@getbase}% \TD@docswitch{Ginclude@eps}% \TD@docswitch{Ginclude@pdf}% \TD@docswitch{Gread@eps}% \TD@docswitch{Gread@pdf}% }% % \end{macrocode} % \subsubsection{Package figlatex} % \begin{macrocode} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % We do not want to fail when trying to load a missing subfig. % \@Ginclude@rawtex \def\TD@FL@includerawtexgraphics[#1]#2{% \IfFileExists{#2}{% \TD@orig@FL@includerawtexgraphics[#1]{#2}% }{% \PackageWarning{texdepends}{Figure '#2' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% \TD@printRequiredFile{#2}% }% }% \def\TD@Ginclude@rawtex#1{% \IfFileExists{#1}{% \TD@orig@Ginclude@rawtex{#1}% }{% \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% \TD@printRequiredFile{#1}% }% }% % \@Ginclude@figtex \def\TD@Ginclude@figtex#1{% \IfFileExists{#1}{% %\PackageWarning{texdepends}{Ginclude File '#1' exists}% \TD@orig@Ginclude@figtex{#1}% }{% \ifthenelse{\isundefined{\FL@subfig@mainfigname}}{% \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% }{% \PackageWarning{texdepends}{SubFigure '#1' from \FL@subfig@mainfigname needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% } \TD@missingDepends% \TD@printRequiredFile{#1}% }% }% % \@Ginclude@svgtex \def\TD@Ginclude@svgtex#1{% \IfFileExists{#1}{% %\PackageWarning{texdepends}{Ginclude File '#1' exists}% \TD@orig@Ginclude@svgtex{#1}% }{% \ifthenelse{\isundefined{\FL@subfig@mainfigname}}{% \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% }{% \PackageWarning{texdepends}{SubFigure '#1' from \FL@subfig@mainfigname needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% } \TD@missingDepends% \TD@printRequiredFile{#1}% }% }% % \@Gread@figtex \def\TD@Gread@figtex#1{% \IfFileExists{#1}{% %\PackageWarning{texdepends}{Gread File '#1' exists}% \TD@orig@Gread@figtex{#1}% }{% \PackageWarning{texdepends}{No '#1' file \MessageBreak using 1 for graphic dimensions}% \setbox\@tempboxa\hbox{\relax}% \def\Gin@llx{1}\let\Gin@lly\Gin@llx \Gin@defaultbp\Gin@urx{\wd\@tempboxa}% \Gin@defaultbp\Gin@ury{\ht\@tempboxa}% }% }% % \@Gread@svgtex \def\TD@Gread@svgtex#1{% \IfFileExists{#1}{% %\PackageWarning{texdepends}{Gread File '#1' exists}% \TD@orig@Gread@svgtex{#1}% }{% \PackageWarning{texdepends}{No '#1' file \MessageBreak using 1 for graphic dimensions}% \setbox\@tempboxa\hbox{\relax}% \def\Gin@llx{1}\let\Gin@lly\Gin@llx \Gin@defaultbp\Gin@urx{\wd\@tempboxa}% \Gin@defaultbp\Gin@ury{\ht\@tempboxa}% }% }% % \FL@subfig@check \def\TD@FL@subfig@check#1{% \TD@printRequiredFile{#1}% \TD@printSubfig{#1}% }% % \TD@PackagePostDivert{figlatex}{% \TD@docswitch{FL@includerawtexgraphics}% \TD@docswitch{Ginclude@rawtex}% \TD@docswitch{Ginclude@figtex}% \TD@docswitch{Ginclude@svgtex}% \TD@docswitch{Gread@figtex}% \TD@docswitch{Gread@svgtex}% \TD@docswitch{FL@subfig@check}% }% % \end{macrocode} % \subsubsection{Package doc} % \begin{macrocode} \def\TD@PrintIndex{% \TD@printIndexStyle{\jobname}{gind.ist} \TD@printIndexTarget{\jobname}{\jobname.ind} \TD@orig@PrintIndex% }% \def\TD@PrintChanges{% \TD@printGlossaryStyle{\jobname}{gglo.ist} \TD@printGlossaryTarget{\jobname}{\jobname.gls} \TD@orig@PrintChanges% }% \TD@PackagePostDivert{doc}{% \TD@docswitch{PrintIndex}% \TD@docswitch{PrintChanges}% }% % \end{macrocode} % \subsubsection{Package index} % \begin{macrocode} \def\TD@def@index#1#2#3#4{% \TD@printIndex{#2}% \TD@printIndexSource{#2}{\jobname.#3}% \TD@printIndexTarget{#2}{\jobname.#4} \TD@orig@def@index{#1}{#2}{#3}{#4}% }% \TD@PackagePostDivert{index}{% \TD@switch{def@index}% }% % \end{macrocode} % \subsubsection{Package makeidx} % \begin{macrocode} \def\TD@printindex{% \TD@printIndexTarget{\jobname}{\jobname.ind} \TD@orig@printindex% }% \TD@PackagePostDivert{makeidx}{% \TD@docswitch{printindex}% }% % \end{macrocode} % \subsubsection{Package nomencl} % We divert |makeglossary| again after loading this package as its % redefines this macro (loosing our divertion). We also setup the % glossary style for this package. % \begin{macrocode} \def\TD@printglossary{% \TD@printGlossaryTarget{\jobname}{\jobname.gls} \TD@orig@printglossary% }% \TD@PackagePostDivert{nomencl}{% \TD@docswitch{printglossary}% \TD@switch{makeglossary}% \TD@printGlossaryStyle{\jobname}{nomencl.ist} }% % \end{macrocode} % \subsubsection{Package bibtopic} % \begin{macrocode} % Pour le package bibtopic \def\TD@btSect{% \@ifnextchar[{\TD@btSect@opt}{\TD@btSect@noopt}} \def\TD@btSect@opt[#1]#2{% \TD@bibli@files{#2}% \TD@bibli@style{#1}% \TD@orig@btSect[#1]{#2}} \def\TD@btSect@noopt#1{% \TD@bibli@files{#1}% \TD@orig@btSect{#1}} \def\TD@@bt@write@auxfile{% \TD@printBblfile{\thebtauxfile}% \TD@orig@@bt@write@auxfile% }% \TD@PackagePostDivert{bibtopic}{% \global\let\TD@bibli@bbl\relax% \global\let\TD@biblio@rules@package\TD@biblio@rules@package@bibtopic% \TD@switch{@bt@write@auxfile}% \TD@printOut{btbbl.aux}% \TD@printRebuildRule{bibtopic}% \TD@docswitch{btSect}% }% % \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \Finale \endinput