Re: [NTG-context] MP boxes: boxjoin not recognized?

2021-07-22 Thread Aditya Mahajan

On Wed, 21 Jul 2021, Hans Hagen wrote:

> On 7/21/2021 12:29 PM, Rudd, Kevin wrote:
> > Hi---
> > 
> > All of my figures that use MP boxes are now failing. It looks like 
> > "boxjoin" (from the MP "boxes" macros) is not being recognized. Also, 
> > apparently unrelated, I wonder if the comparison in "boxes.mp" is 
> > correct as it appears that lmtx loads "mp-xbox.mpiv" instead of 
> > "mp-xbox.mpxl". Here is some log output and a (mostly) MWE.
> 
> Indeed, I made that one an mp-* because it removes a dependency. 

Maybe we should also merge rboxes.mp with mp-xbox.* It is almost the same code 
as boxes.mp.

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

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


Re: [NTG-context] Math cases

2021-07-22 Thread Aditya Mahajan
On Thu, 22 Jul 2021, Jack Hill wrote:

> Dear list,
> 
> I'm using ConTeXt version 2021.07.22 19:16 and the following code 
> typesets both columns in math mode
> 
> \starttext
> \startformula
> \delta_{ij} =
> \startcases
> \NC 1 \NC if i = j \NR
> \NC 0 \NC otherwise \NR
> \stopcases
> \stopformula
> \stoptext
> 
> The wiki states that the second column should be typeset in text mode. 
> Is this a bug or does ConTeXt now typeset the second column in math mode 
> by default?

Yes, we felt that it was more consistent with other align mechanisms to default 
to math. So, for the 2nd column, we now have \NC for a "normal" (i.e., math) 
column and \TC for a text column. So you can use:

\startformula
\delta_{ij} =
\startcases  
\NC 1 \TC if $i = j$ \NR
\NC 0 \TC otherwise \NR
\stopcases 
\stopformula   
\stoptext  

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

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


[NTG-context] Math cases

2021-07-22 Thread Jack Hill

Dear list,

I'm using ConTeXt version 2021.07.22 19:16 and the following code 
typesets both columns in math mode


\starttext
\startformula
\delta_{ij} =
\startcases
\NC 1 \NC if i = j \NR
\NC 0 \NC otherwise \NR
\stopcases
\stopformula
\stoptext

The wiki states that the second column should be typeset in text mode. 
Is this a bug or does ConTeXt now typeset the second column in math mode 
by default?


Thanks,
Jack
___
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] Metapost Animation of Sine

2021-07-22 Thread Otared Kavian
Hi Jeroen,

Unfortunately I am not familiar with Tikz, since all my documents use what is 
built-in ConTeXt and Metapost…
That being said I am sure someone on the list can help you with Tikz module.

Best regards: Otared

