[NTG-context] Two column layout with footnotes

2024-08-18 Thread Michael Loescher

Hello list,

Is it possible to create a two-column journal layout with ConTeXt in which 
relatively large footnotes are always in the right column and, if the size of 
the footnotes exceeds a certain threshold, are distributed between the left and 
right columns? (comparable as shown in the attachment)


As far as I understand it, there are different possibilities for column set 
(e.g. column set, pagecolumns), but which one would be best, if it is possible 
at all?


Kind regards
Michael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: preventing column break after section title

2024-04-18 Thread Peter Münster
On Thu, Apr 18 2024, Peter Münster wrote:

> How could I prevent a column break after the second section title please?

Ok, found it:

\setupitemize[each][autointro]

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] preventing column break after section title

2024-04-18 Thread Peter Münster
Hi,

How could I prevent a column break after the second section title please?

Minimal example:

\starttext
\startcolumns[n=2]
  \section{title 1}
  \dorecurse{22}{bla\par}
  \section{title 2} % Here starts a new column.
  \startitemize
\dorecurse{15}{\item bla}
  \stopitemize
\stopcolumns
\stoptext

I’ve tried "\setuphead[section][after={\columnbreak[no]}]", but it does
not help.

TIA for any hints,
-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] error in column sets

2023-06-20 Thread Henning Hraban Ramm via ntg-context

Am 19.06.23 um 21:59 schrieb Henning Hraban Ramm via ntg-context:

In a minimal example like this:

\setuppapersize[A5]
\definecolumnset[TwoColumns][n=2]

\starttext
\startcolumnset [TwoColumns]
    \dorecurse{10}{\samplefile{knuth}}
\stopcolumnset

\stoptext

… many columns start one line too low and overwrite their last line.

...
Also I seem to remember that column sets would enforce grid mode, but 
they clearly don’t.


If you enable \setuplayout[grid=yes], lines get placed correctly.
Also floats work well (here and top).

But some columnsetspans still disappear, and footnotes get overwritten. 
(I know, that tricky inset stuff…)


Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] error in column sets

2023-06-19 Thread Henning Hraban Ramm via ntg-context

In a minimal example like this:

\setuppapersize[A5]
\definecolumnset[TwoColumns][n=2]

\starttext
\startcolumnset [TwoColumns]
   \dorecurse{10}{\samplefile{knuth}}
\stopcolumnset

\stoptext

… many columns start one line too low and overwrite their last line.


An extended example (nearly the same as in the manual) shows that some 
column set spans don’t appear:


\showgrid\showframe

\definecolumnset[Beispiel][n=3]
\definecolumnsetspan[Zwei][n=2,color=blue]
\definecolumnsetspan[Drei][n=3,color=red]

\starttext
\startcolumnset[Beispiel]
\startcolumnsetspan[Drei]% this works
{\bfd Überschrift}

Anleser: \dorecurse{2}{#1: \samplefile{knuth}\par}
\stoptitle
\stopcolumnsetspan

Zwischen: \samplefile{tufte}\par

\startcolumnsetspan[Zwei]% This never shows up!
Zwei: \dorecurse{2}{#1: \samplefile{lorem}\par}
\stopcolumnsetspan

Nach: \dorecurse{15}{#1: \samplefile{knuth}\par}
\stopcolumnset
\stoptext

Also I seem to remember that column sets would enforce grid mode, but 
they clearly don’t.


(BTW the old \startcolumns mode works better than I remembered.)

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Formula has excess vertical spacing when in two column itemize

2022-10-21 Thread Gavin via ntg-context
Hi List,

I am getting better at adjusting the space in enumerations, but I just put a 
formula inside an enumeration, and the formula’s vertical spacing became 
excessive. I’m not sure how the enumeration caused this problem.


\starttext

Evaluate the following derivatives.

\startitemize[n, columns, two, nowhite, after]

\item\hspace[big] $\frac{d}{dx} x^2$

This is where the solution should be. Text answers look fine, but formulas have 
too much space above, below and between lines\dots.

\item\hspace[big] $\frac{d}{dx}\left( x^3 + 2x \right)$

\item\hspace[big] $\frac{d}{dx}\left( x^{-2} \right)$

\item\hspace[big] $\frac{d}{dt}\left( 4t^4 - 3t^{\onehalf} \right) $

\item\hspace[big] $\frac{d}{dt}( 9 - 3t )$

\startformula\startmathalignment
\NC \frac{d}{dt}( 9 - 3t ) \NC= \frac{d}{dt} 9 - \frac{d}{dt} 3t \NR
\NC  \NC= 0 - 3\frac{d}{dt} t \NR
\NC  \NC= -3\cdot 1t^0 \NR
\NC  \NC= -3 \NR
\stopmathalignment\stopformula

\item\hspace[big] $\frac{d}{dp}\left( p^3 - 2p \right)$

\stopitemize

\stoptext


I’m also attaching a file with the above issue followed by the correct spacing 
in one-column for comparison.

I’m using LMTX (today’s upload, ver: 2022.10.21 21:13 LMTX  fmt: 2022.10.21) on 
an M1 Mac.

Any ideas?
Gavin



TwoColumnProblems.pdf
Description: Adobe PDF document


TwoColumnProblems.tex
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] [Bug] Two-column text: Larger top spacing in inline images

2022-06-26 Thread Max Chernoff via ntg-context

Not a bug, although it may be unexpected. It's a grid snapping thing. Try:

\def\example{%
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
\startMPcode draw fullcircle scaled 1cm; \stopMPcode\
Lorem ipsum. Lorem ipsum. Lorem ipsum.}

\starttext
\example
\startcolumns[grid=off]
\example
\stopcolumns
\stoptext

-- Max
___
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] [Bug] Two-column text: Larger top spacing in inline images

2022-06-26 Thread Marcin Ciura via ntg-context
Dear Hans and ConTeXt developers,

When you compile the following code with ConTeXt ver: 2021.10.28 10:19, you
will see that:
* in 1-column text the top spacing of the circle is normal,
* in 2-column text, the top spacing of the circle is too large.
Here is the link to the output PDF:
https://live.contextgarden.net/cgi-bin/result.cgi?id=7K5tLW

\def\example{%
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
Lorem ipsum. Lorem ipsum. Lorem ipsum.
\startMPcode draw fullcircle scaled 1cm; \stopMPcode\
Lorem ipsum. Lorem ipsum. Lorem ipsum.}

\starttext
\example
\startcolumns
\example
\stopcolumns
\stoptext

Best regards,
Marcin Ciura
___
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] Pull quote between two column - trial

2022-05-29 Thread Garulfo via ntg-context
to use pull quotes, I need to use the dimensions of the different 
elements to be typeset, before typesetting, in order to adapt the shapes 
of the flow accordingly.


So here is just a basic code to
1/ get the dimensions of an item A that will be typeset, before it is 
actually typeset
2/ use these dimensions to define a item B that should be typeset before 
item 1

3/ typeset of item B and finally item A


It is a quick and dirty solution.

Please, could you help me to have a more elegant solution

1/ to replace

 "width=\measure{FTitleW},"

by something more direct like

 "width=\GetDim{myframes}{FTitle}


2/ to replace

   context("\\definemeasure[#2W][" .. (n.width /65536)  .. "pt]")

   by a more "luametatexish" formulation



Le 28/05/2022 à 20:25, Garulfo a écrit :

some progress... if it can help.

No more issue with nonsymetrical behavior, and \framed are properly 
aligned with the grid.


Garulfo

mesure_framed.pdf
Description: Adobe PDF document

\defineblock[myframes]

\unexpanded\def\GetDim#1#2{
\setbox\scratchbox\hbox\bgroup\useblocks[#1][#2]\egroup%
\directlua{%
local n = tex.getbox('scratchbox')
context("\\definemeasure[#2W][" .. (n.width /65536)  .. "pt]")
context("\\definemeasure[#2H][" .. (n.height /65536)  .. "pt]")
}}


%--

\starttext

\beginmyframes[FTitle]
\framed
  [align=normal]
  {initial framed for a title zone\\
   early in the source code but not yet typeset\\
   with a long sentence to take place horizontaly and for demonstration}
\endmyframes

\GetDim{myframes}{FTitle}

\framed
  [align=normal,
   width=\measure{FTitleW},
   height=\measure{FTitleH}]
  {a second framed, with dimensions equal to the original frame, typeset before the original}

\useblocks[myframes][FTitle]

\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] Pull quote between two column - trial

2022-05-28 Thread jbf via ntg-context
That is progress, Garulfo, and real progress! I'm sorry I have not been 
any help to you in achieving this... a bit beyond my skill set. But I 
have long regarded this particular 'feature' to be a quite important 
'missing' feature of ConTeXt, since I occasionally get requests from 
authors as to the possibility of including such pull quotes in 
multi-column presentations, and I have to tell them that to do so I need 
to use another program where that is more easily achieved.


So, I just wanted you to know that someone out there appreciates your 
efforts with this, one of many I am sure.


Julian

On 29/5/22 04:25, Garulfo via ntg-context wrote:

some progress... if it can help.

No more issue with nonsymetrical behavior, and \framed are properly 
aligned with the grid.


Garulfo

___
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] Pull quote between two column - trial

2022-05-28 Thread Garulfo via ntg-context

some progress... if it can help.

No more issue with nonsymetrical behavior, and \framed are properly 
aligned with the grid.


Garulfo


getshapetext_for_pullquote.pdf
Description: Adobe PDF document
\setuplayout [grid=yes]

\showgrid

\definecolor [transparentred]  [r=1,t=.5,a=1]

\def\numA{18}
\def\numB{4}
\def\numC{8}
\def\numD{14}
\def\mygap{0.001pt}

%===

\startMPinclusions
path pleft ; path pright ;

numeric LA ; LA := (\numA-1)*LineHeight + StrutHeight + StrutDepth + \mygap ;
numeric LB ; LB :=  \numB   *LineHeight - StrutHeight - StrutDepth + \mygap ;
numeric LC ; LC :=  \numC   *LineHeight - StrutHeight - StrutDepth - \mygap ;
numeric LD ; LD :=  \numD   *LineHeight ;
numeric LE ; LE := 2cm ;

pleft := (0cm , 0cm) --
 (LD  , 0cm) --
 (LD  , LA - LC) --
 (LD - LE , LA - LC) --
 (LD - LE , LA - LB) --
 (LD  , LA - LB) --
 (LD  , LA ) --
 (0cm , LA ) --
 cycle  ;

pright := pleft reflectedabout ((LD/2,0cm) , (LD/2,1cm));

\stopMPinclusions

\startuseMPgraphic{mytest1}  % column on the left of the pull quote
lmt_parshape [path = pleft ] ;
fill pleft withcolor \MPcolor{transparentred} ;
\stopuseMPgraphic

\startuseMPgraphic{mytest2}  % column on the right of the pull quote
lmt_parshape [path = pright] ;
fill pright withcolor \MPcolor{transparentred} ;
\stopuseMPgraphic

\defineoverlay[myOL1][\useMPgraphic{mytest1}]
\defineoverlay[myOL2][\useMPgraphic{mytest2}]

%===

\defineframed
  [MyBigFrame]
  [offset=-0.26pt,
   frameoffset=0pt,
   frame=off,
   strut=yes,
   before=,
   location=top,
   height=\dimexpr(\numA\lineheight),
   width=\textwidth,
   align=normal,]

\defineframed
  [MyFrame]
  [MyBigFrame]
  [location=high,
   width=\dimexpr(\numD\lineheight),
   after=\dontleavehmode,]

%===

\starttext

{\bf Before}   %

\startshapetext[mytest1,mytest2]
\strut\samplefile{douglas}
\stopshapetext

\MyBigFrame{%
\MyFrame[background=myOL1]{\getshapetext}%
\hfill%
\MyFrame[background=myOL2]{\getshapetext}}

{\bf Between}  %

\startshapetext[mytest1,mytest2]
\strut\samplefile{knuth}\par\samplefile{knuth}
\stopshapetext

\MyBigFrame{%
\MyFrame[background=myOL1]{\getshapetext}%
\hfill%
\MyFrame[background=myOL2]{\getshapetext}}

{\bf After}%

\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] Problems with column sets?

2022-05-25 Thread Ben Moon via ntg-context
I've had a similar issue since December (posted here: 
https://www.mail-archive.com/ntg-context@ntg.nl/msg101228.html) and trying the 
examples from the columnsets manual today and the version that worked for 
Hraban I get the same error (ConTeXt version  2022.05.02, macOS 12.4).

Ben


On Tue, 24 May 2022, at 20:42, T. Kurt Bond via ntg-context wrote:
> Sigh.  I should have mentioned that that I reinstalled LMTX from scratch on 
> both machines, and that my mac is running macOS Monterey 12.3.1.
> 
> On Tue, May 24, 2022 at 3:40 PM T. Kurt Bond  wrote:
>> Huh.  I tried it on a Linux box, and that worked.  But on my main machine, a 
>> Intel 64 bit mac, I get the original result.  Oh, I changed to use this 
>> input:
>>> \definecolumnset[TwoColumns][n=2]
>>> \startcolumnset [TwoColumns]
>>>   \input knuth
>>> \stopcolumnset
>> 
>> On Tue, May 24, 2022 at 3:09 PM Henning Hraban Ramm via ntg-context 
>>  wrote:
>>> Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
>>> > Given the following file that uses definecolumnset and 
>>> > startcolumnset/stopcolumnset (largely from the wiki 
>>> > ) for input:
>>> > 
>>> > 
>>> > 
>>> > \setuppapersize[letter]
>>> > \definecolumnset[TwoColumns][n=2]
>>> > \startcolumnset [TwoColumns]
>>> >\title{Test page}
>>> >\framed
>>> >  [frame=off,
>>> >   bottomframe=on,
>>> >   width=\textwidth,
>>> >   frameoffset=1mm,
>>> >   foregroundstyle=small,
>>> >  ]{\copyright\ \date[][year] Donald E. Knuth}
>>> >\input knuth
>>> > \stopcolumnset
>>> > 
>>> > 
>>> 
>>> That’s not a minimal example, but it works for me (even if the text 
>>> starts only on the second page):
>>> 
>>> \definecolumnset[TwoColumns][n=2]
>>> 
>>> \starttext
>>> \startcolumnset [TwoColumns]
>>>\title{Test page}
>>>\framed
>>>  [frame=off,
>>>   bottomframe=on,
>>>   width=\textwidth,
>>>   frameoffset=1mm,
>>>   foregroundstyle=small,
>>>  ]{\copyright\ \date[][year] Donald E. Knuth}
>>>\samplefile{knuth}
>>> \stopcolumnset
>>> \stoptext
>>> 
>>> 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
>>> ___
>> 
>> 
>> -- 
>> T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
> 
> 
> -- 
> T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
> ___
> 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] Problems with column sets?

2022-05-24 Thread T. Kurt Bond via ntg-context
Sigh.  I should have mentioned that that I reinstalled LMTX from scratch on
both machines, and that my mac is running macOS Monterey 12.3.1.

On Tue, May 24, 2022 at 3:40 PM T. Kurt Bond  wrote:

> Huh.  I tried it on a Linux box, and that worked.  But on my main machine,
> a Intel 64 bit mac, I get the original result.  Oh, I changed to use this
> input:
>
> \definecolumnset[TwoColumns][n=2]
> \startcolumnset [TwoColumns]
>   \input knuth
> \stopcolumnset
>
>
> On Tue, May 24, 2022 at 3:09 PM Henning Hraban Ramm via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>> Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
>> > Given the following file that uses definecolumnset and
>> > startcolumnset/stopcolumnset (largely from the wiki
>> > ) for input:
>> >
>> >
>>  
>> 
>> > \setuppapersize[letter]
>> > \definecolumnset[TwoColumns][n=2]
>> > \startcolumnset [TwoColumns]
>> >\title{Test page}
>> >\framed
>> >  [frame=off,
>> >   bottomframe=on,
>> >   width=\textwidth,
>> >   frameoffset=1mm,
>> >   foregroundstyle=small,
>> >  ]{\copyright\ \date[][year] Donald E. Knuth}
>> >\input knuth
>> > \stopcolumnset
>> >
>>  
>> 
>>
>> That’s not a minimal example, but it works for me (even if the text
>> starts only on the second page):
>>
>> \definecolumnset[TwoColumns][n=2]
>>
>> \starttext
>> \startcolumnset [TwoColumns]
>>\title{Test page}
>>\framed
>>  [frame=off,
>>   bottomframe=on,
>>   width=\textwidth,
>>   frameoffset=1mm,
>>   foregroundstyle=small,
>>  ]{\copyright\ \date[][year] Donald E. Knuth}
>>\samplefile{knuth}
>> \stopcolumnset
>> \stoptext
>>
>> 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
>>
>> ___
>>
>
>
> --
> T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
>


-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Problems with column sets?

2022-05-24 Thread T. Kurt Bond via ntg-context
Huh.  I tried it on a Linux box, and that worked.  But on my main machine,
a Intel 64 bit mac, I get the original result.  Oh, I changed to use this
input:

\definecolumnset[TwoColumns][n=2]
\startcolumnset [TwoColumns]
  \input knuth
\stopcolumnset


On Tue, May 24, 2022 at 3:09 PM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
> > Given the following file that uses definecolumnset and
> > startcolumnset/stopcolumnset (largely from the wiki
> > ) for input:
> >
> >
>  
> 
> > \setuppapersize[letter]
> > \definecolumnset[TwoColumns][n=2]
> > \startcolumnset [TwoColumns]
> >\title{Test page}
> >\framed
> >  [frame=off,
> >   bottomframe=on,
> >   width=\textwidth,
> >   frameoffset=1mm,
> >   foregroundstyle=small,
> >  ]{\copyright\ \date[][year] Donald E. Knuth}
> >\input knuth
> > \stopcolumnset
> >
>  
> 
>
> That’s not a minimal example, but it works for me (even if the text
> starts only on the second page):
>
> \definecolumnset[TwoColumns][n=2]
>
> \starttext
> \startcolumnset [TwoColumns]
>\title{Test page}
>\framed
>  [frame=off,
>   bottomframe=on,
>   width=\textwidth,
>   frameoffset=1mm,
>   foregroundstyle=small,
>  ]{\copyright\ \date[][year] Donald E. Knuth}
>\samplefile{knuth}
> \stopcolumnset
> \stoptext
>
> 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
>
> ___
>


-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Problems with column sets?

2022-05-24 Thread Henning Hraban Ramm via ntg-context

Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
Given the following file that uses definecolumnset and 
startcolumnset/stopcolumnset (largely from the wiki 
) for input:




\setuppapersize[letter]
\definecolumnset[TwoColumns][n=2]
\startcolumnset [TwoColumns]
   \title{Test page}
   \framed
     [frame=off,
      bottomframe=on,
      width=\textwidth,
      frameoffset=1mm,
      foregroundstyle=small,
     ]{\copyright\ \date[][year] Donald E. Knuth}
   \input knuth
\stopcolumnset




That’s not a minimal example, but it works for me (even if the text 
starts only on the second page):


\definecolumnset[TwoColumns][n=2]

\starttext
\startcolumnset [TwoColumns]
  \title{Test page}
  \framed
[frame=off,
 bottomframe=on,
 width=\textwidth,
 frameoffset=1mm,
 foregroundstyle=small,
]{\copyright\ \date[][year] Donald E. Knuth}
  \samplefile{knuth}
\stopcolumnset
\stoptext

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] Problems with column sets?

2022-05-24 Thread T. Kurt Bond via ntg-context
Given the following file that uses definecolumnset and
startcolumnset/stopcolumnset (largely from the wiki
) for input:


\setuppapersize[letter]
\definecolumnset[TwoColumns][n=2]
\startcolumnset [TwoColumns]
  \title{Test page}
  \framed
[frame=off,
 bottomframe=on,
 width=\textwidth,
 frameoffset=1mm,
 foregroundstyle=small,
]{\copyright\ \date[][year] Donald E. Knuth}
  \input knuth
\stopcolumnset


Why does context fail, producing an empty .log and .pdf, with the following
information to the terminal:

resolvers   | formats | executing runner 'run luametatex format':
/usr/local/sw/versions/context-osx-64/tex/texmf-osx-64/bin/luametatex
--jobname="./x.ctx"
--fmt=/usr/local/sw/versions/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=/usr/local/sw/versions/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./x.ctx" --c:input="./x.ctx"
--c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="/usr/local/sw/versions/context-osx-64/tex/texmf-osx-64/bin"
system  >
system  > ConTeXt  ver: 2022.05.11 11:36 LMTX  fmt: 2022.5.24  int:
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name
'/usr/local/sw/versions/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name
'/usr/local/sw/versions/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './x', input './x.ctx', result './x'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './x.ctx'
mtx-context | fatal error: return code: 1

-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Pull quote between two column - trial

2022-05-21 Thread Garulfo via ntg-context

Hi all,

hope you are all doing well.

I am still trying to display pull quote between two columns.

lmt_parshape is really helpfull.


I need to add a 1pt gap to make the left column behave correctly,
but the right column remains shifted one line below the intended one.

Question1: any clue ?

Question2: is there a way to use the columnset system to produce a 
similar output ?


Thanks again for your feedbacks,
Garulfo
\setuplayout
  [grid=yes,
   headerdistance=5mm,
   margindistance=5mm,
   backspace=17.5mm,
   margin=10mm,
   topspace=40mm,
   height=23cm,
   header=10mm,
   footer=10mm,
   width=17.5cm]

%\showframe
%\showgrid
\usemodule [visual]

\setupbodyfont [palatino,11pt]

\definecolor [transparentred]  [r=1,t=.5,a=1]
\definecolor [transparentgreen][g=1,t=.5,a=1]

%

\def\posA{10}
\def\posB{20}
\def\mygap{1pt}
\def\mypen{1pt}
\def\PQhalfwith{20mm}

%

\startuseMPgraphic{mytest0}   % for basic straight column
begingroup ;
save p ; path p ;
p := (0,0)  --
 (0.3*TextWidth,0cm) --
 (0.3*TextWidth,TextHeight) --
 (0cm,TextHeight) --cycle  ;
lmt_parshape [path = p] ;
draw p withpen pencircle scaled \mypen ;
endgroup ;
\stopuseMPgraphic

\startuseMPgraphic{mytest1}  % column on the left of the pull quote
begingroup ;
save p ; path p ;
p := (0,0)  --
 (0.3*TextWidth,0cm) --
 (0.3*TextWidth,TextHeight+\mygap-\posB*LineHeight) --
 (0.3*TextWidth-\PQhalfwith,TextHeight+\mygap-\posB*LineHeight) --
 (0.3*TextWidth-\PQhalfwith,TextHeight-\mygap-\posA*LineHeight) --
 (0.3*TextWidth,TextHeight-\mygap-\posA*LineHeight) --
 (0.3*TextWidth,TextHeight) --
 (0cm,TextHeight) --cycle  ;
lmt_parshape [path = p] ;
draw p withpen pencircle scaled \mypen ;
endgroup ;
\stopuseMPgraphic

\startuseMPgraphic{mytest2}   % column on the right of the pull quote
begingroup ;
save p ; path p ;
p := (0,0)  --
 (0.3*TextWidth,0cm) --
 (0.3*TextWidth,TextHeight) --
 (0cm,TextHeight) --
 (0.0*TextWidth,TextHeight-\mygap-\posA*LineHeight) --
 (0.0*TextWidth+\PQhalfwith,TextHeight-\mygap-\posA*LineHeight) --
 (0.0*TextWidth+\PQhalfwith,TextHeight+\mygap-\posB*LineHeight) --
 (0.0*TextWidth,TextHeight+\mygap-\posB*LineHeight) --
 cycle  ;
lmt_parshape [path = p] ;
draw p withpen pencircle scaled \mypen ;
endgroup ;
\stopuseMPgraphic

\defineoverlay[myOL1][\useMPgraphic{mytest1}]
\defineoverlay[myOL2][\useMPgraphic{mytest2}]

%

\defineframed
  [FramePage]
  [align=width,
   frame=off,
   location=high,
   strut=yes,
   offset=0pt,
   width=\textwidth,
   height=\textheight,
   before=]

\defineframed
  [FrameColumn]
  [FramePage]
  [background=color,
   backgroundcolor=transparentred,
   width=0.3\textwidth,
   after=\dontleavehmode]

%

\definelayer % used to display the pull quote on the page
  [test]
  [x=0mm,
   y=0mm,
   width=\paperwidth,
   height=\paperheight]

%===

\starttext

\startshapetext[mytest1,mytest2,mytest0,mytest0]%
\strut%
\dorecurse{3}{\samplefile{douglas}
\blank[1*line]}%
\stopshapetext

%
% First page

\FramePage{%
\FrameColumn[background={color,myOL1}]{\getshapetext}\hfill
\FrameColumn[background={color,myOL2}]{\getshapetext}\hfill
\FrameColumn{empty}}


% and the pull quote

\setlayer
  [test]
  [hoffset=\backspace+0.3\textwidth-\PQhalfwith+0.2pt,
   voffset=\dimexpr(\topspace+\headerheight+\headerdistance+\posA\baselineskip-0.4pt)]
 {\framed[
background=color,
backgroundcolor=transparentgreen,
frame=off,
strut=yes,
offset=0pt,
width=\dimexpr(0.05\textwidth)+\PQhalfwith+\PQhalfwith,
height=\dimexpr(\posB\baselineskip-\posA\baselineskip)]{\bfd PULL QUOTE\\TRIAL}}

\setupbackgrounds[page][background={foreground,test}]

%
% Second page just to demonstrate that \getshapetext continue to work

\page

\FramePage{%
\FrameColumn{\getshapetext}\hfill
\FrameColumn{\getshapetext}\hfill
\FrameColumn{empty}}


\stoptext



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


[NTG-context] \placenotes ends up in wrong place when mixing one- and two- column layouts.

2022-05-10 Thread Zhichu Chen via ntg-context

Thanks Hans, works perfectly.


Sorry for the late reply. Still working on the template and got another 
one. Again, sorry.



The journal is in two-column form and the title, authors, and addresses 
are spanned to


the full width. Very common. But the title may acknowledge to some 
fund(s) and the


authors may have email addresses. If I use \note[thanks] and 
\note[email] to do that,


only the markers are shown. That's expected. So I tried to put 
\postponenotes before


the title and insert\placenotes[thanks] and \placenotes[email] after 
\startcolumns. The


notes did show up but in wrong position.


I hope there's another magic switch, or I have to put the marks in the 
title head and


put "real" but invisible notes in the two-column texts.



Thanks again, Hans.


Yours,

Zhichu


MWE (not that minimal):

===

\definenote[address]
\setupnote[address][rule=off,location=text]

\definenote[thanks]
\setupnote[thanks][location=firstcolumn]
\setupnotation[thanks][numberconversion=set 2]
\definenote[email][thanks]


\definenamespace
   [addr]
   [type=module,
    name=address,
    command=yes,
    setup=list,
    parent=addr,
  ]

\define[1]\useaddress
    {\edef\currentaddress{#1}%
 {\setnotetext[address][#1]{\addressparameter{name}}}%
    \endgraf
    }

\starttext


\setupaddress[style=italic]
\defineaddress[fst][name={Name of Institute or Affiliation, City, Country}]
\defineaddress[snd][name={Name of Secondary Institute or Affiliation, 
City, Country}]


\processcommacommand[fst,snd]\useaddress

\postponenotes

The Title\thanks{Work supported by somebody.}

%\startlocalnotes[address]
Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd]
%\placelocalnotes[address]
%\stoplocalnotes

\placenotes[address]

\startcolumns

\placenotes[thanks]
\placenotes[email]


\input knuth
\stopcolumns

\stoptext

===


On 5/8/22 17:20, Hans Hagen via ntg-context wrote:

On 5/8/2022 6:55 AM, Zhichu via ntg-context wrote:

Hi,

I am going to convince the Board of a journal to consider ConTeXt as 
an additional option.
I want to make a module before I say anything. Right now I have this 
title problem.


The journal requires the titles to be CAPITALISED, except for the 
acronyms. I'm currently
using backticks`...`to wrap it and replace it with\egroup 
...\WORD\bgroup{} with
lpeg. This kinda works, but that's so ugly. Besides, the actual story 
is that I also want to

add markdown as an option, so the backticks actually have meanings.

I also checked thetypo-cap.luafile to get a clue. But I used to use 
TeX exclusively

and I have to admit that it's so overwhelming for a newbie.

I really like the way wherebibtextreats words enclosed in curly 
braces are ignored.
Or are there something that's less aggressive than\WORDso the LaTeX 
trick works:

\def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}}

\starttext

\protected\def\casing[#1]{\groupedcommand{\setcharactercasing[#1]}{}}
    \protected\def\nocasing 
{\groupedcommand{\setcharactercasing[reset]}{}}


    \setuphead[chapter][textstyle=\WORD]

    \chapter{some \nocasing{kept} text or \casing[Word]{more} text}

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


___
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] local notes, "serried" (paragraph) or column style.

2022-01-03 Thread Youssef Cherem via ntg-context
Hi again,

As a follow-up, I just found some weird behavior when typesetting
local/text notes using columns. The code below describes the issue. (As the
notes are counted by page I really didn't need to use localnotes, so the
problem of footnotes disappearing is solved.)

\definenote[afiliação]%[numberconversion=set 2]

\setupnote[afiliação][

%paragraph=yes,

rule=off,

location=text,

]

\setupnotation[afiliação][numberconversion=a, way=bypage,

%location=text,

%alternative=serried, % no effect

alternative=hanging,

width=fit, % broad

%distance=.5em,

%display=no

] % or set 1

% n=3 doesn’t work


\setupnotation[footnote][location={bottom,left},alternative=hanging,distance=.5em]



\starttext


Note\footnote{This should be at the bottom, but if I use columns it goes
just below the columns.}


%{% local notes have to be enclosed, otherwise footenotes below don’t appear

Author 1\afiliação{asdf} Author 2\afiliação{asdf}
\dorecurse{5}{\afiliação{Nota explicativa.}}


\startcolumns[n=3]

\placenotes[afiliação]

\stopcolumns

%}

% end local notes



\blank[big]


This footnote will disapear completely if I use localnotes and don’t
enclose them.\footnote{Where does it go?}




\stoptext

ons. 29. des. 2021 kl. 10:40 skrev Marco Patzer via ntg-context <
ntg-context@ntg.nl>:

> On Wed, 29 Dec 2021 08:29:34 -0300
> Youssef Cherem via ntg-context  wrote:
>
> > I've tried to implement some sort of affiliation description with
> > local notes. I'd like them to be either in a single paragraph or in
> > columns (e.g., 3), but the options `serried` or  `n=3` don't seem to
> > work for text notes (they do work for notes at the bottom).
> >
> > […]
> >
> > \placelocalnotes[afiliação]
>
> Maybe this helps:
>
> \startcolumns [n=3]
>   \placelocalnotes[afiliação]
> \stopcolumns
>
> 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
___


Re: [NTG-context] aligning Malayalam horizontally across column

2022-01-02 Thread Hans Hagen via ntg-context

On 1/2/2022 8:08 AM, Ajith R via ntg-context wrote:


Thanks for this. But, I changed to natural tables as suggested by
Kausika and that solved my problems.


if it's only text, \starttabulate works ok too (and often better)
 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] aligning Malayalam horizontally across column

2022-01-01 Thread Ajith R via ntg-context
On Sat, 1 Jan 2022 11:12:14 +0100
Hans Hagen via ntg-context  wrote:

> On 12/31/2021 1:55 PM, Ajith R via ntg-context wrote:
> > Hi,
> > I am trying to prepare a moderate sized document in Malayalam using
> > Context. Overall I have been successful. However, there are a few
> > rough edges for which I need help. This is the second problem I
> > face.
> > 
> > I have some 300 group of short sentences placed in five columns
> > using \startcolumns[n=5]
> > \input aCharTable.tex
> > \stopcolumns
> > 
> > The aCharTex generated by a shell script contains the 300 plus
> > commands with the structure
> > 
> > \tfa{  \bold{variable} \par  (12 - 0.13) } \blank
> > 
> > The problems are that - a) the group, with the two short paras get
> > separated into different columns and sometimes pages. How can I
> > prevent that? In other words, how do I tell Context that this
> > should be treated as cohesive unit? b) The horizontal space doesn't
> > align across columns. This probably is because the different
> > conjuncts in each of these lines have different heights. How can I
> > ask Context to treat each of these cohesive units as having the
> > same height?  
> 
> But isn't the \par breaking it?

Yes, it is. I wanted them as two lines, but one below the other. If I
don't use \par, they become one line. May be you will be able to
understand my requirement if I tell what these are. The first of the
pair is one of the many syllables in a text analysed, the numbers
inside the parentheses are its rank and frequency proportion. So, to
make sense, they have to be together. And, it looks pretty if the pairs
are lined up nicely.

> \dontleavehmode\hbox{\tfa\bold{variable} (12 - 0.13)}

Thanks for this. But, I changed to natural tables as suggested by
Kausika and that solved my problems.

> we need a better example (just a snippet of actual source that gets 
> rendered to see the issue)

I am afraid this example is a bit long. The last pair in the first and
third columns gets split.And, overall, the lines are not aligned.

\definefontfamily
  [malayalam]
  [serif]
  [RIT Rachana][features=malayalam-two]

\setupbodyfont[malayalam]
\starttext
\startcolumns[n=5]
 \tfa{  \bold{നാ} \par  (42 - 0.43) }  \blank
 \tfa{  \bold{ണ} \par  (43 - 0.42) }  \blank
 \tfa{  \bold{ള്ള} \par  (44 - 0.42) }  \blank
 \tfa{  \bold{മു} \par  (45 - 0.41) }  \blank
 \tfa{  \bold{ഗ} \par  (46 - 0.39) }  \blank
 \tfa{  \bold{രാ} \par  (47 - 0.38) }  \blank
 \tfa{  \bold{റ} \par  (48 - 0.36) }  \blank
 \tfa{  \bold{സി} \par  (49 - 0.36) }  \blank
 \tfa{  \bold{റി} \par  (50 - 0.36) }  \blank
 \tfa{  \bold{പ്പെ} \par  (51 - 0.34) }  \blank
 \tfa{  \bold{നു} \par  (52 - 0.34) }  \blank
 \tfa{  \bold{ശ} \par  (53 - 0.34) }  \blank
 \tfa{  \bold{ടി} \par  (54 - 0.33) }  \blank
 \tfa{  \bold{കു} \par  (55 - 0.33) }  \blank
 \tfa{  \bold{ക്ക} \par  (56 - 0.32) }  \blank
 \tfa{  \bold{ലി} \par  (57 - 0.31) }  \blank
 \tfa{  \bold{കൾ} \par  (58 - 0.31) }  \blank
 \tfa{  \bold{സ്} \par  (59 - 0.30) }  \blank
 \tfa{  \bold{വാ} \par  (60 - 0.30) }  \blank
\tfa{  \bold{സം} \par  (61 - 0.30) }  \blank
\tfa{  \bold{തു} \par  (62 - 0.30) }  \blank
\tfa{  \bold{ചെ} \par  (63 - 0.30) }  \blank
\tfa{  \bold{ളി} \par  (64 - 0.30) }  \blank
\tfa{  \bold{താ} \par  (65 - 0.29) }  \blank
\tfa{  \bold{ജ} \par  (66 - 0.29) }  \blank
\tfa{  \bold{ങ്ങൾ} \par  (67 - 0.29) }  \blank
\tfa{  \bold{വർ} \par  (68 - 0.28) }  \blank
\tfa{  \bold{ള} \par  (69 - 0.28) }  \blank
\tfa{  \bold{മി} \par  (70 - 0.27) }  \blank
\tfa{  \bold{ലാ} \par  (71 - 0.27) }  \blank
\tfa{  \bold{ത്തിൽ} \par  (72 - 0.27) }  \blank
\tfa{  \bold{യിൽ} \par  (73 - 0.27) }  \blank
\tfa{  \bold{ച്ചു} \par  (74 - 0.26) }  \blank
\tfa{  \bold{ഈ} \par  (75 - 0.25) }  \blank
\tfa{  \bold{ച്ച} \par  (76 - 0.25) }  \blank
\tfa{  \bold{ത്ത} \par  (77 - 0.25) }  \blank
\tfa{  \bold{പി} \par  (78 - 0.25) }  \blank
\stopcolumns
\stoptext

Thanks,
ajith

___
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] aligning Malayalam horizontally across column

2022-01-01 Thread Ajith R via ntg-context
On Fri, 31 Dec 2021 20:49:30 +0530
kauśika  wrote:

> If the height varies due to the formation of conjuncts, I 
> think you are better off using "(natural) tables" :
> https://wiki.contextgarden.net/TABLE
> In particular, setting align=lohi for the two columns concerned
> should work. Again, your example is not clear enough for me to
> suggest much

Hi Kausika,

I used natural tables as you suggested and it has solved both my
problems.

Thanks again for all your help,
Have a wonderful year ahead,
ajith
___
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] aligning Malayalam horizontally across column

2022-01-01 Thread Hans Hagen via ntg-context

On 12/31/2021 1:55 PM, Ajith R via ntg-context wrote:

Hi,
I am trying to prepare a moderate sized document in Malayalam using
Context. Overall I have been successful. However, there are a few rough
edges for which I need help. This is the second problem I face.

I have some 300 group of short sentences placed in five columns using
\startcolumns[n=5]
\input aCharTable.tex
\stopcolumns

The aCharTex generated by a shell script contains the 300 plus commands
with the structure

\tfa{  \bold{variable} \par  (12 - 0.13) } \blank

The problems are that - a) the group, with the two short paras get
separated into different columns and sometimes pages. How can I prevent
that? In other words, how do I tell Context that this should be treated
as cohesive unit? b) The horizontal space doesn't align across columns.
This probably is because the different conjuncts in each of these lines
have different heights. How can I ask Context to treat each of these
cohesive units as having the same height?


But isn't the \par breaking it?

\dontleavehmode\hbox{\tfa\bold{variable} (12 - 0.13)}

we need a better example (just a snippet of actual source that gets 
rendered to see the issue)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] aligning Malayalam horizontally across column

2021-12-31 Thread kauśika via ntg-context
On Friday, December 31, 2021 6:25:01 PM IST Ajith R via ntg-context wrote:
> The problems are that - a) the group, with the two short paras get
> separated into different columns and sometimes pages. How can I prevent
> that? In other words, how do I tell Context that this should be treated
> as cohesive unit? b) The horizontal space doesn't align across columns.
> This probably is because the different conjuncts in each of these lines
> have different heights. How can I ask Context to treat each of these
> cohesive units as having the same height?

Your example is not clear enough for me to address b). I think I understand 
what problem you have described in a).

If you want to explicitly typeset paragraphs into a columnar format, use 
'paragraphs':

\defineparagraphs[mypar][n=5]
\setupparagraphs[mypar][1][width=…]
\setupparagraphs[mypar][2][width=…]
\setupparagraphs[mypar][3][width=…]
\setupparagraphs[mypar][4][width=…]
\setupparagraphs[mypar][5][width=…]

Now, you can do
\startmypar
this is the first column
\mypar
and here is the second column
\mypar
the third column is here
\mypar
and the fourth column is here
\mypar
and the last (fifth) column
\stopmypar

[If you end up using this you will have to "denote columns" in your script-
generated file by using \mypar]

Look into the options of \setupparagraphs for more details (there is a height 
option as well). If the height varies due to the formation of conjuncts, I 
think you are better off using "(natural) tables" :
https://wiki.contextgarden.net/TABLE
In particular, setting align=lohi for the two columns concerned should work. 
Again, your example is not clear enough for me to suggest much.

kauśika


___
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] aligning Malayalam horizontally across column

2021-12-31 Thread Ajith R via ntg-context
Hi,
I am trying to prepare a moderate sized document in Malayalam using
Context. Overall I have been successful. However, there are a few rough
edges for which I need help. This is the second problem I face.

I have some 300 group of short sentences placed in five columns using
\startcolumns[n=5]
\input aCharTable.tex
\stopcolumns

The aCharTex generated by a shell script contains the 300 plus commands
with the structure

\tfa{  \bold{variable} \par  (12 - 0.13) } \blank

The problems are that - a) the group, with the two short paras get
separated into different columns and sometimes pages. How can I prevent
that? In other words, how do I tell Context that this should be treated
as cohesive unit? b) The horizontal space doesn't align across columns.
This probably is because the different conjuncts in each of these lines
have different heights. How can I ask Context to treat each of these
cohesive units as having the same height?

Thanks,
ajith
___
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] local notes, "serried" (paragraph) or column style.

2021-12-29 Thread Youssef Cherem via ntg-context
Marco

Thanks a lot.  It works. Such a solution had briefly crossed my mind but I
had left it aside, hoping there was some feature I had missed.

Em qua., 29 de dez. de 2021 10:40, Marco Patzer via ntg-context <
ntg-context@ntg.nl> escreveu:

> On Wed, 29 Dec 2021 08:29:34 -0300
> Youssef Cherem via ntg-context  wrote:
>
> > I've tried to implement some sort of affiliation description with
> > local notes. I'd like them to be either in a single paragraph or in
> > columns (e.g., 3), but the options `serried` or  `n=3` don't seem to
> > work for text notes (they do work for notes at the bottom).
> >
> > […]
> >
> > \placelocalnotes[afiliação]
>
> Maybe this helps:
>
> \startcolumns [n=3]
>   \placelocalnotes[afiliação]
> \stopcolumns
>
> 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
___


Re: [NTG-context] local notes, "serried" (paragraph) or column style.

2021-12-29 Thread Marco Patzer via ntg-context
On Wed, 29 Dec 2021 08:29:34 -0300
Youssef Cherem via ntg-context  wrote:

> I've tried to implement some sort of affiliation description with
> local notes. I'd like them to be either in a single paragraph or in
> columns (e.g., 3), but the options `serried` or  `n=3` don't seem to
> work for text notes (they do work for notes at the bottom).
>
> […]
>
> \placelocalnotes[afiliação]

Maybe this helps:

\startcolumns [n=3]
  \placelocalnotes[afiliação]
\stopcolumns

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
___


[NTG-context] local notes, "serried" (paragraph) or column style.

2021-12-29 Thread Youssef Cherem via ntg-context
I've tried to implement some sort of affiliation description with local
notes. I'd like them to be either in a single paragraph or in columns
(e.g., 3), but the options `serried` or  `n=3` don't seem to work for text
notes (they do work for notes at the bottom). Any help would be much
appreciated.



\definenote[afiliação]%[numberconversion=set 2]

\setupnote[afiliação][

%paragraph=yes,

rule=off,

location=text,

]

\setupnotation[afiliação][numberconversion=a, way=bypage,

%location=text,

%alternative=serried, % no effect

alternative=hanging,

width=fit, % broad

%distance=.5em,

%display=no

] % or set 1

% n=3 doesn’t work



\starttext

\startlocalnotes

Author 1\afiliação{asdf} Author 2\afiliação{asdf}
\dorecurse{5}{\afiliação{Nota explicativa.}}


\placelocalnotes[afiliação]

\stoplocalnotes


\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] Progressively encouraging page/column breaks at \blank with penalties

2021-08-15 Thread Joey McCollum via ntg-context
That works for my purposes; thank you for letting me know about it!

Joey

On Sun, Aug 15, 2021 at 1:53 AM Aditya Mahajan via ntg-context <
ntg-context@ntg.nl> wrote:

> On Sun, 15 Aug 2021, Joey McCollum via ntg-context wrote:
>
> > Hi,
> >
> > I'm trying to implement a section break marker in a grid layout. At a
> > section break, two lines of space should separate the subsequent segments
> > of text (just plain paragraphs, in this case), and a symbol (in the
> example
> > below, "X") should be set in the middle of these two lines. For my
> > purposes, the section break symbol should never occur at the top of a
> page
> > or column, and it is more desirable to have a page or column end with the
> > section break symbol than to have a single orphaned line follow the
> symbol
> > at the end of the page or column. Based on these constraints, I thought
> > that using the "samepage" and "preference" options for the first and
> second
> > line breaks would work nicely:
> >
> > ```
> > \define\SectionBreak{%
> > \blank[halfline, samepage]% non-breaking to ensure that no column
> > begins with the section break symbol
> > \startalignment[middle]%
> > {X}% section break symbol
> > \stopalignment%
> > \blank[halfline, preference]% this can (and, if possible, should) be
> > broken across a column
> > ```
> >
> > This does successfully prevent the placement of the symbol at the top of
> a
> > page/column, but it doesn't encourage the placement of the symbol at the
> > end of a page/column as often as I would like.
>
> Depending on what you want, you can try adding \testpage[n] (where n is a
> number). This checks if the remainder of the page has enough space for n
> lines; if not, then it issues a page-break.
>
> 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] Progressively encouraging page/column breaks at \blank with penalties

2021-08-14 Thread Aditya Mahajan via ntg-context
On Sun, 15 Aug 2021, Joey McCollum via ntg-context wrote:

> Hi,
> 
> I'm trying to implement a section break marker in a grid layout. At a
> section break, two lines of space should separate the subsequent segments
> of text (just plain paragraphs, in this case), and a symbol (in the example
> below, "X") should be set in the middle of these two lines. For my
> purposes, the section break symbol should never occur at the top of a page
> or column, and it is more desirable to have a page or column end with the
> section break symbol than to have a single orphaned line follow the symbol
> at the end of the page or column. Based on these constraints, I thought
> that using the "samepage" and "preference" options for the first and second
> line breaks would work nicely:
> 
> ```
> \define\SectionBreak{%
> \blank[halfline, samepage]% non-breaking to ensure that no column
> begins with the section break symbol
> \startalignment[middle]%
> {X}% section break symbol
> \stopalignment%
> \blank[halfline, preference]% this can (and, if possible, should) be
> broken across a column
> ```
> 
> This does successfully prevent the placement of the symbol at the top of a
> page/column, but it doesn't encourage the placement of the symbol at the
> end of a page/column as often as I would like. 

Depending on what you want, you can try adding \testpage[n] (where n is a 
number). This checks if the remainder of the page has enough space for n lines; 
if not, then it issues a page-break.

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] Progressively encouraging page/column breaks at \blank with penalties

2021-08-14 Thread Joey McCollum via ntg-context
Hi,

I'm trying to implement a section break marker in a grid layout. At a
section break, two lines of space should separate the subsequent segments
of text (just plain paragraphs, in this case), and a symbol (in the example
below, "X") should be set in the middle of these two lines. For my
purposes, the section break symbol should never occur at the top of a page
or column, and it is more desirable to have a page or column end with the
section break symbol than to have a single orphaned line follow the symbol
at the end of the page or column. Based on these constraints, I thought
that using the "samepage" and "preference" options for the first and second
line breaks would work nicely:

```
\define\SectionBreak{%
\blank[halfline, samepage]% non-breaking to ensure that no column
begins with the section break symbol
\startalignment[middle]%
{X}% section break symbol
\stopalignment%
\blank[halfline, preference]% this can (and, if possible, should) be
broken across a column
```

This does successfully prevent the placement of the symbol at the top of a
page/column, but it doesn't encourage the placement of the symbol at the
end of a page/column as often as I would like. I tried replacing the
"preference" option with options with better negative penalties, like
"penalty:-1000", "penalty:-2000", and even "penalty:-5000", but these
didn't make any difference. The option "penalty:-1" trivially works,
but it forces a page/column break at every section break marker, which is
far too extreme.

Is this normal behavior? I would have thought that progressively more
negative penalties would gradually encourage page/column breaks, but this
doesn't seem to happen. In the following MWE, the "preference" and
"penalty" options (apart from "penalty:-1") for the second line break
don't change the total page count or appearance of the final page at all
(which would be expected in a document of this size):

```

\setuplayout[

grid=yes %enable baseline grid

]


\setupinterlinespace[18bp] % text line spacing


%Define macro for section break:

\define\SectionBreak{%

\blank[halfline, samepage]%non-breaking to ensure that no column begins
with the section break symbol

\startalignment[middle]%

{X}% section break symbol

\stopalignment%

\blank[halfline]% a column break here is neither encouraged nor discouraged

% \blank[halfline, preference]% this should encourage a column break here,
but it doesn't seem to make a difference

% \blank[halfline, penalty:-1000]% still no difference

% \blank[halfline, penalty:-2000]% still no difference

% \blank[halfline, penalty:-5000]% still no difference

% \blank[halfline, penalty:-1]% this works, but it is too extreme!

}


%Set things up for fakewords:

\usemodule[visual]

\setupsystem[random=10]


\starttext

\dorecurse{400}{\fakewords{20}{100}\SectionBreak}

\stoptext
```

As always, any help is appreciated!

Joey
___
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 place text before a table inside a column environment

2021-07-22 Thread Michael Guravage
Thanks for the suggestion.

I've already tried columnsets. With or without grid=yes, with or without a
columnspan, using columnsets produces the following log even though the
table fits on one page.

pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
pages   > flushing realpage 3, userpage 3, subpage 3
pages   > flushing realpage 4, userpage 4, subpage 4
pages   > flushing realpage 5, userpage 5, subpage 5
pages   > flushing realpage 6, userpage 6, subpage 6
pages   > flushing realpage 7, userpage 7, subpage 7
pages   > flushing realpage 8, userpage 8, subpage 8
pages   > flushing realpage 9, userpage 9, subpage 9
pages   > flushing realpage 10, userpage 10, subpage 10
pages   > flushing realpage 11, userpage 11, subpage 11
pages   > flushing realpage 12, userpage 12, subpage 12
pages   > flushing realpage 13, userpage 13, subpage 13
pages   > flushing realpage 14, userpage 14, subpage 14
pages   > flushing realpage 15, userpage 15, subpage 15
pages   > flushing realpage 16, userpage 16, subpage 16
pages   > flushing realpage 17, userpage 17, subpage 17
pages   > flushing realpage 18, userpage 18, subpage 18
pages   > flushing realpage 19, userpage 19, subpage 19
pages   > flushing realpage 20, userpage 20, subpage 20
pages   > flushing realpage 21, userpage 21, subpage 21
...

I stopped counting at 200,

Cheers,

Michael




On Thu, Jul 22, 2021 at 1:14 PM Henning Hraban Ramm  wrote:

> columnsets need \setuplayout[grid=yes] – did you check that?
>
> HR
>
> > Am 22.07.2021 um 12:42 schrieb Michael Guravage :
> >
> > No, I'm afraid not. I have been combining the various table and column
> environments, all without success - yet.
> >
> > Michael
> >
> >
> >
> > On Thu, Jul 22, 2021 at 12:01 PM Henning Hraban Ramm 
> wrote:
> > Hi Michael,
> >
> > you could try columnsets and use a columnsetspan for the text above the
> columns.
> >
> > I don’t know if tables work well within a columnset, though.
> >
> > Hraban
> >
> >
> > > Am 22.07.2021 um 11:52 schrieb Michael Guravage <
> gurav...@literatesolutions.com>:
> > >
> > > I have created a table and placed it inside a columns environment;
> which works as advertised. However, if I place any text before the column
> environment, the columns break. More clearly stated, only one column
> appears on the first table page; whereas two columns resume on subsequent
> pages. I have attached a mwe where you can use --mode=title to invoke the
> broken columns.
> > >
> > > Any advice on how to place text above the columns environment would be
> gratefully received.
> > >
> > > With kind regards,
> > >
> > > Michael
> > >
> > >
> ___
> > > 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] How to place text before a table inside a column environment

2021-07-22 Thread Henning Hraban Ramm
columnsets need \setuplayout[grid=yes] – did you check that?

HR

> Am 22.07.2021 um 12:42 schrieb Michael Guravage :
> 
> No, I'm afraid not. I have been combining the various table and column 
> environments, all without success - yet.
> 
> Michael
> 
> 
> 
> On Thu, Jul 22, 2021 at 12:01 PM Henning Hraban Ramm  wrote:
> Hi Michael,
> 
> you could try columnsets and use a columnsetspan for the text above the 
> columns.
> 
> I don’t know if tables work well within a columnset, though.
> 
> Hraban
> 
> 
> > Am 22.07.2021 um 11:52 schrieb Michael Guravage 
> > :
> > 
> > I have created a table and placed it inside a columns environment; which 
> > works as advertised. However, if I place any text before the column 
> > environment, the columns break. More clearly stated, only one column 
> > appears on the first table page; whereas two columns resume on subsequent 
> > pages. I have attached a mwe where you can use --mode=title to invoke the 
> > broken columns. 
> > 
> > Any advice on how to place text above the columns environment would be 
> > gratefully received.
> > 
> > With kind regards,
> > 
> > Michael
> > 
> > ___
> > 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 : http://contextgarden.net
___


Re: [NTG-context] How to place text before a table inside a column environment

2021-07-22 Thread Michael Guravage
No, I'm afraid not. I have been combining the various table and column
environments, all without success - yet.

Michael



On Thu, Jul 22, 2021 at 12:01 PM Henning Hraban Ramm  wrote:

> Hi Michael,
>
> you could try columnsets and use a columnsetspan for the text above the
> columns.
>
> I don’t know if tables work well within a columnset, though.
>
> Hraban
>
>
> > Am 22.07.2021 um 11:52 schrieb Michael Guravage <
> gurav...@literatesolutions.com>:
> >
> > I have created a table and placed it inside a columns environment; which
> works as advertised. However, if I place any text before the column
> environment, the columns break. More clearly stated, only one column
> appears on the first table page; whereas two columns resume on subsequent
> pages. I have attached a mwe where you can use --mode=title to invoke the
> broken columns.
> >
> > Any advice on how to place text above the columns environment would be
> gratefully received.
> >
> > With kind regards,
> >
> > Michael
> >
> >
> ___
> > 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] How to place text before a table inside a column environment

2021-07-22 Thread Henning Hraban Ramm
Hi Michael,

you could try columnsets and use a columnsetspan for the text above the columns.

I don’t know if tables work well within a columnset, though.

Hraban


> Am 22.07.2021 um 11:52 schrieb Michael Guravage 
> :
> 
> I have created a table and placed it inside a columns environment; which 
> works as advertised. However, if I place any text before the column 
> environment, the columns break. More clearly stated, only one column appears 
> on the first table page; whereas two columns resume on subsequent pages. I 
> have attached a mwe where you can use --mode=title to invoke the broken 
> columns. 
> 
> Any advice on how to place text above the columns environment would be 
> gratefully received.
> 
> With kind regards,
> 
> Michael
> 
> ___
> 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] How to place text before a table inside a column environment

2021-07-22 Thread Michael Guravage
I have created a table and placed it inside a columns environment; which
works as advertised. However, if I place any text before the column
environment, the columns break. More clearly stated, only one column
appears on the first table page; whereas two columns resume on subsequent
pages. I have attached a mwe where you can use --mode=title to invoke the
broken columns.

Any advice on how to place text above the columns environment would be
gratefully received.

With kind regards,

Michael
\startsetups[tablesettings]
  \setupTABLE[c][1][style=\tfc, color=darkred, align=left]
  \setupTABLE[c][2][width=3cm, align=middle]
  \setupTABLE[c][each][frame=off]
\stopsetups

\switchtobodyfont[10pt]

\starttext
  \doifmode{title}{\title{Rooster}}

  \startcolumns[n=2]
\bTABLE[split=yes, setups=tablesettings]
\dorecurse{75}{\bTR \bTD 25 \eTD \bTD aug, wo \eTD \bTD Lecture \eTD \eTR}
\eTABLE
  \stopcolumns
\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
___


[NTG-context] Expanding a table into the second column

2021-05-22 Thread Jeroen
In a document with two columns, is there a method to expand a table
partially into the second column in case there are many tablecolumns to show
___
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] Expanding a figure into the second column

2021-05-16 Thread Jeroen
I have the following MWE whereby the figure nicely fits the first column.
If I now have a picture with more details and want to expand it partially
into the second column, it will not work with width=1.5\textwidth , is
there a simple way to achieve this?



\starttext

\startcolumns[n=2]

\input{tufte}

\placefigure
  [here]
  []
  {my pic}
  {\externalfigure
 [cow]
 [width=.95\textwidth]}

\dorecurse{3}{\input{tufte}}

\stopcolumns

\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] specify column-width, with option=stretch

2020-11-05 Thread Peter Münster
On Wed, Nov 04 2020, Peter Münster wrote:

> I would like to specify the column-width of the first column to 5mm:
>
> \starttext
> [...]
> \stoptext

Sorry, that wasn't really a minimal example.

Here a better file, to show what I'm looking for:

\setupTABLE[textwidth=10cm, option=stretch]
\setupTABLE[c][1][width=15mm]
\starttext
Width of first column should be 15mm, but it is not:\par
\bTABLE
\bTR \bTD ? \eTD \bTD bla \eTD \bTD blablablabla \eTD \eTR
\eTABLE\par
\stoptext

TIA for any help,
-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] specify column-width, with option=stretch

2020-11-04 Thread Peter Münster
Hi,

I would like to specify the column-width of the first column to 5mm:

--8<---cut here---start->8---
\starttext
\setupTABLE[textwidth=99mm, option=stretch]
\setupTABLE[c][each][align={lohi, middle}]
\setupTABLE[c][1][height=5mm, style=\tfxx]
\framed[width=5mm, offset=0pt]{5}
\bTABLE
\bTR \bTD[nr=2] \setupinterlinespace[1.8ex] 1\\2\\3 \eTD
 \bTD bla \eTD \bTD blablabla \eTD \eTR
\bTR \bTD[nc=2] blabla \eTD \eTR
\eTABLE\par
\framed[width=99mm, offset=0pt]{99}
\stoptext
--8<---cut here---end--->8---

How could I do that please?

TIA for any hints,
-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Asymmetrical Column layout leads to an extra blank page (Solved!)

2020-10-30 Thread Ramkumar KB
Hello,

I managed to resolve the issue - which turns out bcos I had 2 back2back
columnset definitions. So instead, I combined them into 1 and the result
was ok.

*Before (leads to blank page or page with symmetrical columns):*

\definecolumnset[2col][n=2, distance=3.5mm, page=no]
\setupcolumnset[2col:1][width=.65\makeupwidth]
\setupcolumnset[2col:2][width=.35\makeupwidth]

\definecolumnset[3col][n=3, page=yes]
\setupcolumnset[3col:1][width=.25\makeupwidth]
\setupcolumnset[3col:2][width=.30\makeupwidth]
\setupcolumnset[3col:3][width=.45\makeupwidth]

\startcolumnset[2col]
...
\stopcolummnset

\startcolumnset[3col]
...
\stopcolummnset

*After (gets the desired result):*

\definecolumnset[summary][nleft=2, nright=3, distance=3.5mm, page=no]
\setupcolumnset[summary:1][width=.65\makeupwidth]
\setupcolumnset[summary:2][width=.35\makeupwidth]
\setupcolumnset[summary:3][width=.25\makeupwidth]
\setupcolumnset[summary:4][width=.30\makeupwidth]
\setupcolumnset[summary:5][width=.45\makeupwidth]

\startcolumnset[summary]
...
\stopcolummnset

Best,

On Thu, Oct 29, 2020 at 7:47 PM Ramkumar KB  wrote:

> Hello All,
>
> I am new to this community and am really excited about the possibilities
> with ConTeXt.
>
> My question is related to the thread -
> https://www.mail-archive.com/ntg-context@ntg.nl/msg92767.html (the
> suggested solution did not work, unfortunately)
>
> After trying out various options, I am faced with these 2 (sub-optimal)
> choices -
>
>1. Extra Blank page with Asymmetric Columns in the next page (with the
>\subject{} uncommented)
>2. No Blank page with Symmetric Columns (with the \subject{} commented)
>3. page=yes / no - does not work (same outcome as above)
>
> I am not sure the role of \section or \subject in this matter (seems to be
> somehow interfering with asymmetrical columnset).
>
> \usemodule[newcolumnsets]
> ...
>
> % \subject{} \definecolumnset[soi1][n=3, distance=3mm, page=yes]
> % \definecolumnset[currency][n=3, page=yes]
> \setupcolumnset[soi1:1][width=.25\makeupwidth]
> \setupcolumnset[soi1:2][width=.30\makeupwidth]
> \setupcolumnset[soi1:3][width=.45\makeupwidth]
>
> Any tips, help or pointers would be greatly appreciated. If not for
> columnset, is there any other way to get this type of layout?
>
> Thank you,
>
___
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] Asymmetrical Column layout leads to an extra blank page

2020-10-29 Thread Ramkumar KB
Hello All,

I am new to this community and am really excited about the possibilities
with ConTeXt.

My question is related to the thread -
https://www.mail-archive.com/ntg-context@ntg.nl/msg92767.html (the
suggested solution did not work, unfortunately)

After trying out various options, I am faced with these 2 (sub-optimal)
choices -

   1. Extra Blank page with Asymmetric Columns in the next page (with the
   \subject{} uncommented)
   2. No Blank page with Symmetric Columns (with the \subject{} commented)
   3. page=yes / no - does not work (same outcome as above)

I am not sure the role of \section or \subject in this matter (seems to be
somehow interfering with asymmetrical columnset).

\usemodule[newcolumnsets]
...

% \subject{} \definecolumnset[soi1][n=3, distance=3mm, page=yes]
% \definecolumnset[currency][n=3, page=yes]
\setupcolumnset[soi1:1][width=.25\makeupwidth]
\setupcolumnset[soi1:2][width=.30\makeupwidth]
\setupcolumnset[soi1:3][width=.45\makeupwidth]

Any tips, help or pointers would be greatly appreciated. If not for
columnset, is there any other way to get this type of layout?

Thank you,
___
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] Column not Balancing, Footnote is Missing

2020-09-08 Thread Wolfgang Schuster

Art Chimes schrieb am 08.09.2020 um 00:38:

Greetings, list. My first post here. Please be gentle!

The command \contextversion reports I am using 2020.09.03 20:03 on Windows 10.

