-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
84 lines (72 loc) · 2.96 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# $Id$
# Makefile for TeX Live documentation. Public domain.
doc = texlive-en
all: pdf html
tlpre = # possible prefix to run from the pretest
env = TEXINPUTS=../texlive-common:../texlive-en:; export TEXINPUTS; $(tlpre)
pdflatex_opts = --file-line-error
pdflatex = pdflatex $(pdflatex_opts) '\nonstopmode\def\Status{1}\input $(doc)'
# The story here is that for HTML, we just want <img> tags referring to
# the graphics (in ../texlive-common), without specifying any size,
# since their natural size is ok (enough). But LaTeX's \includegraphics
# requires a size (htlatex runs latex, not pdflatex, so it can't
# determine the size for .png files), and tex4ht passes that warning on,
# which is just an annoyance. We could generate .xbb files, but then
# we'd have to update them every year, which seems like a waste of time
# when we don't want a size in the first place.
#
texfot_pdf = texfot
texfot_html = texfot --ignore="Cannot determine size of graphic" \
--ignore='File.*\.xbb\"'
pdf:
rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out
$(env) $(texfot_pdf) $(pdflatex)
$(env) $(texfot_pdf) $(pdflatex)
$(env) $(texfot_pdf) $(pdflatex)
$(env) $(texfot_pdf) $(pdflatex)
# It is better to use htlatex than the individual runs since then we can
# easily specify these options; \Preamble in live4ht.cfg is not equivalent.
# The options here:
# live4ht - reads our live4ht.cfg.
# info - extra debugging info.
# xhtml - required for html5.
# html5 - output viewport decl to help on small screens.
# charset - UTF-8 is more likely to work well than Latin 1.
# fn-in - keep footnotes in the main output file.
#
# The other option, -cunihtf -utf8, goes along with the charset and
# tells tex4ht to look for Unicode font encodings. See https://tug.org/tex4ht.
html h:
rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out
$(env) $(texfot_html) htlatex $(doc) \
"live4ht,info,xhtml,html5,charset=utf-8,fn-in" \
" -cunihtf -utf8" </dev/null
ls -l texlive-??.html texlive-??.css
# This is the old way, no longer used.
html-separate:
rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out *.4tc
# this sequence is equivalent to running "ht latex $(doc)". We do it
# this way so we can \def\Status for the \ifcase in tex-live.sty.
$(env) latex '\nonstopmode\def\Status{2`}\input $(doc)'
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)'
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)'
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)'
$(env) tex4ht $(doc)
$(env) t4ht $(doc)
# just run tex once without cleaning temp files.
pdf1 p:
$(env) $(texfot_pdf) $(pdflatex)
clean:
rm -f *.aux *.log *.blg *.toc *.out *.lot tex4ht.ps *.4*
rm -f *.xref* *.lg *.idv *.out *.otc *.tmp tmp.*
rm -f $(doc).dvi $(doc).ps
realclean: clean
rm -f $(doc).pdf
rm -f *.html *.htm $(doc).css *.gif *.jpg
spell:
cat texlive-??.tex \
| aspell list --mode=tex --add-extra-dicts=`pwd`/.dict.pws \
| sort -f -u
svr:
svn revert texlive-??.css texlive-??.html texlive-??.pdf
svn status