Re: [NTG-context] Emojis showing up in black instead of colours

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 7:08 PM, Vincent Hennebert via ntg-context wrote:
> Hi there,
>
> freshly upgraded LMTX installation. TwemojiMozilla.ttf downloaded from
> GitHub [1].
> [...]
> gives me pages of emojis, all black. According to what is described on
> Stackexchange, I should be getting colours. Am I doing something wrong?

Hi Vincent,

if you are using Evince, try Okular to check color display.

I experienced something similar in the past.

Just in case it helps,

Pablo
___
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] issue importing metadata from PDF

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 8:04 PM, Hans Hagen via ntg-context wrote:
> On 11/12/2021 7:24 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I’m afraid I don’t know how to extract the real information, I only
>> get:>>
>>table: 0x324279a3400
>
> then you're doing something wrong
> [...]
>  context(tostring(main.Info.ModDate))
>  context(tostring(main.Info.Title))
> [...]
> works quite okay

I think there is an issue with the PDF document, because it’s an issue
only with that PDF file I have. I can read the info from other files
pretty well.

I’m going to ask the author whether I may share the PDF document here,
so you can check it.

>> BTW, how can I use "\enabledirectives[backend.date=2021.02.01]" in Lua?
>
> grep is your friend ... (probably also in the cld manual)
>
> directives.enable('backend.date=2021.02.01')
>
> which of course doesn't mean that each one will work out as expected
> because timing matters

Sorry, I found in some document (or I found out it worked):

  directives.enable(directives.enable("backend.date", "no")

But I never thought that an equal sign could be the way.

Many thanks for your help,

Pablo
___
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] issue importing metadata from PDF

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 7:24 PM, Pablo Rodriguez via ntg-context wrote:

On 11/12/21 7:14 PM, Hans Hagen via ntg-context wrote:

They are tables because in lua objects are like tables. Doesn't

 context(tostring(main_doc.Info.ModDate))

work?


Many thanks for your reply, Hans.

I’m afraid I don’t know how to extract the real information, I only get:

   table: 0x324279a3400


then you're doing something wrong

\startluacode
local main = lpdf.epdf.load("ar.pdf")
context(tostring(main.Info.ModDate))
context(tostring(main.Info.Title))
local crap1 = tostring(main.Info.ModDate)
local crap2 = tostring(main.Info.Title)
context(crap1)
context(crap2)
\stopluacode

works quite okay


BTW, how can I use "\enabledirectives[backend.date=2021.02.01]" in Lua?


grep is your friend ... (probably also in the cld manual)

directives.enable('backend.date=2021.02.01')

which of course doesn't mean that each one will work out as expected 
because timing matters


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] issue importing metadata from PDF

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 7:14 PM, Hans Hagen via ntg-context wrote:
> They are tables because in lua objects are like tables. Doesn't
>
> context(tostring(main_doc.Info.ModDate))
>
> work?

Many thanks for your reply, Hans.

I’m afraid I don’t know how to extract the real information, I only get:

  table: 0x324279a3400

BTW, how can I use "\enabledirectives[backend.date=2021.02.01]" in Lua?

Many thanks for your help,

Pablo
___
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] Emojis showing up in black instead of colours

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 7:08 PM, Vincent Hennebert via ntg-context wrote:

Hi there,

freshly upgraded LMTX installation. TwemojiMozilla.ttf downloaded from
GitHub [1].

The following:
 \usemodule[fonts-emoji]
 
 \definefontfeature

   [overlay]
   [default]
   [ccmp=yes,
colr=yes,
dist=yes]
 
 \starttext
 
 {\definedfont[name:twemojimozilla*overlay] \ShowEmoji}
 
 \stoptext


gives me pages of emojis, all black. According to what is described on
Stackexchange, I should be getting colours. Am I doing something wrong?

Works here; what if you wipe the font cache?

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] issue importing metadata from PDF

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 6:53 PM, Pablo Rodriguez via ntg-context wrote:

Hans,

I have a PDF document (which I didn’t generate) and it contains the
following objects:

   1 0 obj
   <<
 /Title 272 0 R
 /Producer 273 0 R
 /Creator 274 0 R
 /CreationDate 275 0 R
 /ModDate 275 0 R
   >>
   endobj

   272 0 obj
   (This is an important title)
   endobj

   273 0 obj
   (Mac OS X 10.12.1 Quartz PDFContext)
   endobj

   274 0 obj
   (Keynote)
   endobj

   275 0 obj
   (D:20161108071428Z00'00')
   endobj

I cannot import these objects, since they are tables instead of strings,
after checking that with:

   \startluacode
   function document.transfer_metadata(name)
 local main_doc = lpdf.epdf.load(name)
 context(type(main_doc.Info.ModDate))
 context(type(main_doc.Info.Title))
   end
   \stopluacode

Would it be possible that LMTX can deal with these objects and import
them as strings?


They are tables because in lua objects are like tables. Doesn't

   context(tostring(main_doc.Info.ModDate))

work?

-
  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] Problem with Google Font 'Vollkorn'

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 6:23 PM, Michael Urban via ntg-context wrote:
> I downloaded the Google free font ‘Vollkorn’ 
> (https://fonts.google.com/specimen/Vollkorn) into an appropriate directory 
> and ran
>  mtxrun --script font --reload

Hi Michael,

I would rather wipe out the cache and start again:

 mtxrun --script cache --erase && mtxrun --generate

I had problems reloading fonts on Linux, so I always run that after
updating ConTeXt or adding a new font.

Just in case it might help,

Pablo
___
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] Emojis showing up in black instead of colours

2021-11-12 Thread Vincent Hennebert via ntg-context
Hi there,

freshly upgraded LMTX installation. TwemojiMozilla.ttf downloaded from
GitHub [1].

The following:
\usemodule[fonts-emoji]

\definefontfeature
  [overlay]
  [default]
  [ccmp=yes,
   colr=yes,
   dist=yes]

\starttext

{\definedfont[name:twemojimozilla*overlay] \ShowEmoji}

\stoptext

gives me pages of emojis, all black. According to what is described on
Stackexchange, I should be getting colours. Am I doing something wrong?

Thanks,
Vincent

[1] https://github.com/mozilla/twemoji-
colr/releases/download/v0.6.0/TwemojiMozilla.ttf
[2] https://tex.stackexchange.com/questions/466442/context-using-emoji-
fonts-without-color

___
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] rule beneath chapter number

2021-11-12 Thread Thomas A. Schmitz via ntg-context


On 11/12/21 18:13, Henning Hraban Ramm via ntg-context wrote:

You’re right, tabular numbers are nonproportional. I meant versal (“normal”) 
numbers in opposite of oldstyle (mediaeval) numbers.


I think there are two mutually exclusive feature pairs that you're 
mixing up:


lnum vs onum: lining numbers versus old style numbers; "lining" having 
no descenders, but sitting on the line.


pnum vs tnum: proportional vs tabulate numbers. As the name suggests, 
the latter look better where numbers are vertically aligned because each 
numeral will take exactly the same space, so tables, but also footnotes 
etc. The former of course will look better in running text.


Add to this that numbers can also be subscript or superscript. Some very 
extensive professional fonts have surprising combinations of these 
features, so in the end, one has to do what you did: fiddle with 
featuresets until the result looks right.


Thomas
___
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] Problem with Google Font 'Vollkorn'

2021-11-12 Thread Henning Hraban Ramm via ntg-context


> Am 12.11.2021 um 18:23 schrieb Michael Urban via ntg-context 
> :
> 
> I downloaded the Google free font ‘Vollkorn’ 
> (https://fonts.google.com/specimen/Vollkorn) into an appropriate directory 
> and ran 
> mtxrun --script font --reload 
> all went well, and the Vollkorn truetype fonts show up in the output of 
> mtxrun --script font --list --all   .
> 
> However, the following input:
> 
> \starttext
> \definedfont[name:vollkornregular*default at 14pt]
> \input tufte
> \stoptext
> 
> fails, with the following output:
> system   > ConTeXt  ver: 2020.03.10 14:44 MKIV beta  fmt: 2020.6.8  int: 
> english/english
> 
> fonts   > otf loading > loading 
> 'MYPATH/texmf/fonts/truetype/google/Vollkorn-Regular.ttf', hash 
> 'vollkorn-regular'
> fonts   > otf loading > loading failed due to read error
> fonts   > defining > forced type 'ttf' of 'Vollkorn-Regular' not found
> fonts   > defining > font with asked name 'Vollkorn-Regular' is not 
> found using lookup 'name'
> fonts   > defining > unknown font 'Vollkorn-Regular', loading aborted
> 
> This is on Mac OSX.   I don't recall this problem coming up before.  
> Evidently the difficulty is that it is expecting an otf font and is 
> confounded by the truetype file.   
> 
> The ConTeXt font system always bewilders me, but this time it's pretty 
> specific.  Help?
> 

For me it works on MacOS 10.14 and ConTeXt LMTX 2021.10.28.

Does your list look like mine?:

$ mtxrun --script fonts --list --all --pattern=vollkorn
identifierfamilyname   fontname  filename   
subfont   instances

vollkornblack vollkorn vollkornblack 
Vollkorn-Black.ttf
vollkornblackitalic   vollkorn vollkornblackitalic   
Vollkorn-BlackItalic.ttf
vollkornbold  vollkorn vollkornbold  
Vollkorn-Bold.ttf
vollkornbolditalicvollkorn vollkornbolditalic
Vollkorn-BoldItalic.ttf
vollkornextrabold vollkorn vollkornextrabold 
Vollkorn-ExtraBold.ttf
vollkornextrabolditalic   vollkorn vollkornextrabolditalic   
Vollkorn-ExtraBoldItalic.ttf
vollkornitalicvollkorn vollkornitalic
Vollkorn-Italic.ttf
vollkornmediumvollkorn vollkornmedium
Vollkorn-Medium.ttf
vollkornmediumitalic  vollkorn vollkornmediumitalic  
Vollkorn-MediumItalic.ttf
vollkornnormalvollkorn vollkornitalic
Vollkorn-Italic.ttf
vollkornregular   vollkorn vollkornregular   
Vollkorn-Regular.ttf
vollkornsemibold  vollkorn vollkornsemibold  
Vollkorn-SemiBold.ttf
vollkornsemibolditalicvollkorn vollkornsemibolditalic
Vollkorn-SemiBoldItalic.ttf

Hraban
___
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] issue importing metadata from PDF

2021-11-12 Thread Pablo Rodriguez via ntg-context
Hans,

I have a PDF document (which I didn’t generate) and it contains the
following objects:

  1 0 obj
  <<
/Title 272 0 R
/Producer 273 0 R
/Creator 274 0 R
/CreationDate 275 0 R
/ModDate 275 0 R
  >>
  endobj

  272 0 obj
  (This is an important title)
  endobj

  273 0 obj
  (Mac OS X 10.12.1 Quartz PDFContext)
  endobj

  274 0 obj
  (Keynote)
  endobj

  275 0 obj
  (D:20161108071428Z00'00')
  endobj

I cannot import these objects, since they are tables instead of strings,
after checking that with:

  \startluacode
  function document.transfer_metadata(name)
local main_doc = lpdf.epdf.load(name)
context(type(main_doc.Info.ModDate))
context(type(main_doc.Info.Title))
  end
  \stopluacode

Would it be possible that LMTX can deal with these objects and import
them as strings?

Many thanks for your help,

Pablo
___
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] Problem with Google Font 'Vollkorn'

2021-11-12 Thread Michael Urban via ntg-context
I downloaded the Google free font ‘Vollkorn’ 
(https://fonts.google.com/specimen/Vollkorn) into an appropriate directory and 
ran 
 mtxrun --script font --reload 
all went well, and the Vollkorn truetype fonts show up in the output of mtxrun 
--script font --list --all   .

However, the following input:

\starttext
\definedfont[name:vollkornregular*default at 14pt]
\input tufte
\stoptext

fails, with the following output:
system   > ConTeXt  ver: 2020.03.10 14:44 MKIV beta  fmt: 2020.6.8  int: 
english/english
  
fonts   > otf loading > loading 
'MYPATH/texmf/fonts/truetype/google/Vollkorn-Regular.ttf', hash 
'vollkorn-regular'
fonts   > otf loading > loading failed due to read error
fonts   > defining > forced type 'ttf' of 'Vollkorn-Regular' not found
fonts   > defining > font with asked name 'Vollkorn-Regular' is not 
found using lookup 'name'
fonts   > defining > unknown font 'Vollkorn-Regular', loading aborted

This is on Mac OSX.   I don't recall this problem coming up before.  Evidently 
the difficulty is that it is expecting an otf font and is confounded by the 
truetype file.   

The ConTeXt font system always bewilders me, but this time it's pretty 
specific.  Help?




___
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] rule beneath chapter number

2021-11-12 Thread Henning Hraban Ramm via ntg-context


> Am 12.11.2021 um 09:47 schrieb jbf via ntg-context :
> 
> In fact, in this instance, adjusting the roffset solved the problem, and I 
> didn't see any marked change using the proportional tabular (monospaced?) 
> fontfeature you suggest, though it is an interesting point to bear in mind in 
> the future. I'd always thought of proportional versus tabular rather than 
> proportional + tabular.

You’re right, tabular numbers are nonproportional. I meant versal (“normal”) 
numbers in opposite of oldstyle (mediaeval) numbers.

I often use the Alegreya fonts, and they default to oldstyle numbers.


> Am 12.11.2021 um 14:47 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm via ntg-context schrieb am 12.11.2021 um 09:09:
>> \definefontfeature[ptabnum][default][
>>   onum=no,pnum=yes,tnum=yes,
>> ]
> 
> You can't activate pnum and tnum at the same time, only one is possible.

I don’t doubt that you’re right. I was probably tinkering until the result 
fitted my needs. Or the font has wrong features...


Hraban
___
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] spreadsheet product of two cells in current row

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 4:56 PM, juh via ntg-context wrote:

Am Fri, Nov 12, 2021 at 02:42:13PM +0100 schrieb Hans Hagen:

educational tip:

\starttext

\startluacode
 context("%M",1234567.89)
 context.par()
 context("%m",1234567.89)
\stopluacode

\stoptext


Nice, so I can use that instead:

\startcell[align=flushright] @ "0.2M €" 70 \stopcell

I was looking for the formatting strings, but could not find them. I
guess this is a lua thing? String formatting in lua?


a context thing (in cld manual)


-
  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] spreadsheet product of two cells in current row

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 5:15 PM, juh via ntg-context wrote:

Am Fri, Nov 12, 2021 at 04:56:51PM +0100 schrieb juh via ntg-context:

Am Fri, Nov 12, 2021 at 02:42:13PM +0100 schrieb Hans Hagen:

educational tip:

\starttext

\startluacode
 context("%M",1234567.89)
 context.par()
 context("%m",1234567.89)
\stopluacode

\stoptext


Nice, so I can use that instead:

\startcell[align=flushright] @ "0.2M €" 70 \stopcell



Ok. This shot was too fast. I give up. ;-)

M or m depending on what you want to achieve

-
  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] spreadsheet product of two cells in current row

2021-11-12 Thread juh via ntg-context
Am Fri, Nov 12, 2021 at 04:56:51PM +0100 schrieb juh via ntg-context:
> Am Fri, Nov 12, 2021 at 02:42:13PM +0100 schrieb Hans Hagen:
> > educational tip:
> > 
> > \starttext
> > 
> > \startluacode
> > context("%M",1234567.89)
> > context.par()
> > context("%m",1234567.89)
> > \stopluacode
> > 
> > \stoptext
> 
> Nice, so I can use that instead:
> 
> \startcell[align=flushright] @ "0.2M €" 70 \stopcell
> 

Ok. This shot was too fast. I give up. ;-)

juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] spreadsheet product of two cells in current row

2021-11-12 Thread juh via ntg-context
Am Fri, Nov 12, 2021 at 02:42:13PM +0100 schrieb Hans Hagen:
> educational tip:
> 
> \starttext
> 
> \startluacode
> context("%M",1234567.89)
> context.par()
> context("%m",1234567.89)
> \stopluacode
> 
> \stoptext

Nice, so I can use that instead:

\startcell[align=flushright] @ "0.2M €" 70 \stopcell

I was looking for the formatting strings, but could not find them. I
guess this is a lua thing? String formatting in lua?

juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] spreadsheet product of two cells in current row

2021-11-12 Thread juh via ntg-context
Am Fri, Nov 12, 2021 at 02:33:45PM +0100 schrieb Wolfgang Schuster:
> Not without a complete minimal example.

Sorry, of course.


\usemodule[spreadsheet]
\setupspreadsheet
  [
period={,},
comma={.},
split=yes,
  ]

\startspreadsheettable[test][frame=off]

\startrow[topframe=on,bottomframe=on]
\startcell[align=flushleft] "Anz." \stopcell
\startcell[align=flushleft, width=9cm] "Beschreibung" \stopcell
\startcell[align=flushleft] "MwSt." \stopcell
\startcell[align=flushright] "Einzeln" \stopcell
\startcell[align=flushright] "Gesamt" \stopcell
\stoprow

\startrow
\startcell[align=center] 3 \stopcell
\startcell[align=flushleft] "Job 1, Job 2 und Job 3." \stopcell
\startcell[align=flushright] @ "0.2f \percent" 19 \stopcell
\startcell[align=flushright] @ "0.2f €" 70 \stopcell
\startcell[align=flushright] @ "0.2f €" (A[row] * D[row]) \stopcell
\stoprow
\stopspreadsheettable
\stoptext

Anz. MwSt.

And the comma separated enumeration under "Beschreibung".


TIA
juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] rule beneath chapter number

2021-11-12 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 12.11.2021 um 09:09:

Am 12.11.2021 um 06:26 schrieb jbf via ntg-context :

It does seem, though, just using '1' as the chapter number for the moment, that 
the underline is not quite centered; almost but not quite. So am playing around 
with the roffset to adjust that.

It might make sense to use a different number style for paginations – most 
fonts set unproportional tabular numbers as default, in this case proportional 
tabular numbers make sense. That will affect the spacing around the 1 – don’t 
know if it solves your case.

Example from one of my projects:

\definefontfeature[ptabnum][default][
   onum=no,pnum=yes,tnum=yes,
]


You can't activate pnum and tnum at the same time, only one is possible.

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] spreadsheet product of two cells in current row

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 2:27 PM, juh via ntg-context wrote:

Once again me,

I set this

\setupspreadsheet
   [
 period={,},
 comma={.},
 split=yes,
   ]

to get german numbers in my invoice like: 10.000,00 EUR.

educational tip:

\starttext

\startluacode
context("%M",1234567.89)
context.par()
context("%m",1234567.89)
\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] spreadsheet product of two cells in current row

2021-11-12 Thread Wolfgang Schuster via ntg-context

juh via ntg-context schrieb am 12.11.2021 um 14:27:

Once again me,

I set this

\setupspreadsheet
   [
 period={,},
 comma={.},
 split=yes,
   ]

to get german numbers in my invoice like: 10.000,00 EUR.

The drawback is that I can't use a normal period and comma in the normal
text.

Any hints?


Not without a complete minimal example.

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] spreadsheet product of two cells in current row

2021-11-12 Thread juh via ntg-context
Once again me,

I set this 

\setupspreadsheet
  [
period={,},
comma={.},
split=yes,
  ]

to get german numbers in my invoice like: 10.000,00 EUR.

The drawback is that I can't use a normal period and comma in the normal
text.

Any hints?

juh


signature.asc
Description: PGP signature
___
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] spreadsheet product of two cells in current row

2021-11-12 Thread juh via ntg-context
Thank you Wolfgang for your reply.

I was lucky in the meantime.

Am Fri, Nov 12, 2021 at 12:55:59PM +0100 schrieb Wolfgang Schuster:
> juh via ntg-context schrieb am 12.11.2021 um 12:20:
> > Dear all,
> > 
> > I thought I could find my way through the spreadsheet documentation to
> > make my invoices.
> > 
> > While it is simple to calculate the sum or the product of two cells if
> > you know that they are A[2] and B[2] I can't find the solution to access
> > cell A and B *on the same row*.
> > 
> > Amount | Single | Sum
> > 2  | 5  | 10 <-- A[currentrow] * B[currentrow] does not work
> > 3  | 4  | 12
> > 
> > Sum   22
> > 
> > The rows come from a script and there might be several items.
> > 
> > Any hints?
> 

I found "row"

so:

\startcell @ "0.2f EUR" (A[row] * D[row]) \stopcell

gives the product of cell A and D in the current row.

And I even found row-n

\startcell @ "0.2f EUR" 0.19 * E[row-1] \stopcell

gives the VAT of cell E in the row before.

and:


\startcell[align=flushright] @ "0.2f EUR" E[row-1]+E[row-2] \stopcell

add the numbers of cell E in the two rows before.

It works, but is there a better approach?

juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] spreadsheet product of two cells in current row

2021-11-12 Thread Wolfgang Schuster via ntg-context

juh via ntg-context schrieb am 12.11.2021 um 12:20:

Dear all,

I thought I could find my way through the spreadsheet documentation to
make my invoices.

While it is simple to calculate the sum or the product of two cells if
you know that they are A[2] and B[2] I can't find the solution to access
cell A and B *on the same row*.

Amount | Single | Sum
2  | 5  | 10 <-- A[currentrow] * B[currentrow] does not work
3  | 4  | 12

Sum   22

The rows come from a script and there might be several items.

Any hints?


Do you have a example because I have no problem to access values in the 
current row.


\usemodule[spreadsheet]

\starttext

\bTABLE
    \bTR
    \bTD Amount \eTD
    \bTD Single \eTD
    \bTD Sum \eTD
    \eTR
    \bTR
    \bTD \getspr{2} \eTD
    \bTD \getspr{5} \eTD
    \bTD \getspr{A[2] * B[2]} \eTD
    \eTR
    \bTR
    \bTD \getspr{3} \eTD
    \bTD \getspr{4} \eTD
    \bTD \getspr{A[3] * B[3]} \eTD
    \eTR
\eTABLE

\startspreadsheettable
    \startrow
    \startcell "Amount" \stopcell
    \startcell "Single" \stopcell
    \startcell "Sum" \stopcell
    \stoprow
    \startrow
    \startcell 2 \stopcell
    \startcell 5 \stopcell
    \startcell A[2] * B[2] \stopcell
    \stoprow
    \startrow
    \startcell 3 \stopcell
    \startcell 4 \stopcell
    \startcell A[3] * B[3] \stopcell
    \stoprow
\stopspreadsheettable

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


[NTG-context] spreadsheet product of two cells in current row

2021-11-12 Thread juh via ntg-context
Dear all,

I thought I could find my way through the spreadsheet documentation to
make my invoices.

While it is simple to calculate the sum or the product of two cells if
you know that they are A[2] and B[2] I can't find the solution to access
cell A and B *on the same row*. 

Amount | Single | Sum
2  | 5  | 10 <-- A[currentrow] * B[currentrow] does not work
3  | 4  | 12

Sum   22

The rows come from a script and there might be several items.

Any hints?
 
juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] Synonyms feature request

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 4:22 AM, Rik Kabel via ntg-context wrote:

Hello developers,

Is it possible to get a mechanism to reset and setup synonyms by way 
(page, part, chapter, section, ...)?


This is not a high-priority request.

I currently accomplish this in the after key of chapter setuphead 
definitions. However, it seems cleaner to define it when the synonym 
list is defined instead of adding a resetshownsynonyms and setsynonyms 
to the chapter definition for every new synonym list.

I'll send you something to test (these are the relative easy things ...)


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] rule beneath chapter number

2021-11-12 Thread jbf via ntg-context
In fact, in this instance, adjusting the roffset solved the problem, and 
I didn't see any marked change using the proportional tabular 
(monospaced?) fontfeature you suggest, though it is an interesting point 
to bear in mind in the future. I'd always thought of proportional versus 
tabular rather than proportional + tabular.


Julian

On 12/11/21 7:09 pm, Henning Hraban Ramm via ntg-context wrote:

\definefontfeature[ptabnum][default][
   onum=no,pnum=yes,tnum=yes,
]

___
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] rule beneath chapter number

2021-11-12 Thread Henning Hraban Ramm via ntg-context


> Am 12.11.2021 um 06:26 schrieb jbf via ntg-context :
> 
> It does seem, though, just using '1' as the chapter number for the moment, 
> that the underline is not quite centered; almost but not quite. So am playing 
> around with the roffset to adjust that.

It might make sense to use a different number style for paginations – most 
fonts set unproportional tabular numbers as default, in this case proportional 
tabular numbers make sense. That will affect the spacing around the 1 – don’t 
know if it solves your case.

Example from one of my projects:

\definefontfeature[ptabnum][default][
  onum=no,pnum=yes,tnum=yes,
]
\definefontfeature[tabnum][default][
  onum=no,pnum=no,tnum=yes,
]


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