> On 22 Jul 2021, at 14:28, Jeroen  wrote:
> 
> Hi, both solutions are great! This is what I had in mind, a rolling sine. Is 
> there a way to get the same result with the Tikz module?
> 
> \usemodule[animation]
> \setupinteraction[state=start]
> 
> \starttext
> 
> \input tufte
> 
> \framed{
> \startanimation[menu=yes,framerate=40]
> \dorecurse{50}{\expanded
> {\startframe
> \startMPcode
> numeric u, omega, mylength, tt ;
> u := 2cm ;
> omega := 4 ;
> mylength := 3.141596 ;
> tt := \recurselevel ;
> path p ;
> p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 upto 100 : 
> .. (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) 
> endfor ;
> draw p withpen pencircle scaled .5pt withcolor darkred ;
> \stopMPcode
> \stopframe}
> }
> \stopanimation
> }
> 
> \stoptext
> 
> Op wo 21 jul. 2021 om 23:26 schreef Otared Kavian  >:
> Hi, 
> 
> I wonder whether something like the following is what you are looking for:
> 
> % begin wave-sine.tex
> \usemodule[animation]
> \setupinteraction[state=start]
> \starttext
> \startTEXpage[offset=2pt]
> \startanimation[menu=yes,framerate=10]
> \dorecurse{100}{\expanded
> {\startframe
> \startMPcode
> numeric u, omega, mylength, tt ;
> u := 2cm ;
> omega := 4 ;
> mylength := 3.141596 ;
> tt := \recurselevel ;
> path p ;
> p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 
> upto 100 : 
> .. 
> (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) 
> endfor ;
> draw p withpen pencircle scaled .5pt withcolor 
> darkred ;
> \stopMPcode
> \stopframe}
> }
> \stopanimation
> \stopTEXpage
> \stoptext
> % end wave-sine.tex
> 
> Best regards: OK
> 
> > On 21 Jul 2021, at 19:44, Jeroen  > > wrote:
> > 
> > I am looking for a sine animation as the one file f.pdf on this site
> > 
> > http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm
> >  
> > 
> > 
> > Jeroen
> > 
> > Op wo 21 jul. 2021 om 17:54 schreef Fabrice L  > >:
> > Hi,
> > 
> >> Le 21 juill. 2021 à 10:08, Jeroen  >> > a écrit :
> >> 
> >> I use this small animation to enlarge a circle
> >> 
> >> 
> >> \usemodule[animation]
> >> \setupinteraction[state=start]
> >> \starttext
> >> \startanimation[menu=yes,framerate=10]
> >> \dorecurse{7}{\expanded
> >>   {\startframe
> >> \startMPcode
> >> path p;
> >> numeric n, u;
> >> u := 1cm;
> >> n:=\recurselevel*u;
> >> p := fullcircle scaled n;
> >> draw p;
> >> \stopMPcode
> >>   \stopframe}}
> >> \stopanimation
> >> \stoptext
> >> 
> >> 
> >> This I use to draw a sine
> >> 
> >> 
> >> \starttext
> >> \startMPcode
> >>   draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> >> (i/360*1.5cm,0.9cm*(sind(i)))endfor;
> >> \stopMPcode
> >> \stoptext
> >> 
> >> 
> >> When I put it together to animate the sine as following, it does not 
> >> entirely create the sine animation I am looking for
> >> 
> >> 
> >> \usemodule[animation]
> >> \setupinteraction[state=start]
> >> \starttext
> >> \startanimation[menu=yes,framerate=10]
> >> \dorecurse{7}{\expanded
> >>   {\startframe
> >> \startMPcode
> >> path p;
> >> numeric n, u;
> >> u := 1cm;
> >> n:=\recurselevel*u;
> >> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> >> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> >> draw p;
> >> \stopMPcode
> >> \stopframe}}
> >> \stopanimation
> >> \stoptext
> >> 
> >> 
> >> What better way can I create a sine animation with Metapost?
> >>  
> >> 
> > 
> > Here is another way to do your animation. This is doing something, but I 
> > guess not what you want. Could you describe what do you have in mind ?
> > 
> > \starttext
> > \dorecurse{7}{ % 3180
> > \startMPpage
> >   myvariable := #1 ;
> >   path p;
> > numeric n, u;
> > u := 1cm;
> > n:=myvariable*u;
> > p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. 
> > (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> > draw p;
> > \stopMPpage
> > }
> > \stoptext
> > 
> > Fabrice.
> > 
> > 
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> > 
> > maillist : ntg-context@ntg.nl 

Re: [NTG-context] another MetaPost question (this time on ConTeXt->MetaPost

2021-07-22 Thread Hans Hagen

On 7/22/2021 2:59 PM, Rudd, Kevin wrote:


Hey---

There seems to be a change with color transfer from ConTeXt to MetaPost. 
Using string references to defined (spot?) colors seemed to work but now 
does not; all of my colorful figures are now rendered only in shades of 
gray when using defined (spot?) colors….


I need to catch that case (string spot) indeed but even then, you need 
in your case


 p & ":" & c;

you missed the colon. Anyway, fixed in next upload.
 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] another MetaPost question (this time on ConTeXt->MetaPost color transfer)

2021-07-22 Thread Rudd, Kevin
... fixed minor typo that actually produced new information! invalid color => 
black, valid color => transparent black!---it seems like the color disappears 
in the transfer but not the transparency.

Hey---

There seems to be a change with color transfer from ConTeXt to MetaPost. Using 
string references to defined (spot?) colors seemed to work but now does not; 
all of my colorful figures are now rendered only in shades of gray when using 
defined (spot?) colors….

The figure drawn by the MWE should have a dark orange border and a transparent 
(thin) orange fill. However, all colors of this sort seem to end up being a 
single shade of gray (e.g. black), rendering a box perfect for Halloween use 
but not for my current purposes. Is there a change to how colors defined in 
ConTeXt are referenced in MetaPost that I've missed or is there an issue with 
transferring color (name or parameter) information to MetaPost? Defined (spot?) 
colors work fine in ConTeXt but not in MetaPost.

Many thanks,
 ---K



% system  > ConTeXt  ver: 2021.07.21 19:54 LMTX  fmt: 2021.7.22  int: 
english/english

\startMPdefinitions

presetparameters "parameters_Test"
[
]

def Test =
applyparameters "parameters_Test" "do_Test"
enddef;

def do_Test =
pushparameters "parameters_Test";

string p;  p = getparameter "prefix";  show p;
string c;  c = getparameter "color";   show c;
path   s;  s = unitsquare scaled 10cm; show s;
path   t;  t = unitsquare scaled  5cm; show t;  % new

fill s   withcolor p&":" % tweaked
fill t   withcolor p % new (and 
old)
draw s  withpen pencircle scaled 5pt withcolor   c;
enddef;

\stopMPdefinitions

\starttext

\definespotcolor[Thin:orange][orange][p=1,a=normal,t=0.5]

\color[orange]{hello}

\startalignment[center]
\startplacefigure
\startMPcode
Test [ prefix = "Thin", color = "orange" ];
\stopMPcode
\stopplacefigure
\stopalignment

\color[Thin:orange]{goodbye}

\stoptext




Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
ke...@lps.umd.edu

Visiting Research Professor
United States Naval Academy

r...@usna.edu



___
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] question about followingup.pdf

