summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/pdftex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-04 23:10:15 +0000
committerKarl Berry <karl@freefriends.org>2016-05-04 23:10:15 +0000
commite5ac7d8301efd127740e0ebfde020aae9c9563c0 (patch)
treedf767cacac937f540ded9149064797ca9a31a28f /Master/texmf-dist/doc/pdftex
parent6e6b00930df3ed6b7e295b3b0ed3ef024686a9de (diff)
import SOURCE_DATE_EPOCH_TEX_PRIMITIVES support from pdftex r751, per tex-k thread, http://tug.org/pipermail/tex-k/2016-May/002691.html
git-svn-id: svn://tug.org/texlive/trunk@40889 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/pdftex')
-rw-r--r--Master/texmf-dist/doc/pdftex/manual/ChangeLog5
-rw-r--r--Master/texmf-dist/doc/pdftex/manual/Makefile5
-rw-r--r--Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdfbin813349 -> 817102 bytes
-rw-r--r--Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex30
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile17
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex11
6 files changed, 53 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/pdftex/manual/ChangeLog b/Master/texmf-dist/doc/pdftex/manual/ChangeLog
index 220c0ca6ad4..3e3cb1168fa 100644
--- a/Master/texmf-dist/doc/pdftex/manual/ChangeLog
+++ b/Master/texmf-dist/doc/pdftex/manual/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-04 Karl Berry <karl@freefriends.org>
+
+ * pdftex-t.tex (Invoking \PDFTEX): describe
+ SOURCE_DATE_EPOCH_TEX_PRIMITIVES, with caveats.
+
2016-04-25 Karl Berry <karl@freefriends.org>
* samplepdf: move subdir up a level for more visibility.
diff --git a/Master/texmf-dist/doc/pdftex/manual/Makefile b/Master/texmf-dist/doc/pdftex/manual/Makefile
index 001768d614b..102d82ff576 100644
--- a/Master/texmf-dist/doc/pdftex/manual/Makefile
+++ b/Master/texmf-dist/doc/pdftex/manual/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 745 2016-04-25 18:06:57Z karl $
+# $Id: Makefile 751 2016-05-04 22:57:38Z karl $
# Makefile for pdfTeX documentation. Public domain.
# Get version we're documenting from the \def in the manual.
@@ -58,8 +58,9 @@ pdftex-w.pdf: pdftex-w.tex
# Too annoying to remake help text every time; check by hand when needed.
-pdftex-help.txt:
+pdftex-help.txt: force
$(pdftex_binary) --help >$@ || rm -f $@
+force:
# if we don't have a build tree around, just try from the path.
build_binary := ../../source/build-pdftex/texk/web2c/pdftex
diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf b/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf
index 8de0d2cb619..d220e5ca648 100644
--- a/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf
+++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex
index 9ae584c7c5e..fd2054a33f5 100644
--- a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex
+++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex
@@ -1,7 +1,7 @@
% interface=english modes=letter,screen output=pdftex
% vim: tw=79
-% $Id: pdftex-t.tex 745 2016-04-25 18:06:57Z karl $
+% $Id: pdftex-t.tex 751 2016-05-04 22:57:38Z karl $
% The number of lines on the title page depends on exactly
% what \PDF\ code is generated.
@@ -38,7 +38,7 @@
August\or September\or October\or November\or December\else ERROR\fi}
}
-\svnscan $Id: pdftex-t.tex 745 2016-04-25 18:06:57Z karl $
+\svnscan $Id: pdftex-t.tex 751 2016-05-04 22:57:38Z karl $
\def\currentpdftex{1.40.17}
@@ -1313,20 +1313,36 @@ engines as implemented in \WEBC\ (\from [web2c] has the manual).
The same commonality holds for environment variables; see the section
``Setting search paths'' above for an overview. However, \PDFTEX\ looks
-for one additional environment variable: \type{SOURCE_DATE_EPOCH}
+for two additional environment variables: first, \type{SOURCE_DATE_EPOCH}
(introduced in version 1.40.17, 2016). If this is set, it must be a
positive integer (with one trivial exception: if it is set but empty,
that is equivalent to 0). Non-integer values cause a fatal error. The
value is used as the current time in seconds since the usual Unix
-``epoch'', the beginning of 1970-01-01, UTC. Thus, a value of \type{32}
+``epoch'': the beginning of 1970-01-01, UTC. Thus, a value of \type{32}
would result in a \type{/CreationDate} and \type{/ModDate} values of
\type{19700101000032Z}. This is useful for reproducible builds of
documents. (See also \type{\pdfinfoomitdate},
\type{\pdfsuppressptexinfo}, et al.)
-Just to have the list of options and basic invocation at hand, here is a
-verbatim listing of the \type{-}\type{-help} output. All options can be
-specified with one or two dashes and unambiguously abbreviated.
+The second \PDFTEX-specific environment variable is
+\type{SOURCE_DATE_EPOCH_TEX_PRIMITIVES}. If this is set to~\type{1},
+\TEX's time-related primitives are also initialized from the value of
+\type{SOURCE_DATE_EPOCH}. These primitives are \type{\year},
+\type{\month}, \type{day}, and \type{\time}. If
+\type{SOURCE_DATE_EPOCH} is not set, setting
+\type{SOURCE_DATE_EPOCH_TEX_PRIMITIVES} has no effect. If
+\type{SOURCE_DATE_EPOCH_TEX_PRIMITIVES} is unset, set to the empty
+string, or set to~\type{0}, the primitives reflect the current time as
+usual. Any other value elicits a warning, and the current time is used.
+(This is useful only if one wants to make reproducible \PDF{}s for a set
+of documents without changing them in any way, e.g., an operating system
+distribution with manuals that use \type{\today}. Except in such
+unusual circumstances, it is better not to set this, and let the \TEX\
+primitives have the meaning they have always had.)
+
+Now, just to have the list of options and basic invocation at hand, here
+is a verbatim listing of the \type{-}\type{-help} output. All options
+can be specified with one or two dashes and unambiguously abbreviated.
\startnotmode[screen]
\switchtobodyfont[9pt] % squeeze everything on one page
diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile
index cbf7ee13b25..1e0e72aea9c 100644
--- a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile
+++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 740 2016-04-23 15:08:37Z karl $
+# $Id: Makefile 751 2016-05-04 22:57:38Z karl $
# Public domain.
include ../Common.mak
@@ -9,6 +9,10 @@ test1:
test2:
$(prog) test-fixed-date-id.tex
+testprim:
+ SOURCE_DATE_EPOCH=120 SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 \
+ $(prog) test-prim.tex
+
test = test-SOURCE_DATE_EPOCH
# test invalid settings of the envvar.
test3-invalid:
@@ -27,17 +31,18 @@ test3-valid: test3-orig.pdf test3-repro.pdf
SOURCE_DATE_EPOCH=0 $(prog) $(test).tex
SOURCE_DATE_EPOCH="" $(prog) $(test).tex # same as 0
-$(diff) $< $(test).pdf # shows differences
- SOURCE_DATE_EPOCH=10 $(prog) $(test).tex
+ SOURCE_DATE_EPOCH=11 $(prog) $(test).tex
$(diff) test3-repro.pdf $(test).pdf # should be identical
# SOURCE_DATE_EPOCH=1439928155 $(prog) $(test).tex
# make an original with nonzero time for checking.
-test3-repro.pdf:
- SOURCE_DATE_EPOCH=10 $(prog) $(test).tex && mv $(test).pdf $@
+test3-repro.pdf: force
+ SOURCE_DATE_EPOCH=11 $(prog) $(test).tex && mv $(test).pdf $@
+force:
clean:
rm -f *.log *.pdf *.fmt *.aux
fmt:
- $(prog) *pdflatex.ini
- $(prog) *pdfetex.ini
+ $(prog) \*pdflatex.ini
+ $(prog) \*pdfetex.ini
diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex
new file mode 100644
index 00000000000..7c83d90b422
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex
@@ -0,0 +1,11 @@
+% $Id$
+% See the testprim: target in ./Makefile for the invocation.
+
+\catcode`\{ = 1
+\catcode`\} = 2
+
+\ifnum\year=1970 \else \errmessage{year is \the\year, not 1970}\fi
+\ifnum\month=1 \else \errmessage{month is \the\month, not 1}\fi
+\ifnum\day=1 \else \errmessage{day is \the\day, not 1}\fi
+\ifnum\time=2 \else \errmessage{time is \the\time, not 2}\fi
+\end