Re: [NTG-context] Table, xtable and lua

2018-11-10 Thread Henri Menke


On 11/11/18 12:33 PM, Fabrice Couvreur wrote:
> Hi,
> I can not complete the first line of the table with the letters of the
> alphabet.
> Thank you.
> Fabrice
> 
> \starttext
> \startlinecorrection[blank]
> \startmidaligned
> \startluacode
> context.startxtable({"align=middle, width=1.25cm"})
> context.startxrow()
> context.startxcell({"width=0.5cm"}) context("") context.stopxcell()
> letter = {'A','B','C','D','E','F','G','H','I','J'}
>  for letter = 1,10 do
>  context.startxcell() context(print(letter)) context.stopxcell()
>  end

letters = {'A','B','C','D','E','F','G','H','I','J'}
for _,letter in ipairs(letters) do
context.startxcell() context(letter) context.stopxcell()
end

> context.stopxrow()
> context.startxrow({"background=color","backgroundcolor=gray"})
> 
> context.startxcell({"width=0.5cm","background=color","backgroundcolor=white"})
> context("1") context.stopxcell()
> context.startxcell({"width=2cm"}) context("Année") context.stopxcell()
>  for y = 1998,2006 do
>  context.startxcell() context(y) context.stopxcell()
>  end
> context.stopxrow()
> context.startxrow()
> context.startxcell({"width=0.5cm"}) context("2") context.stopxcell()
> 
> context.startxcell({"width=2cm","background=color","backgroundcolor=gray"})
> context("Prix (kg)") context.stopxcell()
>  local p = 1
>  for y = 1,9 do
>  context.startxcell() context("%0.3f",p) context.stopxcell()
>  p = p*1.031
>  end
> context.stopxrow()
> context.stopxtable()
> \stopluacode
> \stopmidaligned
> \stoplinecorrection
> \stoptext
> 
> 
> ___
> 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] Table, xtable and lua

2018-11-10 Thread Henri Menke


On 11/11/18 12:33 PM, Fabrice Couvreur wrote:
> Hi,
> I can not complete the first line of the table with the letters of the
> alphabet.
> Thank you.
> Fabrice
> 
> \starttext
> \startlinecorrection[blank]
> \startmidaligned
> \startluacode
> context.startxtable({"align=middle, width=1.25cm"})
> context.startxrow()
> context.startxcell({"width=0.5cm"}) context("") context.stopxcell()
> letter = {'A','B','C','D','E','F','G','H','I','J'}
>  for letter = 1,10 do
>  context.startxcell() context(print(letter)) context.stopxcell()
>  end

for _,letter in ipairs(letters) do
context.startxcell() context(letter) context.stopxcell()
end

> context.stopxrow()
> context.startxrow({"background=color","backgroundcolor=gray"})
> 
> context.startxcell({"width=0.5cm","background=color","backgroundcolor=white"})
> context("1") context.stopxcell()
> context.startxcell({"width=2cm"}) context("Année") context.stopxcell()
>  for y = 1998,2006 do
>  context.startxcell() context(y) context.stopxcell()
>  end
> context.stopxrow()
> context.startxrow()
> context.startxcell({"width=0.5cm"}) context("2") context.stopxcell()
> 
> context.startxcell({"width=2cm","background=color","backgroundcolor=gray"})
> context("Prix (kg)") context.stopxcell()
>  local p = 1
>  for y = 1,9 do
>  context.startxcell() context("%0.3f",p) context.stopxcell()
>  p = p*1.031
>  end
> context.stopxrow()
> context.stopxtable()
> \stopluacode
> \stopmidaligned
> \stoplinecorrection
> \stoptext
> 
> 
> ___
> 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
___

[NTG-context] Table, xtable and lua

2018-11-10 Thread Fabrice Couvreur
Hi,
I can not complete the first line of the table with the letters of the
alphabet.
Thank you.
Fabrice