2021-07-22 Thread Hans Hagen

On 7/22/2021 2:57 PM, Pablo Rodriguez wrote:

Hi Hans,

current latest has content added to the Following Up manual and also to
the LMTX manual.

In latest, the PDF document for LMTX is from yesterday, but the PDF for
the Following Up manual is almost two years old.

Is this intended or am I missing something?
i just didn't regenerate the whole thing (when i add a chapter i 
generate just that) .. it's not that critical, nostly a wrapup for 
myself when working on something and users can generate it anyway


Hans


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

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


[NTG-context] another MetaPost question (this time on ConTeXt->MetaPost

2021-07-22 Thread Rudd, Kevin

Hey---

There seems to be a change with color transfer from ConTeXt to MetaPost. Using 
string references to defined (spot?) colors seemed to work but now does not; 
all of my colorful figures are now rendered only in shades of gray when using 
defined (spot?) colors….

The figure drawn by the MWE should have a dark orange border and a transparent 
(thin) orange fill. However, all colors of this sort seem to end up being a 
single shade of gray (e.g. black), rendering a box perfect for Halloween use 
but not for my current purposes. Is there a change to how colors defined in 
ConTeXt are referenced in MetaPost that I've missed or is there an issue with 
transferring color (name or parameter) information to MetaPost? Defined (spot?) 
colors work fine in ConTeXt but not in MetaPost.

Many thanks,
 ---K



% system  > ConTeXt  ver: 2021.07.21 19:54 LMTX  fmt: 2021.7.22  int: 
english/english

\startMPdefinitions

presetparameters "parameters_Test"
[
]

def Test =
applyparameters "parameters_Test" "do_Test"
enddef;

def do_Test =
pushparameters "parameters_Test";

string p;  p = getparameter "prefix";  show p;
string c;  c = getparameter "color";   show c;
path   s;  s = unitsquare scaled 10cm; show s;

fill s withpen pencircle scaled 5pt withcolor p
draw s withpen pencircle scaled 5pt withcolor   c;
enddef;

\stopMPdefinitions

\starttext

\definespotcolor[Thin:orange][orange][p=1,a=normal,t=0.5]

\color[orange]{hello}

\startalignment[center]
\startplacefigure
\startMPcode
Test [ prefix = "Thin", color = "orange" ];
\stopMPcode
\stopplacefigure
\stopalignment

\color[Thin:orange]{goodbye}

\stoptext




Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
ke...@lps.umd.edu

Visiting Research Professor
United States Naval Academy

r...@usna.edu


___
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] question about followingup.pdf

2021-07-22 Thread Pablo Rodriguez
Hi Hans,

current latest has content added to the Following Up manual and also to
the LMTX manual.

In latest, the PDF document for LMTX is from yesterday, but the PDF for
the Following Up manual is almost two years old.

Is this intended or am I missing something?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Metapost Animation of Sine

2021-07-22 Thread Jeroen
Hi, both solutions are great! This is what I had in mind, a rolling sine.
Is there a way to get the same result with the Tikz module?

\usemodule[animation]
\setupinteraction[state=start]

\starttext

\input tufte

\framed{
\startanimation[menu=yes,framerate=40]
\dorecurse{50}{\expanded
{\startframe
\startMPcode
numeric u, omega, mylength, tt ;
u := 2cm ;
omega := 4 ;
mylength := 3.141596 ;
tt := \recurselevel ;
path p ;
p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 upto 100 :
.. (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u)
endfor ;
draw p withpen pencircle scaled .5pt withcolor darkred ;
\stopMPcode
\stopframe}
}
\stopanimation
}

\stoptext

Op wo 21 jul. 2021 om 23:26 schreef Otared Kavian :

> Hi,
>
> I wonder whether something like the following is what you are looking for:
>
> % begin wave-sine.tex
> \usemodule[animation]
> \setupinteraction[state=start]
> \starttext
> \startTEXpage[offset=2pt]
> \startanimation[menu=yes,framerate=10]
> \dorecurse{100}{\expanded
> {\startframe
> \startMPcode
> numeric u, omega, mylength, tt ;
> u := 2cm ;
> omega := 4 ;
> mylength := 3.141596 ;
> tt := \recurselevel ;
> path p ;
> p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1
> upto 100 :
> ..
> (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u)
> endfor ;
> draw p withpen pencircle scaled .5pt withcolor
> darkred ;
> \stopMPcode
> \stopframe}
> }
> \stopanimation
> \stopTEXpage
> \stoptext
> % end wave-sine.tex
>
> Best regards: OK
>
> > On 21 Jul 2021, at 19:44, Jeroen  wrote:
> >
> > I am looking for a sine animation as the one file f.pdf on this site
> >
> >
> http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm
> >
> > Jeroen
> >
> > Op wo 21 jul. 2021 om 17:54 schreef Fabrice L :
> > Hi,
> >
> >> Le 21 juill. 2021 à 10:08, Jeroen  a écrit :
> >>
> >> I use this small animation to enlarge a circle
> >>
> >>
> >> \usemodule[animation]
> >> \setupinteraction[state=start]
> >> \starttext
> >> \startanimation[menu=yes,framerate=10]
> >> \dorecurse{7}{\expanded
> >>   {\startframe
> >> \startMPcode
> >> path p;
> >> numeric n, u;
> >> u := 1cm;
> >> n:=\recurselevel*u;
> >> p := fullcircle scaled n;
> >> draw p;
> >> \stopMPcode
> >>   \stopframe}}
> >> \stopanimation
> >> \stoptext
> >>
> >>
> >> This I use to draw a sine
> >>
> >>
> >> \starttext
> >> \startMPcode
> >>   draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: ..
> (i/360*1.5cm,0.9cm*(sind(i)))endfor;
> >> \stopMPcode
> >> \stoptext
> >>
> >>
> >> When I put it together to animate the sine as following, it does not
> entirely create the sine animation I am looking for
> >>
> >>
> >> \usemodule[animation]
> >> \setupinteraction[state=start]
> >> \starttext
> >> \startanimation[menu=yes,framerate=10]
> >> \dorecurse{7}{\expanded
> >>   {\startframe
> >> \startMPcode
> >> path p;
> >> numeric n, u;
> >> u := 1cm;
> >> n:=\recurselevel*u;
> >> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: ..
> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> >> draw p;
> >> \stopMPcode
> >> \stopframe}}
> >> \stopanimation
> >> \stoptext
> >>
> >>
> >> What better way can I create a sine animation with Metapost?
> >>
> >>
> >
> > Here is another way to do your animation. This is doing something, but I
> guess not what you want. Could you describe what do you have in mind ?
> >
> > \starttext
> > \dorecurse{7}{ % 3180
> > \startMPpage
> >   myvariable := #1 ;
> >   path p;
> > numeric n, u;
> > u := 1cm;
> > n:=myvariable*u;
> > p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: ..
> (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0);
> > draw p;
> > \stopMPpage
> > }
> > \stoptext
> >
> > Fabrice.
> >
> >
> >
> ___
> > 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 / 

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
> >
> ___
>
>
> ___
> 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] Getting the local float reference within a float and reuse (?) it later (\somelocalfloat?)

2021-07-22 Thread Benjamin Buchmuller
Hi, 

Is there a more convenient way to get the current reference label (stably) from 
within a float? For example, I would like to make an "image credits" section at 
the end of a document, so I do something similar to:

\defineblock[credits]

\starttext

\section[sec:topic]{Topic}

\startplacefigure
[
title={Awesome figure. Image credits in \about[sec:credits].},
reference=fig:awesome,
]

\begincredits
\in{Figure}[fig:awesome] in \in{Section}[sec:topic] was not created by me.
\endcredits
\stopplacefigure

\section[sec:credits]{Appendix}

\useblocks[credits]

\stoptext

The block mechanism comes in really handy here, especially since I have more to 
show at the end than just the credits. However, each time I add another figure, 
I have to replace the references appropriately. So, I was wondering how about 
exploiting some pointers:

\begincredits
\somelocalfloat[figure][current] in Section \someheadnumber[section][current] 
was not created by me.
\endcredits
\processblocks[credits] % expected \someheadnumber to evaluate to 1?
\stopplacefigure

Yet, even if asked to be processed within the first section, \someheadnumber 
evaluates at the end to "2" (should be "1" in my opinion)? This is independent 
of calling it from within the float or the main text. I guess, my understanding 
of "processblocks" is wrong in this respect.

% \begincredits
% This is the call from the text \someheadnumber[section][current]
% \endcredits
%
% \processblocks[credits]

Further, \somelocalfloat doesn't show anything. What does it do?

Two probably not really urgent questions as I can live with putting the 
explicit names, but maybe there is an even better approach that comes in handy 
in more circumstances.

Thanks in advance!


Benjamin
___
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] Solution: LMTX initial (drop cap) in combination with indenting

2021-07-22 Thread Gerben Wierda

> On 21 Jul 2021, at 22:38, Nicola  wrote:
> 
> On 2021-07-21, Gerben Wierda  > wrote:
>>> On 19 Jul 2021, at 09:56, Nicola  wrote:
>>> 
>>> On 2021-07-18, Gerben Wierda  wrote:
 PS. switching \kap and \bf has an interesting result, the first
 character of the words is not in bold. This did not happen with
 lettrine in mkii
>>> 
>>> I do not have an answer to your question, but I'd like to point out that
>>> you can keep using lettrine with ConTeXt LMTX, if you wish. You just
>>> need to add the modules manually, currently:
>>> 
>>>   https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
>> 
>> I’ve tried this. Installed the modules and then I get with
> 
> I was sure that I had used lettrine with MKIV in a document of mine, but
> after your reply I double checked that and, in fact, I was using
> lettrine only with MKII. On the plus side, I have recovered my settings
> for MKIV (which work with LMTX as well).
> 
> I think that the `distance` parameter of \setupinitials does what you
> want. Besides, if your font provides real small capitals, you may use
> \definefirstline.
> 
> This is how I set up things in one of my documents:
> 
> 
> \definefontfeature[default][default][protrusion=quality,expansion=quality,onum=no,lnum=yes]
> 
> % \definefirstline below requires a font that implements small capitals as
> % a feature (Latin Modern does not). I have used this:
> % \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
> %   tf=name:Sorts Mill Goudy Regular,
> %   it=name:Sorts Mill Goudy Italic,
> % ]
> % If you don't have the font above, try this:
> \setupbodyfont[heros]
> 
> \setupbodyfont[mainfont,11pt]
> 
> \definemeasure[CAindent][12pt]
> \setupindenting[yes,\measure{CAindent}]
> 
> % Every chapter body text starts with a drop cap:
> \defineinitial[normal][
>  n=3,
>  m=1,
>  distance=18pt, % <== Add this 
>  state=start
> ]
> 
> % Special case: drop cap starting with a quote
> \defineinitial[quote][
>  n=3,
>  m=2,
>  distance=13pt,
>  hoffset=5pt, % Move drop cap a bit to the left
>  method=none
> ]
> 
> % Some initials may need special adjustments, depending on the font
> \defineinitial[Q][
>  voffset=2\lineheight,
>  n=3,
>  m=1,
>  distance=18pt,
>  state=start
> ]
> 
> % Full first line in small caps
> \definefirstline[smallcapsfirstline][
>  alternative=line,
>  style=smallcaps,
> ]
> 
> % First n words in small caps (three in this case)
> \definefirstline[smallcapsfirstlinethree][
>  alternative=word,
>  n=3,
>  style=smallcaps,
> ]
> 
> \starttext
> \setfirstline[smallcapsfirstlinethree]
> \setinitial[normal] Suppose we have a system for the approval of
> loans. \input knuth
> \blank[2*big]
> 
> \setfirstline[smallcapsfirstline]
> \setinitial[quote] “Suppose we have a system for the approval of
> loans.” \input knuth
> \blank[2*big]
> 
> \setfirstline[smallcapsfirstline]
> \setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu
> etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit
> audacia?
> 
> \stoptext
> 
> 
> I hope this will give you some ideas!
> 
> References:
> 
>https://wiki.contextgarden.net/Command/setupinitial 
> 
>https://wiki.contextgarden.net/Command/definefirstline 
> 
>https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy 
> 
> 
> Nicola

Hi Nicola,

Thanks. This solves the indentation of the initial itself. What remains is the 
indentation of the text immediately after, e.g. the 'uppose we’. Minimum 
example (also visible in your example):


% This combination of indenting and initial does not work properly, the text 
following the initial should be unindented
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
% Every chapter body text starts with a drop cap:

\defineinitial[normal][n=3,m=1,hoffset=\measure{CAindent},state=start]

\starttext
\setinitial[normal] S {\bf{\kap uppose we}} have a system for the approval of
loans. \input knuth
\stoptext


The ‘uppose we’ should not be indented more than the lines directly below. I’ve 
tried everything, e.g. trying some sort of noindent
 but so far without success. Setting indenting to ‘next', for instance, 
increases the indenting of that first line after the initial.

I’ve found the solution, though:


\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupinitial[n=3,m=1]

\starttext
\setupindenting[next]
\placeinitial S