The MWE below produces a column and a half of text, not balanced
(despite the \setupcolumns [...balance=yes...] command. Also, the
footnote *number* appears on the PDF, but the *text* of the footnote
doesn't.

However, when I use the online compiler (live.contextgarden.net,
reported version 2020.06.30 17:30, older than mine), the footnote text
*does* appear, though the columns are still not balanced.

%

\usemodule[ipsum]
\setupfootnotes[location=page,rule=on,bodyfont=8.5pt]
\setupcolumns [n=2,balance=yes,blank=line]

\starttext
\chapter{Footnote Test  —  \contextversion}
\startcolumns

\ipsum

Cursus metus aliquam eleifend mi in nulla posuere sollicitudin
aliquam. Id aliquet risus feugiat in ante metus dictum at
tempor.\footnote{Thor, A.U.: {\it Latin 101 for Dummies} (Rome,
Dummies Pub., MCMLXXIX)}

\ipsum[alternative=lines,n=20]

\end columns
\stoptext

%

Question (1) : Why don't the columns balance, and how can I fix it?


Replace

    \end columns

with

    \stopcolumns

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] Column not Balancing, Footnote is Missing

2020-09-07 Thread Art Chimes
Greetings, list. My first post here. Please be gentle!

The command \contextversion reports I am using 2020.09.03 20:03 on Windows 10.

The MWE below produces a column and a half of text, not balanced
(despite the \setupcolumns [...balance=yes...] command. Also, the
footnote *number* appears on the PDF, but the *text* of the footnote
doesn't.

However, when I use the online compiler (live.contextgarden.net,
reported version 2020.06.30 17:30, older than mine), the footnote text
*does* appear, though the columns are still not balanced.

%

\usemodule[ipsum]
\setupfootnotes[location=page,rule=on,bodyfont=8.5pt]
\setupcolumns [n=2,balance=yes,blank=line]

\starttext
\chapter{Footnote Test  —  \contextversion}
\startcolumns

\ipsum

Cursus metus aliquam eleifend mi in nulla posuere sollicitudin
aliquam. Id aliquet risus feugiat in ante metus dictum at
tempor.\footnote{Thor, A.U.: {\it Latin 101 for Dummies} (Rome,
Dummies Pub., MCMLXXIX)}

\ipsum[alternative=lines,n=20]

\end columns
\stoptext

%

Question (1) : Why don't the columns balance, and how can I fix it?
Question (2) : Why does the footnote appear only with the online
compiler? What am I doing wrong?
Question (3) : For extra credit: How can I get the footnotes to
stretch the entire width of the text block instead of the width of one
column?

I did try to parse the somewhat opaque (to me) information in the wiki
and looked in the mailing list archives, but I didn't find the
information I needed.

Thank you for any help you can offer.

Art in Arlington, Virginia, USA.
___
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] pagecolumns: get the current column

2020-06-26 Thread Hans Hagen

On 6/26/2020 5:39 PM, mf wrote:

Hello list,
I'm using a 2-columns layout and I'd like to put some information in the 
margin.
I should put that information in the left margin when I'm in the left 
column, and in the right margin when I'm in the right column, to prevent 
the extra information overlapping the main text in the other column.


I found a useful counter in page-pcl.mkiv: \c_page_col_current.

Here's a MWE:

\unprotect
\def\curCol{\c_page_col_current}
\protect

\def\InfoInMargin#1{\doifelse{\the\curCol}{1}{\inmargin{#1}}{\inothermargin{#1}}} 

\def\TestText{\InfoInMargin{\bf \the\curCol}\input ward 
\InfoInMargin{\bf \the\curCol} \input ward}

\starttext
   \startpagecolumns[n=2,distance=25mm]
   \dorecurse{5}{\TestText\par}
   \stoppagecolumns
\stoptext

\c_page_col_current works most of the time, but unfortunately it tells 
you the current column before the lines of a paragraph get distributed 
over columns.


So sometimes it fails. You can see that in the MWE: the bold "1" between 
columns in the upper part of the page. It should be a bold "2" in the 
right margin.


Is there a better way to read the current column?
Because I want you to run the usual stress test on the latest greatest, 
here's your reward:


\usemodule[article-basic] \setupalign[verytolerant,stretch] \dontcomplain

\newcounter\MyCounter

\def\InfoInMargin#1%
  {\doglobal\increment\MyCounter
   \ifodd\MPcolumn{\MPregion{MyPos:\MyCounter}}\relax
  \inmargin{\xypos{MyPos:\MyCounter}#1}%
   \else
  \inothermargin{\xypos{MyPos:\MyCounter}#1}%
   \fi}

\starttext
  \startpagecolumns[n=2,distance=10mm]
\dorecurse {50}  {
\InfoInMargin{\bf#1}\input ward
\InfoInMargin{\sl#1}\input ward
\par
}
  \stoppagecolumns
\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
___


[NTG-context] pagecolumns: get the current column

2020-06-26 Thread mf

Hello list,
I'm using a 2-columns layout and I'd like to put some information in the 
margin.
I should put that information in the left margin when I'm in the left 
column, and in the right margin when I'm in the right column, to prevent 
the extra information overlapping the main text in the other column.


I found a useful counter in page-pcl.mkiv: \c_page_col_current.

Here's a MWE:

\unprotect
\def\curCol{\c_page_col_current}
\protect

\def\InfoInMargin#1{\doifelse{\the\curCol}{1}{\inmargin{#1}}{\inothermargin{#1}}}
\def\TestText{\InfoInMargin{\bf \the\curCol}\input ward 
\InfoInMargin{\bf \the\curCol} \input ward}

\starttext
  \startpagecolumns[n=2,distance=25mm]
  \dorecurse{5}{\TestText\par}
  \stoppagecolumns
\stoptext

\c_page_col_current works most of the time, but unfortunately it tells 
you the current column before the lines of a paragraph get distributed 
over columns.


So sometimes it fails. You can see that in the MWE: the bold "1" between 
columns in the upper part of the page. It should be a bold "2" in the 
right margin.


Is there a better way to read the current column?

Thanks,
Massi
___
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] background of \typing fills column

2020-06-01 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 01.06.2020 um 20:22:

Hi,
I finally wanted to attack CG journal 2019 again and stumble upon this error:

If an article contains several \starttyping ... \stoptyping examples with a 
textbackground, it sometimes fills the whole column (pagecolumns). It doesn’t occur if 
the "typing" is at top or bottom of the column or even breaks.

It’s the same with MkIV and LMTX.

I’ll try to come up with a MWE, but perhaps you already know what’s wrong?


Can you show the typing and textbackground settings.

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] background of \typing fills column

2020-06-01 Thread Henning Hraban Ramm
Hi,
I finally wanted to attack CG journal 2019 again and stumble upon this error:

If an article contains several \starttyping ... \stoptyping examples with a 
textbackground, it sometimes fills the whole column (pagecolumns). It doesn’t 
occur if the "typing" is at top or bottom of the column or even breaks.

It’s the same with MkIV and LMTX.

I’ll try to come up with a MWE, but perhaps you already know what’s wrong?

Here’s the PDF: https://sedna.fiee.net/f/a75380127d7b4f17a940/

Best, 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] unwanted vertical spaces after sectionhead in column layout

2020-05-02 Thread Damien Thiriet
Hello list,


Looks like lmtx adds extra vertical space after heads.
Compare those two MWE:

\setuppapersize [S4]
\setuphead [subject] [after={}]

\starttext
\startsubject[title={blabla}]
\input knuth
\stopsubject

\stoptext


\setuppapersize [S4]
\setuphead [subject] [after={}]
\starttext
\startcolumns [n=3]
\startsubject[title={blabla}]
\input knuth
\stopsubject
\stopcolumns
\stoptext

Greetings,

Damien Thiriet (missing BachoTeX)
___
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] balance=yes eats up footnote in one-line column

2020-04-22 Thread Joey McCollum
I noticed some unexpected behavior while putting together a minimal working
example for a different issue. In a multi-column layout with column
balancing turned on, if the first column contains a single line and that
line contains a footnote, then the footnote will not be typeset. A minimal
example demonstrating this follows:

\starttext
\startcolumns[n=2]
A single line of text with balancing.\footnote{Footnote dropped in
column balancing.}
\stopcolumns
\stoptext


I typeset this using ConTeXt version 2020.03.10 (from the TeXLive 2020
distribution).

Clearly, the situation I described is an exceptional one, but it could
happen in some real cases (e.g., if the last page of a two-column  text
consists of a widowed line with a footnote), and in any event, this seems
like unintended behavior, so I thought I should bring it to the mailing
list's attention.
___
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] column(sets) questions

2020-01-18 Thread Henning Hraban Ramm
Background: I’m typesetting the annual report of my home town’s "friends of the 
earth" chapter. The corporate design has pages with one, two and three columns 
(yes, that makes sense).
Chapter titles run over the whole page width or sometimes only over two columns 
on three column pages. Images, ads and "boxes" are one or two columns wide 
(here, top or bottom placement, "here" only in one column).
There are a few simple tables on one or two column pages.

I guess I must use columnsets? Still looking into the other options.
Can’t remember the details of the discussion I had with Hans in Bassenge...

*
In the preface of the columnsets manual we’re advised to 
\usemodule[newcolumnsets]
This seems outdated.

*
If I use columnsets for two and three column pages, should I also use a 
one-column columnset for consistency?

*
Can I define columnsetspans whose width depends on the columnset? e.g. like

\definecolumnsetspan[Title][n=2]
\definecolumnsetspan[Intro][n=2]

\startsetups cs:TwoCol
  \setupcolumnsetspan[Title][n=2]
  \setupcolumnsetspan[Intro][n=1]
\stopsetups

\startsetups cs:ThreeCol
  \setupcolumnsetspan[Title][n=3]
  \setupcolumnsetspan[Intro][n=2]
\stopsetups

\definecolumnset[ZweiS][
  n=2,
  setups=cs:TwoCol,
]

\definecolumnset[DreiS][
  n=3,
  setups=cs:ThreeCol,
]

(This doesn’t work, and it’s not a MWE.)

*
ConTeXt stops a few times (probably for every float) on \wait =,
I guess that comes from \page_grd_command_flush_floats in page-cst.mkiv;
is that necessary?

*
Page columns don’t have spans, right?

*
If I would want to use mixed columns, do I need to use \setupmixedcolumns etc. 
or do mixed columns already replace columns if I don’t \usemodule[old-columns]?
Do mixed columns have spans?


So far...


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] Line numbering in two column layout conflicts with marking

2020-01-07 Thread Hans Hagen

On 1/7/2020 1:26 PM, Oliver von Criegern wrote:

Using \definepagecolumns[xyz][n=2] instead of \setupcolumns[n=2]
and \startpagecolumns[xyz] etc. instead of \startcolumns etc.
seems to do what I want, except that the columns of the last page
aren't balanced any more.

Anyway, pagecolumns seems to be experimental.
The manual says "Don't use page columns in production".
as long as you keep in mind that they might 'improve' you can just use 
them (they are just not tested a lot)


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] Line numbering in two column layout conflicts with marking

2020-01-07 Thread Oliver von Criegern

Using \definepagecolumns[xyz][n=2] instead of \setupcolumns[n=2]
and \startpagecolumns[xyz] etc. instead of \startcolumns etc.
seems to do what I want, except that the columns of the last page
aren't balanced any more.

Anyway, pagecolumns seems to be experimental.
The manual says "Don't use page columns in production".


Am 23.12.19 um 12:02 schrieb Wolfgang Schuster:

Oliver von Criegern schrieb am 18.12.2019 um 17:39:

So there seems to be no solution for this?


Not a solution but pagecolumns show the correct marks even with line 
numbering.


Wolfgang


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Line numbering in two column layout conflicts with marking

2019-12-23 Thread Wolfgang Schuster

Oliver von Criegern schrieb am 18.12.2019 um 17:39:

So there seems to be no solution for this?


Not a solution but pagecolumns show the correct marks even with line 
numbering.


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] Line numbering in two column layout conflicts with marking

2019-12-18 Thread Oliver von Criegern

So there seems to be no solution for this?

Am 09.12.19 um 15:18 schrieb Oliver von Criegern:

Any suggestions, how to solve this problem?

Am 02.12.19 um 20:06 schrieb Oliver von Criegern:

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second 
page.


Without linenumbering, the header of the first page reads "ONE -- 
TWO", as is to be expected.


Best regards,
Oliver



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Line numbering in two column layout conflicts with marking

2019-12-09 Thread Oliver von Criegern

Any suggestions, how to solve this problem?

Am 02.12.19 um 20:06 schrieb Oliver von Criegern:

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second 
page.


Without linenumbering, the header of the first page reads "ONE -- 
TWO", as is to be expected.


Best regards,
Oliver



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Line numbering in two column layout conflicts with marking

2019-12-02 Thread Oliver von Criegern

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second page.


Without linenumbering, the header of the first page reads "ONE -- TWO", 
as is to be expected.


Best regards,
Oliver


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Cross references to column numbers

2019-11-16 Thread Hans Hagen

On 11/15/2019 8:22 PM, Pablo Rodriguez wrote:

On 11/15/19 3:44 PM, Oliver von Criegern wrote:

Could someone please take a look at this?

Am 12.11.19 um 13:02 schrieb Oliver von Criegern:

[...]
As you will see, targets A, B and C are all in the first column, and
targets D, E and F are all in the second column. But the references
read as follows:


Hi Oliver,

with latest beta from 2019.11.14 17:07 (and even the previous one),
references read:

 A: page 1, column 1, line 29.
 B: page 1, column 1, line 29.
 C: page 1, column 1, line 29.
 D: page 1, column 2, line 14.
 E: page 1, column 2, line 14.
 F: page 1, column 2, line 14.

I think your issue has been fixed. Or what is wrong there?

different implementation

(taco's solution is for the older method, but that method is a bit 
sensitive for different r/l layouts)


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] Cross references to column numbers

2019-11-15 Thread Pablo Rodriguez
On 11/15/19 3:44 PM, Oliver von Criegern wrote:
> Could someone please take a look at this?
>
> Am 12.11.19 um 13:02 schrieb Oliver von Criegern:
>> [...]
>> As you will see, targets A, B and C are all in the first column, and
>> targets D, E and F are all in the second column. But the references
>> read as follows:

Hi Oliver,

with latest beta from 2019.11.14 17:07 (and even the previous one),
references read:

A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 1, line 29.
D: page 1, column 2, line 14.
E: page 1, column 2, line 14.
F: page 1, column 2, line 14.

I think your issue has been fixed. Or what is wrong there?

Just in case it helps,

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] Cross references to column numbers

2019-11-15 Thread Taco Hoekwater


> On 15 Nov 2019, at 16:31, Taco Hoekwater  wrote:
> 
> But that outer \numexpr rounds instead of truncates. so anything that
> is past halfway   of the column is rounded too far up. This fixes it
 ^ horizontally

Taco
___
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] Cross references to column numbers

2019-11-15 Thread Taco Hoekwater
Hi,

> On 15 Nov 2019, at 15:44, Oliver von Criegern 
>  wrote:
> 
> Could someone please take a look at this?

Well, I can tell you what is wrong …

The definition of \referencecolumnnumber is like this:

\def\referencecolumnnumber
  {\numexpr \dimexpr \clf_referenceposx -\cutspace \relax /
\dimexpr \makeupwidth /\nofcolumns \relax 
   +\plusone \relax }

But that outer \numexpr rounds instead of truncates. so anything that
is past halfway of the column is rounded too far up. This fixes it
(but not very elegantly)

\unprotect
\def\referencecolumnnumber
  {\numexpr \dimexpr \clf_referenceposx -\cutspace - \makeupwidth 
/(2*\nofcolumns) \relax /
\dimexpr \makeupwidth /\nofcolumns \relax 
   +\plusone \relax }
\protect
 

Best wishes,
Taco