\starttext
\startlinecorrection[blank]
\startmidaligned
\startluacode
context.startxtable({"align=middle, width=1.25cm"})
context.startxrow()
context.startxcell({"width=0.5cm"}) context("") context.stopxcell()
letter = {'A','B','C','D','E','F','G','H','I','J'}
 for letter = 1,10 do
 context.startxcell() context(print(letter)) context.stopxcell()
 end
context.stopxrow()
context.startxrow({"background=color","backgroundcolor=gray"})

context.startxcell({"width=0.5cm","background=color","backgroundcolor=white"})
context("1") context.stopxcell()
context.startxcell({"width=2cm"}) context("Année") context.stopxcell()
 for y = 1998,2006 do
 context.startxcell() context(y) context.stopxcell()
 end
context.stopxrow()
context.startxrow()
context.startxcell({"width=0.5cm"}) context("2") context.stopxcell()

context.startxcell({"width=2cm","background=color","backgroundcolor=gray"})
context("Prix (kg)") context.stopxcell()
 local p = 1
 for y = 1,9 do
 context.startxcell() context("%0.3f",p) context.stopxcell()
 p = p*1.031
 end
context.stopxrow()
context.stopxtable()
\stopluacode
\stopmidaligned
\stoplinecorrection
\stoptext
___
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] Colormanagement

2018-11-10 Thread Hans Hagen

On 11/10/2018 2:34 PM, Jan U. Hasecke wrote:

Am 09.11.18 um 17:20 schrieb luigi scarso:

I think you should use the best colorspace (rgb )
and let the print shop do its job -- of course this means that you have
signed  their sample (hard proof) of your project.



I really tend to do this. I am currently exploring the color management
system of ConTeXt together with a friend you is working as a color
manager in print industry.

And my first try was a failure. The cmyk values in the resulting pdf
file (with color profile) differs from the values we calculated (using
the same color profile in Gimp).

But we have to investigate  a bit further, so don't panic. Maybe I the
fault was mine.

Is there a test case tex file we could use to test the color management?
there is no real 1-1 translation from rgb-cmyk .. in many programs that 
do that there is some additional magic (i remember that photoshop also 
applied the paper properties and that there was no roundtrip)


this is where color profiles come in

even viewers (like acrobat) can apply some magic so that the colors come 
out different from what you expect


try this on screen and in print:

\startMPpage

path p ; p := fullcircle scaled 1cm ;

fill p shifted (0cm,1cm) withcolor (1,1,0) ;
fill p shifted (1cm,1cm) withcolor (0,0,1,0) ;
fill p shifted (0cm,0cm) withcolor (1/2,1/2,0) ;
fill p shifted (1cm,0cm) withcolor (0,0,1/2,0) ;

\stopMPpage


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] Colormanagement

2018-11-10 Thread Jan U. Hasecke
Am 09.11.18 um 17:20 schrieb luigi scarso:
> I think you should use the best colorspace (rgb )
> and let the print shop do its job -- of course this means that you have
> signed  their sample (hard proof) of your project.
> 

I really tend to do this. I am currently exploring the color management
system of ConTeXt together with a friend you is working as a color
manager in print industry.

And my first try was a failure. The cmyk values in the resulting pdf
file (with color profile) differs from the values we calculated (using
the same color profile in Gimp).

But we have to investigate  a bit further, so don't panic. Maybe I the
fault was mine.

Is there a test case tex file we could use to test the color management?

juh
___
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] Colormanagement

2018-11-10 Thread Jan U. Hasecke
Am 09.11.18 um 17:18 schrieb Tomas Hala:
> Hi, 
> 
> by default, really not.
> 
> At http://wiki.inkscape.org/wiki/index.php/Color_management
> and http://wiki.inkscape.org/wiki/index.php/ExportPDFCMYK
> there some instructions how to convert files to CMYK,
> or how to install some extension, respectively.
> But I have not test these ways yet.
> 

