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] new module seeking approval: handlecsv

2017-11-11 Thread Pablo Rodriguez
On 11/11/2017 08:01 PM, Mojca Miklavec wrote:
> On 8 November 2017 at 20:46, Pablo Rodriguez wrote:
>> [...] 
>> It can handle different .csv files to data merging for document
>> automatic generation.
> 
> It would be helpful to figure out what exactly is missing in the
> built-in module written by Hans. Maybe that module could be upgraded
> as well?

If the module is
tex/texmf-context/tex/context/modules/mkiv/m-database.mkiv, I think this
is only intended for typesetting the database contents.

handlecsv enables document merging. With the first (stupid) sample that
comes to my mind:

\starttext
\startbuffer
\Name\ has completed the course {\em\Course}, achieving the
following grade: \Grade.\page
\stopbuffer
\doloopforall{\getbuffer}
\stoptext

Having to do that with before and after options would be a pain (in my
opinion).

You may page through
https://github.com/ousia/handlecsv/blob/context-suite/doc/context/third/handlecsv/handlecsv.pdf
to see the features.

I wonder whether it makes sense to extend the built-in module by Hans.
If this wasn’t needed before, it may be not needed now. And Hans’ time
is most precious to devote to other issues ;-).

BTW, handlecsv is coded by Jaroslav Hajtmar. I only release the module
to the public.

Many thanks for your help,

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 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] new module seeking approval: handlecsv

2017-11-11 Thread Mojca Miklavec
On 8 November 2017 at 20:46, Pablo Rodriguez wrote:
> Dear Mojca,
>
> I have submitted the handlecsv module to
> https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=86.

Thank you. I believe we would need to have it accessible as an
extracted folder called t-handlecvs under

https://modules.contextgarden.net/dl/

Taco should probably figure out how to fix that.

> It can handle different .csv files to data merging for document
> automatic generation.

It would be helpful to figure out what exactly is missing in the
built-in module written by Hans. Maybe that module could be upgraded
as well?

> Would it be possible that it could be included in the ConTeXt Suite?

It would be helpful if Taco could fix another issue, see above.

Mojca
___
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] problems with XML export

2017-11-11 Thread Pablo Rodriguez
On 11/11/2017 06:30 PM, Henning Hraban Ramm wrote:
> Here are a few problems that I encountered in my current ePub projects:
> 
> * \color[]{} leaves no trace in export.

Hi Hraban,

this works with PDF, it should work with ePub:

  \definehighlight[read][color=red, style=\sc]
  \starttext
  \starthighlight[read] rot\stophighlight
  \stoptext

I guess you have to use this instead of \color[]{}.

> * As soon as I activate export, my PDFs get two pages more, i.e.
> page breaking changes somehow, I didn’t yet track how.

Without minimal sample and invocation command, it is rather hard to
reproduce the issue.

> * For quotability, I’d like to set markers in my HTML, where the print
> version has page breaks. But the exported XML doesn’t contain anything
> like that. Is it possible to add?

Just out of curiosity, I wonder how this could be achieved.

Do you have other approach than the following?

1. Complete PDF compilation with saving of page breaks.

2. Add the markers in XML code generation.

> * Errors in exported XML:
> [...]
> (2)
> \def\SC#1{\dostarttagged{highlight}{scaps}{\sc\lowercase{#1}}\dostoptagged}
> [...]
> -  breaks  (maybe my \SC definition is bad,
> but nobody answered to my according question)

Try the approach proposed above. I think it should work.

I hope it helps,

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
___

[NTG-context] problems with XML export

2017-11-11 Thread Henning Hraban Ramm
Here are a few problems that I encountered in my current ePub projects:

* \color[]{} leaves no trace in export.

* As soon as I activate export, my PDFs get two pages more, i.e. page breaking 
changes somehow, I didn’t yet track how.

* For quotability, I’d like to set markers in my HTML, where the print version 
has page breaks. But the exported XML doesn’t contain anything like that. Is it 
possible to add?

* Some spacing like \, gets lost. I’m sure there’s an appropriate Unicode 
glyph. Would it be possible to add that?

* Errors in exported XML:

(1)

Brecht, Bertolt
53,–,88
   

Here we have a register entry with (only) a page range. There should be no 
 (it’s unneccessarily complicated to filter that out if 
there’s also a ).
I.e. text content has ",–," instead of just "–".

(2)
\def\SC#1{\dostarttagged{highlight}{scaps}{\sc\lowercase{#1}}\dostoptagged}

\starttabulate[|lw(1cm)|p|]
\NC AFG\NC \SC{SED}, Akademie für Gesellschaftswissenschaften, 
Schriftenverzeichnis\NC\NR
\NC BER\crlf\color[white]{dummy}\NC Hochschule der Deutschen Gewerkschaften 
\quotation{Fritz Heckert} in Bernau, Schriftenverzeichnis\NC\NR
\stoptabulate

leads to


 
  AFG
  
sed, Akademie für 
Gesellschaftswissenschaften, Schriftenverzeichnis 

 
  BERdummy
   Hochschule der Deutschen Gewerkschaften »Fritz 
Heckert« in Bernau, 
Schriftenverzeichnis
 


-  is nonsense
-  breaks  (maybe my \SC definition is bad, but nobody 
answered to my according question)


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 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
___