Saturday, October 17, 2009

If I Have A Cold Can I Take Pepto

Getting Started creating Makefile to compile LaTeX documents

To write my LaTeX documents
use a simple text editor to compile the final document and use the terminal. Commands to be executed to compile a document often must be repeated several times and sometimes I find it difficult to memorize the proper sequence of operations. To make my life easier I decided to turn to make
: make is a utility used with the UNIX family of operating systems which automates the process of converting files from one form to another, solving dependencies and invoking external programs for the necessary work. [...] It uses files called "makefiles" to determine the dependency graph for a particular output, and scripts needed to compile to be passed to the shell. (
http://it.wikipedia.org/wiki/Make
) I
Makefile
are extremely popular in the programming la maggioranza dei software open-source sfrutta i
Makefile
per automatizzare la compilazione del programma. La mia idea di utilizzarli anche per compilare documenti LaTeX è tutt'altro che originale, su Internet, infatti, è possibile recuperare numeri sorgenti LaTeX con allegato un Makefile . Esistono dei programmi (essenzialmente degli script) che permettono di compilare correttamente un documento LaTeX con un solo comando, ma preferisco di gran lunga scrivermi da solo un Makefile perché è estremamente flessibile (con cambiamenti minimi può essere adattato a documenti diversi) e perché oltre alla compilazione automatizza anche altri processi come la conversione di immagini nei formati corretti for inclusion in the final document or delete the temporary files generated in the creation of the latter. On the Internet there are several guides that explain how to make make use, I suppose that a user LaTeX does not necessarily have the knowledge necessary to understand a guide aimed at a programmer). That is why quite a while 'time (as I signaled forum on the Italian TeX Users Group) I published a tutorial about it. The manual, in PDF format, can be found at http://elubuntu.altervista.org/LaTeX/Guide/make.pdf , while the ports are located at http://elubuntu.altervista.org/LaTeX/Guide/make.tar.gz . I focused more on content than form, in fact one of the last readings I found several spelling errors, it also identified other reported. The Makefile shows that are relatively simple (given my basic knowledge on the subject), but you can make much more complex. Again, if you have tips, suggestions on how to broaden and improve the guidance you are welcome. The guide is released under CC-BY , then anyone can modify, adapt to their needs, expand it (I'd love to know the changes, especially if the extension), provided you cite the author (me: D).
I meant to add to the leadership of the Appendices which are short titles (provisional) in the file
make.tex archive, for this moment but I do not have the chance to write anything about it, if I can I will in a very short 'time.

0 comments:

Post a Comment