It includes two minor changes compared to the previous Makefile: theĬompilation of both PDF and PNG figures (rewrite rules get a bit more complex)Īnd the nice help snippet from the marmelab blog. *$$' $(MAKEFILE_LIST ) | sort | awk 'BEGIN ' Inkscape -C -z -file =$< -export-png = # Recompile on any update of LaTeX or SVG do \ Inkscape -C -z -file =$< -export-pdf = figures/svg/%.svg # Figures for my defense slides Makeglossaries $(MAIN.tex = ) # list of abbreviations, nomenclatureĬlean: # Clean LaTeX and output figure filesįigures/pdf/%.pdf: figures/svg/%.svg # Figures for the manuscript The directory structure was:Īnd the corresponding Makefile: # LaTeX Makefile v1.0 - LaTeX PDF figures PNG figuresĪLL = $(wildcard *.tex content/*.tex defense/index.html figures/svg/*.svg ) MAIN =thesis.texįIGURES_SVG = $(wildcard figures/svg/*.svg ) FIGURES_PDF = $(subst svg/,pdf/, $(FIGURES_SVG.svg =.pdf )) FIGURES_PNG = $(subst figures/svg/,defense/images/, $(FIGURES_SVG.svg =.png ))Īll: $(FIGURES_PDF ) $(FIGURES_PNG ) # Build full thesis (LaTeX figures) Disable 'Build subdirectory' option in Texmaker, under Options -> Configure Texmaker -> Commands, Uncheck 'Use a Build Sub-Directory for output files' and. Such as the (HTML 5) slides of my defense. In Texmaker, the '-output-directorybuild' parameter is only supported by the latex and pdflatex commands and not by bibtex. As an example, below is theįull Makefile I used to compile my PhD thesis, as well as associated resources Rubber automates the compilation of LaTeX documents, and using inotifywaitĪnd inkscape automates the process further. Your PDF viewer should also reload the file automatically upon updates # true do inotifywait $(PAPER) sleep 0.01 make all doneĪfter setting PAPER to your TeX file’s name, run make watch and theĭocument will be automatically recompiled any time you save it in your textĮditor. Watch: # Recompile on updates to the source do inotifywait $(PAPER ) sleep 0.01 make all done # for Bash users, replace the while loop with the following SHELL =/bin/zsh # for the while loop below PAPER =paper.tex # set the path to your TeX file here #TEXMAKER COMPILE PDF INSTALL#Package ( sudo apt-get install inotify-tools). On Debian/Ubuntu, you will find this tool in the inotify-tools It relies on inotifywait to recompile the document upon changes to the TeX Here is a minimal Makefile to recompile the document upon saving the TeX file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |