Re: [NTG-context] Reproducible PDF output not working

2018-04-24 Thread N. Raghavendra
At 2018-04-24T10:03:16+02:00, Arthur Reutenauer wrote:

>> PS: Incidentally, what is the "-19:00" in date in the first identifier?
>> In my time zone, IST, I would have expected 2018-04-24T01:49:47+05:30.
>
> I remember noticing something strange in the date format when files
> were compiled after midnight local time while the UTC time was before
> midnight.  It didn’t seem enough to send a bug report at the time, but
> I can look into it again.

Thank you for the help.

Raghu.

-- 
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output not working

2018-04-24 Thread N. Raghavendra
At 2018-04-24T09:44:09+02:00, Hans Hagen wrote:

> fixed in beta but no beta soon ... in lpdf-ini.lua you can try to fix
> this

Thank you for the solution.

Raghu.

-- 
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output not working

2018-04-24 Thread Arthur Reutenauer
> On the other hand, with the 2017.11.14 version, the identifier in the
> output of `context --nodates' is just
> 
>   foo

  The longer identifier is definitely better, but it should be possible
to make it predictable over successive runs.

> PS: Incidentally, what is the "-19:00" in date in the first identifier?
> In my time zone, IST, I would have expected 2018-04-24T01:49:47+05:30.

  I remember noticing something strange in the date format when files
were compiled after midnight local time while the UTC time was before
midnight.  It didn’t seem enough to send a bug report at the time, but I
can look into it again.

  And thanks to Hans for his speedy response, as usual :-)

Best,

Arthur
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output not working

2018-04-24 Thread Hans Hagen

On 4/24/2018 6:28 AM, N. Raghavendra wrote:

At 2018-04-23T23:49:19+02:00, Arthur Reutenauer wrote:


it seems the identifier uses the time of compilation, when it should
probably use the time of last modification of the source file.


Yes, with the 2018.04.19 version, the identifier in the output of
`context --nodates' includes the compilation time, as in

   foo.2018-04-24T01:49:47-19:00.

On the other hand, with the 2017.11.14 version, the identifier in the
output of `context --nodates' is just

   foo

Raghu.

fixed in beta but no beta soon ... in lpdf-ini.lua you can try to fix this

function lpdf.id(date)
local banner = environment.jobname or tex.jobname or "unknown"
if not date then
return banner
else
return format("%s | %s",banner,timestamp)
end
end


and then run context --make

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output not working

2018-04-23 Thread N. Raghavendra
At 2018-04-23T23:49:19+02:00, Arthur Reutenauer wrote:

> it seems the identifier uses the time of compilation, when it should
> probably use the time of last modification of the source file.

Yes, with the 2018.04.19 version, the identifier in the output of
`context --nodates' includes the compilation time, as in

  foo.2018-04-24T01:49:47-19:00.

On the other hand, with the 2017.11.14 version, the identifier in the
output of `context --nodates' is just

  foo

Raghu.

PS: Incidentally, what is the "-19:00" in date in the first identifier?
In my time zone, IST, I would have expected 2018-04-24T01:49:47+05:30.

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output not working

2018-04-23 Thread Arthur Reutenauer
Hi Raghu,

  I can reproduce the problem you observe.  Hans, it seems the
identifier uses the time of compilation, when it should probably use the
time of last modification of the source file.

Best,

Arthur
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Reproducible PDF output not working

2018-04-23 Thread N. Raghavendra
Sometime ago, I asked here about reproducible PDF output, and was told
about the --nodates option of context.  It worked then, but doesn't seem
to be working now, with a recent version of context.

--
$ cat foo.tex

\starttext

Hello, world!

\stoptext

$ ( rm -f a b foo.log foo.pdf foo.tuc && \
context --nodates foo.tex && cp foo.pdf a && \
sleep 1 && \
context --nodates foo.tex && cp foo.pdf b ) > /dev/null && \
md5sum a b

bdd1911005623a519f5ecb3dbcb8bc7b  a
06157e2840c0758ca46d5e7f0be239ef  b

$ context --version
[elided]
mtx-context | current version: 2018.04.19 15:53
--

File `a' has the words "foo.2018-04-24T01:49:47-19:00",
and file `b' has "foo.2018-04-24T01:49:49-19:00" at
the corresponding position.

Please tell me how to ensure that the PDF output depends only on the
source, and not on the time the output is generated.

Thanks,
Raghu.

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output

2017-11-12 Thread Alan Braslau
On Sun, 12 Nov 2017 09:37:33 +0100
Henning Hraban Ramm  wrote:

> Am 2017-11-11 um 21:06 schrieb Pablo Rodriguez :
> 
> > I always use contextjit instead of context, because it’s faster.
> > 
> > Other than speed, I think there is no other difference.  
> 
> Sometimes it has its own bugs, like at the moment (at least in last
> week’s beta) with Lua code. Sometimes ConTeXtJIT couldn’t find my
> fonts, where ConTeXt could (maybe an old, solved problem).

And luajittex is not *always* faster, as Hans has shown us many times
at meetings, although it is usually faster, I believe. It all depends
on what type of operations one is processing.

Note, as well, that luajittex is not available on all platforms for
now. Luajit cannot be compiled for certain processors (one example is
powerpc).

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output

2017-11-12 Thread Henning Hraban Ramm
Am 2017-11-11 um 21:06 schrieb Pablo Rodriguez :

> I always use contextjit instead of context, because it’s faster.
> 
> Other than speed, I think there is no other difference.

Sometimes it has its own bugs, like at the moment (at least in last week’s 
beta) with Lua code.
Sometimes ConTeXtJIT couldn’t find my fonts, where ConTeXt could (maybe an old, 
solved problem).

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output

2017-11-11 Thread N. Raghavendra
At 2017-11-11T21:06:22+01:00, Pablo Rodriguez wrote:

> I checked it with sha256sum ;-).

And, why not!

> I always use contextjit instead of context, because it’s faster.
>
> Other than speed, I think there is no other difference.

That's good to know.  I'll try it out.

Regards,
Raghu.

-- 
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output

2017-11-11 Thread Pablo Rodriguez
On 11/11/2017 08:08 PM, N. Raghavendra wrote:
[...]
> $ ( context --nodates example.tex && cp example.pdf a && sleep 1 && \
> context --nodates example.tex && cp example.pdf b ) > /dev/null && \
> md5sum a b

I checked it with sha256sum ;-).

> Incidentally, is it common to use the contextjit command instead of
> context?  The only hint I found at the Wiki is at
> http://wiki.contextgarden.net/Running_Mark_IV#Experimental_speedup which
> says that the jit flag leads to quicker processing of the source.

I always use contextjit instead of context, because it’s faster.

Other than speed, I think there is no other difference.

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output

2017-11-11 Thread N. Raghavendra
At 2017-11-11T14:37:33+01:00, Pablo Rodriguez wrote:

> "contextjit  --nodates" is your friend here.
>
> No \pdf* commands are required.
>
> I hope it helps,

Dear Pablo,

Thanks for the answer.  It works.

--
$ cat example.tex

\starttext

Hello, world!

\stoptext

$ ( context --nodates example.tex && cp example.pdf a && sleep 1 && \
context --nodates example.tex && cp example.pdf b ) > /dev/null && \
md5sum a b

74497066154ebb4df7978719127f1a93  a
74497066154ebb4df7978719127f1a93  b
--

Incidentally, is it common to use the contextjit command instead of
context?  The only hint I found at the Wiki is at
http://wiki.contextgarden.net/Running_Mark_IV#Experimental_speedup which
says that the jit flag leads to quicker processing of the source.

Regards,
Raghu.

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reproducible PDF output

2017-11-11 Thread Pablo Rodriguez
On 11/11/2017 08:39 AM, N. Raghavendra wrote:
> I would like to have reproducible PDF output from ConTeXt documents.  I
> tried the suggestions at https://tex.stackexchange.com/a/313605/146025
> but they did not work.  The PDF output has information like
> "ConTeXt.Time", "CreateDate", etc., which depend on the time the source
> was processed at.  How do I suppress such temporal information, that is
> not supplied by the author, from the PDF output?

Hi Raghu,

"contextjit  --nodates" is your friend here.

No \pdf* commands are required.

I hope it helps,

Pablo


> Here are my two attempts:
> 
> --
> $ cat example.tex
> 
> \pdfinfoomitdate=1
> \pdftrailerid{}
> 
> \starttext
> 
> Hello, world!
> 
> \stoptext
> 
> $ ( context example.tex && cp example.pdf a && sleep 1 && \
> context example.tex && cp example.pdf b ) > /dev/null && \
> md5sum a b
> 
> 6a4ac7122bb502062e7ea87be52df166  a
> cac1ab3160003526e49da135d77e4eda  b
> --
> 
> --
> $ cat example.tex
> 
> \pdfvariable suppressoptionalinfo \numexpr
> 0
> +   1   % PTEX.FullBanner
> +   2   % PTEX.FileName
> +   4   % PTEX.PageNumber
> +   8   % PTEX.InfoDict
> +  16   % Creator
> +  32   % CreationDate
> +  64   % ModDate
> + 128   % Producer
> + 256   % Trapped
> + 512   % ID
> \relax
> 
> \starttext
> 
> Hello, world!
> 
> \stoptext
> 
> $ ( context example.tex && cp example.pdf a && sleep 1 && \
> context example.tex && cp example.pdf b ) > /dev/null && \
> md5sum a b
> 
> 2116aeec2b5bed2bfd02d16332700758  a
> 3204a1a127f139da8d960037a8ba0690  b
> --
> 
> Here is the reason I want reproducible builds.  I keep the source of my
> ConTeXt documents under version control.  I also keep their PDF output
> under version control because I often find, several years after a
> document was written, that I don't have the supporting files needed to
> process it; in such a case, until I get the missing supporting files, I
> can at least view the PDF output.  Now, even when the source has not
> changed, if I run context on it, the PDF output changes, and the version
> control system reports the PDF file as modified.  In such a situation, I
> have to register the change in the version control system, or revert the
> PDF file to its version.  I would like to avoid this extra work.
> 
> Thanks and regards,
> Raghu.
> 
> --
> N. Raghavendra , http://www.retrotexts.net/
> Harish-Chandra Research Institute, http://www.hri.res.in/
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> 


-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Reproducible PDF output

2017-11-10 Thread N. Raghavendra
I would like to have reproducible PDF output from ConTeXt documents.  I
tried the suggestions at https://tex.stackexchange.com/a/313605/146025
but they did not work.  The PDF output has information like
"ConTeXt.Time", "CreateDate", etc., which depend on the time the source
was processed at.  How do I suppress such temporal information, that is
not supplied by the author, from the PDF output?

Here are my two attempts:

--
$ cat example.tex

\pdfinfoomitdate=1
\pdftrailerid{}

\starttext

Hello, world!

\stoptext

$ ( context example.tex && cp example.pdf a && sleep 1 && \
context example.tex && cp example.pdf b ) > /dev/null && \
md5sum a b

6a4ac7122bb502062e7ea87be52df166  a
cac1ab3160003526e49da135d77e4eda  b
--

--
$ cat example.tex

\pdfvariable suppressoptionalinfo \numexpr
0
+   1   % PTEX.FullBanner
+   2   % PTEX.FileName
+   4   % PTEX.PageNumber
+   8   % PTEX.InfoDict
+  16   % Creator
+  32   % CreationDate
+  64   % ModDate
+ 128   % Producer
+ 256   % Trapped
+ 512   % ID
\relax

\starttext

Hello, world!

\stoptext

$ ( context example.tex && cp example.pdf a && sleep 1 && \
context example.tex && cp example.pdf b ) > /dev/null && \
md5sum a b

2116aeec2b5bed2bfd02d16332700758  a
3204a1a127f139da8d960037a8ba0690  b
--

Here is the reason I want reproducible builds.  I keep the source of my
ConTeXt documents under version control.  I also keep their PDF output
under version control because I often find, several years after a
document was written, that I don't have the supporting files needed to
process it; in such a case, until I get the missing supporting files, I
can at least view the PDF output.  Now, even when the source has not
changed, if I run context on it, the PDF output changes, and the version
control system reports the PDF file as modified.  In such a situation, I
have to register the change in the version control system, or revert the
PDF file to its version.  I would like to avoid this extra work.

Thanks and regards,
Raghu.

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___