diff --git a/Makefile b/Makefile index 7db5f91..85fb7d3 100755 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ # Copyright 2004 Chris Monson (shiblon@gmail.com) +# 2011 Andrew McNabb +# 2013 Krishna Kumar +# 2017 Holger Nahrstaedt # Latest version available at http://www.bouncingchairs.net/oss # # This file is part of ``Chris Monson's Free Software''. @@ -30,7 +33,7 @@ # fileinfo := LaTeX Makefile author := Chris Monson -version := 2.2.1-alpha9 +version := 2.2.1-alpha10 # .DEFAULT_GOAL := all # Note that the user-global version is imported *after* the source directory, @@ -46,6 +49,8 @@ version := 2.2.1-alpha9 # This can be pdflatex or latex - you can change this by adding the following line to your Makefile.ini: # BUILD_STRATEGY := latex BUILD_STRATEGY ?= pdflatex +#BIB_STRATEGY ?= biblatex +BIB_STRATEGY ?= bibtex # This can be used to pass extra options to latex. LATEX_OPTS ?= # @@ -117,6 +122,13 @@ export LC_ALL ?= C # # # CHANGES: +# Holger Nahrstaedt (2017-09-25): +# * Bumped version to 2.2.1-alpha10 +# * Added XELATEX and LUALATEX to BUILD_STRATEGY +# * New option BIB_STRATEGY, can be biblatex or bibtex +# * Added all Authors to Copyright section +# * Added asymptote file generation +# * Added shell-escape to pdflatex, xelatex and lualatex # Krishna Kumar (2013-11-27): # * Added PS to rm_ext to remove PS files generated during LaTeX output # Krishna Kumar (2013-11-26): @@ -746,10 +758,12 @@ XARGS ?= xargs SLEEP ?= sleep # == LaTeX (tetex-provided) == BIBTEX ?= bibtex +BIBER ?= biber DVIPS ?= dvips LATEX ?= latex -PDFLATEX ?= pdflatex -XELATEX ?= xelatex +PDFLATEX ?= pdflatex --shell-escape +XELATEX ?= xelatex --shell-escape +LUALATEX ?= lualatex --shell-escape EPSTOPDF ?= epstopdf MAKEINDEX ?= makeindex XINDY ?= xindy @@ -778,6 +792,7 @@ PNGTOPNM ?= pngtopnm # From NetPBM - step 1 for png -> eps PPMTOPGM ?= ppmtopgm # From NetPBM - (gray) step 2 for png -> eps PNMTOPS ?= pnmtops # From NetPBM - step 3 for png -> eps GUNZIP ?= gunzip # GZipped EPS +ASYMPTOTE ?= asy # == Beamer Enlarged Output == PSNUP ?= psnup # == Viewing Stuff == @@ -1175,11 +1190,21 @@ default_graphic_extension ?= pdf latex_build_program ?= $(XELATEX) build_target_extension ?= pdf hyperref_driver_pattern ?= hdvipdf.* -hyperref_driver_error ?= Using pdflatex: specify pdftex in the hyperref options (or leave it blank). +hyperref_driver_error ?= Using xelatex: specify xelatex in the hyperref options (or leave it blank). endif +ifeq "$(strip $(BUILD_STRATEGY))" "lualatex" +default_graphic_extension ?= pdf +latex_build_program ?= $(LUALATEX) +build_target_extension ?= pdf +hyperref_driver_pattern ?= hdvipdf.* +hyperref_driver_error ?= Using xelatex: specify lualatex in the hyperref options (or leave it blank). +endif + + # Files of interest all_files.tex ?= $(wildcard *.tex) +all_files.xmpdata ?= $(wildcard *.xmpdata) all_files.tex.sh ?= $(wildcard *.tex.sh) all_files.tex.pl ?= $(wildcard *.tex.pl) all_files.tex.py ?= $(wildcard *.tex.py) @@ -1187,6 +1212,7 @@ all_files.rst ?= $(wildcard *.rst) all_files.lhs ?= $(wildcard *.lhs) all_files.mp ?= $(wildcard *.mp) all_files.fig ?= $(wildcard *.fig) +all_files.asy ?= $(wildcard *.asy) all_files.gpi ?= $(wildcard *.gpi) all_files.dot ?= $(wildcard *.dot) all_files.xvg ?= $(wildcard *.xvg) @@ -1238,6 +1264,7 @@ files.gpi := $(call filter-buildable,gpi) files.dot := $(call filter-buildable,dot) files.mp := $(call filter-buildable,mp) files.fig := $(call filter-buildable,fig) +files.asy := $(call filter-buildable,asy) files.xvg := $(call filter-buildable,xvg) files.svg := $(call filter-buildable,svg) files.png := $(call filter-buildable,png) @@ -1268,6 +1295,7 @@ default_files.gpi := $(call filter-default,gpi) default_files.dot := $(call filter-default,dot) default_files.mp := $(call filter-default,mp) default_files.fig := $(call filter-default,fig) +default_files.asy := $(call filter-default,asy) default_files.xvg := $(call filter-default,xvg) default_files.svg := $(call filter-default,svg) default_files.png := $(call filter-default,png) @@ -1367,6 +1395,7 @@ graphic_source_extensions := mp \ xvg \ svg \ dot \ + asy \ eps.gz ifeq "$(strip $(BUILD_STRATEGY))" "latex" @@ -1384,6 +1413,11 @@ graphic_source_extensions += eps graphic_target_extensions := pdf png jpg jpeg mps tif endif +ifeq "$(strip $(BUILD_STRATEGY))" "lualatex" +graphic_source_extensions += eps +graphic_target_extensions := pdf png jpg jpeg mps tif +endif + all_stems_source := $(call concat-stems,tex,all) all_stems_source_gen := $(call concat-stems,rst lhs,all) all_stems_script := $(call concat-stems,tex.sh tex.pl tex.py,all) @@ -1418,6 +1452,7 @@ allowed_source_suffixes := \ ind \ nls \ bbl \ + bci \ aux \ aux.make \ d \ @@ -1537,7 +1572,7 @@ endif # Extensions generated by LaTeX invocation that can be removed when complete rm_ext := \ - log *.log aux $(pre_pdf_extensions) ps pdf blg bbl out nav snm toc lof lot lol pfg \ + log *.log aux $(pre_pdf_extensions) ps pdf blg bcf bbl out nav snm toc lof lot lol pfg \ fls vrb idx ind ilg glg glo gls lox nls nlo nlg brf mtc* mlf* mlt* maf brf ist fmt backup_patterns := *~ *.bak *.backup body.tmp head.tmp @@ -2421,7 +2456,12 @@ endef # BibTeX invocations # # $(call run-bibtex,) +ifeq "$(strip $(BIB_STRATEGY))" "bibtex" run-bibtex = $(BIBTEX) $1 | $(color_bib); $(call transcript,bibtex,$1) +endif +ifeq "$(strip $(BIB_STRATEGY))" "biblatex" +run-bibtex = $(BIBER) $1 | $(color_bib); $(call transcript,biber,$1) +endif # $(call convert-eps-to-pdf,,,[gray]) # Note that we don't use the --filter flag because it has trouble with bounding boxes that way. @@ -2541,6 +2581,10 @@ define convert-jpg $(CONVERT) $(if $3,-type Grayscale,) '$1' eps2:'$2' endef +# Creation of .pdf files from .asy files +# $(call convert-asy,) +convert-asy = $(ASYMPTOTE) -V -f pdf $1 + # Creation of .eps files from .fig files # $(call convert-fig,,,[gray]) convert-fig = $(FIG2DEV) -L $(if $(filter %.pdf,$2),pdf,eps) $(if $3,-N,) $1 $2 @@ -2957,6 +3001,7 @@ endif # Note that we do NOT touch the .bbl file if there is no need to # create/recreate it. We would like to leave existing files alone if they # don't need to be changed, thus possibly avoiding a rebuild trigger. +ifeq "$(strip $(BIB_STRATEGY))" "bibtex" %.bbl: %.auxbbl.make $(QUIET)\ $(if $(filter %.bib,$^),\ @@ -2977,6 +3022,12 @@ endif $(call echo-build,** annotated extra latex **,output ignored,$(RESTARTS)-2); \ $(call run-latex,$*); \ fi +endif +ifeq "$(strip $(BIB_STRATEGY))" "biblatex" +%.bbl: %.bcf + $(QUIET)$(call echo-build,$<,$@) + $(QUIET)$(call run-bibtex,$<,$@,$*.bcf) +endif # Create the index file - note that we do *not* depend on %.tex here, since # that unnecessarily restricts the kinds of indices that we can build to those @@ -3082,6 +3133,10 @@ endif $(QUIET)$(call echo-graphic,$^,$@) $(QUIET)$(call convert-fig,$<,$@,$(GRAY)) +%.pdf: %.asy + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-asy,$<) + %.pdf: %.svg $(QUIET)$(call echo-graphic,$^,$@) $(QUIET)$(call convert-svg,$<,$@,$(GRAY)) @@ -3102,6 +3157,37 @@ endif $(QUIET)$(call echo-graphic,$^,$@) $(QUIET)$(call convert-fig,$<,$@,$(GRAY)) +%.pdf: %.asy + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-asy,$<) + +%.pdf: %.svg + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-svg,$<,$@,$(GRAY)) +endif + +ifeq "$(strip $(BUILD_STRATEGY))" "lualatex" +%.pdf: %.eps $(if $(GRAY),$(gray_eps_file)) + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-eps-to-pdf,$<,$@,$(GRAY)) + +ifeq "$(strip $(GPI_OUTPUT_EXTENSION))" "pdf" +%.pdf: %.gpi %.gpi.d $(gpi_sed) $(gpi_global) + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-gpi,$<,$@,$(GRAY)) +endif + +%.pdf: %.fig + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-fig,$<,$@,$(GRAY)) + +%.pdf: %.asy + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-asy,$<) + +%.pdf: %.svg + $(QUIET)$(call echo-graphic,$^,$@) + $(QUIET)$(call convert-svg,$<,$@,$(GRAY)) endif @@ -4150,4 +4236,3 @@ endef -include $(HOME)/.latex-makefile/Targets.ini # # vim: noet sts=0 sw=8 ts=8 - diff --git a/README.md b/README.md index 8702c97..47efd92 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ This template supports `XeLaTeX` compilation chain. To generate PDF run ### Using latexmk (Unix/Linux/Windows) -This template supports `XeLaTeX` compilation chain. To generate PDF run +This template supports `LuaLaTeX` compilation chain. To generate PDF run latexmk -pdflatex=lualatex -pdf thesis.tex @@ -85,7 +85,27 @@ To build the `PDF` version of your thesis, run: make -This build procedure uses `pdflatex` and will produce `thesis.pdf`. +This build procedure uses `pdflatex` with `bibtex` and will produce `thesis.pdf`. +To use `pdflatex` with `biblatex`, you should run: + + make BIB_STRATEGY=biblatex + +To use `XeLaTeX`, you should run: + + make BUILD_STRATEGY=xelatex + +or with `biblatex` + + make BUILD_STRATEGY=xelatex BIB_STRATEGY=biblatex + +To use `LuaLaTeX`, you should run: + + make BUILD_STRATEGY=lualatex + +or with `biblatex` + + make BUILD_STRATEGY=lualatex BIB_STRATEGY=biblatex + To produce `DVI` and `PS` versions of your document, you should run: