Re: [NTG-context] A strange request...

2019-02-20 Thread Wolfgang Schuster

Willi Egger schrieb am 20.02.19 um 17:23:

Hi all,

I am siting with a project of making a “dwarsligger”, you know these books, 
printed on bible-thin-printing paper, which are about  12 x 8 cm. One opens 
them while holding them ‘landscape’ with the spine on the top…

Now there is of course a little struggle with the page numbering. The reading 
page consists out of the even page together with the following uneven page. It 
is easy to print on the uneven page a page number, however this will result in 
uneven page numbers only throughout the book.

My question is, whether there is an algorithm to print page numbers as follows:


1  2  3  4  5  6  7  8  9 (this is the ordinary numbering)
1 2 3 4 5 (this is the requested numbering)

Does someone have an idea how to solve this?


Variant 1:

\setuppapersize[A5,landscape]

\setuppagenumbering[location=none]

\startsetups [pagenumber]
  \doifoddpageelse
{\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
{}
\stopsetups

\setupheadertexts [\directsetup{pagenumber}]

\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext


Variant 2:

\defineexpandable[1]\DwarsliggerNumber
  {\cldcontext{"\letterpercent d",(#1+1)/2}}

\defineconversion [dwarsligger] [\DwarsliggerNumber]

\setuppapersize[A5,landscape]

\setupuserpagenumber[numberconversion=dwarsligger]

\setuppagenumbering[location=none]

\setupheadertexts [\doifoddpageelse{\prefixedpagenumber}{}]

\starttext
\dorecurse{10}{\samplefile{knuth}}
\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] A strange request...

2019-02-20 Thread luigi scarso
On Wed, Feb 20, 2019 at 5:23 PM Willi Egger  wrote:

> Hi all,
>
> I am siting with a project of making a “dwarsligger”, you know these
> books, printed on bible-thin-printing paper, which are about  12 x 8 cm.
> One opens them while holding them ‘landscape’ with the spine on the top…
>
> Now there is of course a little struggle with the page numbering. The
> reading page consists out of the even page together with the following
> uneven page. It is easy to print on the uneven page a page number, however
> this will result in uneven page numbers only throughout the book.
>
> My question is, whether there is an algorithm to print page numbers as
> follows:
>
>
> 1  2  3  4  5  6  7  8  9 (this is the ordinary numbering)
> 1 2 3 4 5 (this is the requested numbering)
>
> Does someone have an idea how to solve this?
>
> Any hints are most appreciated!
>
> Pickup n>=0, and find q and  r such
n = 2q + r,r = 0 or r=1

It's not clear if you have 6 what you want to print (3 or 4 ?)
but playing with that formula can help you .
In many times, it's better to start from zero, so it could be that you
have to translate your input sequence by adding -1
and the output sequence by adding +1 .



>
-- 
luigi
___
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] Omitting part number in chapter numbers

2019-02-20 Thread Wolfgang Schuster

Simon Collier schrieb am 20.02.19 um 02:01:

Dear list.


I would like to have a TOC that looks basically as follows when stripped 
down to the essentials:


1 Part1
1 Chapter1
2 Chapter2

2 Part2
3 Chapter3

I don't want the part number to be "part" of the chapter number (no 2.1, 
just 1, for example).

This behaviour should apply both to the titles in the text and in the TOC..

With the code:

\definestructureresetset[default][1,0,1][1] % reset part and section, 
but not chapter, from wiki

\setuphead[sectionresetset=default]

\setuphead[part]
[placehead=yes,
number=yes,]
\setuplist [part]
   [number=yes,]

\setuphead [chapter]
   [number=yes,]
\setuplist [chapter]
   [number=yes,]

\starttext
\completecontent

\startpart[title={Part1}]
\startchapter[title={Chapter3}]
\input knuth
\stopchapter
\startchapter[title={Chapter2}]
\input tufte
\stopchapter
\stoppart

\startpart[title={Part2}]
\startchapter[title={Chapter3}]
\input knuth
\stopchapter
\stoppart

\stoptext


I can make chapter numbers flow independently of parts, which is nice.
But the numbering for chapters is like 1.1, 1.2, and 2.3, which is a 
good default, but not what I want.
Is there any way to omit part number and get only the chapter number 
displayed?


In wiki there is something that is almost suitable, namely setting:
numbercommand={\determineheadnumber[chapter]\currentheadnumber\gobbleoneargument}]
But this does not work for TOC, returning just zeros (and seems like 
also an extra zero is spilled on TOC, overall pretty hackish solution).


