Re: [NTG-context] lines in \setuptyping

2017-08-29 Thread Pablo Rodriguez
On 08/30/2017 02:50 AM, Aditya Mahajan wrote:
> On Tue, 29 Aug 2017, Hans Hagen wrote:
>> On 8/29/2017 9:02 PM, Pablo Rodriguez wrote:
>>> [...]
>>> In that case, what enables [lines=yes] in \setuptyping?
>> linebreaks
> 
> There is only a subtle difference between the two:

Many thanks for the info, Aditya.

Pablo


> \setuppapersize[A6]
> \showframe
> 
> \starttext
> \starttyping[lines=no]
> Here is some text with very very long line that goes on
> \stoptyping
> 
> \starttyping[lines=yes]
> Here is some text with very very long line that goes on
> \stoptyping
> 
> \stoptext

-- 
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] lines in \setuptyping

2017-08-29 Thread Pablo Rodriguez
On 08/29/2017 11:28 PM, Hans Hagen wrote:
> On 8/29/2017 9:02 PM, Pablo Rodriguez wrote:
>> [...]
>> In that case, what enables [lines=yes] in \setuptyping?
> linebreaks

Many thanks for your reply, Hans.

I’m afraid this isn’t what I get in the following sample:

\setuppapersize[A6]
\showframe

\starttext
\starttyping[lines=no]
Here is some text with
very very long line that

goes on
\stoptyping

\starttyping[lines=yes]
Here is some text with
very very long line that

goes on
\stoptyping
\stoptext

Exactly the same breaks in both cases using beta from 2017.08.29 19:35.

BTW, I realized that I can fake extra line breaks with a non-breaking space.

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] lines in \setuptyping

2017-08-29 Thread Aditya Mahajan

On Tue, 29 Aug 2017, Hans Hagen wrote:


On 8/29/2017 9:02 PM, Pablo Rodriguez wrote:

On 08/29/2017 07:25 PM, Hans Hagen wrote:

On 8/29/2017 4:43 PM, Pablo Rodriguez wrote:

[...]
I thought the lines key should display multiple lines when they are in
the code.

How should I got the multiple lines in the sample above?

empty lines are always collapsed


Many thanks for your reply, Hans.

In that case, what enables [lines=yes] in \setuptyping?

linebreaks


There is only a subtle difference between the two:

\setuppapersize[A6]
\showframe

\starttext
\starttyping[lines=no]
Here is some text with very very long line that goes on
\stoptyping

\starttyping[lines=yes]
Here is some text with very very long line that goes on
\stoptyping

\stoptext


Aditya
___
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] lines in \setuptyping

2017-08-29 Thread Hans Hagen

On 8/29/2017 9:02 PM, Pablo Rodriguez wrote:

On 08/29/2017 07:25 PM, Hans Hagen wrote:

On 8/29/2017 4:43 PM, Pablo Rodriguez wrote:

[...]
I thought the lines key should display multiple lines when they are in
the code.

How should I got the multiple lines in the sample above?

empty lines are always collapsed


Many thanks for your reply, Hans.

In that case, what enables [lines=yes] in \setuptyping?

linebreaks


-
  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] How to put a circle on top of a character

2017-08-29 Thread Hans Hagen

On 8/29/2017 9:56 PM, Otared Kavian wrote:

Hi Hans,

That’s wonderful! Indeed this is very handy and I’ll add it to the wiki.

However, before doing so, I would like to ask how is it possible to get the 
command act entirely in math mode, that is respecting the distances and the 
math fonts. Please see the attached output.

%%% begin interior-of-a-set.tex
\definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint]
\definemathover[symbol][interiorset]["2218]
\starttext

Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq 
\interiorset{K}$

\stoptext
%%% end interior-of-a-set.tex


I'll add an offset

\definemathstackers
  [\v!symbol]
  [\c!voffset=-.3\mathexheight,
   \c!hoffset=\zeropoint,
   \c!mathclass=ord,
   \c!topoffset=.4\mathemwidth, % poor man's italic correction
   \c!middlecommand=\mathematics]

but keep in mind, this is not really meant for accented math, more for 
special cases


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] How to put a circle on top of a character

2017-08-29 Thread Otared Kavian
Hi Hans,

That’s wonderful! Indeed this is very handy and I’ll add it to the wiki.

However, before doing so, I would like to ask how is it possible to get the 
command act entirely in math mode, that is respecting the distances and the 
math fonts. Please see the attached output. 