These Python scripts does not work here. :-(

But I could ask my designer to convert the RGB-SVG into CMYK-PDF.

juh
___
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] index problem with \setupcolumnset

2018-11-10 Thread Peter Rolf
Am 2018-11-10 um 13:00 schrieb Peter Rolf:
> Hi Wolfgang,
> 
> thanks for the info. I will download the new manual right now.
>

Mh, already on my RAM disk :D

I tend to ignore the shipped documentation. My bad.


> 
> Best wishes,  Peter
> 
> Am 2018-11-10 um 12:03 schrieb Wolfgang Schuster:
>> Hi Peter,
>>
>> the new columnset mechanism accepts only two arguments for the
>> \setupcolumnset command but you can load the old code with
>> \usemodule[old-columnsets].
>>
>> How you can apply backgrounds per column with the new code is shown in a
>> example in the manual.
>>
>> Wolfgang
>>
>>
>> Peter Rolf schrieb am 09.11.18 um 17:23:
>>> Hi,
>>>
>>> I run into this error after updating my ConTeXt version.
>>> Small (but not minimal) example attached.
>>>
>>> mtx-context | current version: 2018.10.18 00:07
>>>
>>>
>>> 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
>>> ___
>>
> 
> ___
> 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] index problem with \setupcolumnset

2018-11-10 Thread Peter Rolf
Hi Wolfgang,

thanks for the info. I will download the new manual right now.


Best wishes,  Peter

Am 2018-11-10 um 12:03 schrieb Wolfgang Schuster:
> Hi Peter,
> 
> the new columnset mechanism accepts only two arguments for the
> \setupcolumnset command but you can load the old code with
> \usemodule[old-columnsets].
> 
> How you can apply backgrounds per column with the new code is shown in a
> example in the manual.
> 
> Wolfgang
> 
> 
> Peter Rolf schrieb am 09.11.18 um 17:23:
>> Hi,
>>
>> I run into this error after updating my ConTeXt version.
>> Small (but not minimal) example attached.
>>
>> mtx-context | current version: 2018.10.18 00:07
>>
>>
>> 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
>> ___
> 

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

2018-11-10 Thread Wolfgang Schuster



Hans Hagen schrieb am 09.11.18 um 17:01:
- the new mixed column code has been around for even longer (and 
always was default on my machine) btu the old code is available as module


A big difference between the old columns environment and the new mixed 
columns code is that the new environment uses grid snapping by default 
which can result in blank lines in the output.


Below is a simplified version of Henning problems which produces an 
blank line when you use bold text.



\showboxes

\starttext

\startcolumns[balance=no]

\snaptogrid[]\hbox{\setstrut\begstrut Ward\endstrut}

\samplefile{ward}

\snaptogrid[]\hbox{\bf\setstrut\begstrut Ward\endstrut}

\samplefile{ward}

\stopcolumns

\stoptext


Two simple ways to get rid of the blank line are

1. to disable the strut for the section or

2. to disable the grid snapping for the section.


\showboxes

\setuphead[section][before=,after=]
\setuphead[section][style=bold]

\define[1]\Sample
  {\begingroup
 \setuphead[section][#1]
 \section{Ward \doifsomething{#1}{\tttf [#1]}}
 \samplefile{ward}\par
   \endgroup}

\starttext

\startcolumns[balance=no]

\Sample{}

\Sample{style=}

\Sample{strut=no}

\Sample{grid=no}

\stopcolumns

\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] index problem with \setupcolumnset

2018-11-10 Thread Wolfgang Schuster

Hi Peter,

the new columnset mechanism accepts only two arguments for the 
\setupcolumnset command but you can load the old code with 
\usemodule[old-columnsets].


How you can apply backgrounds per column with the new code is shown in a 
example in the manual.


Wolfgang


Peter Rolf schrieb am 09.11.18 um 17:23:

Hi,

I run into this error after updating my ConTeXt version.
Small (but not minimal) example attached.

mtx-context | current version: 2018.10.18 00:07


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
___


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