When nothing seemed to work, I also tried to use an ugly macro that uses 
lua to format the argument #1 in the numbercommand nicely with the help 
of string functions,
but it turned out the actual parameter #1 in numbercommand is something 
other than just a string with numbers and dots.
If someone knows what it is, or how to find out, please point me to the 
right direction to better understand the system. Currently I'm unable to 
even print it to the terminal in order to see what actual characters are 
there, the following code outputting the length (seems to be 19 at least 
for me) works just fine as well as printing the string itself to the 
document.


\startluacode  
 userdata = userdata or{}


 function userdata.numberfun(str)
     context(tostring(#str))
 end
\stopluacode

\def\mync#1%
 {\ctxlua{userdata.numberfun([==[#1]==])}}


The idea seemed pretty standard and is used in many books, so maybe I've 
just completely missed the right way to approach this.


You have to use the “sectionsegemnts” key.

\setuphead
  [part]
  [placehead=yes]

\setuphead
  [chapter]
  [sectionsegments=chapter]

\starttext

\completecontent

\part{Part 1}

\chapter{Chapter 1}

\chapter{Chapter 2}

\part{Part 2}

\chapter{Chapter 3}

\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] A strange request...

2019-02-20 Thread Willi Egger
Hi all,

I am siting with a project of making a “dwarsligger”, you know these books, 
printed on bible-thin-printing paper, which are about  12 x 8 cm. One opens 
them while holding them ‘landscape’ with the spine on the top…

Now there is of course a little struggle with the page numbering. The reading 
page consists out of the even page together with the following uneven page. It 
is easy to print on the uneven page a page number, however this will result in 
uneven page numbers only throughout the book. 

My question is, whether there is an algorithm to print page numbers as follows:


1  2  3  4  5  6  7  8  9 (this is the ordinary numbering)
1 2 3 4 5 (this is the requested numbering)

Does someone have an idea how to solve this?

Any hints are most appreciated!

Willi 
___
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] Frame

2019-02-20 Thread Lars

It's the same as with text, but instead of text you put

\externalfigure[path/to-figure.pdf][setup=value]

inside the parenthesis { }:

\setuppapersize[A5]

\starttext

{\framed
   [width=10cm,
   background=color,backgroundcolor=darkblue,
   foreground=color,foregroundcolor=white,
   align={flushleft}]
{The Earth, as a habitat for animal life, is
in old age and has a fatal illness. Several,
in fact.\par
\setupindenting[yes, small]
It would be happening whether humans had ever evolved or not.}

\blank

{\framed
   [width=10cm,
   background=color,backgroundcolor=darkblue,
   foreground=color,foregroundcolor=white,
   align=middle]
{\externalfigure[path/to-figure.pdf][width=.8\textwidth]}

\stoptext


You don't need the \setupcolors[state=start] command in ConTeXt mkiv by 
the way.



Am 20/02/2019 um 12:31 schrieb Ursula Hermann:

Hi Marco!

I have another question to Frame. How is the process, if i have to take Figures 
in a Frame? Sorry, here I have no example, because I dont know, how to write it.

Many thanks

Uschi



-Ursprüngliche Nachricht-
Von: Ursula Hermann
Gesendet: Mittwoch, 20. Februar 2019 11:10
An: 'mailing list for ConTeXt users' 
Betreff: AW: [NTG-context] Frame


Hi, Marco!

With colour:

\setuppapersize[A5]
\setupcolors[state=start]
{\framed
[width=10cm,
background=color,backgroundcolor=darkblue,
foreground=color,foregroundcolor=white,
align={flushleft}]
{The Earth, as a habitat for animal life, is in old age and has a fatal 
illness. Several, in fact.\par \setupindenting[yes, small] It would be 
happening whether humans had ever evolved or not.}

Many Regards

Uschi
-Ursprüngliche Nachricht-
Von: Ursula Hermann
Gesendet: Mittwoch, 20. Februar 2019 10:44
An: 'mailing list for ConTeXt users' 
Betreff: AW: [NTG-context] Frame

Hello Marco!

It works, like I wanted:

\setuppapersize[A5]
{\framed
[width=10cm,
 align={flushleft}]
{The Earth, as a habitat for animal life, is in old age and has a fatal 
illness. Several, in fact.\par \setupindenting[yes, small] It would be 
happening whether humans had ever evolved or not.}

Thank you for helping
Uschi

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Ursula Hermann
Gesendet: Dienstag, 19. Februar 2019 14:17
An: mailing list for ConTeXt users 
Betreff: Re: [NTG-context] Frame

Hi Marco!

Thanks a lot.

Best regards

Uschi

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Marco Patzer
Gesendet: Dienstag, 19. Februar 2019 14:11
An: ntg-context@ntg.nl
Betreff: Re: [NTG-context] Frame

On Tue, 19 Feb 2019 13:01:35 +
Ursula Hermann  wrote:


I have:
\framed
   [height=3em,
width=.5\textwidth,
foregroundcolor=red,
framecolor=blue,
rulethickness=2pt,
background=color,
backgroundcolor=green]
\starttext
{Ich bin da.\par Du auch}
\stoptext

Move the \starttext to the beginning:

\starttext
\framed
   [height=3em,
width=.5\textwidth,
foregroundcolor=red,
framecolor=blue,
rulethickness=2pt,
background=color,
backgroundcolor=green]
{Ich bin da.\par Du auch}
\stoptext

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

Re: [NTG-context] Frame

2019-02-20 Thread Ursula Hermann
Hi Marco!

I have another question to Frame. How is the process, if i have to take Figures 
in a Frame? Sorry, here I have no example, because I dont know, how to write it.

Many thanks

Uschi  



-Ursprüngliche Nachricht-
Von: Ursula Hermann 
Gesendet: Mittwoch, 20. Februar 2019 11:10
An: 'mailing list for ConTeXt users' 
Betreff: AW: [NTG-context] Frame


Hi, Marco!

With colour: 

\setuppapersize[A5]
\setupcolors[state=start]
{\framed
   [width=10cm,
   background=color,backgroundcolor=darkblue,
   foreground=color,foregroundcolor=white,
   align={flushleft}]
{The Earth, as a habitat for animal life, is in old age and has a fatal 
illness. Several, in fact.\par \setupindenting[yes, small] It would be 
happening whether humans had ever evolved or not.}

Many Regards

Uschi
-Ursprüngliche Nachricht-
Von: Ursula Hermann
Gesendet: Mittwoch, 20. Februar 2019 10:44
An: 'mailing list for ConTeXt users' 
Betreff: AW: [NTG-context] Frame

Hello Marco!

It works, like I wanted: 

\setuppapersize[A5]
{\framed
   [width=10cm,
align={flushleft}]
{The Earth, as a habitat for animal life, is in old age and has a fatal 
illness. Several, in fact.\par \setupindenting[yes, small] It would be 
happening whether humans had ever evolved or not.}

Thank you for helping
Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Ursula Hermann
Gesendet: Dienstag, 19. Februar 2019 14:17
An: mailing list for ConTeXt users 
Betreff: Re: [NTG-context] Frame

Hi Marco!

Thanks a lot. 

Best regards 

Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Marco Patzer
Gesendet: Dienstag, 19. Februar 2019 14:11
An: ntg-context@ntg.nl
Betreff: Re: [NTG-context] Frame

On Tue, 19 Feb 2019 13:01:35 +
Ursula Hermann  wrote:

> I have:
> \framed
>   [height=3em,
>width=.5\textwidth,
>foregroundcolor=red,
>framecolor=blue,
>rulethickness=2pt,
>background=color,
>backgroundcolor=green]
> \starttext
> {Ich bin da.\par Du auch}
> \stoptext

Move the \starttext to the beginning:

\starttext
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=color,
   backgroundcolor=green]
{Ich bin da.\par Du auch}
\stoptext

Marco
___
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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-20 Thread Hans Hagen

On 2/20/2019 10:51 AM, Procházka Lukáš Ing. wrote:

Hello Hans,

On Wed, 20 Feb 2019 09:15:40 +0100, Hans Hagen  wrote:


as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy
and is used frequently, would it be possible to provide identical
mechanism for xtables?


all is possible but it won't happen ... different approach ... you can 
use named setups here


should you provide a MWE? - I cannot find an example of usage setups for 
setting column width; something like:


\startsetups MyXTable
   % How to specify the width of the first column here?
\stopsetups

\startxtable[setup=MyXTable]
...
\stopxtable

\setup*

did you look at the 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] Frame

2019-02-20 Thread Ursula Hermann

Hi, Marco!

With colour: 

\setuppapersize[A5]
\setupcolors[state=start]
{\framed
   [width=10cm,
   background=color,backgroundcolor=darkblue,
   foreground=color,foregroundcolor=white,
   align={flushleft}]
{The Earth, as a habitat for animal life, is
in old age and has a fatal illness. Several,
in fact.\par
\setupindenting[yes, small]
It would be happening whether humans had ever evolved or not.}

Many Regards

Uschi 
-Ursprüngliche Nachricht-
Von: Ursula Hermann 
Gesendet: Mittwoch, 20. Februar 2019 10:44
An: 'mailing list for ConTeXt users' 
Betreff: AW: [NTG-context] Frame

Hello Marco!

It works, like I wanted: 

\setuppapersize[A5]
{\framed
   [width=10cm,
align={flushleft}]
{The Earth, as a habitat for animal life, is in old age and has a fatal 
illness. Several, in fact.\par \setupindenting[yes, small] It would be 
happening whether humans had ever evolved or not.}

Thank you for helping
Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Ursula Hermann
Gesendet: Dienstag, 19. Februar 2019 14:17
An: mailing list for ConTeXt users 
Betreff: Re: [NTG-context] Frame

Hi Marco!

Thanks a lot. 

Best regards 

Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Marco Patzer
Gesendet: Dienstag, 19. Februar 2019 14:11
An: ntg-context@ntg.nl
Betreff: Re: [NTG-context] Frame

On Tue, 19 Feb 2019 13:01:35 +
Ursula Hermann  wrote:

> I have:
> \framed
>   [height=3em,
>width=.5\textwidth,
>foregroundcolor=red,
>framecolor=blue,
>rulethickness=2pt,
>background=color,
>backgroundcolor=green]
> \starttext
> {Ich bin da.\par Du auch}
> \stoptext

Move the \starttext to the beginning:

\starttext
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=color,
   backgroundcolor=green]
{Ich bin da.\par Du auch}
\stoptext

Marco
___
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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-20 Thread Procházka Lukáš Ing .

Hello Hans,

On Wed, 20 Feb 2019 09:15:40 +0100, Hans Hagen  wrote:


as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy
and is used frequently, would it be possible to provide identical
mechanism for xtables?


all is possible but it won't happen ... different approach ... you can use 
named setups here


should you provide a MWE? - I cannot find an example of usage setups for 
setting column width; something like:

\startsetups MyXTable
  % How to specify the width of the first column here?
\stopsetups

\startxtable[setup=MyXTable]
...
\stopxtable

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 | IČO: 40763439
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
___


Re: [NTG-context] Frame

2019-02-20 Thread Ursula Hermann
Hello Marco!

It works, like I wanted: 

\setuppapersize[A5]
{\framed
   [width=10cm,
align={flushleft}]
{The Earth, as a habitat for animal life, is
in old age and has a fatal illness. Several,
in fact.\par
\setupindenting[yes, small]
It would be happening whether humans had ever evolved or not.}

Thank you for helping
Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Ursula Hermann
Gesendet: Dienstag, 19. Februar 2019 14:17
An: mailing list for ConTeXt users 
Betreff: Re: [NTG-context] Frame

Hi Marco!

Thanks a lot. 

Best regards 

Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Marco Patzer
Gesendet: Dienstag, 19. Februar 2019 14:11
An: ntg-context@ntg.nl
Betreff: Re: [NTG-context] Frame

On Tue, 19 Feb 2019 13:01:35 +
Ursula Hermann  wrote:

> I have:
> \framed
>   [height=3em,
>width=.5\textwidth,
>foregroundcolor=red,
>framecolor=blue,
>rulethickness=2pt,
>background=color,
>backgroundcolor=green]
> \starttext
> {Ich bin da.\par Du auch}
> \stoptext

Move the \starttext to the beginning:

\starttext
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=color,
   backgroundcolor=green]
{Ich bin da.\par Du auch}
\stoptext

Marco
___
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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-20 Thread Hans Hagen

On 2/20/2019 9:06 AM, Procházka Lukáš Ing. wrote:

Hello,

On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster 
 wrote:





Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27:

Hello,

it seems that xtable setup doesn't recognize the "c" option, which is
recognized successfully by TABLE setup;
tested on mapping provided by "ntb-to-xtb" module:


\usemodule[ntb-to-xtb] \restoreTABLEfromxtable

\starttext
  \bTABLE
    \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE
    \bTR
  \bTD A
  \eTD
    \eTR
  \eTABLE

  \bgroup
    \mapTABLEtoxtable
    \bTABLE
  \setupTABLE[c][1][width=1in] % <- This line causes error - not
recognized by xtable setup


xtables don’t support row/column settings like natural table and the
mapping doesn’t change this.

Wolfgang


as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy 
and is used frequently, would it be possible to provide identical 
mechanism for xtables?


all is popssible but it won't happen ... different approach ... you can 
use named setups here


 From what I read in the manual, setting width of a column for xtable is 
provided by \startxcell[width=...] at the place of the first 
cell-in-that-column usage.


Moreover, when xtable is built in two passes, in the first pass it might 
take a column (width) specification(s), if provided, and keep on reading 
xcell specification(s), considering xcell width, if provided.


it already does ... even more than two passes

I guess to be handy to implement both \setupTABLE[c][...] and 
\setupxtable[c][...] in a similar way, especially when there is a simple 
mechanism which allows TABLE/xtable switching (ntb-to-xtb module).


it would also be pretty inefficient

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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-20 Thread Procházka Lukáš Ing .

Hello,

On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster 
 wrote:




Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27:

Hello,

it seems that xtable setup doesn't recognize the "c" option, which is
recognized successfully by TABLE setup;
tested on mapping provided by "ntb-to-xtb" module:


\usemodule[ntb-to-xtb] \restoreTABLEfromxtable

\starttext
  \bTABLE
\setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE
\bTR
  \bTD A
  \eTD
\eTR
  \eTABLE

  \bgroup
\mapTABLEtoxtable
\bTABLE
  \setupTABLE[c][1][width=1in] % <- This line causes error - not
recognized by xtable setup


xtables don’t support row/column settings like natural table and the
mapping doesn’t change this.

Wolfgang


as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is 
used frequently, would it be possible to provide identical mechanism for xtables?

From what I read in the manual, setting width of a column for xtable is 
provided by \startxcell[width=...] at the place of the first 
cell-in-that-column usage.

Moreover, when xtable is built in two passes, in the first pass it might take a 
column (width) specification(s), if provided, and keep on reading xcell 
specification(s), considering xcell width, if provided.

I guess to be handy to implement both \setupTABLE[c][...] and 
\setupxtable[c][...] in a similar way, especially when there is a simple 
mechanism which allows TABLE/xtable switching (ntb-to-xtb module).

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
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
___