%%% begin interior-of-a-set.tex
\definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint]
\definemathover[symbol][interiorset]["2218]
\starttext

Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq 
\interiorset{K}$

\stoptext
%%% end interior-of-a-set.tex

Best regards: OK



interior-of-a-set.pdf
Description: Adobe PDF document


> On 29 Aug 2017, at 19:23, Hans Hagen  wrote:
> 
> On 8/29/2017 4:24 PM, Otared Kavian wrote:
>> Thanks Aditya,
>> Indeed the solution is already there in luatex-math.tex…
>> one can just use $\mathring{A}$ out of the box!
>> I see why I love ConTeXt :-)
> I checked one of the stacker sub-mechanisms and fixed / extended something:
> 
> \starttext
> 
> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint,color=red]
> 
> \definemathover[symbol][interiorset]["2217]
> 
> \startformula
>\mathover  [symbol]{"2217}   {A}
>\mathover  [symbol]{"2218}   {A}
>\mathover  [symbol]{"2219}   {A}
>\mathunder [symbol]   {"2217}{A}
>\mathunder [symbol]   {"2218}{A}
>\mathunder [symbol]   {"2219}{A}
> 
>\mathdouble[symbol]{"2217}{"2217}{A}
>\mathdouble[symbol]{"2218}{"2218}{A}
>\mathdouble[symbol]{"2219}{"2219}{A}
> 
>\mathring{A}
>\interiorset{A}^{\interiorset{A}^{\interiorset{A}}}
> \stopformula
> 
> \stoptext
> 
> Maybe it comes in handy for weird cases.
> 
> (not yet uploaded)
> 
> 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
> ___

___
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] lines in \setuptyping

2017-08-29 Thread Pablo Rodriguez
On 08/29/2017 07:25 PM, Hans Hagen wrote:
> On 8/29/2017 4:43 PM, Pablo Rodriguez wrote:
>> [...]
>> I thought the lines key should display multiple lines when they are in
>> the code.
>>
>> How should I got the multiple lines in the sample above?
> empty lines are always collapsed

Many thanks for your reply, Hans.

In that case, what enables [lines=yes] in \setuptyping?

I need this to provide a sample in a ConTeXt introduction of empty lines
collapse in ConTeXt.

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] lines in \setuptyping

2017-08-29 Thread Hans Hagen

On 8/29/2017 4:43 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

 \setuptyping[TEX][lines=yes]
 \starttext
 \startTEX
 code

 one line before


 two lines before



 three lines before
 \stopTEX
 \stoptext

I thought the lines key should display multiple lines when they are in
the code.

How should I got the multiple lines in the sample above?

empty lines are always collapsed

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] How to put a circle on top of a character

2017-08-29 Thread Hans Hagen

On 8/29/2017 4:24 PM, Otared Kavian wrote:

Thanks Aditya,

Indeed the solution is already there in luatex-math.tex…
one can just use $\mathring{A}$ out of the box!

I see why I love ConTeXt :-)

I checked one of the stacker sub-mechanisms and fixed / extended something:

\starttext

\definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint,color=red]

\definemathover[symbol][interiorset]["2217]

\startformula
\mathover  [symbol]{"2217}   {A}
\mathover  [symbol]{"2218}   {A}
\mathover  [symbol]{"2219}   {A}
\mathunder [symbol]   {"2217}{A}
\mathunder [symbol]   {"2218}{A}
\mathunder [symbol]   {"2219}{A}

\mathdouble[symbol]{"2217}{"2217}{A}
\mathdouble[symbol]{"2218}{"2218}{A}
\mathdouble[symbol]{"2219}{"2219}{A}

\mathring{A}
\interiorset{A}^{\interiorset{A}^{\interiorset{A}}}
\stopformula

\stoptext

Maybe it comes in handy for weird cases.

(not yet uploaded)

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
___

[NTG-context] Possible error in page-lay.mkiv

2017-08-29 Thread Rik Kabel

In page-lay.mkvi I see, at lines 1591–1594:

   \definepapersize
  [doubleoversized]
  [ \c!width=\dimexpr
   \paperheight+\layouttargetparameter\c!distance\relax,
   \c!height=\dimexpr2\paperwidth
   +\layouttargetparameter\c!distance\relax]


I would expect to see:

   \definepapersize
  [doubleoversized]
  [ \c!width=\dimexpr \paperwidth
   +\layouttargetparameter\c!distance\relax,
   \c!height=\dimexpr2\paperheight+\layouttargetparameter\c!distance\relax]


--
Rik
___
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] lines in \setuptyping

2017-08-29 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuptyping[TEX][lines=yes]
\starttext
\startTEX
code

one line before


two lines before



three lines before
\stopTEX
\stoptext

I thought the lines key should display multiple lines when they are in
the code.

How should I got the multiple lines in the sample above?

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] How to put a circle on top of a character

2017-08-29 Thread Otared Kavian
Thanks Aditya,

Indeed the solution is already there in luatex-math.tex… 
one can just use $\mathring{A}$ out of the box!

I see why I love ConTeXt :-)

Best regards: OK


> On 29 Aug 2017, at 15:34, Aditya Mahajan  wrote:
> 
> On Tue, 29 Aug 2017, Otared Kavian wrote:
> 
>> Hi,
>> 
>> How can I put a small circle on top of a character in math mode (for the 
>> curious this is needed when one defines the interior of a set…).
>> 
>> I tried the following, but the small circle is too far away from the 
>> character A. I am sure I had an ugly solution for this in plain TeX some 
>> years ago but I woul dlike to have an elegant solution in ConTeXt.
> 
> The proper solution in LaTeX is to use the \mathring accent (I think that 
> amssym package defines that). The accent should also be available in ConTeXt 
> (sorry cannot check right now, but a simple grep of char-def.lua should 
> confirm that).
> 
> Aditya___
> 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
> ___

___
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] How to put a circle on top of a character

2017-08-29 Thread Aditya Mahajan

On Tue, 29 Aug 2017, Otared Kavian wrote:


Hi,

How can I put a small circle on top of a character in math mode (for the 
curious this is needed when one defines the interior of a set…).

I tried the following, but the small circle is too far away from the 
character A. I am sure I had an ugly solution for this in plain TeX some 
years ago but I woul dlike to have an elegant solution in ConTeXt.


The proper solution in LaTeX is to use the \mathring accent (I think that 
amssym package defines that). The accent should also be available in 
ConTeXt (sorry cannot check right now, but a simple grep of char-def.lua 
should confirm that).


Aditya___
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] How to put a circle on top of a character

2017-08-29 Thread Otared Kavian
Hi,

How can I put a small circle on top of a character in math mode (for the 
curious this is needed when one defines the interior of a set…).

I tried the following, but the small circle is too far away from the character 
A. I am sure I had an ugly solution for this in plain TeX some years ago but I 
woul dlike to have an elegant solution in ConTeXt.

%%% begin interior-of-a-set.tex
\showgrid
\starttext

\mathtriplet{A}{\circ}{}

\startformula
\mathtriplet{A}{\circ}{}
\stopformula

\stoptext
%%% end interior-of-a-set.tex

Thanks for your help: OK
___
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] Currency - space delimiting thousands

2017-08-29 Thread Procházka Lukáš Ing .

That's great, Hans, thank you!

Lukas


On Tue, 29 Aug 2017 13:30:48 +0200, Hans Hagen  wrote:


On 8/29/2017 12:35 PM, Procházka Lukáš Ing. wrote:

Hello,

thank you, Hans...

On Mon, 28 Aug 2017 11:30:49 +0200, Hans Hagen  wrote:


On 8/27/2017 9:15 PM, Procházka Lukáš Ing. wrote:

Hello,

is there a built-in (Lua-?)numeric format to produce big numbers with
spaces delimiting thousands (widely used for currencies)?

E.g.:


\cldcontext{string.format("%[separate-thousands].0f", 1234567.0)} % To
give: "1 234 567.00"

there is some code deep down but it's in a module ... i'll move that to
the converters namespace


Could you provide a sample?

\starttext

\startluacode

 local t = {
 "1", "12", "123", "1234", "12345", "123456", "1234567",
"12345678", "123456789",
 "1.1", "12.12", "123.123", "1234.123", "1234.1234",
"12345.1234", "1234.12345", "12345.12345",
 "123456.123456", "1234567.1234567", "12345678.12345678",
"123456789.123456789",
 "0.2", "0.1234", "1234.0", "1234.00", "0.123456789",
"100.5",
 "0.80018", "10.80018", "100.80018", "1000.80018", "1.80018",
 }

 context.starttabulate { "" }
 context.TL()
 context.BC() context("method 1")
 context.BC() context("method 2")
 context.BC() context("method 3")
 context.NC()
 context.NR()
 context.ML()
 for i=1,#t do
 local ti = t[i]
 context.NC() context.setvalue("spaceddigitsmethod",1)
context.spaceddigits(ti)
 context.NC() context.setvalue("spaceddigitsmethod",2)
context.spaceddigits(ti)
 context.NC() context.setvalue("spaceddigitsmethod",3)
context.spaceddigits(ti)
 context.NC()
 context.NR()
 end
 context.LL()
 context.stoptabulate()

\stopluacode

\stoptext


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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

ThousDig.mkiv
Description: Binary data


ThousDig.pdf
Description: Adobe PDF document
___
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] Currency - space delimiting thousands

2017-08-29 Thread Hans Hagen

On 8/29/2017 12:35 PM, Procházka Lukáš Ing. wrote:

Hello,

thank you, Hans...

On Mon, 28 Aug 2017 11:30:49 +0200, Hans Hagen  wrote:


On 8/27/2017 9:15 PM, Procházka Lukáš Ing. wrote:

Hello,

is there a built-in (Lua-?)numeric format to produce big numbers with
spaces delimiting thousands (widely used for currencies)?

E.g.:


\cldcontext{string.format("%[separate-thousands].0f", 1234567.0)} % To
give: "1 234 567.00"

there is some code deep down but it's in a module ... i'll move that to
the converters namespace


Could you provide a sample?

\starttext

\startluacode

local t = {
"1", "12", "123", "1234", "12345", "123456", "1234567", 
"12345678", "123456789",
"1.1", "12.12", "123.123", "1234.123", "1234.1234", 
"12345.1234", "1234.12345", "12345.12345",
"123456.123456", "1234567.1234567", "12345678.12345678", 
"123456789.123456789",
"0.2", "0.1234", "1234.0", "1234.00", "0.123456789", 
"100.5",

"0.80018", "10.80018", "100.80018", "1000.80018", "1.80018",
}

context.starttabulate { "" }
context.TL()
context.BC() context("method 1")
context.BC() context("method 2")
context.BC() context("method 3")
context.NC()
context.NR()
context.ML()
for i=1,#t do
local ti = t[i]
context.NC() context.setvalue("spaceddigitsmethod",1) 
context.spaceddigits(ti)
context.NC() context.setvalue("spaceddigitsmethod",2) 
context.spaceddigits(ti)
context.NC() context.setvalue("spaceddigitsmethod",3) 
context.spaceddigits(ti)

context.NC()
context.NR()
end
context.LL()
context.stoptabulate()

\stopluacode

\stoptext


-
  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] Scite module and escape does not work anymore

2017-08-29 Thread Hans Hagen

On 8/29/2017 9:31 AM, Christoph Reller wrote:

Hi,

I noticed that the scite module (m-scite.mkiv) has undergone some 
changes recently. When using this module to highlight source code, then 
the escape mechanism does not seem to work anymore.


MWE:
\enabletrackers[buffers.visualize]
\usemodule[scite]
\setuptyping[TEX][escape={[[,]]}]
\starttext
\startTEX
\test[[\em test]]
\stopTEX
\stoptext

The reported error is:
[ctxlua]:221: attempt to index local 'specification' (a nil value)
stack traceback:
[ctxlua]:221: in function <[ctxlua]:220>
[C]: in function 'lpegmatch'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:283: in 
function 'n'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:511: in 
function 'visualize'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:760: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:752>

(...tail calls...)

Can this be fixed? Thank you in advance for your effort.

i'll intercept it (there are no escapes in scite mode)

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] Currency - space delimiting thousands

