Re: [NTG-context] printing the current date

2021-01-27 Thread Wolfgang Schuster

Hans Hagen schrieb am 27.01.2021 um 22:31:

On 1/27/2021 6:28 PM, Peter Münster wrote:

On Sun, Jan 10 2021, Peter Münster wrote:


\currentdate% same as \date, but I would expect the day of today...


Should I fill a bug-report on the tracker?
Perhaps also for the missing space after \date[]?


Reporting here is faster. Can (lazy me) Wolfgang confirm the issue?



1. Wrong date

The \date command has wrong/weird grouping which makes global changes 
for the day, month and year.


\permanent\tolerant\protected\def\date[#1]#*[#2]%
  {\dontleavehmode
   \ifparameter#1\or
 \begingroup
 \letdummyparameter\c!d\normalday
 \letdummyparameter\c!m\normalmonth
 \letdummyparameter\c!y\normalyear
 \getdummyparameters[#1]%
 \normalexpanded
   {\endgroup
\normalday  \number\directdummyparameter\c!d\relax
\normalmonth\number\directdummyparameter\c!m\relax
\normalyear \number\directdummyparameter\c!y\relax}%
   \fi
   ...}


2. Missing space

When not all optional arguments are used the space after the last given 
argument is gobbled. This was normal behavior for a long time until you 
changed the code in MkIV to keep them.



\tolerant\def\foo[#1]#*[#2]%
  {[#1][#2]}

\starttext

a \foo [1] b

a \foo [1] [2] b

\stoptext


Wolfgang
___
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] printing the current date

2021-01-27 Thread Hans Hagen

On 1/27/2021 6:28 PM, Peter Münster wrote:

On Sun, Jan 10 2021, Peter Münster wrote:


\currentdate% same as \date, but I would expect the day of today...


Should I fill a bug-report on the tracker?
Perhaps also for the missing space after \date[]?

Reporting here is faster. Can (lazy me) Wolfgang confirm the issue?

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] externalizing TikZ graphics

2021-01-27 Thread Henning Hraban Ramm

> Am 25.01.2021 um 20:08 schrieb Henning Hraban Ramm :
> 
> """
> \startmodule[tikzfilter]
> 
> \usemodule[filter]
> % docs see https://github.com/adityam/filter
> 
> \def\TIKZTEMP{tikztemp} % name of folder for TikZ/buffer files
> 
> \startbuffer[tikz::before]
> \environment env_world % contains font setup etc.
> \environment env_TikZ % contains TikZ settings
> 
> \startpagefigure

Wrong, I need \startTEXpage

> \starttikzpicture[thick,domain=-90:90]% TODO: make this configurable

Now, how can I forward options from
\starttix[anything]
to this place?

> \stopbuffer
> 
> \startbuffer[tikz::after]
> \stoptikzpicture
> \stoppagefigure

\stopTEXpage

> \stopbuffer
> 
> \define[1]\ParseTikZFile% #1 is the name of the output file
>  {\ctxlua{thirddata.parsetikzfile("#1")}}
> 
> \startluacode
> thirddata = thirddata or {}
> 
> -- create temp folder if missing
> if not lfs.isdir("\TIKZTEMP") then
>   lfs.mkdir("\TIKZTEMP")
> end
> 
> function thirddata.parsetikzfile(name)
>   -- name is like \TIKZTEMP/mainfile-temp-tikz-21.pdf
>   logs.report("TIKZFILTER","name='" .. name .. "'")
>   context("\\externalfigure[" .. name .. "]")
> end
> \stopluacode
> 
> \defineexternalfilter[tikz][
>  cache=yes,
>  purge=no,
>  directory=\TIKZTEMP,
>  bufferbefore={tikz::before},
>  bufferafter={tikz::after},
>  readcommand=\ParseTikZFile,
>  output={\externalfilterbasefile.pdf},
> % ConTeXt never writes results to other directories
>  filtercommand={context --batchmode --once --autopdf=auto 
> --result=\externalfilterbasefile\space \externalfilterinputfile\space && mv 
> \externalfilterbasefile.pdf\space \TIKZTEMP/},
> ]
> 
> \stopmodule



___
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] printing the current date

2021-01-27 Thread Peter Münster
On Sun, Jan 10 2021, Peter Münster wrote:

> \currentdate% same as \date, but I would expect the day of today...

Should I fill a bug-report on the tracker?
Perhaps also for the missing space after \date[]?

TIA,
-- 
   Peter
___
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] understanding \startTEXpage

2021-01-27 Thread Peter Münster
Hi,

According to https://wiki.contextgarden.net/Command/startTEXpage it
"starts a page that fits its contents exactly".

But it seems, that part of the content is cropped here:
\startTEXpage X \hskip20cm X \stopTEXpage

No problem with 10cm instead of 20cm...

Is this a bug or expected behaviour?

TIA,
-- 
   Peter
___
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] --extra=combine no more working

2021-01-27 Thread Peter Münster
On Wed, Jan 27 2021, Hans Hagen wrote:

> then it's an invalid pdf ... maybe you can use QPDF to fix those files

Yes, indeed, QPDF fixes it.
So my old ConTeXt-version is no more needed, thanks!

-- 
   Peter
___
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] --extra=combine no more working

2021-01-27 Thread Hans Hagen

On 1/27/2021 12:44 PM, Peter Münster wrote:

On Wed, Jan 27 2021, Hans Hagen wrote:


Works here so how do these pdf files look?


I've just checked with other PDF-files, and it works ok here too.
But unfortunately it does not work with PDF-files from my bank, that I
cannot share here.
There is no such problem with context-2017.08.29-19:35.

The files start like this:

--8<---cut here---start->8---
%PDF-1.4
%\200\201\202\203\204
76 0 obj
<<
/Length 3961/Filter/FlateDecode



stream
--8<---cut here---end--->8---

then it's an invalid pdf ... maybe you can use QPDF to fix those files

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] --extra=combine no more working

2021-01-27 Thread Peter Münster
On Wed, Jan 27 2021, Hans Hagen wrote:

> Works here so how do these pdf files look?

I've just checked with other PDF-files, and it works ok here too.
But unfortunately it does not work with PDF-files from my bank, that I
cannot share here.
There is no such problem with context-2017.08.29-19:35.

The files start like this:

--8<---cut here---start->8---
%PDF-1.4
%\200\201\202\203\204
76 0 obj
<<
/Length 3961/Filter/FlateDecode
>>
stream
--8<---cut here---end--->8---

-- 
   Peter
___
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] --extra=combine no more working

2021-01-27 Thread Hans Hagen

On 1/26/2021 10:36 PM, Peter Münster wrote:

context --extra=combine file-1.pdf file-2.pdf" doesn't work


Works here so how do these pdf files look?

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
___