> 
> Am 12.11.19 um 13:02 schrieb Oliver von Criegern:
>> Am 10.09.19 um 13:16 schrieb Hans Hagen:
>>> On 9/9/2019 10:05 PM, Henri Menke wrote:
>>>> Bump
>>>> 
>>>> On 9/3/19 4:46 AM, Oliver von Criegern wrote:
>>>>> Dear list members,
>>>>> 
>>>>> is there any way to get a cross reference to a column in a two column 
>>>>> layout?
>>> 
>>> yes and no:
>>> 
>>> no : there is not something buil tin
>>> yes: one can write some hack in a few lines
>>> 
>>> but instead of posting such a hack (which then will a live of its own) i'll 
>>> add a feature:
>>> 
>>> \pagereference[column:#1]
>>> 
>>> \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}
>>> 
>>> in the next beta,
>>> 
>>> Hans
>> 
>> Thanks for implementing this, but I am afraid it does not work properly, at 
>> least not if there are several targets following one after another.
>> 
>> Consider this example:
>> 
>> 
>> \setupcolumns[
>> n=2,
>> ]
>> \setuplinenumbering[
>> step=5,
>> method=page,
>> ]
>> 
>> \def\Lab#1{%
>> \pagereference[#1]%
>> \pagereference[column:#1]%
>> \someline[#1]%
>> }
>> 
>> \def\Ref#1{
>> page \at[#1],
>> column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
>> line \inlinerange[#1].
>> }
>> 
>> \starttext
>> \startcolumns
>> \startlinenumbering
>> 
>> REFERENCES:\par
>> A: \Ref{A}\par
>> B: \Ref{B}\par
>> C: \Ref{C}\par
>> D: \Ref{D}\par
>> E: \Ref{E}\par
>> F: \Ref{F}\par
>> \input lorem
>> TARGETS:
>> \Lab{A} A,
>> \Lab{B} B,
>> \Lab{C} C.
>> \input lorem
>> TARGETS:
>> \Lab{D} D,
>> \Lab{E} E,
>> \Lab{F} F.
>> \input lorem
>> 
>> \stoplinenumbering
>> \stopcolumns
>> \stoptext
>> 
>> As you will see, targets A, B and C are all in the first column, and targets 
>> D, E and F are all in the second column. But the references read as follows:
>> 
>> A: page 1, column 1, line 29.
>> B: page 1, column 1, line 29.
>> C: page 1, column 2, line 29.
>> D: page 1, column 2, line 14.
>> E: page 1, column 3, line 14.
>> F: page 1, column 3, line 14.
>> 
>> 
>> Best regards,
>> Oliver
>> 
>> 
>>> 
>>>>> At least, I would need to get some value that tells me whether the target 
>>>>> is in the left or in the right column. How to achieve this?
>>>>> 
>>>>> This is the more simplified version of the my previous question cited 
>>>>> below.
>>>>> 
>>>>> Best regards,
>>>>> Oliver.
>>>>> 
>>>>> 
>>>>> Am 12.08.19 um 15:26 schrieb Oliver von Criegern:
>>>>>> Dear list members,
>>>>>> 
>>>>>> how can I create cross references to column numbers?
>>>>>> 
>>>>>> I have a two column layout with column numbers in the header instead of 
>>>>>> page numbers (actually, these column numbers are calculated from the 
>>>>>> page numbers). Now I want to create a cross reference that returns the 
>>>>>> column number of the target. How can I achieve this?
>>>>>> 
>>>>>> Of course, I can get the page number with \pagereference (for the 
>>>>>> target) and \at (for the reference), but for calculating the column 
>>>>>> number (according to what I did in the header), I would also need to 
>>>>>> know whether the target is in the left or in the right column, and I 
>

Re: [NTG-context] Cross references to column numbers

2019-11-15 Thread Oliver von Criegern

Could someone please take a look at this?

Am 12.11.19 um 13:02 schrieb Oliver von Criegern:

Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two 
column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its 
own) i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


Thanks for implementing this, but I am afraid it does not work 
properly, at least not if there are several targets following one 
after another.


Consider this example:


\setupcolumns[
    n=2,
]
\setuplinenumbering[
    step=5,
    method=page,
]

\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}

\def\Ref#1{
page \at[#1],
column 
\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},

line \inlinerange[#1].
}

\starttext
\startcolumns
\startlinenumbering

REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B} B,
\Lab{C} C.
\input lorem
TARGETS:
\Lab{D} D,
\Lab{E} E,
\Lab{F} F.
\input lorem

\stoplinenumbering
\stopcolumns
\stoptext

As you will see, targets A, B and C are all in the first column, and 
targets D, E and F are all in the second column. But the references 
read as follows:


A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 2, line 29.
D: page 1, column 2, line 14.
E: page 1, column 3, line 14.
F: page 1, column 3, line 14.


Best regards,
Oliver




At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question 
cited below.


Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header 
instead of page numbers (actually, these column numbers are 
calculated from the page numbers). Now I want to create a cross 
reference that returns the column number of the target. How can I 
achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the 
column number (according to what I did in the header), I would 
also need to know whether the target is in the left or in the 
right column, and I can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in 
the case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to 
refer to a line, I need \someline (for the target) and \inline 
(for the reference), but only if I want it to automatically add 
the word "line" or something else before the number, otherwise I 
have to use \inlinerange. It took me some time to find that out. 
Wouldn't it be easier to have just one command for the target and 
another one for the reference, and everything else, as counters 
and headers to be returned, text to be added etc. to be configured 
by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in 
a macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to 
drop compatibility.


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
___ 




--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Gop

Re: [NTG-context] Cross references to column numbers

2019-11-12 Thread Oliver von Criegern

Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two 
column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its own) 
i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


Thanks for implementing this, but I am afraid it does not work properly, 
at least not if there are several targets following one after another.


Consider this example:


\setupcolumns[
    n=2,
]
\setuplinenumbering[
    step=5,
    method=page,
]

\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}

\def\Ref#1{
page \at[#1],
column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}

\starttext
\startcolumns
\startlinenumbering

REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B} B,
\Lab{C} C.
\input lorem
TARGETS:
\Lab{D} D,
\Lab{E} E,
\Lab{F} F.
\input lorem

\stoplinenumbering
\stopcolumns
\stoptext

As you will see, targets A, B and C are all in the first column, and 
targets D, E and F are all in the second column. But the references read 
as follows:


A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 2, line 29.
D: page 1, column 2, line 14.
E: page 1, column 3, line 14.
F: page 1, column 3, line 14.


Best regards,
Oliver




At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question 
cited below.


Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header 
instead of page numbers (actually, these column numbers are 
calculated from the page numbers). Now I want to create a cross 
reference that returns the column number of the target. How can I 
achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need 
to know whether the target is in the left or in the right column, 
and I can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the 
case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to 
refer to a line, I need \someline (for the target) and \inline (for 
the reference), but only if I want it to automatically add the word 
"line" or something else before the number, otherwise I have to use 
\inlinerange. It took me some time to find that out. Wouldn't it be 
easier to have just one command for the target and another one for 
the reference, and everything else, as counters and headers to be 
returned, text to be added etc. to be configured by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in 
a macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to 
drop compatibility.


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
___ 



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___

Re: [NTG-context] Column sets (span) & unwanted vertical gap

2019-10-01 Thread Wolfgang Schuster

Procházka Lukáš Ing. schrieb am 01.10.2019 um 14:51:

Hello,

the code bellow produces unwanted vertical gap between the bottom 
border of the figure and the following title "A" in the first column 
(marked by red arrows "<->" in the PDF attached).


Note that in the second column there is no such gap.

I tried to play with "before", "inbetween", "beforesection" and other 
keys of \setuphead to remove the gap but without success.


Is there a way to avoid the vertical gap?

https://www.mail-archive.com/ntg-context@ntg.nl/msg89563.html

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] Column sets (span) & unwanted vertical gap

2019-10-01 Thread Procházka Lukáš Ing .

Hello,

the code bellow produces unwanted vertical gap between the bottom border of the figure and the following 
title "A" in the first column (marked by red arrows "<->" in the PDF attached).

Note that in the second column there is no such gap.

I tried to play with "before", "inbetween", "beforesection" and other keys of 
\setuphead to remove the gap but without success.

Is there a way to avoid the vertical gap?

My code so far:


\setuppapersize[A3,landscape]

\setuplayout
  [topspace=10mm,header=5mm,headerdistance=5mm,height=270mm,
   backspace=20mm,width=380mm,
  ]

\setupheadertexts[]
\setupfootertexts[]

\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

\setupindenting[no]
\setupwhitespace[none]

\setuplayout[grid=yes]

\definehead[MyTit][title]
\setuphead[MyTit]
  [style=\bf,color=MyBlue,
   
before={\blank[none]},after={\blank[none]},inbetween={\blank[none]},beforesection={BS},aftersection={AS},
   page=no,%grid=yes,
  ]

%

%\showframe
%\showboxes

%\showlayout

%

\starttext
  \startcolumnset[example]
\startcolumnsetspan[wide]
  \externalfigure[cow][height=120mm,frame=on]
  %\vbox to120mm{}
\stopcolumnsetspan
\MyTit{A}
  \input knuth
\MyTit{B}
  \input knuth
  \stopcolumnset
\stoptext


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
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t6.mkiv
Description: Binary data


t6~~.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] Column(set)s & overlapping lines

2019-09-30 Thread Procházka Lukáš Ing .

Hello,

thank you for quick response - I didn't notice such question.

I added some info to wiki:

https://wiki.contextgarden.net/Command/startcolumnset#Note

Best,

Lukas


On Tue, 01 Oct 2019 08:24:19 +0200, Henri Menke  wrote:


This has been asked many times.
Columnsets need grid.

\setuplayout[grid=yes]

Cheers, Henri

On 10/1/19 7:16 PM, Procházka Lukáš Ing. wrote:

Hello,

I have the following code:


\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

%

\starttext
   \startcolumnset[example]
 \startcolumnsetspan[wide]
   %\externalfigure[hacker][width=120mm] % Produces overlapping last two 
lines in the first column, too
   \vbox to80mm{}
 \stopcolumnsetspan

 \input knuth
   \stopcolumnset
\stoptext


The last two lines in the first column overlap (it seems that the last line is 
typeset a bit higher than the pre-last line) - how to avoid it?

Best regards,

Lukas



___
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

___
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] Column(set)s & overlapping lines

2019-09-30 Thread Henri Menke
This has been asked many times.
Columnsets need grid.

\setuplayout[grid=yes]

Cheers, Henri

On 10/1/19 7:16 PM, Procházka Lukáš Ing. wrote:
> Hello,
> 
> I have the following code:
> 
> 
> \definecolumnset[example][n=3,balancing=no]
> \definecolumnsetspan[wide][n=2]
> 
> \setupexternalfigures[location=default]
> 
> %
> 
> \starttext
>\startcolumnset[example]
>  \startcolumnsetspan[wide]
>%\externalfigure[hacker][width=120mm] % Produces overlapping last two 
> lines in the first column, too
>\vbox to80mm{}
>  \stopcolumnsetspan
> 
>  \input knuth
>\stopcolumnset
> \stoptext
> 
> 
> The last two lines in the first column overlap (it seems that the last line 
> is typeset a bit higher than the pre-last line) - how to avoid it?
> 
> Best regards,
> 
> Lukas
> 
> 
___
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] Column(set)s & overlapping lines

2019-09-30 Thread Procházka Lukáš Ing .

Hello,

I have the following code:


\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

%

\starttext
  \startcolumnset[example]
\startcolumnsetspan[wide]
  %\externalfigure[hacker][width=120mm] % Produces overlapping last two 
lines in the first column, too
  \vbox to80mm{}
\stopcolumnsetspan

\input knuth
  \stopcolumnset
\stoptext


The last two lines in the first column overlap (it seems that the last line is 
typeset a bit higher than the pre-last line) - how to avoid it?

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
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] Options for \column (was: Columns with non-equal width; nested columns)

2019-09-25 Thread Henning Hraban Ramm

> Am 2019-09-25 um 22:29 schrieb Procházka Lukáš Ing. :
> 
> NB: I've noticed many changes on wiki 
> (https://wiki.contextgarden.net/Special:RecentChanges) in last days issued by 
> you, Hraban, so thank you for maintaining wiki.

You’re welcome!
I’m working on my ConTeXt book as well as two books typeset with ConTeXt, so I 
use the wiki a lot. If I see something’s wrong or missing, I change that – if 
it’s not too much work, that is: Therefore, columns are a big todo.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] Options for \column (was: Columns with non-equal width; nested columns)

2019-09-25 Thread Procházka Lukáš Ing .

Hello,

I extended the "Description" section at 
https://wiki.contextgarden.net/Command/column#Description by an incomplete list of 
options.


Please try it and report back, i.e. document it in the wiki. Someone has to do 
it…


The only effect I can see is when I use \column (= go to next column) and 
\column[last] (go to last column);
just guessing what other options mean;
and no idea what [3*5] does.


I only ever used plain \column.


So did I. And I tried \column[last] this time, too.

So - anyone with better knowledge to fill meaning of the unknown \column 
options?

BTW, what effect has using \column more times than \startcolumns[n=...] 
predicts?

Best,

Lukas

NB: I've noticed many changes on wiki 
(https://wiki.contextgarden.net/Special:RecentChanges) in last days issued by 
you, Hraban, so thank you for maintaining wiki.



Maybe the source helps further: 
https://source.contextgarden.net/tex/context/base/mkiv/page-cst.mkiv



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD



--
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] Extracting a column from an array in lua

2019-09-20 Thread Otared Kavian
Hi,

Probably this is a silly question… 
In lua, I have an array named  t which is determined in a piece of lua code, 
having (say) two columns and I want to extract for example the first column of 
t and call the new array tt.
In Matlab, Scilab and friends, this can done by saying tt = t[:,1].

Is this possible in lua?
For the moment I have something like this, but I think it is not a good 
approach:

\starttext
\startluacode
t = {}  -- a silly example of a matrix...
for i = 1, 3 do
t[i] = {}
t[i]["columnOne"] = 10*i + 1
t[i]["columnTwo"] = 10*i + 2
end
tt = {}
for i = 1,3 do -- is it possible to avoid this ?
tt[i] = t[i]["columnOne"]
    end
\stopluacode

The first column of the array  \type{t} is: 
\ctxlua{context.print(tt," ; ")}
\stoptext

Many thanks for any help,
Best regards: 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] Cross references to column numbers

2019-09-10 Thread Henning Hraban Ramm
Am 2019-09-10 um 13:16 schrieb Hans Hagen :
> 
> On 9/9/2019 10:05 PM, Henri Menke wrote:
>> Bump
>> On 9/3/19 4:46 AM, Oliver von Criegern wrote:
>>> Dear list members,
>>> 
>>> is there any way to get a cross reference to a column in a two column 
>>> layout?
> 
> yes and no:
> 
> no : there is not something buil tin
> yes: one can write some hack in a few lines
> 
> but instead of posting such a hack (which then will a live of its own) i'll 
> add a feature:
> 
> \pagereference[column:#1]
> 
> \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}
> 
> in the next beta,

Dear Oliver,
please don’t forget to document this on the appropriate wiki pages!


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] Cross references to column numbers

2019-09-10 Thread Oliver von Criegern


Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two 
column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its own) 
i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans



This would be great, thanks!

Best regards,
Oliver




At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question 
cited below.


Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header 
instead of page numbers (actually, these column numbers are 
calculated from the page numbers). Now I want to create a cross 
reference that returns the column number of the target. How can I 
achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need 
to know whether the target is in the left or in the right column, 
and I can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the 
case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to 
refer to a line, I need \someline (for the target) and \inline (for 
the reference), but only if I want it to automatically add the word 
"line" or something else before the number, otherwise I have to use 
\inlinerange. It took me some time to find that out. Wouldn't it be 
easier to have just one command for the target and another one for 
the reference, and everything else, as counters and headers to be 
returned, text to be added etc. to be configured by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in 
a macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to 
drop compatibility.


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
___ 



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Cross references to column numbers

2019-09-10 Thread Hans Hagen

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its own) 
i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


At least, I would need to get some value that tells me whether the target is in 
the left or in the right column. How to achieve this?

This is the more simplified version of the my previous question cited below.

Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header instead of page 
numbers (actually, these column numbers are calculated from the page numbers). 
Now I want to create a cross reference that returns the column number of the 
target. How can I achieve this?

Of course, I can get the page number with \pagereference (for the target) and 
\at (for the reference), but for calculating the column number (according to 
what I did in the header), I would also need to know whether the target is in 
the left or in the right column, and I can't see how I can get this information.

For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers

Besides, I am wondering, regarding the generally very regular and consistent naming of 
commands in ConTeXt, why this is not so in the case of references. For example, to refer 
to a page, I need \pagereference (for the target) and \at (for the reference); to refer 
to a line, I need \someline (for the target) and \inline (for the reference), but only if 
I want it to automatically add the word "line" or something else before the 
number, otherwise I have to use \inlinerange. It took me some time to find that out. 
Wouldn't it be easier to have just one command for the target and another one for the 
reference, and everything else, as counters and headers to be returned, text to be added 
etc. to be configured by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in a 
macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to drop 
compatibility.


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] Cross references to column numbers

2019-09-09 Thread Henri Menke
Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:
> Dear list members,
> 
> is there any way to get a cross reference to a column in a two column layout?
> 
> At least, I would need to get some value that tells me whether the target is 
> in the left or in the right column. How to achieve this?
> 
> This is the more simplified version of the my previous question cited below.
> 
> Best regards,
> Oliver.
> 
> 
> Am 12.08.19 um 15:26 schrieb Oliver von Criegern:
>> Dear list members,
>>
>> how can I create cross references to column numbers?
>>
>> I have a two column layout with column numbers in the header instead of page 
>> numbers (actually, these column numbers are calculated from the page 
>> numbers). Now I want to create a cross reference that returns the column 
>> number of the target. How can I achieve this?
>>
>> Of course, I can get the page number with \pagereference (for the target) 
>> and \at (for the reference), but for calculating the column number 
>> (according to what I did in the header), I would also need to know whether 
>> the target is in the left or in the right column, and I can't see how I can 
>> get this information.
>>
>> For an example, see the question posted by me at stackexchange:
>> https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers
>>
>> Besides, I am wondering, regarding the generally very regular and consistent 
>> naming of commands in ConTeXt, why this is not so in the case of references. 
>> For example, to refer to a page, I need \pagereference (for the target) and 
>> \at (for the reference); to refer to a line, I need \someline (for the 
>> target) and \inline (for the reference), but only if I want it to 
>> automatically add the word "line" or something else before the number, 
>> otherwise I have to use \inlinerange. It took me some time to find that out. 
>> Wouldn't it be easier to have just one command for the target and another 
>> one for the reference, and everything else, as counters and headers to be 
>> returned, text to be added etc. to be configured by options?
>>
>> Best regards,
>> Oliver.
>>
>>
> ___
> 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] Cross references to column numbers

2019-09-02 Thread Oliver von Criegern

Dear list members,

is there any way to get a cross reference to a column in a two column 
layout?


At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question cited below.

Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header instead 
of page numbers (actually, these column numbers are calculated from 
the page numbers). Now I want to create a cross reference that returns 
the column number of the target. How can I achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need to 
know whether the target is in the left or in the right column, and I 
can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the 
case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to refer 
to a line, I need \someline (for the target) and \inline (for the 
reference), but only if I want it to automatically add the word "line" 
or something else before the number, otherwise I have to use 
\inlinerange. It took me some time to find that out. Wouldn't it be 
easier to have just one command for the target and another one for the 
reference, and everything else, as counters and headers to be 
returned, text to be added etc. to be configured by options?


Best regards,
Oliver.



___
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] line numbering disappears in custom column layout

2019-08-31 Thread Damien Thiriet
Hi,



Line numbering disappears when called inside custom columns defined with
defineparagraph.

This works fine

\defineparagraphs[Colonne][n=2]
\starttext
\startlinenumbering 
\input knuth
\stoplinenumbering

\input knuth
\stoptext

Whereas this does not work as expected

\defineparagraphs[Colonne][n=2]
\starttext
\startColonne
\startlinenumbering 
\input knuth
\stoplinenumbering
\Colonne

\input knuth
\stopColonne
\stoptext

Playing with \setuplinenumbering (location=text and so on) didn't help.
Maybe this has to do with setting margins in defineparagraphs, but I
can't figure out how to do it.

Greetings,


Damien Thiriet 

PS: This is exactly the unanswered question I asked a few days ago on TeX SE 
https://tex.stackexchange.com/questions/505238/context-line-numbering-disappears-in-custom-column-layout

- End forwarded message -
___
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] Cross references to column numbers

2019-08-12 Thread Oliver von Criegern

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header instead of 
page numbers (actually, these column numbers are calculated from the 
page numbers). Now I want to create a cross reference that returns the 
column number of the target. How can I achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need to 
know whether the target is in the left or in the right column, and I 
can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers

Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the case 
of references. For example, to refer to a page, I need \pagereference 
(for the target) and \at (for the reference); to refer to a line, I need 
\someline (for the target) and \inline (for the reference), but only if 
I want it to automatically add the word "line" or something else before 
the number, otherwise I have to use \inlinerange. It took me some time 
to find that out. Wouldn't it be easier to have just one command for the 
target and another one for the reference, and everything else, as 
counters and headers to be returned, text to be added etc. to be 
configured by options?


Best regards,
Oliver.


___
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] white space after a float in a column

2019-08-12 Thread Sytse Knypstra
Hi all,

In my recent question I had overlooked the possibility of using
\startplaceintermezzo
...
\stopplaceintermezzo
and inserting a \blank before the \stopplaceintermezzo.

Sorry for this stupid mistake and the noise.

With kind regards,

Sytse Knypstra
___
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] white space after a float in a column

2019-08-10 Thread Sytse knyps...@home.nl
Dear list members,

I am struggling with floats in a two-column layout. I understand that there are 
three up-to-date mechanisms for columns: columnsets, pagecolumns and pagegrids.

However, in neither setup I succeed in producing some extra vertical whitespace 
after the float if a caption is omitted (i.e. location=none in \setupcaption).

My example:



\definepapersize[square21][width=21cm,height=21cm]

\setuppapersize[square21][square21]

\definecolumnset[Two][n=2]

\setupcolumnset[Two]

\setupcaption[intermezzo][location=none,spaceafter=1cm]
 % no value for 
spaceafter seems to work
\setuptolerance[verytolerant,stretch]

\setupframedtexts[frame=on,corner=round,width=local]

\setuplayout[grid=yes]

\starttext

\startcolumnset[Two]

\input knuth \par

   \placeintermezzo[bottom][]{}

\startframedtext

\input tufte \par

\stopframedtext

   \input knuth \par

\stopcolumnset
\stoptext

If 'columnset' is replaced everywhere by 'pagecolumns' or by 'pagegrid' through 
a find-and-replace operation, the result remains identical.

Is it possible to insert more vertical white space after the intermezzo?

A secondary remark: \placeintermezzo always puts the framed text at the top of 
the next column, no matter whether the parameter is top or bottom. But this is 
not a big deal.

Sytse Knypstra
___
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] Nested Column Layout

2019-08-06 Thread Oliver von Criegern

Hello Walter,

seems to me something which could be done using columnsets. (But I 
didn't use them yet.)


See here:
https://wiki.contextgarden.net/Columns#Column_Sets

And in the manual
http://www.pragma-ade.com/general/manuals/columns.pdf
see especially the examples on pages 11 and 13-14.

Best regards, Oliver.


Am 06.08.19 um 00:41 schrieb Walter Mays:

Hello all,

I am trying to lay out a page that has a 2/3 column split, and then
nest another set of 3 columns inside the larger of the two outer
columns. In case that's not clear, I've attached a PNG that shows
approximately what I would like to achieve.

Here's what I've tried:

```
\defineparagraphs[TwoThirds][n=2]
\setupparagraphs[TwoThirds][1][width=0.33\textwidth]

\starttext

\startTwoThirds

\input tufte

\nextTwoThirds

\input tufte

\startcolumns[n=3]
\input tufte
\stopcolumns

\stopTwoThirds

\stoptext
```

Instead of doing what I described, it made the contents of that inner
column very narrow, but does not split it across columns. The \column
command seems to have no effect.

Thank you for your help,

Walter

___
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] Nested Column Layout

2019-08-05 Thread Walter Mays
Hello all,

I am trying to lay out a page that has a 2/3 column split, and then
nest another set of 3 columns inside the larger of the two outer
columns. In case that's not clear, I've attached a PNG that shows
approximately what I would like to achieve.

Here's what I've tried:

```
\defineparagraphs[TwoThirds][n=2]
\setupparagraphs[TwoThirds][1][width=0.33\textwidth]

\starttext

\startTwoThirds

\input tufte

\nextTwoThirds

\input tufte

\startcolumns[n=3]
\input tufte
\stopcolumns

\stopTwoThirds

\stoptext
```

Instead of doing what I described, it made the contents of that inner
column very narrow, but does not split it across columns. The \column
command seems to have no effect.

Thank you for your help,

Walter
___
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] In a two column layout, activate line numbering for one column only

2019-07-30 Thread Oliver von Criegern

Dear list members,

I am trying to recreate a layout for some dictionary with ConTeXt. It is 
a two column layout with line numbering between the columns, that is, 
there is only one numbering for both columns. How can I do this with 
ConTeXt?


I would need either an option to activate line numbering only for one 
column, which, as far as I can see, does not exist; or I could use the 
"command" option for "\setuplinenumbering" to make the line numbers 
dissappear for one column, but then I would need some way to decide 
whether a line number belongs to the first or to the second column, some 
command that returns to me the number of the actual column, which I 
can't find, too.


For illustration, I give a minimal example:


||\setuppapersize[A4][A4]\setupbodyfont[9pt]||
|||\setupcolumns[n=2, distance=1cm, ]\setuplinenumbering[step=5, 
method=page, location=right, align=flushright, 
width=.25cm]\starttext\startcolumns\startlinenumbering\dorecurse{10}{\inputlorem}\par\stoplinenumbering\stopcolumns\stoptext|||



In the result, there are (as is to be expected) line numbers between 
both columns and also to the right of the second column. How can I get 
rid of the latter ones?


(For the pdf result see also: 
https://tex.stackexchange.com/questions/501269/context-how-to-have-line-numbering-in-a-two-column-layout-for-one-column-only). 



Best regards,
Oliver.


||

___
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] Column spacing in MathML in mkiv

2019-07-18 Thread Duncan Hothersall
Hi all.

If I want to set the space between columns in a MathML , how do I
do it?

Minimal non-working example below (set the attribute columnspacing to
anything you like and it seems to be ignored). Is this a bug or is there a
feature I've missed?

\usemodule[mathml]
\starttext
\xmlprocessdata{}{

 
  
   ab
   =
   cd
  
  
   ef
   =
   gh
  
 
}{}
\stoptext

Many thanks.

Duncan
___
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] Wrong breaks in footnote for column texts

2019-06-20 Thread Wolfgang Schuster
Am Do., 20. Juni 2019 um 17:00 Uhr schrieb Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com>:

> Hi Hans,
>
> as mentioned a few times by others long footnote entries have problems
> with line breaks.
>
> In mixed columns you get a single line for each entry and in page
> columns the width for the entries is wrong.
>
> \starttext
>
> \dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
>
> \page
>
> \startmixedcolumns
> \dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
> \stopmixedcolumns
>
> \page
>
> \setupnote[footnote][alternative=columns,n=2]
>

The setup above shouldn't be part of the 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
___


[NTG-context] Wrong breaks in footnote for column texts

2019-06-20 Thread Wolfgang Schuster

Hi Hans,

as mentioned a few times by others long footnote entries have problems 
with line breaks.


In mixed columns you get a single line for each entry and in page 
columns the width for the entries is wrong.


\starttext

\dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }

\page

\startmixedcolumns
\dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
\stopmixedcolumns

\page

\setupnote[footnote][alternative=columns,n=2]

\startpagecolumns
\dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
\stoppagecolumns

\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] mix two-column and single-column footnotes

2019-02-16 Thread Mohammad Hossein Bateni
Hi,

Is it possible to mix two-column and single-column footnotes?

Here's my use case.  I have two types of footnotes:
1) short one- or two-word terms
2) long descriptions and notes

On some pages there are a lot of "short" footnotes which take up a lot of
space at the bottom of the page.  I'd like to typeset them in 2 or 3
columns.  But then the "long" footnotes had better stay in one column.

See below for desired input and output.

Thanks,
~MHB

Sample input:

\definenote[shortfootnote][...,n=3]
\definenote[longfootnote][...,n=1]
\definenotation[shortfootnote][...]
\definenotation[longfootnote][...]
\starttext
\shortfootnote{short}\shortfootnote{short}\shortfootnote{short}
\longfootnote{This is a long footnote which spans the entire width of the
page.}
\shortfootnote{short}\shortfootnote{short}
\longfootnote{Another "long" footnote.}
\longfootnote{Note that footnotes 5, 6 used only two out of three available
columns.}
\stoptext


Desired output:

__
1 short  2 short   3 short
4 This is a long footnote which spans
the entire width of the page.
5 short  6 short
7 Another "long" footnote.
8 Note that footnotes 5, 6 used only
two out of three available columns.
___
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] Color a column (xtable, lua)

2019-01-27 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 27.01.19 um 00:59:

Hi Henry,
Thank you for your proposition. I tested both : the first work  but 
not the second.

Fabrice
Remove the empty line between the two arguments of the \defineoverlay 
command.


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] Color a column (xtable, lua)

2019-01-26 Thread Fabrice Couvreur
Hi Henry,
Thank you for your proposition. I tested both : the first work  but not the
second.
Fabrice

lua error   > lua error on line 13 in file /home/viserion/Ntg_7.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/tabl-xtb.lua:1269: attempt
to index a nil value (upvalue 'data')

 3
 4 \startuseMPgraphic{tablebackground}{i,j}
 5 if (\MPvar{i} = 1) or (\MPvar{j} = 1):
 6   fill OverlayBox withcolor \MPcolor{fondpaille} ;
 7 fi;
 8 \stopuseMPgraphic
 9
10 \defineoverlay
11   [tablebackground]
12
13 >>
[\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}]
14
15 \setupxtable[background=tablebackground]
16
17 \starttext
18 \startluacode
19 local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J"
}
20 local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
21 context.startxtable({"align={middle,lohi},
width=1.25cm,offset=0.8ex"})
22
23 context.startxrow()


?

Le dim. 27 janv. 2019 à 00:34, Henri Menke  a écrit :

> On 1/27/19 12:26 PM, Henri Menke wrote:
> > On 1/27/19 12:08 PM, Fabrice Couvreur wrote:
> >> Hi,
> >> How to color the first column as I did for the first line ?
> >
> > Stolen from Wolfgang's answer on TeX.SX.
> > https://tex.stackexchange.com/a/464771
> >
>
> You could also evaluate the conditional purely in MetaPost.  I don't
> know if that would be faster, but it's a bit more readable to me.
>
>
> \startuseMPgraphic{tablebackground}{i,j}
> if (\MPvar{i} = 1) or (\MPvar{j} = 1):
>   fill OverlayBox withcolor \MPcolor{fondpaille} ;
> fi;
> \stopuseMPgraphic
>
> \defineoverlay
>   [tablebackground]
>
>
> [\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}]
>
> \setupxtable[background=tablebackground]
>
> >
> > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> >
> > \startuseMPgraphic {tablebackground}
> >   fill OverlayBox withcolor \MPcolor{fondpaille} ;
> > \stopuseMPgraphic
> >
> > \defineoverlay
> >   [tablebackground]
> >   [\ifnum\currentxtablerow=1
> >\useMPgraphic{tablebackground}%
> >\else\ifnum\currentxtablecolumn=1
> >\useMPgraphic{tablebackground}%
> >\fi\fi]
> >
> > \setupxtable[background=tablebackground]
> >
> > \starttext
> > \startluacode
> > local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> > local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
> > context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
> >
> > context.startxrow()
> > context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> > context("")
> > context.stopxcell()
> > for _, letter in ipairs(letters_1) do
> > context.startxcell()
> > context(letter) context.stopxcell()
> > end
> > context.stopxrow()
> >
> > context.startxrow()
> > for _, letter in ipairs(letters_2) do
> > context.startxcell() context(letter) context.stopxcell()
> > end
> > context.stopxrow()
> >
> > for i=2,10 do
> > context.startxrow()
> > context.startxcell()  context(converters.convert("A",i))
> > context.stopxcell()
> > context.stopxrow()
> > end
> >
> > context.stopxtable()
> > \stopluacode
> > \stoptext
> >
> >
> >> Thank you
> >> Fabrice
> >>
> >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> >> \starttext
> >> \startluacode
> >> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> >> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
> >> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
> >> context.startxrow()
> >> context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> >> context("") context.stopxcell()
> >> for _, letter in ipairs(letters_1) do
> >>  context.startxcell({&quo

Re: [NTG-context] Color a column (xtable, lua)

2019-01-26 Thread Henri Menke
On 1/27/19 12:26 PM, Henri Menke wrote:
> On 1/27/19 12:08 PM, Fabrice Couvreur wrote:
>> Hi,
>> How to color the first column as I did for the first line ?
> 
> Stolen from Wolfgang's answer on TeX.SX.
> https://tex.stackexchange.com/a/464771
> 

You could also evaluate the conditional purely in MetaPost.  I don't
know if that would be faster, but it's a bit more readable to me.


\startuseMPgraphic{tablebackground}{i,j}
if (\MPvar{i} = 1) or (\MPvar{j} = 1):
  fill OverlayBox withcolor \MPcolor{fondpaille} ;
fi;
\stopuseMPgraphic

\defineoverlay
  [tablebackground]

[\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}]

\setupxtable[background=tablebackground]

> 
> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> 
> \startuseMPgraphic {tablebackground}
>   fill OverlayBox withcolor \MPcolor{fondpaille} ;
> \stopuseMPgraphic
> 
> \defineoverlay
>   [tablebackground]
>   [\ifnum\currentxtablerow=1
>\useMPgraphic{tablebackground}%
>\else\ifnum\currentxtablecolumn=1
>\useMPgraphic{tablebackground}%
>\fi\fi]
> 
> \setupxtable[background=tablebackground]
> 
> \starttext
> \startluacode
> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
> 
> context.startxrow()
> context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> context("")
> context.stopxcell()
> for _, letter in ipairs(letters_1) do
> context.startxcell()
> context(letter) context.stopxcell()
> end
> context.stopxrow()
> 
> context.startxrow()
> for _, letter in ipairs(letters_2) do
> context.startxcell() context(letter) context.stopxcell()
> end
> context.stopxrow()
> 
> for i=2,10 do
> context.startxrow()
> context.startxcell()  context(converters.convert("A",i))
> context.stopxcell()
> context.stopxrow()
> end
> 
> context.stopxtable()
> \stopluacode
> \stoptext
> 
> 
>> Thank you
>> Fabrice
>> 
>> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
>> \starttext
>> \startluacode
>> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
>> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
>> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
>> context.startxrow()
>> context.startxcell({"background=color,backgroundcolor=white,frame=off"})
>> context("") context.stopxcell()
>> for _, letter in ipairs(letters_1) do
>>  context.startxcell({"background=color,backgroundcolor=fondpaille"})
>> context(letter) context.stopxcell()
>> end
>> context.stopxrow()
>> context.startxrow()
>> for _, letter in ipairs(letters_2) do
>>  context.startxcell() context(letter) context.stopxcell()
>> end
>> context.stopxrow()
>> for i=2,10 do
>>  context.startxrow()
>>  context.startxcell()  context(converters.convert("A",i))
>> context.stopxcell()
>>  context.stopxrow()
>> end
>> context.stopxtable()
>> \stopluacode
>> \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] Color a column (xtable, lua)

2019-01-26 Thread Henri Menke
On 1/27/19 12:08 PM, Fabrice Couvreur wrote:
> Hi,
> How to color the first column as I did for the first line ?

Stolen from Wolfgang's answer on TeX.SX.
https://tex.stackexchange.com/a/464771


\definecolor[fondpaille][c=0,m=0,y=0.2,k=0]

\startuseMPgraphic {tablebackground}
  fill OverlayBox withcolor \MPcolor{fondpaille} ;
\stopuseMPgraphic

\defineoverlay
  [tablebackground]
  [\ifnum\currentxtablerow=1
   \useMPgraphic{tablebackground}%
   \else\ifnum\currentxtablecolumn=1
   \useMPgraphic{tablebackground}%
   \fi\fi]

\setupxtable[background=tablebackground]

\starttext
\startluacode
local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})

context.startxrow()
context.startxcell({"background=color,backgroundcolor=white,frame=off"})
context("")
context.stopxcell()
for _, letter in ipairs(letters_1) do
context.startxcell()
context(letter) context.stopxcell()
end
context.stopxrow()

context.startxrow()
for _, letter in ipairs(letters_2) do
context.startxcell() context(letter) context.stopxcell()
end
context.stopxrow()

for i=2,10 do
context.startxrow()
context.startxcell()  context(converters.convert("A",i))
context.stopxcell()
context.stopxrow()
end

context.stopxtable()
\stopluacode
\stoptext


> Thank you
> Fabrice
> 
> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> \starttext
> \startluacode
> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
> context.startxrow()
> context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> context("") context.stopxcell()
> for _, letter in ipairs(letters_1) do
>  context.startxcell({"background=color,backgroundcolor=fondpaille"})
> context(letter) context.stopxcell()
> end
> context.stopxrow()
> context.startxrow()
> for _, letter in ipairs(letters_2) do
>  context.startxcell() context(letter) context.stopxcell()
> end
> context.stopxrow()
> for i=2,10 do
>  context.startxrow()
>  context.startxcell()  context(converters.convert("A",i))
> context.stopxcell()
>  context.stopxrow()
> end
> context.stopxtable()
> \stopluacode
> \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] Color a column (xtable, lua)

2019-01-26 Thread Fabrice Couvreur
Hi,
How to color the first column as I did for the first line ?
Thank you
Fabrice

\definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
\starttext
\startluacode
local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
context.startxrow()
context.startxcell({"background=color,backgroundcolor=white,frame=off"})
context("") context.stopxcell()
for _, letter in ipairs(letters_1) do
 context.startxcell({"background=color,backgroundcolor=fondpaille"})
context(letter) context.stopxcell()
end
context.stopxrow()
context.startxrow()
for _, letter in ipairs(letters_2) do
 context.startxcell() context(letter) context.stopxcell()
end
context.stopxrow()
for i=2,10 do
 context.startxrow()
 context.startxcell()  context(converters.convert("A",i))
context.stopxcell()
 context.stopxrow()
end
context.stopxtable()
\stopluacode
\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] table making ugly column sizes, how to fix?

2018-10-02 Thread David Walther

On Tue, Oct 02, 2018 at 12:28:44AM -0400, Aditya Mahajan wrote:

ConTeXt MkIV 2018.09.30

What version are you using?


My version is from 2017.  Thank you for the confirmation; now I will file a bug
report with Debian.

David
___
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 making ugly column sizes, how to fix?

2018-10-01 Thread Aditya Mahajan

On Mon, 1 Oct 2018, David Walther wrote:

I looked at your example.  I ran your example, and on my installation, it 
has

the same problem as I described.  I have included a PDF file of my original
sample file, and also the PDF generated from your example.   What version 
of

ConTeXt are you using?


ConTeXt MkIV 2018.09.30

What version are you using?

On my installation of context, columns are still coming out "ugly" as 
you will see in the PDF t1.pdf.


Everything seems okay with the latest version of ConTeXt (see attached 
pdf, obtained from your t1.tex).


Aditya

t1.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] table making ugly column sizes, how to fix?

2018-10-01 Thread David Walther

I looked at your example.  I ran your example, and on my installation, it has
the same problem as I described.  I have included a PDF file of my original
sample file, and also the PDF generated from your example.   What version of
ConTeXt are you using?

On my installation of context, columns are still coming out "ugly" as you will
see in the PDF t1.pdf.  In t2.pdf you'll see the problem shows up in the table
labelled "Good".  The "Good" refers to the row in bold, not to the row above
it.

David

On Sun, Sep 30, 2018 at 07:44:12PM -0400, Aditya Mahajan wrote:

On Sat, 29 Sep 2018, David Walther wrote:


Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR


You can also use

\bTC[nc=2, align=middle, style=bold]

But then the regular lines have ugly line breaks and suddenly the 
column size of column 3 is squeezed.  This shouldn't be, we have the 
whole page to work with.


I don't really see the difference in column sizes between the two 
cases. See attached (I simplified and cleaned the example a little)


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
___




t1.tex
Description: TeX document


t2.pdf
Description: Adobe PDF document


t1.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] table making ugly column sizes, how to fix?

2018-09-30 Thread Aditya Mahajan

On Sat, 29 Sep 2018, David Walther wrote:


Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR


You can also use

\bTC[nc=2, align=middle, style=bold]

But then the regular lines have ugly line breaks and suddenly the column 
size of column 3 is squeezed.  This shouldn't be, we have the whole page to 
work with.


I don't really see the difference in column sizes between the two cases. 
See attached (I simplified and cleaned the example a little)


Aditya

test.tex
Description: TeX document


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

[NTG-context] table making ugly column sizes, how to fix?

2018-09-29 Thread David Walther

Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

But then the regular lines have ugly line breaks and suddenly the column size 
of column 3 is squeezed.  This shouldn't be, we have the whole page to work 
with.

So, when I do my section headers this way, the columns come out sized nicely, 
but the section header isn't styled the way I want it:

\bTR\bTC 30. \eTC \bTC\eTC \bTC[align=center] \bf{Foo Bar} \eTC\eTR

Below is my minimal example you can cut and paste.  How do I do the section
headers without messing up the column sizing?


\setuppagenumbering[alternative=doublesided,location=none,page=no]
\setupfootertexts[\sans{Source: http://mywebsite}]
\setupheadertexts[test column text wrapping]
\setupheadertexts
 [] [Page \userpagenumber\ of \lastuserpagenumber]
 [Page \userpagenumber\ of \lastuserpagenumber] []
\setuppapersize[letter, portrait]
\setuplayout[topspace=0.5in, backspace=1in, height=10in, width=7in,
header=0.5in, footer=0.5in, headerdistance=0in, footerdistance=0in]
\switchtobodyfont[12pt]
\starttext
\setupTABLE[split=repeat]
\setupTABLE[r][each][toffset=3pt, boffset=3pt, loffset=3pt, roffset=3pt]
\setupTABLE[c][each][leftframe=off,rightframe=off,align=right]
\setupTABLE[c][first][frame=off,align=left]
\setupTABLE[c][2][style=\tfx\it,align=left]
\bTABLE
\bTABLEhead
\bTR\bTH Col1 \eTH\bTH Col2 \eTH\bTH Col3 \eTH\eTR
\eTABLEhead
\bTABLEnext
\bTR\bTH Col1 \eTH\bTH Col2 \eTH\bTH Col3 \eTH\eTR
\eTABLEnext
\bTABLEbody
\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

% This displays the way I want, but breaks the regular rows.
\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

% This works with the regular rows, but doesn't look how I want.
%\bTR\bTC 30. \eTC \bTC\eTC \bTC[align=center] \bf{Foo Bar} \eTC\eTR
\eTABLEbody
\eTABLE
\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] Construct tables column after column

2018-09-10 Thread Henri Menke
On 09/10/2018 10:47 PM, Jan Willem Flamma wrote:
> Dear list members,
> 
> Table are constructed row after row like in the code below:
> 
> Building up a table row after row
> \par
> \bTABLE
> \bTR
> \bTC Row 1, Column 1 \eTC
> \bTC Row 1, Column 2 \eTC
> \eTR
>     \bTR
> \bTC Row 2, Column 1 \eTC
> \bTC Row 2, Column 2 \eTC
> \eTR
> \eTABLE
> 
> But is it possible to construct tables column after column?

If you are not scared of plain TeX macros, you can use \valign.

\starttext

\begingroup
\hsize=5cm
\valign{%
  \strut#\aligntab\strut#\cr
  %
  Column 1, Row 1\aligntab
  Column 1, Row 2\cr
  %
  Column 2, Row 1\aligntab
  Column 2, Row 2\cr
}
\endgroup

\stoptext

> (The code below does not generate output. I merely switched the xTC and xTR 
> to illustate the idea)
> 
> Building up a table column after column
> \par
> \bTABLE
> \bTC
> \bTR Column 1, Row 1 \eTR
> \bTR Column 1, Row 2 \eTR
> \eTC
> \bTC
> \bTR Column 2, Row 1 \eTR
> \bTR Column 2, Row 2 \eTR
> \eTC
> \eTABLE
> 
> Kind regards,
> Jan Willem Flamma
> ___
> 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] Construct tables column after column

2018-09-10 Thread Taco Hoekwater
Hi,

This is a funny bit of synchronicity. I made exactly the same request 
for extreme tables (\startxtable) during the ConTeXt meeting. Would
xtables work for you as well? It would be easier for Hans to set it up
in that because a) bTABLE is ‘like html’ which would not allow a swap
like that and b) xtable has explicits command for rows and cells, but 
not columns, so that could be added without any extra effort and confusion.

Best wishes,
Taco

> On 10 Sep 2018, at 12:47, Jan Willem Flamma  wrote:
> 
> Dear list members,
> 
> Table are constructed row after row like in the code below:
> 
> Building up a table row after row
> \par
> \bTABLE
>\bTR
>\bTC Row 1, Column 1 \eTC
>\bTC Row 1, Column 2 \eTC
>    \eTR
>\bTR
>\bTC Row 2, Column 1 \eTC
>\bTC Row 2, Column 2 \eTC
>\eTR
> \eTABLE
> 
> But is it possible to construct tables column after column?
> (The code below does not generate output. I merely switched the xTC and xTR 
> to illustate the idea)
> 
> Building up a table column after column
> \par
> \bTABLE
>\bTC
>\bTR Column 1, Row 1 \eTR
>\bTR Column 1, Row 2 \eTR
>\eTC
>\bTC
>\bTR Column 2, Row 1 \eTR
>\bTR Column 2, Row 2 \eTR
>\eTC
> \eTABLE
> 
> Kind regards,
> Jan Willem Flamma
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] Construct tables column after column

2018-09-10 Thread Jan Willem Flamma
Dear list members,

Table are constructed row after row like in the code below:

Building up a table row after row
\par
\bTABLE
\bTR
\bTC Row 1, Column 1 \eTC
\bTC Row 1, Column 2 \eTC
\eTR
\bTR
\bTC Row 2, Column 1 \eTC
\bTC Row 2, Column 2 \eTC
\eTR
\eTABLE

But is it possible to construct tables column after column?
(The code below does not generate output. I merely switched the xTC and xTR to 
illustate the idea)

Building up a table column after column
\par
\bTABLE
\bTC
\bTR Column 1, Row 1 \eTR
\bTR Column 1, Row 2 \eTR
\eTC
\bTC
\bTR Column 2, Row 1 \eTR
\bTR Column 2, Row 2 \eTR
\eTC
\eTABLE

Kind regards,
Jan Willem Flamma
___
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
___

  1   2   3   4   >