2017-08-29 Thread Procházka Lukáš Ing .

Hello,

thank you, Hans...

On Mon, 28 Aug 2017 11:30:49 +0200, Hans Hagen  wrote:


On 8/27/2017 9:15 PM, Procházka Lukáš Ing. wrote:

Hello,

is there a built-in (Lua-?)numeric format to produce big numbers with
spaces delimiting thousands (widely used for currencies)?

E.g.:


\cldcontext{string.format("%[separate-thousands].0f", 1234567.0)} % To
give: "1 234 567.00"

there is some code deep down but it's in a module ... i'll move that to
the converters namespace


Could you provide a sample?

Best regards,

Lukas


Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] Scite module and escape does not work anymore

2017-08-29 Thread Christoph Reller
Hi,

I noticed that the scite module (m-scite.mkiv) has undergone some changes
recently. When using this module to highlight source code, then the escape
mechanism does not seem to work anymore.

MWE:
\enabletrackers[buffers.visualize]
\usemodule[scite]
\setuptyping[TEX][escape={[[,]]}]
\starttext
\startTEX
\test[[\em test]]
\stopTEX
\stoptext

The reported error is:
[ctxlua]:221: attempt to index local 'specification' (a nil value)
stack traceback:
[ctxlua]:221: in function <[ctxlua]:220>
[C]: in function 'lpegmatch'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:283: in
function 'n'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:511: in
function 'visualize'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:760: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.lua:752>
(...tail calls...)

Can this be fixed? Thank you in advance for your effort.

Cheers,
Christoph
___
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
___