Commit b614b032 authored by Sergey Goncharov's avatar Sergey Goncharov
Browse files

minor

parent 8373c935
Pipeline #22325 passed with stage
in 34 seconds
......@@ -33,9 +33,9 @@ TEXSRC = $(wildcard *.tex)
SHELL = /bin/bash
LATEX = latex -src
BIBTEX = bibtex
DVIPS = dvips
DVIPS = dvips
PDFPS = pdftops
PDF = max_print_line=1000 pdflatex -shell-escape -src -halt-on-error -synctex=1 -interaction nonstopmode -file-line-error-style
PDF = max_print_line=1000 pdflatex -shell-escape -src -halt-on-error -synctex=1 -interaction nonstopmode -file-line-error-style
OPEN = xdg-open
# Mac-specific definitions
......@@ -56,9 +56,9 @@ pdf : $(PDFNAMES) # Compile pdf's
over : clean pdf # Force recompile
.PHONY: clean
clean :
clean :
@echo Soft clean
-rm *.blg *.log *.out $(DVINAMES) $(PDFNAMES) 2>/dev/null ; true
-rm *.blg *.log *.out $(DVINAMES) $(PDFNAMES) 2>/dev/null ; true
.PHONY: cleanall
cleanall : clean
......@@ -66,7 +66,7 @@ cleanall : clean
-rm *~ *.aux *.bbl *.lof *.lot *.toc *.ps *.cit *.synctex.gz 2>/dev/null ; true
.PHONY: cleanaux
cleanaux :
cleanaux :
-rm *.blg *.log *.out *.dvi*.aux *.bbl *.lof *.lot *.toc *.ps *.cit *.synctex.gz 2>/dev/null ; true
.PHONY: show
......@@ -77,7 +77,7 @@ show: $(PDFNAMES)
edit: $(SRCNAMES)
for file in $(SRCNAMES); do $(OPEN) $$file; done
%.bbl: $(BIBSRC)
%.bbl: $(BIBSRC)
@echo Recreate the .aux file
$(PDF) $(@:.bbl=.tex) >/dev/null || cat $(@:.bbl=.log)
......@@ -91,23 +91,23 @@ edit: $(SRCNAMES)
%.dvi: %.tex # Cancel the default rule
%.dvi: $(TEXSRC) $(wildcard $(THISDIR)*.tex)
%.dvi: $(TEXSRC) $(wildcard $(THISDIR)*.tex)
@echo If compilation fails manipuate the timestamp to prevent recognission of .dvi as ready
$(LATEX) $(@:.dvi=.tex) || (touch --date="`date -R -r $(@:.dvi=.tex)`" $@ & false)
@echo If the citations were updated recompile the .bbl file
grep -o -G "Citation \`[^']*" $(@:.dvi=.log) | md5sum -c $(@:.dvi=.cit) || $(BIBTEX) $(@:.dvi=.aux)
while grep -q "Rerun to get cross-references right." $(@:.dvi=.log); \
do $(LATEX) $(@:.dvi=.tex); done
@echo Update the missing citation hash
grep -o -G "Citation \`[^']*" $(@:.dvi=.log) | md5sum > $(@:.dvi=.cit)
%.pdf: %.tex # Cancel the default rule
%.pdf: $(TEXSRC) $(wildcard $(THISDIR)*.tex) %.bbl
@echo Compiling $@
@echo Compiling $@
($(PDF) $(@:.pdf=.tex) >/dev/null) || (touch --date="`date -R -r $(@:.pdf=.tex)`" $@ & cat $(@:.pdf=.log) & false)
@echo Recompile tikz images
......@@ -115,7 +115,7 @@ edit: $(SRCNAMES)
then \
$(MAKE) -e -f $(@:.pdf=.makefile); \
$(PDF) $(@:.pdf=.tex) >/dev/null; \
fi
fi
@echo Create $(@:.pdf=.cit) if it does not exist
test -s $(@:.pdf=.cit) || echo '' | md5sum > $(@:.pdf=.cit)
......@@ -131,12 +131,12 @@ edit: $(SRCNAMES)
$(PDF) $(@:.pdf=.tex) >/dev/null; \
else \
echo "None"; \
fi
fi
@echo Update the citation hash
grep -o -G "Citation \`[^']*" $(@:.pdf=.log) | md5sum > $(@:.pdf=.cit)
%.ps : %.pdf
%.ps : %.pdf
$(PDFPS) -level1 $< # Create .ps from .pdf
.PHONY: bib
......@@ -180,6 +180,6 @@ up: $(PDFNAMES)
# Check common text writting issues
.PHONY: check
check:
check:
-echo "Checking duplicates.."
-grep -Eon -r --include "*.tex" '(\b[[:alpha:]]+\b) \1\b' .
......@@ -135,7 +135,7 @@
\providecommand{\dash}{\nobreakdash-\hspace{0pt}} % non-line-beaking hyphen
\providecommand{\erule}{\rule{0pt}{0pt}} % Empty object whose emptiness is not recognized by LaTeX
\providecommand{\by}[1]{\text{/\!/~#1}} % Comments in equations
\providecommand{\by}[1]{\text{/\!\!/~#1}} % Comments in equations
\providecommand{\pacman}[1]{} % Hide a piece of text
\providecommand{\noqed}{\def\qed{}} % Undefine the QED symbol
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment