Comments (2)
A minimal working example to reproduce this issue would be nice, but yes, Makefile.tex
runs pdflatex
in draft mode twice before attempting to produce a PDF (i.e., a total of three runs of pdflatex
). The multiple runs essentially assume that all documents have some sort of cross-references that should be resolved.
It might make sense to have a draft
phony target that compiles once without attempting to resolve any cross references (or handle references, glossaries, indexes, etc.). That is, one could execute make draft
to compile a document. Would that be useful?
from latex-incubator.
Minimal Working Example
Makefile
:
mwe.pdf: mwe.tex
mwe.tex:
cat > $@ <<< '\documentclass{article}\begin{document}MWE\end{document}'
include $(shell git rev-parse --show-toplevel)/texmf/Makefile.tex
Executing make
(technically make --dry-run
):
rm -f mwe.sta
TEXINPUTS=.::../texmf//: pdflatex -shell-escape -draftmode mwe.tex
if grep -E '^\\@istfilename' mwe.aux; then makeglossaries -d . mwe && TEXINPUTS=.::../texmf//: pdflatex -shell-escape -draftmode mwe.tex; fi
files=$(sed -n 's/\\@input{\(.*\)}/\1/p' mwe.aux); if grep --quiet -E '\\(citation)' mwe.aux $files; then BIBINPUTS=.::../texmf//: bibtex mwe; fi
TEXINPUTS=.::../texmf//: pdflatex -shell-escape -draftmode mwe.tex
if [ -f mwe.idx ]; then makeindex $(if [[ mwe.tex == *.dtx ]]; then echo -s gind.ist; fi) -o mwe.ind mwe.idx; fi
if [ -f mwe.glo ]; then makeindex -s $(if [[ mwe.tex == *.dtx ]]; then echo gglo; else echo mwe; fi).ist -o mwe.gls mwe.glo; fi
TEXINPUTS=.::../texmf//: pdflatex -shell-escape mwe.tex
while ( grep -q '^LaTeX Warning: Label(s) may have changed' mwe.log ) do TEXINPUTS=.::../texmf//: pdflatex -shell-escape mwe.tex; done
Using -draftmode
prevents pdflatex
from producing an output PDF. Using draft mode doesn't do much else (see pdflatex -draftmode much slower compared to draft option passed to graphicx and What is the correct way to use draft mode with arara?) and could be omitted, but the later invocations of pdflatex
would need to be conditional, using various heuristics to determine if additional runs are needed.
from latex-incubator.
Related Issues (20)
- Allow answer to fill remaining space on page
- Support key-value options for question environment
- Create package for business cards HOT 1
- Use frame number in glossary entries for presentations HOT 3
- Publications define labels multiple times in resume HOT 2
- Use standard list environment for publications HOT 2
- Remove patch for beamer@outsideframenote HOT 3
- Specify TeX configuration in texmf.cnf
- Allow specification of background color for `imageframe` environment
- Include background in frame thumbnail for notes HOT 1
- Section titles aren't centered properly in resume HOT 1
- Infer files to clean based on .gitignore patterns HOT 1
- Use standard bullets for itemize environment in resume
- visualization: Add support for "jitter" in scatterplots
- make: Additional LaTeX runs necessary when using standalone HOT 4
- minted-doc: \minted@checkstyle removed in v2.6 HOT 1
- Create package to facilitate reproducible builds HOT 2
- slides: Add overlay support to `beamercolorbox`
- visualization: Add library for reading configuration file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex-incubator.