[NTG-context] Re: Strange extra space when using cases in an inner align in math

2024-08-25 Thread Mikael Sundqvist
Hi Gerion,

Hans is working on the problem.

/Mikael

On Sun, Aug 25, 2024 at 4:01 PM Gerion Entrup  wrote:
>
> Hi Mikael,
>
> your examples are simpler, that is correct, but all of them have the extra 
> space.
> Thanks for the simpler code, I will integrate it!
>
> Gerion
>
> Am Dienstag, 20. August 2024, 12:41:45 MESZ schrieb Mikael Sundqvist:
> > Hi,
> >
> > There is indeed a space added in this case. But you do not need n=3.
> > And in fact, you do not need a simplealign either, but can use an
> > ordinary align, with location=packed. It looks like you had the wrong
> > number of \NC. I hope the examples below help, the last one is merely
> > for Hans for looking into why the relation-digit space is added there.
> >
> > /Mikael
> >
> > \definemathsimplealign[inneralign]
> >
> > \showglyphs
> > \showboxes
> >
> > \showmakeup[mathglue]
> >
> > \startdocument
> >
> > OK with \typ {n=2} instead of \typ {n=3}:
> >
> > \startformula
> >   \startalign
> > \NC a = b \NC \NR
> > \NC   \NC \startinneralign[n=2,align={1:right,2:left}]
> > \NC A  \NC = B \NR
> > \NC f(x,y) \NC = \startcases
> >\NC 1 \NC a \NR
> >\NC 1 \NC b \NR
> >\NC 1 \NC b \NR
> >      \stopcases
> >\NR
> >   \stopinneralign
> >       \NR
> >   \stopalign
> > \stopformula
> >
> > With align and location set to packed, instead of simplealign
> >
> > \startformula
> >   \startalign
> > \NC a = b \NC \NR
> > \NC   \NC \startalign[n=2,location=packed,align={1:right,2:left}]
> > \NC A  \NC = B \NR
> > \NC f(x,y) \NC = \startcases
> >\NC 1 \NC a \NR
> >\NC 1 \NC b \NR
> >    \NC 1 \NC b \NR
> >  \stopcases
> >\NR
> >   \stopalign
> >   \NR
> >   \stopalign
> > \stopformula
> >
> > Extra \typ {reldig} space before the 1:
> >
> > \startformula
> > \startalign[n=3,location=packed,align={1:right,2:middle,2:left}]
> > \NC A  \NC = \NC B \NR
> > \NC f(x,y) \NC = \NC \startcases
> >\NC 1 \NC a \NR
> >\NC 2 \NC b \NR
> >  \stopcases
> >\NR
> > \stopalign
> > \stopformula
> >
> > \stopdocument
> >
> > On Tue, Aug 20, 2024 at 11:55 AM Gerion Entrup  
> > wrote:
> > >
> > > Hi,
> > >
> > > I currently have the case of a strange extra space in math mode when 
> > > using cases in inner align.
> > >
> > > Here is a MWE to demonstrate the problem:
> > > ```
> > > \definemathsimplealign[inneralign]
> > > \startdocument
> > > \startformula
> > > \startalign
> > > \NC a = b \NR
> > > \NC \NC 
> > > \startinneralign[n=3,align={1:right,2:middle,3:left}]
> > > \NC A \NC = \NC B \NR
> > > \NC f(x,y) \NC = \NC \startcases
> > >  \NC \text{strange}  \NC a \NR
> > >  \NC \text{normal}  \NC b \NR
> > >  \NC \text{also normal}  \NC b \NR
> > > \stopcases
> > > \stopinneralign
> > > \stopalign
> > > \stopformula
> > > \stopdocument
> > > ```
> > >
> > > "strange" and "normal" are not aligned what I would expect but strange 
> > > has more space in front of it.
> > > Is this a usage error or a bug in the math engine?
> > >
> > > Best,
> > > Gerion___
>
> ___
> 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
> ___
___
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: [ how to remove speae before (and after) \startitemize ?

2024-08-25 Thread Wolfgang Schuster

vm via ntg-context schrieb am 25.08.2024 um 14:36:

Any hint as how to remove the automatic default space before and after
\startitemize and have equal line spacing between all text lines?


\starttext
one two three
\startitemize[packed]


\startitemize[packed,joinedup]

or

\startitemize[packed][before=,after=]

Wolfgang
___
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: Strange extra space when using cases in an inner align in math

2024-08-25 Thread Gerion Entrup
Hi Mikael,

your examples are simpler, that is correct, but all of them have the extra 
space.
Thanks for the simpler code, I will integrate it!

Gerion

Am Dienstag, 20. August 2024, 12:41:45 MESZ schrieb Mikael Sundqvist:
> Hi,
> 
> There is indeed a space added in this case. But you do not need n=3.
> And in fact, you do not need a simplealign either, but can use an
> ordinary align, with location=packed. It looks like you had the wrong
> number of \NC. I hope the examples below help, the last one is merely
> for Hans for looking into why the relation-digit space is added there.
> 
> /Mikael
> 
> \definemathsimplealign[inneralign]
> 
> \showglyphs
> \showboxes
> 
> \showmakeup[mathglue]
> 
> \startdocument
> 
> OK with \typ {n=2} instead of \typ {n=3}:
> 
> \startformula
>   \startalign
> \NC a = b \NC \NR
> \NC   \NC \startinneralign[n=2,align={1:right,2:left}]
> \NC A  \NC = B \NR
> \NC f(x,y) \NC = \startcases
>\NC 1 \NC a \NR
>\NC 1 \NC b \NR
>\NC 1 \NC b \NR
>  \stopcases
>\NR
>   \stopinneralign
>   \NR
>   \stopalign
> \stopformula
> 
> With align and location set to packed, instead of simplealign
> 
> \startformula
>   \startalign
> \NC a = b \NC \NR
> \NC   \NC \startalign[n=2,location=packed,align={1:right,2:left}]
> \NC A  \NC = B \NR
> \NC f(x,y) \NC = \startcases
>\NC 1 \NC a \NR
>\NC 1 \NC b \NR
>\NC 1 \NC b \NR
>  \stopcases
>\NR
>   \stopalign
>   \NR
>   \stopalign
> \stopformula
> 
> Extra \typ {reldig} space before the 1:
> 
> \startformula
> \startalign[n=3,location=packed,align={1:right,2:middle,2:left}]
> \NC A  \NC = \NC B \NR
> \NC f(x,y) \NC = \NC \startcases
>\NC 1 \NC a \NR
>\NC 2 \NC b \NR
>  \stopcases
>\NR
> \stopalign
> \stopformula
> 
> \stopdocument
> 
> On Tue, Aug 20, 2024 at 11:55 AM Gerion Entrup  wrote:
> >
> > Hi,
> >
> > I currently have the case of a strange extra space in math mode when using 
> > cases in inner align.
> >
> > Here is a MWE to demonstrate the problem:
> > ```
> > \definemathsimplealign[inneralign]
> > \startdocument
> > \startformula
> > \startalign
> > \NC a = b \NR
> > \NC \NC 
> > \startinneralign[n=3,align={1:right,2:middle,3:left}]
> > \NC A \NC = \NC B \NR
> > \NC f(x,y) \NC = \NC \startcases
> >  \NC \text{strange}  \NC a \NR
> >  \NC \text{normal}  \NC b \NR
> >  \NC \text{also normal}  \NC b \NR
> > \stopcases
> > \stopinneralign
> > \stopalign
> > \stopformula
> > \stopdocument
> > ```
> >
> > "strange" and "normal" are not aligned what I would expect but strange has 
> > more space in front of it.
> > Is this a usage error or a bug in the math engine?
> >
> > Best,
> > Gerion___



signature.asc
Description: This is a digitally signed message part.
___
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] [ how to remove speae before (and after) \startitemize ?

2024-08-25 Thread vm via ntg-context

Any hint as how to remove the automatic default space before and after
\startitemize and have equal line spacing between all text lines?


\starttext
one two three
\startitemize[packed]
\item one
\item two
\item three
\stopitemize
four five six
\stoptext



___
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: Strange extra space when using cases in an inner align in math

2024-08-20 Thread Mikael Sundqvist
Hi,

There is indeed a space added in this case. But you do not need n=3.
And in fact, you do not need a simplealign either, but can use an
ordinary align, with location=packed. It looks like you had the wrong
number of \NC. I hope the examples below help, the last one is merely
for Hans for looking into why the relation-digit space is added there.

/Mikael

\definemathsimplealign[inneralign]

\showglyphs
\showboxes

\showmakeup[mathglue]

\startdocument

OK with \typ {n=2} instead of \typ {n=3}:

\startformula
  \startalign
\NC a = b \NC \NR
\NC   \NC \startinneralign[n=2,align={1:right,2:left}]
\NC A  \NC = B \NR
\NC f(x,y) \NC = \startcases
   \NC 1 \NC a \NR
   \NC 1 \NC b \NR
   \NC 1 \NC b \NR
 \stopcases
   \NR
  \stopinneralign
  \NR
  \stopalign
\stopformula

With align and location set to packed, instead of simplealign

\startformula
  \startalign
\NC a = b \NC \NR
\NC   \NC \startalign[n=2,location=packed,align={1:right,2:left}]
\NC A  \NC = B \NR
\NC f(x,y) \NC = \startcases
   \NC 1 \NC a \NR
   \NC 1 \NC b \NR
   \NC 1 \NC b \NR
 \stopcases
   \NR
  \stopalign
  \NR
  \stopalign
\stopformula

Extra \typ {reldig} space before the 1:

\startformula
\startalign[n=3,location=packed,align={1:right,2:middle,2:left}]
\NC A  \NC = \NC B \NR
\NC f(x,y) \NC = \NC \startcases
   \NC 1 \NC a \NR
   \NC 2 \NC b \NR
 \stopcases
   \NR
\stopalign
\stopformula

\stopdocument

On Tue, Aug 20, 2024 at 11:55 AM Gerion Entrup  wrote:
>
> Hi,
>
> I currently have the case of a strange extra space in math mode when using 
> cases in inner align.
>
> Here is a MWE to demonstrate the problem:
> ```
> \definemathsimplealign[inneralign]
> \startdocument
> \startformula
> \startalign
> \NC a = b \NR
> \NC \NC \startinneralign[n=3,align={1:right,2:middle,3:left}]
> \NC A \NC = \NC B \NR
> \NC f(x,y) \NC = \NC \startcases
>  \NC \text{strange}  \NC a \NR
>  \NC \text{normal}  \NC b \NR
>  \NC \text{also normal}  \NC b \NR
> \stopcases
> \stopinneralign
> \stopalign
> \stopformula
> \stopdocument
> ```
>
> "strange" and "normal" are not aligned what I would expect but strange has 
> more space in front of it.
> Is this a usage error or a bug in the math engine?
>
> Best,
> Gerion___
> 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
> ___
___
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: documenting itemize specials

2024-07-07 Thread fv leung
Numerical answers to a 3-part math problem in which the 2nd part is a proof:

\startitemize[a]
\item 1234
\noitem
\item 5679
\stopitemize 

> On 7 Jul 2024, at 4:54 PM, Henning Hraban Ramm  wrote:
> 
> Hi,
> * can anyone give me an example where \noitem makes sense?
> * is the + symbol of \sub configurable?
> 
> 
> \startitemize[n,packed]
> \startitem oins \stopitem
> \noitem zwoi
> \startitem droi \stopitem
> \sub droi ond ebbes
> \stopitemize
> 
> 
> Hraban
> ___
> 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
> ___

___
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] documenting itemize specials

2024-07-07 Thread Henning Hraban Ramm

Hi,
* can anyone give me an example where \noitem makes sense?
* is the + symbol of \sub configurable?


\startitemize[n,packed]
\startitem oins \stopitem
\noitem zwoi
\startitem droi \stopitem
\sub droi ond ebbes
\stopitemize


Hraban
___
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: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop)

2024-06-28 Thread Gerion Entrup
Am Donnerstag, 27. Juni 2024, 22:19:02 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 25.06.2024 um 08:41:
> > Am Dienstag, 25. Juni 2024, 00:09:09 MESZ schrieb Wolfgang Schuster:
> >> Gerion Entrup schrieb am 24.06.2024 um 23:57:
> >>> Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan:
> >>>> On Mon, 24 Jun 2024, Gerion Entrup wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I was in the process to convert an itemize part to a description and 
> >>>>> wanted to simplify the code in the same move.
> >>>>> I discovered headcommand for that, but struggled to set the text in an 
> >>>>> highlight _and_ make a colon at the end.
> >>>> Not sure what exactly you want, but how about:
> >>>>
> >>>> \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}]
> >>>> % This is the wrong way to define such a command as '>' is not part of 
> >>>> the style. I have left this definition just for comparison with the soln 
> >>>> below.
> >>> Is there a better way to define a highlight that sets a style (color, 
> >>> font) _and_ a prefix (symbol)?
> >>> Another way, I know of, would be just a plain def, something like 
> >>> \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I 
> >>> want to define a highlight (just with an additional prefix).
> >>
> >> 1. ConTeXt already uses \hl as name for a existing command.
> >>
> >> 2. Use \definestartstop:
> >>
> >> \definestartstop [gerion] [style=mono,left={›\thinspace}]
> >>
> >> \starttext
> >>
> >> text
> >>
> >> \gerion{text}
> >>
> >> \stoptext
> >>
> >>>> \definedescription[category][
> >>>>  alternative=top,
> >>>>  headstyle=bold,
> >>>>  width=broad,
> >>>> ]
> >>>>
> >>>> \definedescription[desc][
> >>>>  width=fit,
> >>>>  distance={\widthofstring{~}},
> >>
> >> distance=\spaceamount,
> >>
> >> Wolfgang
> > 
> > This seems to be much better but does not lead to the wanted result. The 
> > full example now is:
> > ```
> > \definestartstop[myhl][style=mono,left={›\thinspace}]
> > 
> > \definedescription[categorie][
> > alternative=top,
> > headstyle=bold,
> > width=broad,
> > ]
> > 
> > \definedescription[desc][
> > width=broad,
> > distance=\spaceamount,
> > headcommand={\groupedcommand{\startmyhl}{\stopmyhl :}},
> > headstyle=,
> > before={\startpacked},
> > after={\stoppacked},
> > alternative=hanging
> > ]
> > 
> > \starttext
> > 
> > This is a \myhl{highlight}.
> > 
> > Some listings
> > 
> > \startcategorie{Itemize}
> > \startitemize[packed]
> > \item \myhl{first}: one
> > \item \myhl{second}: two
> > \stopitemize
> > \stopcategorie
> > 
> > Now the same as desc:
> > \startcategorie{Desc}
> > \startdesc{first} one \stopdesc
> > \startdesc{second} two \stopdesc
> > \stopcategorie
> > 
> > \stoptext
> > ```
> > 
> > This adopts the correct style in \startdesc \stopdesc and sets the colon 
> > but omits the › (the left part).
> 
> You can do the following in the next version.
> 
> 1. Add "arguments=yes" to \definestartstop to enable the optional 
> argument for the new command.
> 
> 2. Use the new commands with the "headcommand" key and apply ":" as 
> right delimiter for the content of \Highlight.
> 
> \definestartstop
>[Highlight]
>[arguments=yes,
> style=mono,
>  left={›\thinspace}]
> 
> \definedescription
>[description]
>[  width=broad,
>distance=\spaceamount,
> headcommand=\Highlight[right=:],
> alternative=hanging]
> 
> \starttext
> 
> This is a \Highlight{highlight}.
> 
> \startdescription[title={Lorem ipsum}]
> \samplefile{lorem}
> \stopdescription
> 
> \stoptext
> 
> Wolfgang

Thanks, that will work.
Do you know, why the groupedcommand solution does not work?

Gerion


signature.asc
Description: This is a digitally signed message part.
___
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: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop)

2024-06-27 Thread Wolfgang Schuster

Gerion Entrup schrieb am 25.06.2024 um 08:41:

Am Dienstag, 25. Juni 2024, 00:09:09 MESZ schrieb Wolfgang Schuster:

Gerion Entrup schrieb am 24.06.2024 um 23:57:

Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan:

On Mon, 24 Jun 2024, Gerion Entrup wrote:


Hi,

I was in the process to convert an itemize part to a description and wanted to 
simplify the code in the same move.
I discovered headcommand for that, but struggled to set the text in an 
highlight _and_ make a colon at the end.

Not sure what exactly you want, but how about:

\definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}]
% This is the wrong way to define such a command as '>' is not part of the 
style. I have left this definition just for comparison with the soln below.

Is there a better way to define a highlight that sets a style (color, font) 
_and_ a prefix (symbol)?
Another way, I know of, would be just a plain def, something like 
\def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want to 
define a highlight (just with an additional prefix).


1. ConTeXt already uses \hl as name for a existing command.

2. Use \definestartstop:

\definestartstop [gerion] [style=mono,left={›\thinspace}]

\starttext

text

\gerion{text}

\stoptext


\definedescription[category][
alternative=top,
headstyle=bold,
width=broad,
]

\definedescription[desc][
width=fit,
distance={\widthofstring{~}},


distance=\spaceamount,

Wolfgang


This seems to be much better but does not lead to the wanted result. The full 
example now is:
```
\definestartstop[myhl][style=mono,left={›\thinspace}]

\definedescription[categorie][
alternative=top,
headstyle=bold,
width=broad,
]

\definedescription[desc][
width=broad,
distance=\spaceamount,
headcommand={\groupedcommand{\startmyhl}{\stopmyhl :}},
headstyle=,
before={\startpacked},
after={\stoppacked},
alternative=hanging
]

\starttext

This is a \myhl{highlight}.

Some listings

\startcategorie{Itemize}
    \startitemize[packed]
\item \myhl{first}: one
\item \myhl{second}: two
\stopitemize
\stopcategorie

Now the same as desc:
\startcategorie{Desc}
\startdesc{first} one \stopdesc
\startdesc{second} two \stopdesc
\stopcategorie

\stoptext
```

This adopts the correct style in \startdesc \stopdesc and sets the colon but 
omits the › (the left part).


You can do the following in the next version.

1. Add "arguments=yes" to \definestartstop to enable the optional 
argument for the new command.


2. Use the new commands with the "headcommand" key and apply ":" as 
right delimiter for the content of \Highlight.


\definestartstop
  [Highlight]
  [arguments=yes,
   style=mono,
left={›\thinspace}]

\definedescription
  [description]
  [  width=broad,
  distance=\spaceamount,
   headcommand=\Highlight[right=:],
   alternative=hanging]

\starttext

This is a \Highlight{highlight}.

\startdescription[title={Lorem ipsum}]
\samplefile{lorem}
\stopdescription

\stoptext

Wolfgang


Highlight.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 / 
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: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop)

2024-06-24 Thread Gerion Entrup
Am Dienstag, 25. Juni 2024, 00:09:09 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 24.06.2024 um 23:57:
> > Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan:
> >> On Mon, 24 Jun 2024, Gerion Entrup wrote:
> >>
> >>> Hi,
> >>>
> >>> I was in the process to convert an itemize part to a description and 
> >>> wanted to simplify the code in the same move.
> >>> I discovered headcommand for that, but struggled to set the text in an 
> >>> highlight _and_ make a colon at the end.
> >> Not sure what exactly you want, but how about:
> >>
> >> \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}]
> >> % This is the wrong way to define such a command as '>' is not part of the 
> >> style. I have left this definition just for comparison with the soln below.
> > Is there a better way to define a highlight that sets a style (color, font) 
> > _and_ a prefix (symbol)?
> > Another way, I know of, would be just a plain def, something like 
> > \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want 
> > to define a highlight (just with an additional prefix).
> 
> 1. ConTeXt already uses \hl as name for a existing command.
> 
> 2. Use \definestartstop:
> 
> \definestartstop [gerion] [style=mono,left={›\thinspace}]
> 
> \starttext
> 
> text
> 
> \gerion{text}
> 
> \stoptext
> 
> >> \definedescription[category][
> >>alternative=top,
> >>headstyle=bold,
> >>width=broad,
> >> ]
> >>
> >> \definedescription[desc][
> >>width=fit,
> >>distance={\widthofstring{~}},
> 
> distance=\spaceamount,
> 
> Wolfgang

This seems to be much better but does not lead to the wanted result. The full 
example now is:
```
\definestartstop[myhl][style=mono,left={›\thinspace}]

\definedescription[categorie][
alternative=top,
headstyle=bold,
width=broad,
]

\definedescription[desc][
    width=broad,
distance=\spaceamount,
headcommand={\groupedcommand{\startmyhl}{\stopmyhl :}},
headstyle=,
before={\startpacked},
after={\stoppacked},
alternative=hanging
]

\starttext

This is a \myhl{highlight}.

Some listings

\startcategorie{Itemize}
\startitemize[packed]
\item \myhl{first}: one
\item \myhl{second}: two
\stopitemize
\stopcategorie

Now the same as desc:
\startcategorie{Desc}
\startdesc{first} one \stopdesc
\startdesc{second} two \stopdesc
\stopcategorie

\stoptext
```

This adopts the correct style in \startdesc \stopdesc and sets the colon but 
omits the › (the left part).

Gerion


mwe.pdf
Description: Adobe PDF document


signature.asc
Description: This is a digitally signed message part.
___
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: Use headcommand in \definedescription together with \definehighlight

2024-06-24 Thread Aditya Mahajan
On Mon, 24 Jun 2024, Gerion Entrup wrote:

> Hi,
> 
> I was in the process to convert an itemize part to a description and wanted 
> to simplify the code in the same move.
> I discovered headcommand for that, but struggled to set the text in an 
> highlight _and_ make a colon at the end.

Not sure what exactly you want, but how about:

\definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}]
% This is the wrong way to define such a command as '>' is not part of the 
style. I have left this definition just for comparison with the soln below.

\definedescription[category][
alternative=top,
headstyle=bold,
width=broad,
]

\definedescription[desc][
width=fit,
distance={\widthofstring{~}},
headcommand={\groupedcommand{>\,}{:}}, 
headstyle=\tt,
before={\startpacked},
after={\stoppacked},
alternative=hanging,
]

\starttext

This is a \hl{highlight}.

Some listings

\startcategory{Itemize}
\startitemize[packed]
\item \hl{first}: one
\item \hl{second}: two
\stopitemize
\stopcategory

Now the same as desc:
\startcategory{Desc}
\startdesc{first} one \stopdesc
\startdesc{second} two \stopdesc
\stopcategory

\stoptext

Aditya
___
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] Use headcommand in \definedescription together with \definehighlight

2024-06-24 Thread Gerion Entrup
Hi,

I was in the process to convert an itemize part to a description and wanted to 
simplify the code in the same move.
I discovered headcommand for that, but struggled to set the text in an 
highlight _and_ make a colon at the end.
Do you know, if this is possible?

Here is a MWE:
```
\definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}]

\definedescription[category][
alternative=top,
headstyle=bold,
width=broad,
]

\definedescription[desc][
width=broad,
distance={\widthofstring{~}},
headcommand={\groupedcommand{\hl}{:}},
% headcommand={\groupedcommand{}{:}}, % this compiles but the highlight 
is lost
% headcommand={\groupedcommand{\starthl}{\stophl :}}, % this does not 
compile
headstyle=,
before={\startpacked},
after={\stoppacked},
alternative=hanging,
]

\starttext

This is a \hl{highlight}.

Some listings

\startcategory{Itemize}
\startitemize[packed]
\item \hl{first}: one
\item \hl{second}: two
\stopitemize
\stopcategory

Now the same as desc:
\startcategory{Desc}
\startdesc{first} one \stopdesc
\startdesc{second} two \stopdesc
\stopcategory

\stoptext
```
The itemize looks like it should look (except of the dots).

Best,
Gerion

signature.asc
Description: This is a digitally signed message part.
___
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] Arranging bullets within tabulate and itemize

2024-06-19 Thread Lukas via ntg-context

Hello,

here is a simple code:


\definedescription[Mat]
  [headstyle=bi,
   
text={Foo},alternative=serried,width_=fit,indenting_={yes,medium},indenting_=no,align_=left,indentnext_=no,hang_=none,

  ]

\starttext

  \startMat
\startitemize[packed,][]
  \starttabulate[|l|l|l|]
\NI Aaa \NC Aa \NC\AR
\NI Bbb \NC Bb \NC\AR
  \stoptabulate
\stopitemize
  \stopMat

  \startMat
\startitemize[packed_,joinedup_][afterhead=,]
  \head Ttt \par
Tt

  \head Uuu \par
Uu
\stopitemize
  \stopMat

\stoptext


which produces something like:

Foo
  • Aaa Aa
  • Bbb Bb

Foo
• Ttt
Tt
• Uuu
Uu


I cannot find out how to arrange the tabulate bullets straight above 
those of itemize, so how to supress the left indeting, to get:


Foo
• Aaa Aa
• Bbb Bb

Foo
• Ttt
Tt
• Uuu
Uu

How do I achieve this?

TIA.

Best regards,

Lukas
\definedescription[Mat]
  [headstyle=bi,
   
text={Foo},alternative=serried,width_=fit,indenting_={yes,medium},indenting_=no,align_=left,indentnext_=no,hang_=none,
  ]

\starttext

  \startMat
\startitemize[packed,][]
  \starttabulate[|l|l|l|]
\NI Aaa \NC Aa \NC\AR
\NI Bbb \NC Bb \NC\AR
  \stoptabulate
\stopitemize
  \stopMat

  \startMat
\startitemize[packed_,joinedup_][afterhead=,]
  \head Ttt \par
Tt

  \head Uuu \par
Uu
\stopitemize
  \stopMat

\stoptext
___
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: How to Define a New Language

2024-05-24 Thread Wolfgang Schuster

ai2472206...@yeah.net schrieb am 24.05.2024 um 14:05:

Hello, everyone.

As the title describes, I want to define a new language: Chinese Traditional.
Based on what I could find on the Internet, I made these settings.
But I couldn't get the results I wanted.

%%%start example
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\installlanguage[cnt] [default=cn,patterns=cn,factor=yes]
\setuplanguage  [cnt] [spacing=packed,default=cn,patterns=cn,factor=yes]
\setuplabeltext [cnt] [appendix={附錄}]
\protect
\mainlanguage[cnt]
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

I think I'm going to get the two kanji [附錄]. But the truth is, he has nothing.
But when I converted to Chinese Simplified, he magically appeared.

%%%start example
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\setuplabeltext [cn] [appendix={附錄}] %%% here switch to Chinese-Simplified
\protect
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

So, what should I do to get it. Of course, my original assumption was that
when I changed the language, these labels, fonts, indentations, line spacing, 
etc.,
would change. But for now, I'm stuck at defining a new language.

  If anyone can give advice, appreciate it


1. It is better to add new languages to Context itself and not just in 
your document.


2. Chinese doesn't use hyphenation pattern but has rules where to break 
which is enabled with the \setscript command.


3. We should use agree upon a name which is used for traditional and 
simplified chinese (at the moment we have only chinese without 
distinction). Is it even enough to just separate between both or do we 
need separate setting china, singapore, taiwan, hong kong and macau?


Wolfgang

___
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: How to Define a New Language

2024-05-24 Thread Jean-Pierre Delange

Hi Muyik !

The first thing to check, even if it seems stupid, is to make sure that 
the Traditional Chinese fonts are installed in the 
/context/context-mf/fonts/ etc. folder and test this installation with 
the following command:
mtxrun --script fonts --list --pattern="Chinese Font" --all (indicate 
actual font name)


Don't forget the following commands to purge the font cache and restore 
the database:


1. mtxrun --script cache --erase && mtxrun --generate

2. mtxrun --script fonts --reload
Then : 3. mtxrun --script fonts --list --pattern="Chinese Font" --all

Normally, the system should support the desired font after these checks. 
For my part, I have no problem with Traditional Chinese or Simplified 
Chinese fonts, but I haven't checked with OSX ...


I hope these few suggestions will help.

JP

Le 24/05/2024 à 14:05, ai2472206...@yeah.net a écrit :

Hello, everyone.

As the title describes, I want to define a new language: Chinese Traditional.
Based on what I could find on the Internet, I made these settings.
But I couldn't get the results I wanted.

%%%start example
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\installlanguage[cnt] [default=cn,patterns=cn,factor=yes]
\setuplanguage  [cnt] [spacing=packed,default=cn,patterns=cn,factor=yes]
\setuplabeltext [cnt] [appendix={附錄}]
\protect
\mainlanguage[cnt]
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

I think I'm going to get the two kanji [附錄]. But the truth is, he has nothing.
But when I converted to Chinese Simplified, he magically appeared.

%%%start example
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\setuplabeltext [cn] [appendix={附錄}] %%% here switch to Chinese-Simplified
\protect
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

So, what should I do to get it. Of course, my original assumption was that
when I changed the language, these labels, fonts, indentations, line spacing, 
etc.,
would change. But for now, I'm stuck at defining a new language.

  If anyone can give advice, appreciate it

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

___
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] How to Define a New Language

2024-05-24 Thread ai2472206007
Hello, everyone. 

As the title describes, I want to define a new language: Chinese Traditional. 
Based on what I could find on the Internet, I made these settings. 
But I couldn't get the results I wanted.

%%%start example 
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\installlanguage[cnt] [default=cn,patterns=cn,factor=yes]
\setuplanguage  [cnt] [spacing=packed,default=cn,patterns=cn,factor=yes]
\setuplabeltext [cnt] [appendix={附錄}]
\protect
\mainlanguage[cnt]
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

I think I'm going to get the two kanji [附錄]. But the truth is, he has nothing. 
But when I converted to Chinese Simplified, he magically appeared. 

%%%start example 
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\setuplabeltext [cn] [appendix={附錄}] %%% here switch to Chinese-Simplified
\protect
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

So, what should I do to get it. Of course, my original assumption was that 
when I changed the language, these labels, fonts, indentations, line spacing, 
etc., 
would change. But for now, I'm stuck at defining a new language.

 If anyone can give advice, appreciate it

Muyik
___
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: Hbox error with itemized list on second page

2024-05-08 Thread Ross Schulman
Hi everyone. Just raising this question again. Is anyone able to help me figure 
out why this is happening and how I can fix it more permanently? Thank you all 
very much!

Ross

On Mon, May 6, 2024, at 7:33 PM, Ross Schulman wrote:
> So, unfortunately while using `\testpage` helped in the version of the resume 
> I was working on at the time, I've encountered the error again now that some 
> different content is making the page break at a different point, and setting 
> `\testpage` as high as 6 is not fixing the problem. Is there something else I 
> can/should try?
> 
> Thanks very much,
> Ross
> 
> On Tue, Apr 30, 2024, at 12:20 PM, Ross Schulman wrote:
>> Thank you. Adding that did the trick!
>> 
>> Best,
>> Ross Schulman
>> 
>> On Tue, Apr 30, 2024, at 11:47 AM, Wolfgang Schuster wrote:
>>> Ross Schulman schrieb am 30.04.2024 um 15:01:
>>> > Hello,
>>> > I'm attempting to format a resume in Context building off of a template 
>>> > I found online. I'm having an odd error with some bullets on the second 
>>> > page, however. I'm guessing it has something to do with my \definelayout 
>>> > for the second (and subsequent) pages, but I can't figure it out for 
>>> > sure. What is happening is that whichever bullets are at the top of the 
>>> > second page are being wrapped as if they were appearing on the first 
>>> > page, which has a different layout structure.
>>> > 
>>> > I've pasted a sanitized version of the tex file below. Any assistance 
>>> > would be greatly appreciated!
>>> > 
>>> > Thanks,
>>> > Ross Schulman
>>> > 
>>> > 
>>> > [...]
>>> > 
>>> > Lorem Manager
>>> > \startitemize[packed]
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> > \stopitemize
>>> 
>>> You can use the \testpage command to force a page break before the TeX 
>>> mechanism to start a new page kicks in.
>>> 
>>> \startitemize[inbetween={\testpage[2]\blank}]
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> \stopitemize
>>> 
>>> Wolfgang
>>> ___
>>> 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
>>> ___
>>> 
>> 
>> ___
>> 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
>> ___
>> 
> 
> ___
> 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
> ___
> 
___
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: Hbox error with itemized list on second page

2024-05-06 Thread Ross Schulman
So, unfortunately while using `\testpage` helped in the version of the resume I 
was working on at the time, I've encountered the error again now that some 
different content is making the page break at a different point, and setting 
`\testpage` as high as 6 is not fixing the problem. Is there something else I 
can/should try?

Thanks very much,
Ross

On Tue, Apr 30, 2024, at 12:20 PM, Ross Schulman wrote:
> Thank you. Adding that did the trick!
> 
> Best,
> Ross Schulman
> 
> On Tue, Apr 30, 2024, at 11:47 AM, Wolfgang Schuster wrote:
>> Ross Schulman schrieb am 30.04.2024 um 15:01:
>> > Hello,
>> > I'm attempting to format a resume in Context building off of a template 
>> > I found online. I'm having an odd error with some bullets on the second 
>> > page, however. I'm guessing it has something to do with my \definelayout 
>> > for the second (and subsequent) pages, but I can't figure it out for 
>> > sure. What is happening is that whichever bullets are at the top of the 
>> > second page are being wrapped as if they were appearing on the first 
>> > page, which has a different layout structure.
>> > 
>> > I've pasted a sanitized version of the tex file below. Any assistance 
>> > would be greatly appreciated!
>> > 
>> > Thanks,
>> > Ross Schulman
>> > 
>> > 
>> > [...]
>> > 
>> > Lorem Manager
>> > \startitemize[packed]
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> > \stopitemize
>> 
>> You can use the \testpage command to force a page break before the TeX 
>> mechanism to start a new page kicks in.
>> 
>> \startitemize[inbetween={\testpage[2]\blank}]
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> \stopitemize
>> 
>> Wolfgang
>> ___
>> 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
>> ___
>> 
> 
> ___
> 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
> ___
> 
___
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: Hbox error with itemized list on second page

2024-04-30 Thread Ross Schulman
Thank you. Adding that did the trick!

Best,
Ross Schulman

On Tue, Apr 30, 2024, at 11:47 AM, Wolfgang Schuster wrote:
> Ross Schulman schrieb am 30.04.2024 um 15:01:
> > Hello,
> > I'm attempting to format a resume in Context building off of a template 
> > I found online. I'm having an odd error with some bullets on the second 
> > page, however. I'm guessing it has something to do with my \definelayout 
> > for the second (and subsequent) pages, but I can't figure it out for 
> > sure. What is happening is that whichever bullets are at the top of the 
> > second page are being wrapped as if they were appearing on the first 
> > page, which has a different layout structure.
> > 
> > I've pasted a sanitized version of the tex file below. Any assistance 
> > would be greatly appreciated!
> > 
> > Thanks,
> > Ross Schulman
> > 
> > 
> > [...]
> > 
> > Lorem Manager
> > \startitemize[packed]
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> > \stopitemize
> 
> You can use the \testpage command to force a page break before the TeX 
> mechanism to start a new page kicks in.
> 
> \startitemize[inbetween={\testpage[2]\blank}]
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> \stopitemize
> 
> Wolfgang
> ___
> 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
> ___
> 
___
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: Hbox error with itemized list on second page

2024-04-30 Thread Wolfgang Schuster

Ross Schulman schrieb am 30.04.2024 um 15:01:

Hello,
I'm attempting to format a resume in Context building off of a template 
I found online. I'm having an odd error with some bullets on the second 
page, however. I'm guessing it has something to do with my \definelayout 
for the second (and subsequent) pages, but I can't figure it out for 
sure. What is happening is that whichever bullets are at the top of the 
second page are being wrapped as if they were appearing on the first 
page, which has a different layout structure.


I've pasted a sanitized version of the tex file below. Any assistance 
would be greatly appreciated!


Thanks,
Ross Schulman


[...]

Lorem Manager
\startitemize[packed]
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize


You can use the \testpage command to force a page break before the TeX 
mechanism to start a new page kicks in.


\startitemize[inbetween={\testpage[2]\blank}]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

Wolfgang
___
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] Hbox error with itemized list on second page

2024-04-30 Thread Ross Schulman
Hello,
I'm attempting to format a resume in Context building off of a template I found 
online. I'm having an odd error with some bullets on the second page, however. 
I'm guessing it has something to do with my \definelayout for the second (and 
subsequent) pages, but I can't figure it out for sure. What is happening is 
that whichever bullets are at the top of the second page are being wrapped as 
if they were appearing on the first page, which has a different layout 
structure.

I've pasted a sanitized version of the tex file below. Any assistance would be 
greatly appreciated!

Thanks,
Ross Schulman


\usemodule[ipsum]
\setuppapersize[letter]
\setuppagenumbering[location=]
\definelayout[first]
  [% horizontal
   backspace=2.5in,
   leftmargin=1.75in,
   leftmargindistance=0.25in,
   width=5.5in,
   rightmargin=0in,
   % vertical
   topspace=0pt,
   header=1.2in,
   headerdistance=.1in,
   height=middle,
   footerdistance=0pt,
   footer=\lineheight,
   bottomspace=.5in]

\definelayout[rest]
  [% horizontal
leftmargin=0in,
width=6.5in,
rightmargin=0in,
% % vertical
topspace=0pt,
header=1in,
headerdistance=.1in,
height=middle,
footerdistance=0pt,
footer=\lineheight,
bottomspace=.3in]

\definelayout[1][first]
\definelayout[2][rest]

\setupmarginblock
  [location=left,
   width=\leftmarginwidth,
   align=flushright]

\usecolors[svg]

\definehead[contacts][title]
\setuphead
[contacts]
[
align=center,
page=no,
after={\thinrule\blank[big]}]

\definehead[topic][subject]
\setuphead
[topic]
[
after={\hairline}]

\defineitemgroup
  [timeline]
  [before=,
   inbetween=,
   width=6em]

\setuplines[before=,after=,command=\strut]

\definelayer[mybkgr][x=0mm,y=0mm,
  width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background={mybkgr}]

\starttext
\setlayerframed
  [mybkgr]
  []
  [background=color,
   framecolor=forestgreen,
   backgroundcolor=forestgreen,
   foregroundcolor=white,
   width=\paperwidth,
   height=\dimexpr\topspace+\headerheight\relax]
{\dontleavehmode{\tfd ROSS SCHULMAN}\blank[medium]
policy technologist
}

\startmarginblock
\topic{CONTACT}
\startlines
1234 Main St NW
Washington, DC 20011
\stoplines

\topic{LANGUAGES}
\startlines
English (Native Speaker)
Spanish (Conversational)
\stoplines

\topic{TECH}
\startlines
Rust
Javascript \letterampersand\space Typescript
Linux Administration
Google and Microsoft Office Suites
\stoplines
\stopmarginblock

\setupalign[flushleft]
\topic{EXPERIENCE}
\starttimeline
\sym{2021--Now}\color[forestgreen]{Lorem Ipsum Foundation}\hfill
\color[darkgrey]{\tfx San Francisco, CA (remote)}

Senior Fellow
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2015--2021}\color[forestgreen]{Other Place About Lorem}\hfill
\color[darkgrey]{\tfx Washington, DC}

Senior Lorem Counsel
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2014--2015}\color[forestgreen]{Lorems R Us}\hfill
\color[darkgrey]{\tfx Washington, DC}

Lorem Manager
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2010--2014}\color[forestgreen]{Computer and Communications Industry 
Association}\hfill
\color[darkgrey]{\tfx Washington, DC}

Lorem Project Manager
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2005--2007}\color[forestgreen]{Center for Lorem Ipsum}\hfill
\color[darkgrey]{\tfx Washington, DC}

Program Associate
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize
\stoptimeline
\stoptext
___
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://

[NTG-context] Re: How can I do this?

2024-03-08 Thread Otared Kavian
Hi Ursula,

The reason for which you did not get the expected result is that you have « } » 
missing in your file, that is the closing brace after your italic command
« {\it » at the end of your document. 
Moreover you did not have a \stoptext in your file, and a math command « \m » 
was not written correctly. Talking of math, I personnaly prefer to enclose 
in-line math between dollar signs $, that is writing « $\exists x \in H$ » 
instead of  « \m{\exists x \in H} ».

Also the way you write your text is somewhat « incorrect » (or as Mikael 
Sundqvist would put it, « interesting »…), since in principle all the setups 
and definitions must be before the body of your document which begns with 
\starttext. Another point i sthat instead of using \par you can leave a blank 
line, which makes the document more readable. And you don’t need to break the 
lines by « hand », since ConTeXt does it in a better way.
Finally instead of 
\blackrule[color=black, height=0.10ex, width=13.50cm]
you can use just \hairline, and the thickness and color of such a \hairline can 
be adjusted by 
\setupthinrules[rulethickness=4pt,color=darkgreen]
(for instance), which should be put before \starttext.

Best regards: Otared

% begin textbackground-Ursula.tex
\definetextbackground[myBG][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.8\bodyfontsize,
  rightoffset=.8\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off]

\setupnarrower[left=0.80cm, right=0.80cm]
\definehspace[oneem][0.5em]
\setupinteraction
   [state=start,
color=blue]

\usecolors[svg]
\setupinteraction
  [state=start,
   contrastcolor=cornflowerblue]
   
   
\starttext
\margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und 
Existenzquantor).}

{\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aussage 
h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich 
die Bedeutung der beiden Aussagen klar.}

\startitemize[n,packed,broad]
\item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  

\item $∃f ∈ F : ∀m ∈ M : h(m, f)$.

\stopitemize


\startmyBG
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein $∃\forall∀ $ oder ein $\forall∀\m∃$ versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank

\startnarrower[left, right]

Der\hspace[oneem] Wert \hspace[oneem] von \hspace[oneem] 
\m{y = f(x)} ist unabhängig von der Wahl

von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} 

(Beutelspacher [10, S.54])

\blank
\stopnarrower
\stopmyBG


\blank

\blackrule[color=black, height=0.10ex, width=13.50cm]

\reference[Regel:1]{3.1}

{\bf Aufgabe 3.2.18} Formulieren Sie gemäß der Regel (\goto{3.1}[Regel:1]) 
äquivalent

\startitemize[n,packed,broad]

\item \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},

\item \m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides 
n},

\item \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }\nospace
\implies n \mtext{ ungerade}}.

\stopitemize

\blackrule[color=black, height=0.10ex, width=13.50cm]

{\bf Aufgabe 3.2.19} Bilden Sie die Verneinung der folgenden Aussagen:

\startitemize[n,packed,broad]
\item Alle Rosen sind verwelkt oder teuer.

\item Alle rosen sind entweder verwelkt oder teuer.

\stopitemize


\reference[Abschnitt:1]{3.2.1.1}

{\it Hinweis: Beachten Sie die Konvention aus Abschnitt 
\goto{3.2.1.1}[Abschnitt:1] die Formulierung \quotation {entweder ... oder} 
entspricht dem ausschließenden Oder
und die Formulierung \quotation{oder} dem (mathematischen) einschließenden
Oder.}

\blackrule[color=black, height=0.10ex, width=13.50cm]

\stoptext
% end textbackground-Ursula.tex


> On 6 Mar 2024, at 13:52, Ursula Hermann  wrote:
> 
> Dear List,
> I need a tip how to do this:
> In the command \definepapersize[Mybook] the height should be not 24 cm, but a 
> little bit longer. My Problem is, as you can see on the PDF, that there are 
> troubles with the Gray Background. The Gray Background should begin with : 
> Mitunter. . I think it should be the topoffset, and the bottomoffset, but how 
> many .\bodyfontsize should I try?
> Many thanks 
> Uschi 
> \mainlanguage[de]
> \definepapersize[MyBook][width=19cm,height=24cm]
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
> \setupbodyfont[Times New Roman,12.55pt]
> \definemargindata  [MyInMargin][inright]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
> \defineenumeration
>   [theorem]
>   [
> text=Theorem,
> title=yes,
> width=fit,
> distance=0.2em,
> alternative=serried,
>   ]
> \definetextbackground[GrayBackground][
>   location=p

[NTG-context] How can I do this?

2024-03-06 Thread Ursula Hermann
Dear List,
I need a tip how to do this:
In the command \definepapersize[Mybook] the height should be not 24 cm, but a 
little bit longer. My Problem is, as you can see on the PDF, that there are 
troubles with the Gray Background. The Gray Background should begin with : 
Mitunter. . I think it should be the topoffset, and the bottomoffset, but how 
many .\bodyfontsize should I try?
Many thanks
Uschi
\mainlanguage[de]
\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman,12.55pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.8\bodyfontsize,
  rightoffset=.8\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und 
Existenzquantor).}
\par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die 
Aus-\par
sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie 
sich die Bedeutung der beiden Aussagen klar.}
\par
\startitemize[n,packed,broad]
\item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
\startGrayBackground
\tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m ∃\forall∀ oder ein \m \forall∀\m∃ versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank
\setupnarrower [left=0.80cm, right=0.80cm]
\startnarrower[left, right]
\definehspace[oneem][0.5em]
Der\hspace[oneem] Wert\hspace[oneem] von\hspace[oneem] \m{y = f(x)} ist 
unabhängig von der Wahl\\
von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \\ 
(Beutelspacher [10, S.54])\par
\blank
\stopnarrower
\stopGrayBackground
\blank
\blackrule[color=black, height=0.10ex, width=13.50cm]
\setupinteraction
   [state=start,
color=blue]
\reference[Regel:1]{3.1}\par
{\bf Aufgabe 3.2.18} Formulieren Sie gemäß der Regel (\goto{3.1}[Regel:1]) 
äquivalent
\startitemize[n,packed,broad]
\item \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},\item 
\m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides 
n},\item \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }\nospace
\implies n \mtext{ ungerade}}.
\stopitemize
\blackrule[color=black, height=0.10ex, width=13.50cm]\par
{\bf Aufgabe 3.2.19} Bilden Sie die Verneinung der folgenden Aussagen:
\startitemize[n,packed,broad]
\item Alle Rosen sind verwelkt oder teuer.
\item Alle rosen sind entweder verwelkt oder teuer.
\stopitemize
\par
\usecolors[svg]
\setupinteraction
  [state=start,
   contrastcolor=cornflowerblue]
\reference[Abschnitt:1]{3.2.1.1}
{\it Hinweis: Beachten Sie die Konvention aus Abschnitt \goto 
{3.2.1.1}[Abschnitt:1]die For-\par
mulierung \quotation {entweder ... oder} entspricht dem ausschließenden Oder\par
und die Formulierung \quotation{oder} dem (mathematischen) einschließenden\par
Oder.\par
\blackrule[color=black, height=0.10ex, width=13.50cm]



Bruce.pdf
Description: Bruce.pdf
___
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] Nested itemize lists: unexpected spacing

2024-02-01 Thread Jim
Consider the following:

\starttext

Text before.
\startitemize[1,nowhite]
\item item 1
\item item 2
\startitemize[5,nowhite]
\item sub-item 1
\item sub-item 2
\stopitemize
\item item 3
\stopitemize
Text after.

\stoptext

Notwithstanding the "nowhite" options, there is a blank line before
sub-item 1, which I do not want.

Oddly (to me), if I change the first "nowhite" to "packed", the space
before sub-item 1 goes away, but then I get undesired space before and
after the out itemization.

Q1: Can someone explain the Zen of this?  That is, why does the blank
line before sub-item 1 go away with "packed", but not "nowhite"?



Poking around on the internet, I find that if I leave the "nowhite"s, but
precede "Text before." with
\unprotect
\c_strc_itemgroups_spacing_mode=1  % 0 works too, but 2 doesn't
\protect
then I get the spacing I want.

Q2: \c_strc_itemgroups_spacing_mode seems to be an undocumented "feature".
Is there a "documented" way of making the unwanted blank line
go away, without introducing unwanted blank lines before and
after the outer itemize list?


Thanks.
Jim
___
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: Math alignment issue

2024-01-17 Thread Otared Kavian
Hi Mikael,

I installed anew the latest version and I get still the same bizarre result 
with math alignment.

Please can someone on the list typeset the following in order to see whether 
the result is correct or not ?

%begin 240117-1-bis.tex

\definemathsimplealign[alignedcases]
[left={\startmathfenced[cases]},
right=\stopmathfenced,
align={1:right,2:left,3:left},
strut=yes]

\setupformula
  [location=left]

\starttext

\samplefile{knuthmath}

\startplaceformula
\startformula
\startalignedcases
\NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0
  \NC \mtext{bla bla bla} \NR
\NC u(x,0)   \NC = 
u_0(x) \NC \mtext{bla bla} \NR
  \NC u(t,\sigma)  \NC = 0  \NC \mtext{bla 
bla bla bla} \NR
\stopalignedcases
\stopformula
\stopplaceformula

\samplefile{knuthmath}

\startplaceformula
\startformula

\startalign[location=packed,n=2,m=2,align={1:right,2:left},fences=cases]
\NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0
  \NC \NC \mtext{bla bla bla} \NR
\NC u(x,0)   \NC = 
u_0(x) \NC \NC \mtext{bla bla} \NR
  \NC u(t,\sigma)  \NC = 0  \NC \NC 
\mtext{bla bla bla bla} \NR
\stopalign
\stopformula
\stopplaceformula

\samplefile{knuthmath}

\stoptext
% end 240117-1-bis.tex

Thanks in advance: Otared


> On 17 Jan 2024, at 12:09, Mikael Sundqvist  wrote:
> 
> Could your installation be broken?
> 
> /Mikael
> 
> Den ons 17 jan. 2024 11:41Otared Kavian  <mailto:ota...@gmail.com>> skrev:
> Hi Mikael,
> 
> Actually it seems that the math alignment stuff has been broken even in 
> version 2023-09-26, since I get also something incorrect, as you can see in 
> the attached PDF.
> 
> Many thanks for your help: Otared
> 
> 
> 
>> On 17 Jan 2024, at 11:06, Mikael Sundqvist > <mailto:mic...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> Then there was a problem with the last update. Maybe there will be a new 
>> upload soon that works better for you.
>> 
>> /Mikael
>> 
>> Den ons 17 jan. 2024 10:37Otared Kavian > <mailto:ota...@gmail.com>> skrev:
>> Hi Mikael,
>> 
>> Thank you for your reply. When I typeset the example you sent me, that is
>> 
>> %begin 240117-1-bis.tex
>> 
>> \definemathsimplealign[alignedcases]
>>  [left={\startmathfenced[cases]},
>>  right=\stopmathfenced,
>>  align={1:right,2:left,3:left},
>>  strut=yes]
>> 
>> \setupformula
>>   [location=left]
>> 
>> \starttext
>> 
>> \samplefile{knuthmath}
>> 
>> \startplaceformula
>>  \startformula
>>  \startalignedcases
>>  \NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0
>>   \NC \mtext{bla bla bla} \NR
>>  \NC u(x,0)   \NC = 
>> u_0(x) \NC \mtext{bla bla}     \NR
>>   \NC u(t,\sigma)  \NC = 0  \NC 
>> \mtext{bla bla bla bla} \NR
>>  \stopalignedcases
>>  \stopformula
>> \stopplaceformula
>> 
>> \samplefile{knuthmath}
>> 
>> \startplaceformula
>>  \startformula
>>  
>> \startalign[location=packed,n=2,m=2,align={1:right,2:left},fences=cases]
>>  \NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0
>>   \NC \NC \mtext{bla bla bla} \NR
>>  \NC u(x,0)   \NC = 
>> u_0(x) \NC \NC \mtext{bla bla} \NR
>>   \NC u(t,\sigma)  \NC = 0  \NC \NC 
>> \mtext{bla bla bla bla} \NR
>>  \stopalign
>>  \stopformula
>> \stopplaceformula
>> 
>> \samplefile{knuthmath}
>> 
>> \stoptext
>> % end 240117-1-bis.tex
>> 
>> I get something different than the PDF you sent me: the formulas run into 
>> the text just above them, as you can see in the attached PDF. I am using 
>> ConTeXt LMTX version 2024.01.08 on MacOS 11.7.10. I don’t see what is wrong 
>> with my installation…
>> 
>> Best regards: Otared
>> 
>> 
>> 
>>> On 17 Jan 2024, at 09:47, Mikael Sundqvist >> <mailto:mic...@gmail.com>> wrote:
>>> 
>>> Hi Otared,
>>> 
>>> I'm not sure 

[NTG-context] Re: Math alignment issue

2024-01-17 Thread Otared Kavian
Hi Mikael,Thank you for your reply. When I typeset the example you sent me, that is%begin 240117-1-bis.tex\definemathsimplealign[alignedcases]		[left={\startmathfenced[cases]},		right=\stopmathfenced,		align={1:right,2:left,3:left},		strut=yes]\setupformula  [location=left]\starttext\samplefile{knuthmath}\startplaceformula	\startformula		\startalignedcases			\NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0      \NC \mtext{bla bla bla}     \NR			\NC u(x,0)                                   \NC = u_0(x) \NC \mtext{bla bla}         \NR      \NC u(t,\sigma)                              \NC = 0      \NC \mtext{bla bla bla bla} \NR		\stopalignedcases	\stopformula\stopplaceformula\samplefile{knuthmath}\startplaceformula	\startformula		\startalign[location=packed,n=2,m=2,align={1:right,2:left},fences=cases]			\NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0      \NC \NC \mtext{bla bla bla}     \NR			\NC u(x,0)                                   \NC = u_0(x) \NC \NC \mtext{bla bla}         \NR      \NC u(t,\sigma)                              \NC = 0      \NC \NC \mtext{bla bla bla bla} \NR		\stopalign	\stopformula\stopplaceformula\samplefile{knuthmath}\stoptext% end 240117-1-bis.texI get something different than the PDF you sent me: the formulas run into the text just above them, as you can see in the attached PDF. I am using ConTeXt LMTX version 2024.01.08 on MacOS 11.7.10. I don’t see what is wrong with my installation…Best regards: Otared

240117-1-bis.pdf
Description: Adobe PDF document
On 17 Jan 2024, at 09:47, Mikael Sundqvist <mic...@gmail.com> wrote:Hi Otared,I'm not sure how you get that code, since you do not show the source.From last upload, there is location=packed for align, so now that canbe used "inline" in formulas. See attached. I hope it helps.Best, MikaelOn Tue, Jan 16, 2024 at 9:41 PM Otared Kavian <ota...@gmail.com> wrote:Hi Mickael,I wish you a happy new year !I apologize for writing you outside the mailing list: this is du eto the fact that I am attaching two screenshots in order to show the problem I encounter, and these documents cannot go through the mailing list.In a document written a year and half ago I have the following definition:\definemathmatrix[alignedcases][align={right,left,left},distance=3pt,left={\left\{},right={\right.},style=\displaystyle]in order to typeset multi-lines formulas regrouped with a left brace. This is analogous to math-cases, but I need three columns instead of two.When the alignment in maths changed I changed the above definition to the following:\definemathsimplealign[alignedcases][left={\startmathfenced[cases]},right=\stopmathfenced,align={1:right,2:left,3:left},strut=yes]The result of the typesetting with LMTX in 2022 is shown in the attached document « math-align-2022.pdf »,But when the same documentis  typeset with the latest version from 2024-01-08, it does not show the formulas correctly, as one can see in the attached screenshot « math-align-2024-01-08.pdf ».I cannot reproduce the issue on a short document, but since there have been some changes in the way the math alignment is treated now, I wonder whether you can help me how to change my definitions accordingly.In order to let th elist be informed, once the issue may be solved without the screenshots, I may post a message there.Thanks in advance, and best regards: Otared<240117-1.mkxl><240117-1.pdf>
Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95

___
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: Looking for itemize help

2024-01-15 Thread Jim
On Mon, Jan 15, 2024 at 20:33 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 17:15 schrieb Jim:
>> "after" does the trick, but not in an automatic way.  I would like
>> something which automagically "does the right thing".

> With “automagically”, do you mean for all instances?

I hate to go out on a limb and say "all", but I mean that if there is text
"immediately" following the \stopitemize (i.e., no \par token or vertical
mode material before more text), then there is no white space following the
last \item.  But if there is a blank line following the last \item, there
will be vertical white space corresponding to the current \setupwhitespace
setting following the last item.

> \setupitemgroup[itemize][nowhite,after]

>>> Sorry, then you need "nowhite". Usually that’s synonymous to
>>> "packed,joineup", but apparently not if whitespace is active.

>> "Usually" is in the eye of the beholder.  ;-)

>> I would have thought that having non-zero whitespace between paragraphs is
>> common.  For example, Aditya's blog linked to above has whitespace between
>> paragraphs.  Are you suggesting that is uncommon, or (showing my
>> Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

> Yes, it’s common, and \setupwhitespace is right.

OK, thanks for the confirmation.

> I just don’t remember all the setups in my many environments all the time.

>>> I added a few comments to
>>> https://wiki.contextgarden.net/Command/setupitemgroup
>>> Unfortunately, this is one of the areas where we have a plethora of options
>>> and no documentation about them.

>> Thanks for adding them.  I see you did not document the all-important (to
>> me) "after" (or "before") in the wiki.  Would you like to add that?  If
>> you don't have time right now, I'd be happy to do so.

> It’s there now.

Thanks, I have already seen them!

> I’m not sure about the options regarding width

I've done some more exploration about items in the last hour or so.  I'm
not sure I am yet ready to update the wiki (I am concerned that incomplete
information may be worse than no information), but if/when I feel
confident, I will add some information about some options.  (I guess the
implementation code is the current definitive documentation!)

Cheers.
Jim
___
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: Looking for itemize help

2024-01-15 Thread Henning Hraban Ramm

Am 15.01.24 um 17:15 schrieb Jim:

"after" does the trick, but not in an automatic way.  I would like
something which automagically "does the right thing".


With “automagically”, do you mean for all instances?

\setupitemgroup[itemize][nowhite,after]


Sorry, then you need "nowhite". Usually that’s synonymous to
"packed,joineup", but apparently not if whitespace is active.


"Usually" is in the eye of the beholder.  ;-)

I would have thought that having non-zero whitespace between paragraphs is
common.  For example, Aditya's blog linked to above has whitespace between
paragraphs.  Are you suggesting that is uncommon, or (showing my
Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?


Yes, it’s common, and \setupwhitespace is right.

I just don’t remember all the setups in my many environments all the time.


I added a few comments to
https://wiki.contextgarden.net/Command/setupitemgroup
Unfortunately, this is one of the areas where we have a plethora of options
and no documentation about them.


Thanks for adding them.  I see you did not document the all-important (to
me) "after" (or "before") in the wiki.  Would you like to add that?  If
you don't have time right now, I'd be happy to do so.


It’s there now.
I’m not sure about the options regarding width

Hraban

___
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: Looking for itemize help

2024-01-15 Thread Jim
On Mon, Jan 15, 2024 at 17:39 (+0100), Wolfgang Schuster wrote:

> Jim schrieb am 15.01.2024 um 01:42:
>> I have

>> \setupwhitespace [big]

>> so that I get "a blank line" between paragraphs.

>> I would like to *not* have "blank lines" before and after my items.  For
>> example, if there is more "paragraph text" after the last item I would like
>> to see this structure:

>> --

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

>> --

>> and if there is no "paragraph text" after the last item, I'd like to see
>> this structure:

>> --

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.

>> The next paragraph starts here...

>> --

>> Try as I might, I can't find the right options to give to \startitemize.

>> The closest I have found is to start with
>> \startitemize[a,nowhite]
>> but that prevents the "blank line" even in the second case above, which is
>> not what I want.  Further, 'packed' and 'joinedup' seem to behave
>> identically here, both leaving "a blank line" before the first item and
>> after the last item.

>> Clearly, I can force a blank line before the following paragraph with a
>> \vskip, but that seems like a crude way to do it.

>> Can someone either enlighten me on either
>> (a) the Right ConTeXt Way to do this, or
>> (b) a document that would tell me this, if I knew to read it?

>> I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
>> an excursion" with no luck.

> Hi Jim,

> such a feature exists only to suppress paragraph indentation but not to
> ignore whitespace
> between paragraphs.

> \setupitemize[indentnext=auto]

> \setupindenting[yes,medium]

> \starttext

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \startitemize
> \startitem Lorem ipsum \unknown \stopitem
> \stopitemize

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \startitemize
> \startitem Lorem ipsum \unknown \stopitem
> \stopitemize
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \stoptext

Hi Wolfgang,

thanks for that information.

I would have thought that what I want to do is not so unusual that ConTeXt
does not have the ability to handle it, especially in light of the
indentnext=auto feature which shows that (presumably) some people want to
handle the text following \stopitemize differently, depending on whether or
not the following text is part of the same paragraph.

Perhaps I need to go and contemplate the sins of my formatting
choices... :-)

Jim
___
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: Looking for itemize help

2024-01-15 Thread Wolfgang Schuster

Jim schrieb am 15.01.2024 um 01:42:

I have

\setupwhitespace [big]

so that I get "a blank line" between paragraphs.

I would like to *not* have "blank lines" before and after my items.  For
example, if there is more "paragraph text" after the last item I would like
to see this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...

--

and if there is no "paragraph text" after the last item, I'd like to see
this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.

The next paragraph starts here...

--

Try as I might, I can't find the right options to give to \startitemize.

The closest I have found is to start with
\startitemize[a,nowhite]
but that prevents the "blank line" even in the second case above, which is
not what I want.  Further, 'packed' and 'joinedup' seem to behave
identically here, both leaving "a blank line" before the first item and
after the last item.

Clearly, I can force a blank line before the following paragraph with a
\vskip, but that seems like a crude way to do it.

Can someone either enlighten me on either
(a) the Right ConTeXt Way to do this, or
(b) a document that would tell me this, if I knew to read it?

I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
an excursion" with no luck.


Hi Jim,

such a feature exists only to suppress paragraph indentation but not to 
ignore whitespace

between paragraphs.

\setupitemize[indentnext=auto]

\setupindenting[yes,medium]

\starttext

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown


\startitemize
\startitem Lorem ipsum \unknown \stopitem
\stopitemize

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown


\startitemize
\startitem Lorem ipsum \unknown \stopitem
\stopitemize
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown


\stoptext

Wolfgang

___
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: [External] Re: Looking for itemize help

2024-01-15 Thread Jim
Hi Michael,

thanks for getting back.  But the problem is not the text in front of the
items, but rather vertical whitespace that I don't want.  (Or, with
'nowhite', vertical space that I might want not being there.)

Cheers.
Jim

On Mon, Jan 15, 2024 at 15:51 (+), Rogers, Michael K wrote:

> Hi Jim,

> I think you want alternative “a”, if the dot instead of a letter is the 
> problem and not the whitespace:

> %%

> \starttext

> This is a short paragraph.

> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[a,packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.

> This is a short paragraph.

> \stoptext

> %%

> Cheers,

> Michael

>> On Jan 15, 2024, at 6:36 AM, Jim  wrote:

>> Hi Hraban,

>> thanks for your response.  But...

>> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

>>> Am 15.01.24 um 01:42 schrieb Jim:

>>>> Some text preceding the list of items:
>>>> a. Item one.
>>>> b. Second item.
>>>> This sentence is part of the same paragraph.

>>>> The next paragraph starts here...

>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

>> %%%%%%%

>> \setupwhitespace [big]

>> \setuppapersize [letter]

>> \starttext
>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize
>> This is a line immediately following the above itemization.

>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize

>> This is another short paragraph.

>> \stoptext

>> %%%

>> Thoughts?

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

> ___
> 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
> ___
___
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: Looking for itemize help

2024-01-15 Thread Jim
Two replies in one...

On Mon, Jan 15, 2024 at 15:47 (+0100), Aditya Mahajan wrote:

> On Mon, 15 Jan 2024, Jim wrote:

>> Thoughts?


> \startitemize[nowhite, after]
>   . . .
> \stopitemize

> See: https://adityam.github.io/context-blog/post/spacing-in-itemize/

Aditya,

thanks for the suggestion, and thanks for the link.

"after" does the trick, but not in an automatic way.  I would like
something which automagically "does the right thing".

Perhaps it just doesn't exist in ConTeXt.  The plain TeX macros I wrote for
itemization do what I want, so I know it isn't (at least in plain TeX) a
difficult thing.



On Mon, Jan 15, 2024 at 16:08 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 15:36 schrieb Jim:
>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

> Sorry, then you need "nowhite". Usually that’s synonymous to
> "packed,joineup", but apparently not if whitespace is active.

"Usually" is in the eye of the beholder.  ;-)

I would have thought that having non-zero whitespace between paragraphs is
common.  For example, Aditya's blog linked to above has whitespace between
paragraphs.  Are you suggesting that is uncommon, or (showing my
Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

> I added a few comments to
> https://wiki.contextgarden.net/Command/setupitemgroup
> Unfortunately, this is one of the areas where we have a plethora of options
> and no documentation about them.

Thanks for adding them.  I see you did not document the all-important (to
me) "after" (or "before") in the wiki.  Would you like to add that?  If
you don't have time right now, I'd be happy to do so.

Cheers.

Jim
___
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: [External] Re: Looking for itemize help

2024-01-15 Thread Rogers, Michael K
Hi Jim,

I think you want alternative “a”, if the dot instead of a letter is the problem 
and not the whitespace:

%%

\starttext

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[a,packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

\stoptext

%%

Cheers,

Michael

> On Jan 15, 2024, at 6:36 AM, Jim  wrote:
>
> Hi Hraban,
>
> thanks for your response.  But...
>
> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:
>
>> Am 15.01.24 um 01:42 schrieb Jim:
>
>>> Some text preceding the list of items:
>>> a. Item one.
>>> b. Second item.
>>> This sentence is part of the same paragraph.
>
>>> The next paragraph starts here...
>
>> \startitemize[packed,joinedup] should be the right combination.
>
> I won't argue about "should", but I will point out it isn't, at least on my
> computer with a recently updated context.
>
> Here is a non-minimal but short non-working example.
>
> %%%
>
> \setupwhitespace [big]
>
> \setuppapersize [letter]
>
> \starttext
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.
>
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
>
> This is another short paragraph.
>
> \stoptext
>
> %%%
>
> Thoughts?
>
>Jim
> ___
> 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/
> ___

___
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: Looking for itemize help

2024-01-15 Thread Henning Hraban Ramm

Am 15.01.24 um 15:36 schrieb Jim:

\startitemize[packed,joinedup] should be the right combination.


I won't argue about "should", but I will point out it isn't, at least on my
computer with a recently updated context.

Here is a non-minimal but short non-working example.


Sorry, then you need "nowhite". Usually that’s synonymous to 
"packed,joineup", but apparently not if whitespace is active.


I added a few comments to 
https://wiki.contextgarden.net/Command/setupitemgroup
Unfortunately, this is one of the areas where we have a plethora of 
options and no documentation about them.


Hraban
___
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: Looking for itemize help

2024-01-15 Thread Jim
Hi Hraban,

thanks for your response.  But...

On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 01:42 schrieb Jim:

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

> \startitemize[packed,joinedup] should be the right combination.

I won't argue about "should", but I will point out it isn't, at least on my
computer with a recently updated context.

Here is a non-minimal but short non-working example.

%%%

\setupwhitespace [big]

\setuppapersize [letter]

\starttext
This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
 
This is another short paragraph.

\stoptext

%%%

Thoughts?

Jim
___
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: Looking for itemize help

2024-01-14 Thread Henning Hraban Ramm

Am 15.01.24 um 01:42 schrieb Jim:


Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...


\startitemize[packed,joinedup] should be the right combination.

Hraban
___
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] Looking for itemize help

2024-01-14 Thread Jim
I have

\setupwhitespace [big]

so that I get "a blank line" between paragraphs.

I would like to *not* have "blank lines" before and after my items.  For
example, if there is more "paragraph text" after the last item I would like
to see this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...

--

and if there is no "paragraph text" after the last item, I'd like to see
this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.

The next paragraph starts here...

--

Try as I might, I can't find the right options to give to \startitemize.

The closest I have found is to start with
\startitemize[a,nowhite]
but that prevents the "blank line" even in the second case above, which is
not what I want.  Further, 'packed' and 'joinedup' seem to behave
identically here, both leaving "a blank line" before the first item and
after the last item.  

Clearly, I can force a blank line before the following paragraph with a
\vskip, but that seems like a crude way to do it.

Can someone either enlighten me on either
(a) the Right ConTeXt Way to do this, or
(b) a document that would tell me this, if I knew to read it?

I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
an excursion" with no luck.

Thanks.

Jim
___
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: Vertical Space between Text and Itemize List

2023-09-06 Thread Mikael Sundqvist
Hi,

You can use before, inbetween and after.

\setupitemgroup
[itemize]
[inbetween={\blank[1cm]},
before={\blank[2cm]},
after={\blank[3cm]}]

\starttext

\samplefile{ward}

\startitemize
\dorecurse{4}{
\startitem
\samplefile{knuthmath}
\stopitem
}
\stopitemize

\samplefile{ward}

\stoptext

/Mikael

On Thu, Sep 7, 2023 at 12:57 AM Jeroen  wrote:
>
> To get a packed itemize list I use this in the preamble
>
> \setupitemgroup
>   [itemize]
>   [packed]
>
> To get less vspace between the text and the first item, i changed it to this
>
> \setupitemgroup
>   [itemize]
>   [packed,
>nowhite]
>
> now there is indeed no whitespace. Is there a more granular way to place just 
> a little vertical whitespace between the text and the first item?
> ___
> 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
> ___
___
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] Vertical Space between Text and Itemize List

2023-09-06 Thread Jeroen
To get a packed itemize list I use this in the preamble

\setupitemgroup
  [itemize]
  [packed]

To get less vspace between the text and the first item, i changed it to this

\setupitemgroup
  [itemize]
  [packed,
   nowhite]

now there is indeed no whitespace. Is there a more granular way to place
just a little vertical whitespace between the text and the first item?
___
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] Re: new upload

2023-09-04 Thread Pablo Rodriguez
On 9/4/23 19:22, Hans Hagen wrote:
> Hi,
>
> new upload with packed itemize fix .. hopefyully no side effects of some
> work in progress (but no crashes in test suite so likely ok)

Hi Hans,

many thanks for the ultrafast fix and upload.

Pablo

___
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] new upload

2023-09-04 Thread Hans Hagen

Hi,

new upload with packed itemize fix .. hopefyully no side effects of some 
work in progress (but no crashes in test suite so likely ok)


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 / 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] Re: no packed in current latest (LMTX only)

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 6:12 PM, Pablo Rodriguez wrote:

Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

   \starttext
   \startTEXpage[offset=1em]
   \startitemize[packed]
   \item item
   \item item
   \stopitemize
   \stopTEXpage
   \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,
hm, accidently removed line ... (there have been some 'additions' to 
itemize wrt tabulated items which makes things even more complex)


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 / 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] Re: no packed in current latest (LMTX only)

2023-09-04 Thread Rik Kabel


On 9/4/2023 12:12 PM, Pablo Rodriguez wrote:

Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

   \starttext
   \startTEXpage[offset=1em]
   \startitemize[packed]
   \item item
   \item item
   \stopitemize
   \stopTEXpage
   \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,

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

maillist :ntg-context@ntg.nl  /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
___



I can confirm the problem.

--
Rik
___
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] no packed in current latest (LMTX only)

2023-09-04 Thread Pablo Rodriguez
Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

  \starttext
  \startTEXpage[offset=1em]
  \startitemize[packed]
  \item item
  \item item
  \stopitemize
  \stopTEXpage
  \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 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] Re: Nested itemize

2023-08-22 Thread fv leung
It seems that displaystyle fractions insert extra vertical space before the
main item.
With textstyle fractions, the code works fine.
\blank[back,overlay] can get rid of the gap above the first row, but not
the space inserted by \dfrac.


\defineitemgroup[alex]

\setupitemgroup
 [alex]
 [each]
 [a,two]
 [
 margin=2cm,
 before={\blank[overlay,-depth]},
 after={\blank[nowhite]},
 stopper=)
 ]

%\showboxes
\autofences

\starttext
\samplefile{ward}
\startitemize[n][style=\bf,before={\blank[back,overlay]},after={\blank[medium]}]
  \startitem
\startalextable
  \startitem
\m{6(x - \frac{5}{12})^2 - \frac{1}{24}}
  \stopitem
  \startitem
\m{-3(x - \frac{1}{3})^2 + \frac{1}{3}}
  \stopitem
  \startitem
\m{7(x + \frac{5}{14})^2 + \frac{199}{28}}
  \stopitem
  \startitem
\m{-\frac{1}{2}(x + 2)^2 + \frac{9}{2}}
  \stopitem
\stopalextable
  \stopitem
\stopitemize

\samplefile{ward}
\stoptext

Alexandre Christe  於 2023年8月22日 週二 下午5:48寫道:

> Hi Mikael,
>
> That looks very attractive. However, with the following code, I end up
> with a large gap above the first row.
>
> \defineitemgroup[alex]
>
> \setupitemgroup
>  [alex]
>  [each]
>  [a,two]
>  [
>  margin=2cm,
>  before=\blank[overlay,-depth],
>  stopper=)
>  ]
>
> \showboxes
> \autofences
>
> \starttext
> \samplefile{ward}
>
> \startitemize[n][style=\bf]
>  \startitem
>  \startalextable
>  \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem
>  \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem
>  \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem
>  \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem
>  \stopalextable
>  \stopitem
> \stopitemize
>
> \samplefile{ward}
> \stoptext
>
> A. Christe
> Le 22 août 2023 à 07:12 +0200, Alexandre Christe ,
> a écrit :
>
> It’s true that \vtop{…} does the job for a single line of items, but it
> doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom.
>
> Here’s a modified MWE
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize
> [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> A. Christe
> Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
>
> I'd do it this way:
>
> \starttext
> \startitemize[n][style=\bf]
> \item\vtop{%
>   \startitemize[a,horizontal,four][stopper=\)]
> \startitem
>   $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \stopitem
> \startitem
>   $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \stopitem
> \startitem
>   $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \stopitem
> \startitem
>   $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> \stopitem
>   \stopitemize
> }
> \stopitemize
>
> \stoptext
>
> Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
>
>> Dear ConTeXt users,
>>
>> Time goes by but I haven't yet found a nice solution to this issue. When
>> having mathematics, I'd not like to adjust by hand the factor of \linewidth
>> for the \godown command.
>>
>> Here's a MWE
>>
>> \starttext
>>
>> \startitemize[n][style=\bf]
>>   \item \godown[-\lineheight] \startitemize
>> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
>> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>>   \stopitemize
>> \stopitemize
>>
>> \stoptext
>>
>> Thanks in advance.
>>
>> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context <
>> ntg-context@ntg.nl> a écrit :
>>
>>>
>>> \starttext
>>>
>>> \startitemize[n]
>>> \item\godown[-\lineheight]
>>>
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>

[NTG-context] Re: Nested itemize

2023-08-22 Thread Alexandre Christe
Hi Mikael,

That looks very attractive. However, with the following code, I end up with a 
large gap above the first row.

\defineitemgroup[alex]

\setupitemgroup
 [alex]
 [each]
 [a,two]
 [
 margin=2cm,
 before=\blank[overlay,-depth],
 stopper=)
 ]

\showboxes
\autofences

\starttext
\samplefile{ward}

\startitemize[n][style=\bf]
 \startitem
 \startalextable
 \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem
 \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem
 \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem
 \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem
 \stopalextable
 \stopitem
\stopitemize

\samplefile{ward}
\stoptext

A. Christe
Le 22 août 2023 à 07:12 +0200, Alexandre Christe , a 
écrit :
> It’s true that \vtop{…} does the job for a single line of items, but it 
> doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom.
>
> Here’s a modified MWE
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize 
> [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
>     \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>     \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>     \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>     \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> A. Christe
> Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
> > I'd do it this way:
> >
> > \starttext
> > \startitemize[n][style=\bf]
> > \item\vtop{%
> >   \startitemize[a,horizontal,four][stopper=\)]
> >     \startitem
> >       $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> >     \stopitem
> >     \startitem
> >       $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> >     \stopitem
> >     \startitem
> >       $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> >     \stopitem
> >     \startitem
> >       $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> >     \stopitem
> >   \stopitemize
> > }
> > \stopitemize
> >
> > \stoptext
> >
> > > Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
> > > > Dear ConTeXt users,
> > > >
> > > > Time goes by but I haven't yet found a nice solution to this issue. 
> > > > When having mathematics, I'd not like to adjust by hand the factor of 
> > > > \linewidth for the \godown command.
> > > >
> > > > Here's a MWE
> > > >
> > > > \starttext
> > > >
> > > > \startitemize[n][style=\bf]
> > > >   \item \godown[-\lineheight] \startitemize 
> > > > [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
> > > >     \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> > > >     \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> > > >     \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> > > >     \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> > > >   \stopitemize
> > > > \stopitemize
> > > >
> > > > \stoptext
> > > >
> > > > Thanks in advance.
> > > >
> > > > > Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context 
> > > > >  a écrit :
> > > > > >
> > > > > > \starttext
> > > > > >
> > > > > > \startitemize[n]
> > > > > > \item\godown[-\lineheight]
> > > > > >   
> > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \stopitemize
> > > > > > \item\godown[-\lineheight]
> > > > > >   
> > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \stopitemize
> > > > > > \item\godown[-\lineheight]
> > > > > >   
> > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
>

[NTG-context] Re: Nested itemize

2023-08-22 Thread Mikael Sundqvist
Hi,

On Tue, Aug 22, 2023 at 7:16 AM Alexandre Christe
 wrote:
>
> It’s true that \vtop{…} does the job for a single line of items, but it 
> doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom.
>
> Here’s a modified MWE
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize 
> [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> A. Christe
> Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
>
> I'd do it this way:
>
> \starttext
> \startitemize[n][style=\bf]
> \item\vtop{%
>   \startitemize[a,horizontal,four][stopper=\)]
> \startitem
>   $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \stopitem
> \startitem
>   $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \stopitem
> \startitem
>   $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \stopitem
> \startitem
>   $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> \stopitem
>   \stopitemize
> }
> \stopitemize
>
> \stoptext
>
> Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
>>
>> Dear ConTeXt users,
>>
>> Time goes by but I haven't yet found a nice solution to this issue. When 
>> having mathematics, I'd not like to adjust by hand the factor of \linewidth 
>> for the \godown command.
>>
>> Here's a MWE
>>
>> \starttext
>>
>> \startitemize[n][style=\bf]
>>   \item \godown[-\lineheight] \startitemize 
>> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
>> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>>   \stopitemize
>> \stopitemize
>>
>> \stoptext
>>
>> Thanks in advance.
>>
>> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context  
>> a écrit :
>>>
>>>
>>> \starttext
>>>
>>> \startitemize[n]
>>> \item\godown[-\lineheight]
>>>   
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>   
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>   
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \stopitemize
>>>
>>> \stoptext
>>>
>>> Alexandre Christe via ntg-context  於 2022年9月2日 週五 
>>> 下午5:08寫道:
>>>>
>>>> Dear all,
>>>>
>>>> I'm struggling to setup a nested itemize with no blank line and several 
>>>> columns.
>>>>
>>>> What I mean is something like
>>>> 1. a) bla   c) bla
>>>> b) bla   d) bla
>>>>
>>>> The following MWE is my starting point
>>>>
>>>> \starttext
>>>> \startitemize[n]
>>>> \item \blank[-line]
>>>> \startitemize[a,horizontal,two] [margin=2cm]
>>>> \item First
>>>> \item Second
>>>> \item Third
>>>> \item Fourth
>>>> \stopitemize
>>>> \item \blank[-line]
>>>> \startitemize[a,horizontal,columns,two]
>>>> \item First
>>>> \item Second
>>>> \item Third
>>>> \item Fourth
>>>> \stopitemize
>>>> \stopitemize
>>>> \stoptext
>>>>
>>>> Thanks in advance

Not really tested, but \blank[overlay,-depth] seems to work OK (thanks Hans!).

I also take the opportunity to push a bit for the new itemtable mechanism:

\defineitemgroup[alex]

\setupitemgroup
[alex]
[each]
[a,two]
[margin=2cm,
before=\blank[overlay,-depth]]

\showboxes

\starttext
\startitemize[n]
\startitem
\startalextable
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\startitem Fourth \stopitem
\stopalextable
\stopitem
\stopitemize
\stoptext

Please test for a larger document to see if it works well.

/Mikael
___
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] Re: Nested itemize

2023-08-21 Thread Alexandre Christe
It’s true that \vtop{…} does the job for a single line of items, but it doesn’t 
in the case there’re multiple (\vtop{}) aligns with the bottom.

Here’s a modified MWE

\startitemize[n][style=\bf]
  \item \godown[-\lineheight] \startitemize 
[a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
    \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
    \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
    \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
    \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
  \stopitemize
\stopitemize

A. Christe
Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
> I'd do it this way:
>
> \starttext
> \startitemize[n][style=\bf]
> \item\vtop{%
>   \startitemize[a,horizontal,four][stopper=\)]
>     \startitem
>       $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>     \stopitem
>     \startitem
>       $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>     \stopitem
>     \startitem
>       $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>     \stopitem
>     \startitem
>       $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>     \stopitem
>   \stopitemize
> }
> \stopitemize
>
> \stoptext
>
> > Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
> > > Dear ConTeXt users,
> > >
> > > Time goes by but I haven't yet found a nice solution to this issue. When 
> > > having mathematics, I'd not like to adjust by hand the factor of 
> > > \linewidth for the \godown command.
> > >
> > > Here's a MWE
> > >
> > > \starttext
> > >
> > > \startitemize[n][style=\bf]
> > >   \item \godown[-\lineheight] \startitemize 
> > > [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
> > >     \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> > >     \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> > >     \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> > >     \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> > >   \stopitemize
> > > \stopitemize
> > >
> > > \stoptext
> > >
> > > Thanks in advance.
> > >
> > > > Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context 
> > > >  a écrit :
> > > > >
> > > > > \starttext
> > > > >
> > > > > \startitemize[n]
> > > > > \item\godown[-\lineheight]
> > > > >   
> > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \stopitemize
> > > > > \item\godown[-\lineheight]
> > > > >   
> > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \stopitemize
> > > > > \item\godown[-\lineheight]
> > > > >   
> > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \item bla
> > > > >   \stopitemize
> > > > > \stopitemize
> > > > >
> > > > > \stoptext
> > > > >
> > > > > > Alexandre Christe via ntg-context  於 2022年9月2日 
> > > > > > 週五 下午5:08寫道:
> > > > > > > Dear all,
> > > > > > >
> > > > > > > I'm struggling to setup a nested itemize with no blank line and 
> > > > > > > several columns.
> > > > > > >
> > > > > > > What I mean is something like
> > > > > > > 1. a) bla   c) bla
> > > > > > >     b) bla   d) bla
> > > > > > >
> > > > > > > The following MWE is my starting point
> > > > > > >
> > > > > > > \starttext
> > > > > > > \startitemize[n]
> > > > > > > \item \blank[-line]
> > > > > > > \startitemize[a,horizontal,two] [margin=2cm]
> > > > > > > \item First
> > > > > > > \item Second
> > > &g

[NTG-context] Re: Nested itemize

2023-08-21 Thread fv leung
I'd do it this way:

\starttext
\startitemize[n][style=\bf]
\item\vtop{%
  \startitemize[a,horizontal,four][stopper=\)]
\startitem
  $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
\stopitem
\startitem
  $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
\stopitem
\startitem
  $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
\stopitem
\startitem
  $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
\stopitem
  \stopitemize
}
\stopitemize

\stoptext

Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:

> Dear ConTeXt users,
>
> Time goes by but I haven't yet found a nice solution to this issue. When
> having mathematics, I'd not like to adjust by hand the factor of \linewidth
> for the \godown command.
>
> Here's a MWE
>
> \starttext
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize
> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> \stoptext
>
> Thanks in advance.
>
> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context 
> a écrit :
>
>>
>> \starttext
>>
>> \startitemize[n]
>> \item\godown[-\lineheight]
>>
>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \stopitemize
>> \item\godown[-\lineheight]
>>
>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \stopitemize
>> \item\godown[-\lineheight]
>>
>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \item bla
>>   \stopitemize
>> \stopitemize
>>
>> \stoptext
>>
>> Alexandre Christe via ntg-context  於 2022年9月2日 週五
>> 下午5:08寫道:
>>
>>> Dear all,
>>>
>>> I'm struggling to setup a nested itemize with no blank line and several
>>> columns.
>>>
>>> What I mean is something like
>>> 1. a) bla   c) bla
>>> b) bla   d) bla
>>>
>>> The following MWE is my starting point
>>>
>>> \starttext
>>> \startitemize[n]
>>> \item \blank[-line]
>>> \startitemize[a,horizontal,two] [margin=2cm]
>>> \item First
>>> \item Second
>>> \item Third
>>> \item Fourth
>>> \stopitemize
>>> \item \blank[-line]
>>> \startitemize[a,horizontal,columns,two]
>>> \item First
>>> \item Second
>>> \item Third
>>> \item Fourth
>>> \stopitemize
>>> \stopitemize
>>> \stoptext
>>>
>>> Thanks in advance
>>>
>>> ___
>>> 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
>>>
>>> ___
>>>
>>
>> ___
>> 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
>>
>> ___
>>
>
> ___
> 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
>
> ___
___
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] Re: Nested itemize

2023-08-21 Thread Alexandre Christe
Dear ConTeXt users,

Time goes by but I haven't yet found a nice solution to this issue. When
having mathematics, I'd not like to adjust by hand the factor of \linewidth
for the \godown command.

Here's a MWE

\starttext

\startitemize[n][style=\bf]
  \item \godown[-\lineheight] \startitemize
[a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
\item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
\item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
\item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
\item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
  \stopitemize
\stopitemize

\stoptext

Thanks in advance.

Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context 
a écrit :

>
> \starttext
>
> \startitemize[n]
> \item\godown[-\lineheight]
>
> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \stopitemize
> \item\godown[-\lineheight]
>
> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \stopitemize
> \item\godown[-\lineheight]
>
> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \item bla
>   \stopitemize
> \stopitemize
>
> \stoptext
>
> Alexandre Christe via ntg-context  於 2022年9月2日 週五
> 下午5:08寫道:
>
>> Dear all,
>>
>> I'm struggling to setup a nested itemize with no blank line and several
>> columns.
>>
>> What I mean is something like
>> 1. a) bla   c) bla
>> b) bla   d) bla
>>
>> The following MWE is my starting point
>>
>> \starttext
>> \startitemize[n]
>> \item \blank[-line]
>> \startitemize[a,horizontal,two] [margin=2cm]
>> \item First
>> \item Second
>> \item Third
>> \item Fourth
>> \stopitemize
>> \item \blank[-line]
>> \startitemize[a,horizontal,columns,two]
>> \item First
>> \item Second
>> \item Third
>> \item Fourth
>> \stopitemize
>> \stopitemize
>> \stoptext
>>
>> Thanks in advance
>>
>> ___
>> 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
>>
>> ___
>>
>
> ___
> 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
>
> ___
>
___
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] Re: Very strange error:

2023-08-14 Thread Xavier B.
> level 3, order 52, name 'pgfmoduleplot.code.tex'
close source> level 3, order 52, name 'pgfmoduleplot.code.tex'
open source > level 3, order 53, name 'tikz.code.tex'
open source > level 4, order 54, name 'pgflibraryplothandlers.code.tex'
close source> level 4, order 54, name 'pgflibraryplothandlers.code.tex'
open source > level 4, order 55, name 'pgfmodulematrix.code.tex'
open source > level 5, order 56, name 'pgfmoduleshapes.code.tex'
close source> level 5, order 56, name 'pgfmoduleshapes.code.tex'
close source> level 4, order 56, name 'pgfmodulematrix.code.tex'
open source > level 4, order 57, name 'tikzlibrarytopaths.code.tex'
close source> level 4, order 57, name 'tikzlibrarytopaths.code.tex'
close source> level 3, order 57, name 'tikz.code.tex'
open source > level 3, order 58, name 'pgfmoduleplot.code.tex'
close source> level 3, order 58, name 'pgfmoduleplot.code.tex'
open source > level 3, order 59, name 'pgfmoduledecorations.code.tex'
close source> level 3, order 59, name 'pgfmoduledecorations.code.tex'
close source> level 2, order 59, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl'
open source > level 2, order 60, name 
'tikzlibrarydecorations.markings.code.tex'
open source > level 3, order 61, name 'tikzlibrarydecorations.code.tex'
close source> level 3, order 61, name 'tikzlibrarydecorations.code.tex'
open source > level 3, order 62, name 
'pgflibrarydecorations.markings.code.tex'
close source> level 3, order 62, name 
'pgflibrarydecorations.markings.code.tex'
close source> level 2, order 62, name 
'tikzlibrarydecorations.markings.code.tex'
open source > level 2, order 63, name 'tikzlibrarytrees.code.tex'
close source> level 2, order 63, name 'tikzlibrarytrees.code.tex'
open source > level 2, order 64, name 'tikzlibrarycalc.code.tex'
close source> level 2, order 64, name 'tikzlibrarycalc.code.tex'
open source > level 2, order 65, name 'tikzlibraryintersections.code.tex'
open source > level 3, order 66, name 'pgflibraryintersections.code.tex'
open source > level 4, order 67, name 'pgflibraryfpu.code.tex'
close source> level 4, order 67, name 'pgflibraryfpu.code.tex'
close source> level 3, order 67, name 'pgflibraryintersections.code.tex'
close source> level 2, order 67, name 'tikzlibraryintersections.code.tex'
open source > level 2, order 68, name 'tikzlibrarythrough.code.tex'
close source> level 2, order 68, name 'tikzlibrarythrough.code.tex'
open source > level 2, order 69, name 'tikzlibrarybackgrounds.code.tex'
close source> level 2, order 69, name 'tikzlibrarybackgrounds.code.tex'
open source > level 2, order 70, name 'tikzlibraryarrows.code.tex'
open source > level 3, order 71, name 'pgflibraryarrows.code.tex'
close source> level 3, order 71, name 'pgflibraryarrows.code.tex'
close source> level 2, order 71, name 'tikzlibraryarrows.code.tex'
open source > level 2, order 72, name 'tikzlibraryshapes.geometric.code.tex'
open source > level 3, order 73, name 'pgflibraryshapes.geometric.code.tex'
close source> level 3, order 73, name 'pgflibraryshapes.geometric.code.tex'
close source> level 2, order 73, name 'tikzlibraryshapes.geometric.code.tex'
open source > level 2, order 74, name 'tikzlibraryfadings.code.tex'
open source > level 3, order 75, name 'pgflibraryfadings.code.tex'
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
close source> level 3, order 75, name 'pgflibraryfadings.code.tex'
close source> level 2, order 75, name 'tikzlibraryfadings.code.tex'
open source > level 2, order 76, name 
'tikzlibrarydecorations.pathreplacing.code.tex'
open source > level 3, order 77, name 
'pgflibrarydecorations.pathreplacing.code.tex'
close source> level 3, order 77, name 
'pgflibrarydecorations.pathreplacing.code.tex'
close source> level 2, order 77, name 
'tikzlibrarydecorations.pathreplacing.code.tex'
open source > level 2, order 78, name 'tikzlibraryshadings.code.tex'
open source     > level 3, order 79, name 'pgflibraryshadings.code.tex'
close source> level 3, order 79, name 'pgflibraryshadings.code

[NTG-context] Very strange error:

2023-08-14 Thread Xavier B.
After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.


dev.tex
Description: TeX document
return {
 ["errortype"]=6,
 ["filename"]="./dev.tex",
 ["lastcontext"]="\n200 persones en total \\par \\startitemize [a, packed] 
\\item 2 de 5 persones estan a $A$ \\item a cada 4 persones de $A$ li 
corresponen 3 persones de $B$ \\item 20\\% són de $C$ \\item 2/8 són de $D$ 
\\stopitemize \\par \\head 420 persones en total \\par \\startitemize [a, 
packed] \\item $3/4$ de persones estan a $A$ \\item hi ha una correspondència: 
3 de $A$ $\\leftrightarrow $ 2 de $B$ \\item 40\\% és de $C$ \\item de 5 
persones, 4 són de $D$ \\stopitemize \\par \\head 245 persones \\par 
\\startitemize [a, packed] \\item $1/5$ de persones són de $A$ \\item $20\\%$ 
de persones són de $B$ \\item per cada 7 persones de $A$, n'hi ha 4 de $C$ 
\\item per cada 49 persones, n'hi ha 1 de $D$ \\stopitemize \\par \\head 1800 
persones \\par \\startitemize [a, packed] \\item Un $30\\%$ és de $A$ \\item 
30 de cada 50 són de $B$ \\item cada 5 persones de $B$ li corresponen 2 
persones de $C$ \\item $D$ té un 150\\% que les persones de $C$ \\stopitemize 
\\par \\stopitemize \\par En tots els casos, digueu quantes persones hi hauria 
en el subgrup més nombrós si en total hi hagués 1000 persones. 
\\stopexercici \\par \\startexercici 
[exercici:proporcionalitat-directa-8]{relacionar diagrames} Relacioneu en cada 
cas els diagrames amb la proporció indicada \\par \\startitemize [A] \\par 
\\head Proporcions \\par \\startitemize [a, packed, columns] \\item 2 de 5 
\\item 20\\% \\item $3/5$ \\item 5 a 10 \\stopitemize \\par \\head Diagrames 
\\par \\startitemize [a, packed, columns] \\item \\starttikzpicture \\draw 
(0,0) -- (5,0); \\foreach \\x in {0, 1, 2,..., 5} { \\draw (\\x , -0.2) -- (\\x 
, 0.2); \\draw (\\x ,-0.2) node[anchor=north] {\\x }; } \\draw [color=blue!50, 
line width=2pt] (0,0) -- (1,0); \\stoptikzpicture \\par \\item 
\\starttikzpicture \\draw (0,0) -- (5,0); \\foreach \\x in {0, 1, 2,..., 5} { 
\\draw (\\x , -0.2) -- (\\x , 0.2); \\draw (\\x ,-0.2) node[anchor=north] {\\x 
}; } \\draw [color=red!50, line width=2pt] (0,0) -- (2,0); \\stoptikzpicture 
\\par \\item \\starttikzpicture \\draw (0,0) -- (5,0); \\foreach \\x in {0, 1, 
2,..., 5} { \\draw (\\x , -0.2) -- (\\x , 0.2); \\draw (\\x ,-0.2) 
node[anchor=north] {\\x }; } \\draw [color=green!50, line width=2pt] (0,0) -- 
(3,0); \\stoptikzpicture \\par \\item \\starttikzpicture \\draw (0,0) -- (5,0); 
\\foreach \\x in {0, 1, 2,..., 5} { \\draw (\\x , -0.2) -- (\\x , 0.2); \\draw 
(\\x ,-0.2) node[anchor=north] {\\x }; } \\draw [color=orange!50, line 
width=2pt] (0,0) -- (1.6,0); \\stoptikzpicture \\par \\stopitemize \\par 
\\stopitemize \\par Per a cada proporció, dibuixeu nous diagrames que tengui 
longitud 100. \\stopexercici \\par \\par \\startexercici 
[exercici:proporcionalitat-directa-9]{representar a diagrames}Usant el diagrama 
$5 \\times 10$ següent (vegeu la figura~\\in [figura:diagrama-punts-5x10]) 
representeu la informació donada en cada cas. \\par \\placefigure [force] 
[figura:diagrama-punts-5x10] {Diagrama de punts $5 \\times 10$} { \\bTABLE 
[frame=off,align={middle,lohi},width=fit, offset=2mm] \\bTR \\bTD 
\\starttikzpicture \\foreach \\x in {0,...,9} \\foreach \\y in {0,...,4} { 
\\draw [fill=gray!50] (\\x ,\\y ) circle (0.25); } \\par \\stoptikzpicture 
\\eTD \\eTR \\eTABLE } \\par \\startitemize [a, columns, packed, four] \\item 
40\\% \\item 4 de 5 \\item $3/4$ \\item 4 a 1 \\item 22\\% \\item $1/8$ \\item 
5 a 3 \\item 3 de 8 \\stopitemize \\par Si aquestes informacions 
corresponguessin a mostres de peixos ferits a la mar, calculeu quants peixos 
malalts hi hauria en una mostra de 3000 peixos en total. \\stopexercici \\par 
\\startexercici [exercici:proporcionalitat-directa-antic-1]{sou} Na Marta fa 
feina per hores. Si fent 25 hores de feina, na Marta cobra 625 euros, quant 
cobrarà fent 40 hores? Quantes hores hauria de fer na Marta per cobrar 
exactament 2300 euros? \\stopexercici \\par \\par \\startexercici 
[exercici:proporcionalitat-directa-antic-2]{astronautes} Aquest és la bità
cola d'un projecte espacial: \\startitemize [4] \\item S'enlairen 5 
astronautes, amb 200 kg de menjar a una estació espacial \\item Al cap de 3 
dies, hi ha un relleu: se'n van 2 i en vénen 3 \\item La tripulació resultant 
es queda durant 5 dies més \\item Tots els astronautes tornen. L'estació 
espacial queda buida \\stopitemize \\par Els bastarà el menjar que s'enduen al 
principi si sabem que quatre astronautes mengen en promig 20 kg per dia? 
\\stopexercici \\par \\st

[NTG-context] Re: Link from a PDF to a reference of an embedded PDF

2023-07-26 Thread Pablo Rodriguez
On 7/25/23 17:38, Pablo Rodriguez wrote:
> On 7/24/23 18:04, Gerion Entrup wrote:
>> […]
>
> I’m in a hurry, excuse my rash reply.

Sorry, Gerion, my reply yesterday was rushed (no skin condition).

The solution is already there (in the test files).

You have the file with the reference (save it as main.tex):

  \starttext
  \dorecurse{15}
{\chapter[chap\recurselevel]{Chapter}}
  \stoptext

You have the file that reads the references from main.tuc and generates
the inter-document links:

  \setupinteraction[state=start]
  \starttext
  Links to each chapter using \type{main.tuc}:

  \startitemize[n, packed]
  \dorecurse{15}
{\item Reference to \in[main::chap\recurselevel].}
  \stopitemize
  \stoptext

The real issue is that I couldn’t make it work with any PDF viewer I
have on Linux.

Either the viewer doesn’t detect the link (such as PDF.js), or it cannot
solve the target file (such as MuPDF and MuPDF-GL), or it cannot reach
destinations (such as Xpdf, Evince/Okular or SumatraPDF).

I take for granted that Acrobat will deal fine with this, since
destinations in links (GoToR) seem to be fine.

Of course, to confirm this, it should be tested with Acrobat.

Just in case it helps,

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

maillist : ntg-context@ntg.nl / 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] new module installer and .tar.gz compression

2023-05-08 Thread Pablo Rodriguez via ntg-context
On 5/8/23 17:58, Bruce Horrocks via ntg-context wrote:
>> On 8 May 2023, at 16:20, Pablo Rodriguez wrote:
>> [...]
>> Sorry, but I don’t know how to force git urls to be added as zip
>> packages in https://modules.contextgarden.net.
>
> Use <https://github.com/ousia/handlecsv/archive/refs/heads/context-suite.zip> 
> as the link to download as a Zip file.

Many thanks for your tip, Bruce.

Fixed and everything is working know.

Hans, I attach the diff for two new modules (packed as zip files).

Many thanks for your help,

Pablo
--- a/mtx-install-imp-modules.lua
+++ b/mtx-install-imp-modules.lua
@@ -35,6 +35,7 @@
 ["greek"] = { url = "modules", zips = { "t-greek.zip" } },
 ["grph-downsample"]   = { url = "modules", zips = { "grph-downsample.lua.zip" } },
 ["gs"]= { url = "modules", zips = { "t-gs.zip" } },
+["handlecsv"] = { url = "modules", zips = { "t-handlecsv.zip" } },
 ["high"]  = { url = "modules", zips = { "high.zip" } },
 ["inifile"]   = { url = "modules", zips = { "t-inifile.zip" } },
 ["karnaugh"]  = { url = "modules", zips = { "karnaugh.zip" } },
@@ -45,6 +46,7 @@
 ["lua-widow-control"] = { url = "modules", zips = { "lua-widow-control.zip" } },
 ["mathsets"]  = { url = "modules", zips = { "t-mathsets.zip" } },
 ["metaducks"] = { url = "modules", zips = { "metaducks.zip" } },
+["presvoz"]   = { url = "modules", zips = { "presvoz.zip" } },
 ["pret-c.lua"]= { url = "modules", zips = { "pret-c.lua.zip" } },
 ["rst"]   = { url = "modules", zips = { "t-rst.zip" } },
 ["rsteps"]= { url = "modules", zips = { "t-rsteps.zip" } },

___
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] Kaktovik numerals

2023-04-19 Thread Hans Hagen via ntg-context
vik,u=.25,d=.20,x=}]

\setupbodyfont[dejavu]

% \nopdfcompression

\startTEXpage[offset=1ts,width=3es]

\start
\showglyphs
KAKTOVIK
\dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
\stop

kaktovik \start
\red\glyphxscale 700
\dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
\stop

\startitemize[packed,K][color=orange,stopper=]
\startitem first  \stopitem
\startitem second \stopitem
\startitem third  \stopitem
\stopitemize

KAKTOVIK \start
\red  \kaktoviknumerals{2023} --
\green\kaktoviknumerals{4}--
\blue \kaktoviknumerals{18}
\stop

KAKTOVIK
\stopTEXpage


___
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] Kaktovik numerals

2023-04-18 Thread Hans Hagen via ntg-context

On 4/18/2023 10:57 AM, Henning Hraban Ramm via ntg-context wrote:
I just came across this thread about the base-20 system of the Inuit 
people and the numerals invented for it in the 1990s:

https://mathstodon.xyz/@johncarlosbaez/110215432175491555

This makes simple calculations just beautiful.

interesting ... quick hack attached

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
-


meta-imp-kaktovik.pdf
Description: Adobe PDF document
%D \module
%D   [   file=meta-imp-kaktovik,
%Dversion=2023.04.18,
%D  title=\METAPOST\ Graphics,
%D   subtitle=Kaktovik Numbers,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Just a quick hack for Hraban (after a post on the mailing list).

\startMPcalculation{simplefun}

path kaktovik_glyphs[] ;

def InitializeKaktovik =

save p, d, u ;

pair p[] ; numeric d ; d := .1 ; numeric u ; u := .15 ;

  % d := getparameterdefault "mpsfont" "d" .10 ;
  % u := getparameterdefault "mpsfont" "u" .15 ;

p[0] := (0,1) ;
p[1] := (1,0) ;
p[2] := (2,1 -  d) ;
p[3] := (3,0) ;
p[4] := (4,1 - 2d) ;

p[5] := (4,1 +  u) ;
p[6] := (0,1 + 2u) ;
p[7] := (4,1 + 4u) ;

kaktovik_glyphs[0] := (1,1)  { right } .. { left } (2,1/2) { left } .. 
{ right } (3,1);

for i= 1 upto 4 :
kaktovik_glyphs[i] := p[0] for j=1 upto i : -- p[j] endfor ;
endfor ;

kaktovik_glyphs[ 5] := p[5] -- p[0] ;for i= 6 upto  9 : 
kaktovik_glyphs[i] := p[5] -- kaktovik_glyphs[i-5] ; endfor ;
kaktovik_glyphs[10] := p[6] -- kaktovik_glyphs[ 5] ; for i=11 upto 14 : 
kaktovik_glyphs[i] := p[6] -- kaktovik_glyphs[i-5] ; endfor ;
kaktovik_glyphs[15] := p[7] -- kaktovik_glyphs[10] ; for i=16 upto 19 : 
kaktovik_glyphs[i] := p[7] -- kaktovik_glyphs[i-5] ; endfor ;

enddef ;

vardef Kaktovik(expr i) =
draw image (
draw kaktovik_glyphs[i]
xscaled (10/20 -1/20)
yscaled (25/20 -2/20)
withpen (pencircle xscaled 1/20 yscaled 5/20) rotated -(2*20)
  % withpen (pencircle xscaled 1/40 yscaled 5/40) rotated -(2*20)
  % withpen (pencircle xscaled 2.5/40 yscaled 5/40) rotated -(2*20)
;
) shifted (2/20,2/20)
enddef ;

lmt_registerglyphs [
name = "kaktovik",
units= 2,
usecolor = true,
width= 2,
height   = 2,
depth= 0,
preamble = "InitializeKaktovik"
] ;

for i=0 upto 19 :
lmt_registerglyph [
category = "kaktovik",
unicode  = 119488 + i, % "0x1D2C0"
code = "Kaktovik(" & decimal i & ")"
] ;
endfor ;

\stopMPcalculation

\startluacode
interfaces.implement {
name  = "kaktoviknumerals",
arguments = "integer",
actions   = function(n)
local digits = { }
local count  = 1
while true do
digits[count] = utf.char(0x1D2C0 + (n % 20))
n = n // 20
if n == 0 then
break;
end
count = count + 1
end
context("%t",digits)
end
}
\stopluacode

\unprotect

\permanent\def\kaktoviknumerals#1{\clf_kaktoviknumerals\numexpr#1\relax}

\defineconversion [kaktoviknumerals] [\kaktoviknumerals]
\defineconversion [K][\kaktoviknumerals]

\definefontfeature
  [kaktovik]
  [metapost=kaktovik]

\protect

\continueifinputfile{meta-imp-kaktovik.mkxl}

\definefontfeature
  [default]
  [default]
  [metapost=kaktovik]
% [metapost={category=kaktovik,u=.25,d=.20,x=}]

\setupbodyfont[dejavu]

% \nopdfcompression

\startTEXpage[offset=1ts,width=3es]

\start
\showglyphs
KAKTOVIK
\dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
\stop

    kaktovik \start
\red\glyphxscale 700
\dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
\stop

\startitemize[packed,K][color=orange,stopper=]
\startitem first  \stopitem
\startitem second \stopitem
\startitem third  \stopitem
\stopitemize

KAKTOVIK \start
\red  \kaktoviknumerals{2023} --
\green\kaktoviknumerals{4}--
\blue \kaktovikn

Re: [NTG-context] question about multimedia renderings

2023-01-16 Thread Pablo Rodriguez via ntg-context
red)
-- already reported
elseif specification.method == v_hidden then
referenced[hash] = "hidden"
else
referenced[hash] = "annotation"
local name, appearance = 
analyzesymbol(specification.symbol,attachment_symbols)
local flags = specification.flags or 0 -- to keep it expandable
local d = pdfdictionary {
Subtype  = pdfconstant("FileAttachment"),
FS   = aref,
Contents = pdfunicode(title),
Name = name,
NM   = pdfstring("attachment:"..nofattachments),
T= author ~= "" and pdfunicode(author) or nil,
Subj = subtitle ~= "" and pdfunicode(subtitle) or nil,
C= 
analyzecolor(specification.colorvalue,specification.colormodel),
CA   = analyzetransparency(specification.transparencyvalue),
AP   = appearance,
OC   = analyzelayer(specification.layer),
 -- F= pdfnull(), -- another rediculous need to satisfy 
validation
F= (flags | 4) & (1023-1-2-32-256), -- set 3, clear 
1,2,6,9; PDF 32000-1, p385
}
local width  = specification.width  or 0
local height = specification.height or 0
local depth  = specification.depth  or 0
local box= 
hpacknode(nodeinjections.annotation(width,height,depth,d()))
box.width= width
box.height   = height
box.depth= depth
return box
end
end
end

function codeinjections.attachmentid(filename) -- not used in context
return filestreams[filename]
end

-- Comments

local nofcomments  = 0
local usepopupcomments = false

local defaultattributes = {
["xmlns"]   = "http://www.w3.org/1999/xhtml";,
["xmlns:xfa"]   = "http://www.xfa.org/schema/xfa-data/1.0/";,
["xfa:contentType"] = "text/html",
["xfa:APIVersion"]  = "Acrobat:8.0.0",
["xfa:spec"]= "2.4",
}

local function checkcontent(text,option)
if option and option.xml then
local root = xml.convert(text)
if root and not root.er then
xml.checkbom(root)
local body = xml.first(root,"/body")
if body then
local at = body.at
for k, v in next, defaultattributes do
if not at[k] then
at[k] = v
end
end
 -- local content = xml.textonly(root)
local richcontent = xml.tostring(root)
return nil, pdfunicode(richcontent)
end
end
end
return pdfunicode(text)
end

function nodeinjections.comment(specification) -- brrr: seems to be done twice
nofcomments = nofcomments + 1
local text = specification.data or ""
if specification.space ~= v_yes then
text = stripstring(text)
text = gsub(text,"[\n\r] *","\n")
end
text = gsub(text,"\r","\n")
local name, appearance = analyzesymbol(specification.symbol,comment_symbols)
local tag  = specification.tag  or "" -- this is somewhat messy as 
recent
local title= specification.titleor "" -- versions of acrobat see 
the title
local subtitle = specification.subtitle or "" -- as author
local author   = specification.author   or ""
local option   = settings_to_hash(specification.option or "")
if author ~= "" then
if subtitle == "" then
subtitle = title
elseif title ~= "" then
subtitle = subtitle .. ", " .. title
end
title = author
end
if title == "" then
title = tag
end
local content, richcontent = checkcontent(text,option)
local d = pdfdictionary {
Subtype   = pdfconstant("Text"),
Open  = option[v_max] and pdfboolean(true) or nil,
Contents  = content,
RC    = richcontent,
T = title ~= "" and pdfunicode(title) or nil,
Subj  = subtitle ~= "" and pdfunicode(subtitle) or nil,
C = 
analyzecolor(specification.colorvalue,specification.colormodel),
CA= analyzetransparency(specification.transparencyvalue),
OC= analyzelayer(specification.layer),
Name  = name,
NM= pdfstring("comment:"..nofcomments),
AP= appearance,
}
local width  = specification.width  or 0
local height = specification.height or 0
local dept

Re: [NTG-context] question about multimedia renderings

2023-01-15 Thread Michal Vlasák via ntg-context
fication.tag  or "" -- this is somewhat messy as 
recent
local title= specification.titleor "" -- versions of acrobat see 
the title
local subtitle = specification.subtitle or "" -- as author
local author   = specification.author   or ""
local option   = settings_to_hash(specification.option or "")
if author ~= "" then
if subtitle == "" then
subtitle = title
elseif title ~= "" then
subtitle = subtitle .. ", " .. title
end
title = author
end
if title == "" then
title = tag
end
local content, richcontent = checkcontent(text,option)
local d = pdfdictionary {
    Subtype   = pdfconstant("Text"),
Open  = option[v_max] and pdfboolean(true) or nil,
Contents  = content,
RC= richcontent,
T = title ~= "" and pdfunicode(title) or nil,
Subj  = subtitle ~= "" and pdfunicode(subtitle) or nil,
C = 
analyzecolor(specification.colorvalue,specification.colormodel),
CA= analyzetransparency(specification.transparencyvalue),
OC= analyzelayer(specification.layer),
Name  = name,
NM= pdfstring("comment:"..nofcomments),
AP= appearance,
}
local width  = specification.width  or 0
local height = specification.height or 0
local depth  = specification.depth  or 0
local box
if usepopupcomments then
-- rather useless as we can hide/vide
local nd = pdfreserveobject()
local nc = pdfreserveobject()
local c = pdfdictionary {
Subtype = pdfconstant("Popup"),
Parent  = pdfreference(nd),
}
d.Popup = pdfreference(nc)
box = hpacknode(
nodeinjections.annotation(0,0,0,d(),nd),
nodeinjections.annotation(width,height,depth,c(),nc)
)
else
box = hpacknode(nodeinjections.annotation(width,height,depth,d()))
end
box.width  = width  -- redundant
box.height = height -- redundant
box.depth  = depth  -- redundant
return box
end

-- rendering stuff
--
-- object_1  -> <> >>
-- object_2  -> <> >>
-- rendering -> <>
--
-- we only work foreward here (currently)
-- annotation is to be packed at the tex end

-- aiff audio/aiff
-- au   audio/basic
-- avi  video/avi
-- mid  audio/midi
-- mov  video/quicktime
-- mp3  audio/x-mp3 (mpeg)
-- mp4  audio/mp4
-- mp4  video/mp4
-- mpeg video/mpeg
-- smil application/smil
-- swf  application/x-shockwave-flash

-- P  media play parameters (evt /BE for controls etc
-- A  boolean (audio)
-- C  boolean (captions)
-- O  boolean (overdubs)
-- S  boolean (subtitles)
-- PL pdfconstant("ADBE_MCI"),

-- F= flags,
-- T= title,
-- Contents = rubish,
-- AP   = irrelevant,

-- sound is different, no window (or zero) so we need to collect them and
-- force them if not set

local mu, mf = { }, { }, { }

local function delayed(label)
local reserved = mu[label]
if not reserved then
reserved = pdfreserveobject()
mu[label] = reserved
end
return reserved
end

local function checkedreference(ref)
local set, bug = structures.references.identify("",ref)
if not bug and #set > 0 then
return pdfaction(set)
end
end

local function insertrenderingwindow(specification)
local actions   = nil
local label = specification.label
local openpage  = specification.openpage
local closepage = specification.closepage
local option= settings_to_hash(specification.option)
openpage  = checkedreference(openpage)
closepage = checkedreference(closepage)
if option[v_auto] then
if not openpage then
openpage = executers.startrendering(label)
end
if not closepage then
closepage = executers.stoprendering(label)
end
end
if openpage or closepage then
actions = pdfdictionary {
PO = openpage,
PC = closepage,
}
end
local page = tonumber(specification.page) or texgetcount("realpageno") -- 
todo
local r = delayed(label) -- reserve, child refers to parent
local a = executers.startrendering(label)
local bs, bc = pdfborder()
local d = pdfdictionary {
Subtype = pdfconstant("Screen"),
P   = pdfreference(pdfpagereference(page)),
A   = a, -- needed in order to make the annotation clickable (i.e. 
don't bark)
T   = pdfunicode(label), -- for JS
Border  = bs,
C   = bc,
AA  = actions,
}
local width = specification.width or 0
local height = specification.height or 0
context(nodeinjections.annotati

[NTG-context] new upload

2022-12-27 Thread Hans Hagen via ntg-context

Hi,

I uploaded lmtx. There have been some additions to tabulate.

\starttext

% \showboxes
% \showstruts

\starttabulate[|w(top,3cm)|w(top,3cm)|]
\NC test \NC test \par test \NC \NR
\NC test \NC test \par test \NC \NR
\stoptabulate

\starttabulate[|w(top,packed,3cm)|w(top,packed,3cm)|]
\NC test \NC test \par test \NC \NR
\NC test \NC test \par test \NC \NR
\stoptabulate

\starttabulate[interlinespace=no,format={|w(bottom,3cm)|w(bottom,3cm)|}]
\NC test \NC test \par test \NC \NR
\NC test \NC test \par test \NC \NR
\stoptabulate

\starttabulate[format={|w(3cm)|w(3cm)|}]
\NC \vtop{\strut test} \NC \vtop{\strut test\par \strut test} \NC \NR
\NC \vtop{\strut test} \NC \vtop{\strut test\par \strut test} \NC \NR
\stoptabulate

\starttabulate[interlinespace=no,format={|w(3cm)|w(3cm)|}]
\NC \vtop{\strut test} \NC \vtop{\strut test\par \strut test} \NC \NR
\NC \vtop{\strut test} \NC \vtop{\strut test\par \strut test} \NC \NR
\stoptabulate

\starttabulate[interlinespace=no,format={|w(3cm)|w(3cm)|}]
\NC \vbox{\strut test} \NC \vbox{\strut test\par \strut test} \NC \NR
\NC \vbox{\strut test} \NC \vbox{\strut test\par \strut test} \NC \NR
\stoptabulate

\starttabulate[interlinespace=no,format={|w(3cm)|w(3cm)|}]
\NC \vtop{\strut test} \NC \vbox{\strut test\par \strut test} \NC \NR
\NC \vbox{\strut test} \NC \vtop{\strut test\par \strut test} \NC \NR
\stoptabulate

\stoptext

This permits top and bottom alignments of text blobs without interrow 
spacing being disturbed.


A bit more weird addition is the new \TM (move) option:

\starttext

\defineorientation[test][orientation=down,vertical=top]

\startbuffer[b]
\definetabulatemove[a][xoffset=40pt]
\definetabulatemove[b][orientation=test,yoffset=depth]

\starttabulate[|c|c|]
\TM[a] \NC \darkred   cell one   \NC \darkgray cell one   \NC \NR
\TM[b] \NC \darkgreen cell one   \NC \darkblue cell one   \NC \NR
\TM[a] \NC \darkred   cell two   \NC \darkgray cell two   \NC \NR
\TM[b] \NC \darkgreen cell two   \NC \darkblue cell two   \NC \NR
\TM[a] \NC \darkred   cell three \NC \darkgray cell three \NC \NR
\TM[b] \NC \darkgreen cell three \NC \darkblue cell three \NC \NR
\TM[a] \NC \darkred   cell four  \NC \darkgray cell four  \NC \NR
\TM[b] \NC \darkgreen cell four  \NC \darkblue cell four  \NC \NR
\stoptabulate
\stopbuffer

\start \showmakeup[line] \showstruts \ruledvbox{\getbuffer[b]} \stop
\start   \showstruts \ruledvbox{\getbuffer[b]} \stop
\start   \ruledvbox{\getbuffer[b]} \stop

\startbuffer[b]
\definetabulatemove[a][xoffset=20pt]

\starttabulate[|p|p|]
\TM[a] \NC \darkred   \samplefile{tufte} \NC \darkgray \samplefile{ward} 
\NC \NR
   \NC \darkgreen \samplefile{tufte} \NC \darkblue 
\samplefile{ward} \NC \NR
\TM[a] \NC \darkred   \samplefile{tufte} \NC \darkgray \samplefile{ward} 
\NC \NR
   \NC \darkgreen \samplefile{tufte} \NC \darkblue 
\samplefile{ward} \NC \NR

\stoptabulate
\stopbuffer

\start \small \small \showmakeup[line] \showstruts \getbuffer[b] \stop

\stoptext

This uses some new low level alignment options that operate on rows as a 
whole. As usual, I have no clue what users will come up with but the 
idea is that these 'moves' are independent of the alignment so the in 
this case shifted columns actually keeps their alignment. (It is mostly 
about consistent support luametatex engine features but it might come in 
handy.)


Some other 'new' things are too obscure to mention now,

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 / 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] Page break with placement of a figure at the bottom of the page

2022-11-12 Thread Fabrice Couvreur via ntg-context
Hi Pablo and Bruce,
Please try to figure out what is not working.
I'm sorry but I forgot in my previous post files.
Fabrice

Le sam. 12 nov. 2022 à 12:28, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 11/11/22 21:58, Bruce Horrocks via ntg-context wrote:
> >> On 10 Nov 2022, at 17:06, Fabrice Couvreur via ntg-context wrote:
> >>
> >> Hi,
> >> Sorry to come back to you, but it seems to me that there is enough
> space here.
> >> Fabrice
> >
> > For some reason your PNG images came through in extremely low
> > resolution. Without having the ConTeXt source it's hard to say for sure
> > what's happening - for example, I would have expected the text on the
> > second page to be at the bottom of the first even if there wasn't room
> > for the image - because that was what was happening in your first
> example.
>
> Hi Fabrice and Bruce,
>
> I agree that the source would be helpful to say what may be hard for
> ConTeXt.
>
> In any case, ConTeXt has a hard time with pagebreaks when you combine
> elements that need both horizontal and vertical calculation, such as in:
>
>   \starttext
>   \dorecurse{64}
>   {\input knuth\footnote{\input zapf}
>
>   \startitemize[a, columns, eight, packed]
>   \dorecurse{64}{\item\currentitemnumber}
>   \stopitemize}
>   \stoptext
>
> There is a similar issue with paragraph notes.
>
> Pablo
>
> ___
> 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
>
> ___
>

\startenvironment[premiere-modules]

  \usesymbols[mvs] 
  \usecolors[xwi]
  \usemodule[tikz]
  \usemodule[pgfplots]
  \usepgfplotslibrary[fillbetween]
  \pgfplotsset{compat=newest}
  \usetikzlibrary[arrows]
  \usetikzlibrary[automata]
  \usetikzlibrary[calc]
  \usetikzlibrary[backgrounds]
  \usetikzlibrary[intersections]
  \usetikzlibrary[patterns]
  \usetikzlibrary[bending]
  \usetikzlibrary[arrows.meta]
  \usetikzlibrary[shapes.geometric]
  \usetikzlibrary[plotmarks]
  \usetikzlibrary[shapes]
  \usetikzlibrary[trees]
  \usetikzlibrary[animations]
  \usetikzlibrary[quotes]
  \usetikzlibrary[mindmap]
  \usetikzlibrary[matrix,decorations.pathreplacing,fit,positioning]

\stopenvironment\startenvironment[premiere-macros]

  \unexpanded\def\R{\math{\mathbb{R}}\autoinsertnextspace}

  \protected\def\N{\doifnextcharelse{*}\MyNstarred\MyNnormal}

  \def\MyNstarred*{\m{\mathbb{N}^*}\autoinsertnextspace}
  \def\MyNnormal  {\m{\mathbb{N}  }\autoinsertnextspace}

  \define[1]\cscript
 {\start\switchtobodyfont[stixtwo]\m{{\mathscript{#1}}}\stop} 


  %\protected\def\card#1{\m{\mfunction{Card}\thinspace(#1)}}

  \define[1]\card
 {\m{\mathtexttf{Card}\thinspace(#1)}\autoinsertnextspace}

  \define[1]\norm
{\math{\left\Vert#1\right\Vert}}

  \define\esp{\math{\mathcal{E}}\autoinsertnextspace}

  \define\espv{\math{\vec{\mathcal{E}}}\autoinsertnextspace}

  \define\repere
 {\m{\left(O\,;\vec{i}, \vec{j}\right)}\autoinsertnextspace}

  \define\base
 {\m{\left(\vec{i}, \vec{j}, \vec{k}\right)}\autoinsertnextspace}

 \protected\def\vector#1{%
   \starttikzpicture[baseline=(arg.base),>=stealth,thick]
   \node[inner xsep=0pt] (arg) {\m{#1}};
   \draw[->,shorten >=-2pt] (arg.north west) -- (arg.north east);
   \stoptikzpicture%
  }

  
  \definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]

  \unexpanded\def\intervalff#1#2{\math{\left[#1\nonscript\,;#2\right]}}
  
  \unexpanded\def\intervaloo#1#2{\math{\left]#1\nonscript\,;#2\right[}}
  
  \unexpanded\def\intervalfo#1#2{\math{\left[#1\nonscript\,;#2\right[}}
  
  \unexpanded\def\intervalof#1#2{\math{\left]#1\nonscript\,;#2\right]}}

  \define[1]\vabs{\math{\left\vert#1\right\vert}}

  \define\u{\math{\left(u_n\right)}\autoinsertnextspace}

  \define\v{\math{\left(v_n\right)}\autoinsertnextspace}

  \define\w{\math{\left(w_n\right)}\autoinsertnextspace}

  \unexpanded\def\euros#1{#1\,\symbol[europe][EUR]}

  \protected\def\point#1#2#3{\math{#1\left(#2\,;#3\right)}}

  \protected\def\coord#1#2{\math{\left(#1\,;#2\right)}}

  \define[2]\prod{\m{\vector{#1}\cdot\vector{#2}}}

   \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace}
  
\stopenvironment\startenvironment[tikz-style]

  \pgfplotsset{
/pgfplots/layers/Bowpark/.define layer set={
axis background,axis grid,main,axis ticks,axis lines,axis tick labels,
axis de

Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-12 Thread Pablo Rodriguez via ntg-context
On 11/11/22 21:58, Bruce Horrocks via ntg-context wrote:
>> On 10 Nov 2022, at 17:06, Fabrice Couvreur via ntg-context wrote:
>>
>> Hi,
>> Sorry to come back to you, but it seems to me that there is enough space 
>> here.
>> Fabrice
> 
> For some reason your PNG images came through in extremely low
> resolution. Without having the ConTeXt source it's hard to say for sure
> what's happening - for example, I would have expected the text on the
> second page to be at the bottom of the first even if there wasn't room
> for the image - because that was what was happening in your first example.

Hi Fabrice and Bruce,

I agree that the source would be helpful to say what may be hard for
ConTeXt.

In any case, ConTeXt has a hard time with pagebreaks when you combine
elements that need both horizontal and vertical calculation, such as in:

  \starttext
  \dorecurse{64}
  {\input knuth\footnote{\input zapf}

  \startitemize[a, columns, eight, packed]
  \dorecurse{64}{\item\currentitemnumber}
  \stopitemize}
  \stoptext

There is a similar issue with paragraph notes.

Pablo
___
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] Nested itemize

2022-09-02 Thread fv leung via ntg-context
\starttext

\startitemize[n]
\item\godown[-\lineheight]

\startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
  \item bla
  \item bla
  \item bla
  \item bla
  \stopitemize
\item\godown[-\lineheight]

\startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
  \item bla
  \item bla
  \item bla
  \item bla
  \item bla
  \item bla
  \stopitemize
\item\godown[-\lineheight]

\startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
  \item bla
  \item bla
  \item bla
  \item bla
  \item bla
  \item bla
  \item bla
  \item bla
  \stopitemize
\stopitemize

\stoptext

Alexandre Christe via ntg-context  於 2022年9月2日 週五
下午5:08寫道:

> Dear all,
>
> I'm struggling to setup a nested itemize with no blank line and several
> columns.
>
> What I mean is something like
> 1. a) bla   c) bla
> b) bla   d) bla
>
> The following MWE is my starting point
>
> \starttext
> \startitemize[n]
> \item \blank[-line]
> \startitemize[a,horizontal,two] [margin=2cm]
> \item First
> \item Second
> \item Third
> \item Fourth
> \stopitemize
> \item \blank[-line]
> \startitemize[a,horizontal,columns,two]
> \item First
> \item Second
> \item Third
> \item Fourth
> \stopitemize
> \stopitemize
> \stoptext
>
> Thanks in advance
>
> ___
> 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
>
> ___
>
___
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] Line up itemize list with answer block

2022-08-23 Thread Jan Willem Flamma via ntg-context


Dear list members,

How can I ensure that the itemize list in the answers line up with the 
counter?

Or, put simply: I want '1.1' and 'a) Answer 1' to line up.

Regards,
Jan Willem Flamma

PDF result:
https://live.contextgarden.net/cgi-bin/result.cgi?id=VtEh2Y


MWE:

\defineblock[question]
\defineblock[answer]

\hideblocks[question]
\hideblocks[answer]

\defineenumeration
    [question]
    [text=Question,
 after={\blank[2*big]},
 inbetween={\blank[nowhite]},
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]

\defineenumeration
    [answer]
    [counter=answer,
 text=,
 width=,
 before={\blank[nowhite]},
 after={\blank[nowhite]},
 indenting=no,
 titledistance=1cm,
 location=inmargin,
 alternative=left,
 headstyle=,
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]

\starttext

\startchapter[title={Chapter}]

\beginquestion
\startquestion
\startitemize[a,packed][stopper=,right=)]
\item Question 1
\item Question 2
\stopitemize
\stopquestion
\endquestion
\beginanswer
\startanswer
\startitemize[a,packed][stopper=,right=)]
\item Answer 1
\item Answer 2
\stopitemize

\stopanswer
\endanswer


\startsection[title={Questions}]
\useblocks[question]
\stopsection

\blank[big]

\startsection[title={Answers}]
\useblocks[answer]
\stopsection

\stopchapter

\stoptext


___
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] Fwd: Typesetting modern Greek (UTF8) with ConTeXt

2022-08-12 Thread Adam Reviczky via ntg-context
Thanks Hanx for the fix!

>> Just curious: you're still in mkii?
No, I was just trying to compare an old project (nothing important) with
lmtx, otherwise I wouldn't have even noticed.

Adam


On Fri, Aug 12, 2022 at 8:14 AM Hans Hagen  wrote:

> On 8/12/2022 2:57 AM, Adam Reviczky wrote:
> > Hi Hans,
> >
> > I get a 'Nonletter' error with *fmtutil* for the mkii greek patterns
> (from
> > the latest cont-tmf.zip 2022-08-05 17:17).
> >
> > Is that an issue with texlive's *fmtutil* itself or something wrong with
> > the mkii greek pattern file?
>
> Actually, we never had a greek hyphenation pattern file, only for
> ancient greek. Modern greek in mkii has not encoding defined (we're
> talking 2005 and before when Tomas made the greek encoding that dealt
> with utf in pdftex). It has to do with 'setting what are letters' and
> these modern greek patterns have plenty different.
>
> You can patch lang-grk.mkii:
>
> \installlanguage
>[\s!gr]
>[\c!spacing=\v!packed,
> \c!leftsentence=---,
> \c!rightsentence=---,
> \c!leftsubsentence=---,
> \c!rightsubsentence=---,
> \c!leftquote=\greekleftquot,
> \c!rightquote=\greekrightquot,
> \c!leftquotation=\greekleftquot,
> \c!rightquotation=\greekrightquot,
>  % we're missing an encoding for greek
> \s!patterns=\s!agr,
> \s!mapping=\s!agr,
> \s!encoding=\s!agr,
> % but one can use mkiv / lmtx anyway
> \c!date={\v!day\ \v!month\ \v!year}]
>
> At least you get something. In mkiv and lmtx we have both.
>
> Just curious: you're still in mkii?
>
> 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 / 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] Fwd: Typesetting modern Greek (UTF8) with ConTeXt

2022-08-12 Thread Hans Hagen via ntg-context

On 8/12/2022 2:57 AM, Adam Reviczky wrote:

Hi Hans,

I get a 'Nonletter' error with *fmtutil* for the mkii greek patterns (from
the latest cont-tmf.zip 2022-08-05 17:17).

Is that an issue with texlive's *fmtutil* itself or something wrong with
the mkii greek pattern file?


Actually, we never had a greek hyphenation pattern file, only for 
ancient greek. Modern greek in mkii has not encoding defined (we're 
talking 2005 and before when Tomas made the greek encoding that dealt 
with utf in pdftex). It has to do with 'setting what are letters' and 
these modern greek patterns have plenty different.


You can patch lang-grk.mkii:

\installlanguage
  [\s!gr]
  [\c!spacing=\v!packed,
   \c!leftsentence=---,
   \c!rightsentence=---,
   \c!leftsubsentence=---,
   \c!rightsubsentence=---,
   \c!leftquote=\greekleftquot,
   \c!rightquote=\greekrightquot,
   \c!leftquotation=\greekleftquot,
   \c!rightquotation=\greekrightquot,
% we're missing an encoding for greek
   \s!patterns=\s!agr,
   \s!mapping=\s!agr,
   \s!encoding=\s!agr,
   % but one can use mkiv / lmtx anyway
   \c!date={\v!day\ \v!month\ \v!year}]

At least you get something. In mkiv and lmtx we have both.

Just curious: you're still in mkii?

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 / 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] Cyrillic UTF8 works, greek does not?

2022-06-22 Thread Gerben Wierda via ntg-context
What am I doing wrong? Minimum example:

\setuplanguage[en][spacing=packed,patterns={en,el,ru,fr,pt}]
\definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:cyrillic,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes]
\definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:{greekandcoptic,greekextended},
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes]

\definefontfamily
[archimate]
[ss]
[Gill Sans]
[tf=style:Regular,
 bf=style:SemiBold,
 it=style:Italic,
 bi=style:SemiBold Italic]
\setupbodyfont[archimate]

\starttext
This is English text

Στοιχείο στο επιχειρησιακό επίπεδο που

This is English text.

Элемент бизнес-уровня; агрегат сервисов

This is English text.
\stoptext

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R&A IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

___
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] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-07 Thread Henning Hraban Ramm via ntg-context

Am 07.06.22 um 17:42 schrieb Pablo Rodriguez via ntg-context:

On 6/6/22 22:59, Henning Hraban Ramm via ntg-context wrote:

I can’t remember where I found the information that el-monoton
(synonymous to el and gr) and el-polyton (synonymous to agr and grc)
should be available.


Hyphenation patterns for Greek are three: grc, el-monoton and el-polyton.

Ancient and medieval Greek are hyphenated in a different way than
polytonic Greek before 1982 (when monotonic orthography was introduced
by law).


Ah, thank you for the explanation!

But at least in ConTeXt LMTX, there are only the agr patterns left, and 
lang-def.mkxl contains:


"""
% Greek

\installlanguage
  [\s!gr]
  [\c!spacing=\v!packed,
   \c!leftsentence=\emdash,
   \c!rightsentence=\emdash,
   \c!leftsubsentence=\emdash,
   \c!rightsubsentence=\emdash,
   \c!leftquote=“,
   \c!rightquote=”,
   \c!leftquotation=«,
   \c!rightquotation=»,
   \c!date={\v!day\space\v!month\space\v!year},
   \s!patterns=\s!agr] % ok?

\installlanguage [\s!greek] [\s!gr]

\installlanguage
  [\s!agr]
  [\s!default=\s!gr,
   \c!leftquote=\upperleftsinglesixquote,
   \c!rightquote=\upperrightsingleninequote,
   \c!leftquotation=\upperleftdoublesixquote,
   \c!rightquotation=\upperrightdoubleninequote]

\installlanguage [\s!ancientgreek] [\s!agr]
"""

So it seems that is wrong / incomplete.

AFAI understand, "el" should be modern greek (post 1982, monotonic), 
"grc" Ancient and Medieval Greek (polytonic), and "el-polytonic" should 
cover 1453–1982.


see https://en.wikipedia.org/wiki/Greek_orthography

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

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


Re: [NTG-context] right item marks for associative questions? (śrīrāma)

2022-04-16 Thread Damien Thiriet via ntg-context
Hi,

> In function 'ListeAleatoireGauche' calling startitemize as below should
> help:
>  context.startitemize ({"8","packed","random"}, {align="righttoleft"})
>
>  Further, I think you might also need to put the entry into stream in a
>  group:
>context.start() context.lefttoright(t[k]) context.stop()
>
>  Sreeram

Many thanks, this solved my problems. I understand
context.startitemize() is designed to get several vectors as arguments,
something I didn't thought about.
Could you explain the whereabouts of calling to context.(start|stop)()?
Some expansion stuff? 
In my MWE, only the first item was left-to-right.

Best regards,

Damien Thiriet 
___
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] right item marks for associative questions?

2022-04-15 Thread śrīrāma via ntg-context
On 4/15/22 2:24 PM Damien Thiriet via ntg-context wrote:
> I read the cld manual and my guess is I should use function() 
> but looks like I lack some understanding of context proceeding.
> 
> 
> This is what I did so far
> [...]

In function 'ListeAleatoireGauche' calling startitemize as below should help:
  context.startitemize ({"8","packed","random"}, {align="righttoleft"})

Further, I think you might also need to put the entry into stream in a group:
  context.start() context.lefttoright(t[k]) context.stop()

  Sreeram


___
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] right item marks for associative questions?

2022-04-15 Thread Damien Thiriet via ntg-context
> You can use different alignment settings to move the bullet points to
> the right side of your lists.

Thank you Wolfgang, this is exactly what I need.
One more question: I am typesetting those questions in lua,
because lua vectors were more convenient for reading the whole 
but I am not sure how should I pass the righttoleft option.
I read the cld manual and my guess is I should use function() 
but looks like I lack some understanding of context proceeding.


This is what I did so far


\startluacode 
   userdata = userdata or {}
   function ListeAleatoireGauche(t)
  context.startitemize {"8","packed","random"}
 for k=1,#t do
context.startitem()
   context.lefttoright(t[k])
context.stopitem()
 end
  context.stopitemize()
   end
   function ListeAleatoireDroite(t)
      context.startitemize {"8","packed","random"}
 for k=1,#t do
context.startitem()
   context(t[k])
context.stopitem()
 end
  context.stopitemize()
   end

   function QCMAssociatif(t,u)
  context.startxtable {"frame=no","columndistance=3cm"}
 context.startxrow()
context.startxcell()
   ListeAleatoireGauche(t)
context.stopxcell()
context.startxcell()
   ListeAleatoireDroite(u)
context.stopxcell()
 context.stopxrow()
  context.stopxtable()
   end
\stopluacode
\starttext
\startluacode 
Author = {"Nietzsche","God"}
Quote = {"God is dead","Nietzsche is Dead"}
QCMAssociatif (Author,Quote)
\stoptext


Damien Thiriet 
___
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] Solved! Itemize columns with MPgraphics: another vertical spacing puzzle

2022-01-14 Thread Gavin via ntg-context
Thanks, Hans!

That works, and it makes sense. Playing with frames always pays, indeed.

-Gavin


> On Jan 14, 2022, at 3:18 PM, Hans Hagen  wrote:
> 
> On 1/14/2022 8:10 PM, Gavin via ntg-context wrote:
>> Hi List,
>> I solved this problem, but the solution is a bit mysterious to me. I was 
>> trying to solve another problem – removing the small space underneath the 
>> graphic in the framed box. I did this by adding boffset=-\strutdepth to the 
>> framed command. That not only got rid of the space inside the frame, it also 
>> removed the excess space between the rows in the itemize columns!
>> I don’t know why this fix solved both problems, but I’m happy with the 
>> result. Now I can use options for the choices – like packed and joinedup – 
>> with consistent results for any number of columns. I’ve put the fixed code 
>> and output below, for anyone who is interested.
>> Even when I’m a bit confused, I’m glad to be working with ConTeXt rather 
>> than any other system!
> 
> % your hack:
> 
> \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,boffset=-\strutdepth,xframe=off]{\useMPgraphic{name}}}
> 
> % but ... you just don't want struts
> 
> \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,strut=no,frame=off]{\useMPgraphic{name}}}
> 
> % and no offset but also no invisible frame
> 
> \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=overlay,frame=off]{\useMPgraphic{name}}}
> 
> playing with framed for a while alway spays back
> 
> 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] Solved! Itemize columns with MPgraphics: another vertical spacing puzzle

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

On 1/14/2022 8:10 PM, Gavin via ntg-context wrote:

Hi List,

I solved this problem, but the solution is a bit mysterious to me. I was trying 
to solve another problem – removing the small space underneath the graphic in 
the framed box. I did this by adding boffset=-\strutdepth to the framed 
command. That not only got rid of the space inside the frame, it also removed 
the excess space between the rows in the itemize columns!

I don’t know why this fix solved both problems, but I’m happy with the result. 
Now I can use options for the choices – like packed and joinedup – with 
consistent results for any number of columns. I’ve put the fixed code and 
output below, for anyone who is interested.

Even when I’m a bit confused, I’m glad to be working with ConTeXt rather than 
any other system!


% your hack:

\define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,boffset=-\strutdepth,xframe=off]{\useMPgraphic{name}}}

% but ... you just don't want struts

\define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,strut=no,frame=off]{\useMPgraphic{name}}}

% and no offset but also no invisible frame

\define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=overlay,frame=off]{\useMPgraphic{name}}}

playing with framed for a while alway spays back

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] Solved! Itemize columns with MPgraphics: another vertical spacing puzzle

2022-01-14 Thread Gavin via ntg-context
Hi List,

I solved this problem, but the solution is a bit mysterious to me. I was trying 
to solve another problem – removing the small space underneath the graphic in 
the framed box. I did this by adding boffset=-\strutdepth to the framed 
command. That not only got rid of the space inside the frame, it also removed 
the excess space between the rows in the itemize columns!

I don’t know why this fix solved both problems, but I’m happy with the result. 
Now I can use options for the choices – like packed and joinedup – with 
consistent results for any number of columns. I’ve put the fixed code and 
output below, for anyone who is interested.

Even when I’m a bit confused, I’m glad to be working with ConTeXt rather than 
any other system!

Best,
Gavin


\starttext

\defineitemgroup[questions]
\setupquestions [1] [n]
\define\question{\item}

\defineitemgroup[choices]
\setupchoices [each] [A,columns] [left=(, right=), width=1.7em, stopper=,]
\define\choice{\item}

\def\mycolor{.625red}

\startuseMPgraphic{name}
  fill fullcircle scaled 40pt withcolor \mycolor;
\stopuseMPgraphic

\define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,boffset=-\strutdepth,frame=off]{\useMPgraphic{name}}}

Here are a few great looking multiple choice questions about colors.
\startquestions
\question What is your favorite color?
\startchoices[columns,four]
  \choice \mycolordot{.625red}
  \choice \mycolordot{.625blue}
  \choice \mycolordot{.625green}
  \choice \mycolordot{.625magenta}
\stopchoices

\question What is your least favorite color?
\startchoices[columns]
  \choice \mycolordot{.625red}
  \choice \mycolordot{.625blue}
  \choice \mycolordot{.625green}
  \choice \mycolordot{.625magenta}
\stopchoices

\question Toward which colors do you feel indifferent?
\startchoices[one]
  \choice \mycolordot{.625red}
  \choice \mycolordot{.625blue}
  \choice \mycolordot{.625green}
  \choice \mycolordot{.625magenta}
\stopchoices
\stopquestions

That's it for questions about colors!

\stoptext



PastedGraphic-2.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] \its disappeared

2022-01-08 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 08.01.2022 um 16:53:


I don’t know since when the questionnaire item command \its doesn’t 
exist any more:

https://wiki.contextgarden.net/Command/its

\starttext
\startitemize[5,packed][items=7,width=5em,distance=1em]
 \ran{\ss\tfx 1 \hss 7}
 \its \CONTEXT\ or \LaTeX?
 \its Tofu or sausage?
 \its Freedom or security?
\stopitemize
\stoptext



strc-itm.mklx

-\protected\tolerant\def\strc_itemgroups_start_items_indeed[#1]%
+\protected\tolerant\def\strc_itemgroups_start_items[#1]%
  {\strc_itemgroups_start_edge
 {\localcontrolledloop
\plusone
\ifchknum#1\or#1\else0\itemgroupparameter\c!items\fi
\plusone
{\strc_itemgroups_used_symbol\hss}%
  \unskip}}


It’s also absent in the interface files, i.e. autosyntax doesn’t work in 
the wiki.



There is no easy way to document them because many of these short 
commands exists in different environment (e.g. \startitemize and 
\startinteractionmenu) with different arguments.


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] \its disappeared

2022-01-08 Thread Henning Hraban Ramm via ntg-context


I don’t know since when the questionnaire item command \its doesn’t 
exist any more:

https://wiki.contextgarden.net/Command/its

\starttext
\startitemize[5,packed][items=7,width=5em,distance=1em]
\ran{\ss\tfx 1 \hss 7}
\its \CONTEXT\ or \LaTeX?
\its Tofu or sausage?
\its Freedom or security?
\stopitemize
\stoptext


It’s also absent in the interface files, i.e. autosyntax doesn’t work in 
the wiki.


Is there a better alternative?

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

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


Re: [NTG-context] Have a cell span multiple columns with tabulate

2021-11-27 Thread Jean-Philippe Rey via ntg-context
Denis,

I have used natural tables that span multiple pages. However, if I am right, 
each row must be contained on a single page. That may be an issue depending on 
your use cases.

Best,

> Le 27 nov. 2021 à 17:45, denis.ma...@unibe.ch a écrit :
> 
> Bonjour Jean-Philippe
>  
> Thank you for your response. That sounds very promising. I don’t remember why 
> I didn’t use natural tables when I’ve started setting things up for this 
> journal. I think I’d might have had something to do with tables that break 
> across pages. (At least, this is 
> whathttps://wiki.contextgarden.net/Tables_Overview 
> <https://wiki.contextgarden.net/Tables_Overview> currently says: 
> extremetables are said to be better when page breaking is involved.)
> Have you ever noticed problems in that area?
>  
> Best,
> Denis
>  
> Von: Jean-Philippe Rey  
> Gesendet: Samstag, 27. November 2021 17:36
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Have a cell span multiple columns with tabulate
>  
> Dear Denis,
> 
> 
> Le 27 nov. 2021 à 13:25, Denis Maier via ntg-context  <mailto:ntg-context@ntg.nl>> a écrit :
>  
> Hi,
>  
> I’m using tabulate for parallel texts (source and translation next to each 
> other). The top of each table should consist of only one cell covering both 
> columns with centered content. Is that possible?
>  
> A HTML equivalent will look roughly like this:
>  
> 
>   
> Manuscript XY 
>   
>   
> Some text in Greek or Hebrew or whatever
> This is the translation
>   
> 
>  
> With ConteXt I’d like to do something like this
>  
> \starttabulate[|p(1.2cm)|p(1.2cm)|]
>   \NC Manuscript XY \NR
>   \NC  Some text in Greek or Hebrew or whatever
>   \NC  This is the translation \NC \NR
>  
> \stoptabulate
>  
> This compiles (interestingly?), but the cells at the top aren’t merged.
>  
> Any ideas ?
>  
> I know that natural tables offer more in this regard, but those seem not to 
> be so well suited for parallel texts.
>  
> I switched to natural tables a long time ago and that's how I would do it:
>  
> \starttext
> \bTABLE[width=8cm, frame=off]
> \setupTABLE[c][1][roffset=0.5em]
> \setupTABLE[c][2][loffset=0.5em]
> \bTR
>   \bTD[nc=2, align=center, bottomframe=on] Manuscript XY \eTD
> \eTR\bTR
> \bTD
>   Some text in Greek or Hebrew or whatever.
>   
>   The text can comprise multiple paragraphs.
>   Or even lists and other goodies :
>   \startitemize[intro, packed]
>   \item first item
>   \item second item
>   \stopitemize
> \eTD\bTD
>   This is the translation
> \eTD
> \eTR
> \eTABLE
> \stoptext
>  
> I haven't seen drawbacks with parallel texts (yet) and I found natural tables 
> very flexible.
>  
> Hope it helps,
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr 
> <mailto:jean-philippe@centralesupelec.fr>
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51


-- 
Jean-Philippe Rey
jean-philippe@centralesupelec.fr 
<mailto:jean-philippe@centralesupelec.fr>
91192 Gif-sur-Yvette Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

___
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] Have a cell span multiple columns with tabulate

2021-11-27 Thread Denis Maier via ntg-context
Bonjour Jean-Philippe

Thank you for your response. That sounds very promising. I don’t remember why I 
didn’t use natural tables when I’ve started setting things up for this journal. 
I think I’d might have had something to do with tables that break across pages. 
(At least, this is what https://wiki.contextgarden.net/Tables_Overview 
currently says: extremetables are said to be better when page breaking is 
involved.)
Have you ever noticed problems in that area?

Best,
Denis

Von: Jean-Philippe Rey 
Gesendet: Samstag, 27. November 2021 17:36
An: mailing list for ConTeXt users 
Cc: Maier, Denis Christian (UB) 
Betreff: Re: [NTG-context] Have a cell span multiple columns with tabulate

Dear Denis,


Le 27 nov. 2021 à 13:25, Denis Maier via ntg-context 
mailto:ntg-context@ntg.nl>> a écrit :

Hi,

I’m using tabulate for parallel texts (source and translation next to each 
other). The top of each table should consist of only one cell covering both 
columns with centered content. Is that possible?

A HTML equivalent will look roughly like this:


  
Manuscript XY 
  
  
Some text in Greek or Hebrew or whatever
This is the translation
  


With ConteXt I’d like to do something like this

\starttabulate[|p(1.2cm)|p(1.2cm)|]
  \NC Manuscript XY \NR
  \NC  Some text in Greek or Hebrew or whatever
  \NC  This is the translation \NC \NR
\stoptabulate

This compiles (interestingly?), but the cells at the top aren’t merged.

Any ideas ?

I know that natural tables offer more in this regard, but those seem not to be 
so well suited for parallel texts.

I switched to natural tables a long time ago and that's how I would do it:

\starttext
\bTABLE[width=8cm, frame=off]
\setupTABLE[c][1][roffset=0.5em]
\setupTABLE[c][2][loffset=0.5em]
\bTR
  \bTD[nc=2, align=center, bottomframe=on] Manuscript XY \eTD
\eTR\bTR
\bTD
  Some text in Greek or Hebrew or whatever.

  The text can comprise multiple paragraphs.
  Or even lists and other goodies :
  \startitemize[intro, packed]
  \item first item
  \item second item
  \stopitemize
\eTD\bTD
  This is the translation
\eTD
\eTR
\eTABLE
\stoptext

I haven't seen drawbacks with parallel texts (yet) and I found natural tables 
very flexible.

Hope it helps,

--
Jean-Philippe Rey
jean-philippe@centralesupelec.fr<mailto:jean-philippe@centralesupelec.fr>
91192 Gif-sur-Yvette Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

___
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] Have a cell span multiple columns with tabulate

2021-11-27 Thread Jean-Philippe Rey via ntg-context
Dear Denis,

> Le 27 nov. 2021 à 13:25, Denis Maier via ntg-context  a 
> écrit :
> 
> Hi,
>  
> I’m using tabulate for parallel texts (source and translation next to each 
> other). The top of each table should consist of only one cell covering both 
> columns with centered content. Is that possible?
>  
> A HTML equivalent will look roughly like this:
>  
> 
>   
> Manuscript XY 
>   
>   
> Some text in Greek or Hebrew or whatever
> This is the translation
>   
> 
>  
> With ConteXt I’d like to do something like this
>  
> \starttabulate[|p(1.2cm)|p(1.2cm)|]
>   \NC Manuscript XY \NR
>   \NC  Some text in Greek or Hebrew or whatever
>   \NC  This is the translation \NC \NR
>  
> \stoptabulate
>  
> This compiles (interestingly?), but the cells at the top aren’t merged.
>  
> Any ideas ?
>  
> I know that natural tables offer more in this regard, but those seem not to 
> be so well suited for parallel texts.

I switched to natural tables a long time ago and that's how I would do it:

\starttext
\bTABLE[width=8cm, frame=off]
\setupTABLE[c][1][roffset=0.5em]
\setupTABLE[c][2][loffset=0.5em]
\bTR
\bTD[nc=2, align=center, bottomframe=on] Manuscript XY \eTD
\eTR\bTR
\bTD
Some text in Greek or Hebrew or whatever.

The text can comprise multiple paragraphs.
Or even lists and other goodies :
\startitemize[intro, packed]
\item first item
\item second item
\stopitemize
\eTD\bTD
This is the translation
\eTD
\eTR
\eTABLE
\stoptext
 
I haven't seen drawbacks with parallel texts (yet) and I found natural tables 
very flexible.

Hope it helps,


-- 
Jean-Philippe Rey
jean-philippe@centralesupelec.fr 
<mailto:jean-philippe@centralesupelec.fr>
91192 Gif-sur-Yvette Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

___
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] Adaptation of ConTeXt to Esperanto

2021-10-09 Thread Alain Delmotte via ntg-context

  
  


Le 9/10/2021 à 12:49, Wolfgang Schuster
  a écrit :

Alain
  Delmotte schrieb am 09.10.2021 um 11:23:
  
  Hi!


Le 9/10/2021 à 10:58, Wolfgang Schuster a écrit :

Alain Delmotte via ntg-context schrieb
  am 08.10.2021 um 22:07:
  
  Hi,


Some time ago I did prepare the files to support Esperanto
in Context (hyphenation and translation of terms).


I thought it was working, testing with the command \date,
which gives the correct format.


But today I remarked that the legends for Figure and Table
(and perhaps other) are in English.


The file lang-txt.lua is there and contains the translations
for Esperanto.

  
  
  The language definitions for esperanto in lang-def.mkxl are in
  the wrong order, the first definition has to be "eo".
  
  
  
  \installlanguage
  
  - [\s!esperanto]
  
  + [\s!eo]
  
    [\c!spacing=\v!packed,
  
     \c!leftsentence=\endash,
  
     \c!rightsentence=\endash,
  
     \c!leftsubsentence=\endash,
  
     \c!rightsubsentence=\endash,
  
     \c!leftquote=\upperleftsinglesixquote, %U+2018,
  
     \c!rightquote=\upperrightsingleninequote,  %U+2019,
  
     \c!leftquotation=\upperleftdoublesixquote, %U+201C,
  
     \c!rightquotation=\upperrightdoubleninequote,  %U+201D,
  
     \c!date={\v!day,-a\space de\space,\v!month,\space \v!year},
  
     \s!patterns=eo,
  
     \s!lefthyphenmin=2,
  
     \s!righthyphenmin=2]
  
  
  -\installlanguage[\s!eo][\c!default=\s!esperanto]
  
  +\installlanguage[\s!esperanto][\c!default=\s!eo]
  
  
  
  Wolfgang
  


Thanks Wolfgang, I did find the file and the wrong order.


Now, what should I do? I modified it outside context-lmtx in a
copy.


Replace the original and???

  
  
  You have to make the changes in the original file and afterwards
  generate the format file with
  
  
      context --make
  
  
  If everything works as expected report back and Hans can apply the
  fix on his machine to ensure they are included in the next release
  because when you make a update your changes are overwritten.
  
  
  Wolfgang
  

Thanks Wolfgang, it works perfectly.
You can report to Hans and thank him
for the nice work.
Alain

  


___
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] Adaptation of ConTeXt to Esperanto

2021-10-09 Thread Wolfgang Schuster via ntg-context

Alain Delmotte schrieb am 09.10.2021 um 11:23:

Hi!

Le 9/10/2021 à 10:58, Wolfgang Schuster a écrit :

Alain Delmotte via ntg-context schrieb am 08.10.2021 um 22:07:

Hi,

Some time ago I did prepare the files to support Esperanto in 
Context (hyphenation and translation of terms).


I thought it was working, testing with the command \date, which 
gives the correct format.


But today I remarked that the legends for Figure and Table (and 
perhaps other) are in English.


The file lang-txt.lua is there and contains the translations for 
Esperanto.


The language definitions for esperanto in lang-def.mkxl are in the 
wrong order, the first definition has to be "eo".



\installlanguage
- [\s!esperanto]
+ [\s!eo]
  [\c!spacing=\v!packed,
   \c!leftsentence=\endash,
   \c!rightsentence=\endash,
   \c!leftsubsentence=\endash,
   \c!rightsubsentence=\endash,
   \c!leftquote=\upperleftsinglesixquote, %U+2018,
   \c!rightquote=\upperrightsingleninequote,  %U+2019,
   \c!leftquotation=\upperleftdoublesixquote, %U+201C,
   \c!rightquotation=\upperrightdoubleninequote,  %U+201D,
   \c!date={\v!day,-a\space de\space,\v!month,\space \v!year},
   \s!patterns=eo,
   \s!lefthyphenmin=2,
   \s!righthyphenmin=2]

-\installlanguage[\s!eo][\c!default=\s!esperanto]
+\installlanguage[\s!esperanto][\c!default=\s!eo]


Wolfgang


Thanks Wolfgang, I did find the file and the wrong order.

Now, what should I do? I modified it outside context-lmtx in a copy.

Replace the original and???


You have to make the changes in the original file and afterwards 
generate the format file with


    context --make

If everything works as expected report back and Hans can apply the fix 
on his machine to ensure they are included in the next release because 
when you make a update your changes are overwritten.


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] Adaptation of ConTeXt to Esperanto

2021-10-09 Thread Wolfgang Schuster via ntg-context

Alain Delmotte via ntg-context schrieb am 08.10.2021 um 22:07:

Hi,

Some time ago I did prepare the files to support Esperanto in Context 
(hyphenation and translation of terms).


I thought it was working, testing with the command \date, which gives 
the correct format.


But today I remarked that the legends for Figure and Table (and perhaps 
other) are in English.


The file lang-txt.lua is there and contains the translations for Esperanto.


The language definitions for esperanto in lang-def.mkxl are in the wrong 
order, the first definition has to be "eo".



\installlanguage
- [\s!esperanto]
+ [\s!eo]
  [\c!spacing=\v!packed,
   \c!leftsentence=\endash,
   \c!rightsentence=\endash,
   \c!leftsubsentence=\endash,
   \c!rightsubsentence=\endash,
   \c!leftquote=\upperleftsinglesixquote, %U+2018,
   \c!rightquote=\upperrightsingleninequote,  %U+2019,
   \c!leftquotation=\upperleftdoublesixquote, %U+201C,
   \c!rightquotation=\upperrightdoubleninequote,  %U+201D,
   \c!date={\v!day,-a\space de\space,\v!month,\space \v!year},
   \s!patterns=eo,
   \s!lefthyphenmin=2,
   \s!righthyphenmin=2]

-\installlanguage[\s!eo][\c!default=\s!esperanto]
+\installlanguage[\s!esperanto][\c!default=\s!eo]


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] Regular online meet-up

2021-09-26 Thread Hans Hagen via ntg-context

On 9/26/2021 11:03 AM, Alain Delmotte via ntg-context wrote:

Hi,

Le 25/09/2021 à 20:02, Henning Hraban Ramm via ntg-context a écrit :

Hi all,

already for a while I wanted to suggest a regular online meet-up, just to chat 
or discuss ConTeXt and the world.

Participants of the just finished meeting already know the BigBlueButton 
“room”, and without the difficulty of a auditory in presence and a weak DHCP, 
we should have even less problems with it.

I’d offer this monthly, 2–3 hours, and let’s see if it stands the test.

Now, if you’d like to participate, which times would fit you (weekdays, 
daytime...)?

Warm regards,
Hraban


What is the BigBlueButton “room”?

I am interested.

I hope that the “just finished meeting” was enjoyable, calm, not 
necessarily reposing😂 and of course fruitful.😁
For sure. As were the moments between meetings, the location, and 
cuisine. It is as much a 'meeting friends' event as a 'talking tex, mp 
and lua' opportunity. A lot packed in a week. And thanks to Jano (last 
year) and Taco (this year) covid could not prevent it happening, 
although of course for some it did (which is why we experimented again 
with limited online).


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] itemize problems

2021-09-07 Thread Sylvain Hubert via ntg-context
This works, thanks!

On 07/09/2021, fv leung via ntg-context  wrote:
> Use
>
>  \startitemize[A,text][lefttext=,righttext=,stopper=]
>
> then.
>
> Maybe that's the new way.
>
> Sylvain Hubert via ntg-context  於 2021年9月7日 週二
> 下午4:32寫道:
>
>> Thanks, but this doesn't seem to work on my laptop:
>>
>> \starttext
>> \startitemize[A,text][left=,right=,stopper=]
>> \item 1
>> \item 2
>> \stopitemize
>> \stoptext
>>
>> %output: (A) 1 (B) 2
>>
>> On 07/09/2021, fv leung via ntg-context  wrote:
>> > I add
>> >
>> > left=,right=,
>> >
>> > in the second option group.
>> >
>> > 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context 
>> 寫道:
>> >
>> >> A few more information:
>> >>
>> >> For the 1st problem:
>> >>
>> >> It seems that \setupitemize accepts two option groups, to which
>> >> n,packed and margin belong accordingly. However,
>> >> \setupitemize[n][margin=2em] does not seem to work.
>> >>
>> >> For the 2nd problem:
>> >>
>> >> \setupitemize[columns,one], although doing nothing in theory, seems to
>> >> fix the problem.
>> >>
>> >> For the 4th problem:
>> >>
>> >> I've found that we can do \setupitemize[A,text] which makes it like
>> >>
>> >> (A.) 0 (B.) 1 (C.) 2 (D.) 3
>> >>
>> >> The problem now is, how can we remove the parentheses around the item
>> >> labels?
>> >>
>> >> On 07/09/2021, Sylvain Hubert  wrote:
>> >> > Dear List,
>> >> >
>> >> > Here's a collection of four problems about item groups that I've
>> >> > just
>> >> > encountered.
>> >> >
>> >> > 1. 'n' and 'packed' not playing well with other options.
>> >> >
>> >> > This works:
>> >> >
>> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before]
>> >> > \setupmyitems[n,packed]
>> >> >
>> >> > \starttext
>> >> > text
>> >> > \startmyitems
>> >> > \item 1
>> >> > \item 2
>> >> > \stopmyitems
>> >> > \stoptext
>> >> >
>> >> > This does not:
>> >> >
>> >> >
>> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
>> >> >
>> >> > This does not either:
>> >> >
>> >> > \defineitemgroup[myitems][itemize]
>> >> > \setupmyitems[n,packed,margin=2em,before=before]
>> >> >
>> >> > Is there a rule for this glitch which makes it worth memorizing, or
>> >> > is
>> >> > this just a bug?
>> >> >
>> >> > 2. 'before' not working in nested item groups.
>> >> >
>> >> > \starttext
>> >> > \startitemize[before=before1]
>> >> > \item 1
>> >> > \startitemize[before=before2]
>> >> > \item 2
>> >> > \stopitemize
>> >> > \stopitemize
>> >> > \stoptext
>> >> >
>> >> > Both before1 and before2 should appear, but only before1 is shown.
>> >> >
>> >> > 3. How to wrap the line under the bulletin or number?
>> >> >
>> >> > To be more precise, the current wrapping behavior of, say, "\item 0
>> >> > 1
>> >> > 2 3 4 5 6 7 8 9" is:
>> >> >
>> >> > * 0 1 2 3 4 5 6 7
>> >> >   8 9
>> >> >
>> >> > How can we remove the indentation of the second line and make it
>> >> > like
>> >> >
>> >> > * 0 1 2 3 4 5 6 7
>> >> > 8 9
>> >> >
>> >> > 4. How to put the items on the same line?
>> >> >
>> >> > That is, for "\item 0 \item 1 \item 2", I would like it to be like
>> >> >
>> >> > * 0   * 1   * 2
>> >> >
>> >> > instead of
>> >> >
>> >> > * 0
>> >> > * 1
>> >> > * 2
>> >> >
>> >> > 

Re: [NTG-context] itemize problems

2021-09-07 Thread fv leung via ntg-context
Use

 \startitemize[A,text][lefttext=,righttext=,stopper=]

then.

Maybe that's the new way.

Sylvain Hubert via ntg-context  於 2021年9月7日 週二 下午4:32寫道:

> Thanks, but this doesn't seem to work on my laptop:
>
> \starttext
> \startitemize[A,text][left=,right=,stopper=]
> \item 1
> \item 2
> \stopitemize
> \stoptext
>
> %output: (A) 1 (B) 2
>
> On 07/09/2021, fv leung via ntg-context  wrote:
> > I add
> >
> > left=,right=,
> >
> > in the second option group.
> >
> > 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context 
> 寫道:
> >
> >> A few more information:
> >>
> >> For the 1st problem:
> >>
> >> It seems that \setupitemize accepts two option groups, to which
> >> n,packed and margin belong accordingly. However,
> >> \setupitemize[n][margin=2em] does not seem to work.
> >>
> >> For the 2nd problem:
> >>
> >> \setupitemize[columns,one], although doing nothing in theory, seems to
> >> fix the problem.
> >>
> >> For the 4th problem:
> >>
> >> I've found that we can do \setupitemize[A,text] which makes it like
> >>
> >> (A.) 0 (B.) 1 (C.) 2 (D.) 3
> >>
> >> The problem now is, how can we remove the parentheses around the item
> >> labels?
> >>
> >> On 07/09/2021, Sylvain Hubert  wrote:
> >> > Dear List,
> >> >
> >> > Here's a collection of four problems about item groups that I've just
> >> > encountered.
> >> >
> >> > 1. 'n' and 'packed' not playing well with other options.
> >> >
> >> > This works:
> >> >
> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before]
> >> > \setupmyitems[n,packed]
> >> >
> >> > \starttext
> >> > text
> >> > \startmyitems
> >> > \item 1
> >> > \item 2
> >> > \stopmyitems
> >> > \stoptext
> >> >
> >> > This does not:
> >> >
> >> >
> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
> >> >
> >> > This does not either:
> >> >
> >> > \defineitemgroup[myitems][itemize]
> >> > \setupmyitems[n,packed,margin=2em,before=before]
> >> >
> >> > Is there a rule for this glitch which makes it worth memorizing, or is
> >> > this just a bug?
> >> >
> >> > 2. 'before' not working in nested item groups.
> >> >
> >> > \starttext
> >> > \startitemize[before=before1]
> >> > \item 1
> >> > \startitemize[before=before2]
> >> > \item 2
> >> > \stopitemize
> >> > \stopitemize
> >> > \stoptext
> >> >
> >> > Both before1 and before2 should appear, but only before1 is shown.
> >> >
> >> > 3. How to wrap the line under the bulletin or number?
> >> >
> >> > To be more precise, the current wrapping behavior of, say, "\item 0 1
> >> > 2 3 4 5 6 7 8 9" is:
> >> >
> >> > * 0 1 2 3 4 5 6 7
> >> >   8 9
> >> >
> >> > How can we remove the indentation of the second line and make it like
> >> >
> >> > * 0 1 2 3 4 5 6 7
> >> > 8 9
> >> >
> >> > 4. How to put the items on the same line?
> >> >
> >> > That is, for "\item 0 \item 1 \item 2", I would like it to be like
> >> >
> >> > * 0   * 1   * 2
> >> >
> >> > instead of
> >> >
> >> > * 0
> >> > * 1
> >> > * 2
> >> >
> >> > My context version: 2021.03.05 19:11, texlive.
> >> >
> >> > Any help with any of the problems above would be greatly appreciated.
> >> >
> >> > Best,
> >> > Sylvain
> >> >
> >>
> >>
> ___
> >> 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
___


[NTG-context] error: (nodes): fuzzy token cleanup in whatsit node

2021-09-07 Thread Sylvain Hubert via ntg-context
Dear List,

I think I've just encountered a fragile bug. It is only reproducible
with exactly the same layout as the doc below. Any insertion or
removal of an item that changes the pagination would let the document
compile.

\defineitemgroup[choice][itemize]
\setupchoice[packed,columns,one]
\setupchoice[before={\blank[medium]}]

\starttext
.\blank[32*big]

\startitemize
\item 0

\startchoice[text]
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\stopitemize
\stoptext

test.log:

open source > level 1, order 1, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2021.03.05 19:11 MKIV  fmt: 2021.4.24
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/me/code/qs-cs/test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
! error:  (nodes): fuzzy token cleanup in whatsit node with type
whatsit and subtype 29

Could anyone reproduce or explain this bug?

Thanks!

Sylvain
___
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] itemize problems

2021-09-07 Thread Sylvain Hubert via ntg-context
Thanks, but this doesn't seem to work on my laptop:

\starttext
\startitemize[A,text][left=,right=,stopper=]
\item 1
\item 2
\stopitemize
\stoptext

%output: (A) 1 (B) 2

On 07/09/2021, fv leung via ntg-context  wrote:
> I add
>
> left=,right=,
>
> in the second option group.
>
> 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context  寫道:
>
>> A few more information:
>>
>> For the 1st problem:
>>
>> It seems that \setupitemize accepts two option groups, to which
>> n,packed and margin belong accordingly. However,
>> \setupitemize[n][margin=2em] does not seem to work.
>>
>> For the 2nd problem:
>>
>> \setupitemize[columns,one], although doing nothing in theory, seems to
>> fix the problem.
>>
>> For the 4th problem:
>>
>> I've found that we can do \setupitemize[A,text] which makes it like
>>
>> (A.) 0 (B.) 1 (C.) 2 (D.) 3
>>
>> The problem now is, how can we remove the parentheses around the item
>> labels?
>>
>> On 07/09/2021, Sylvain Hubert  wrote:
>> > Dear List,
>> >
>> > Here's a collection of four problems about item groups that I've just
>> > encountered.
>> >
>> > 1. 'n' and 'packed' not playing well with other options.
>> >
>> > This works:
>> >
>> > \defineitemgroup[myitems][itemize][margin=2em,before=before]
>> > \setupmyitems[n,packed]
>> >
>> > \starttext
>> >     text
>> > \startmyitems
>> > \item 1
>> > \item 2
>> > \stopmyitems
>> > \stoptext
>> >
>> > This does not:
>> >
>> >
>> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
>> >
>> > This does not either:
>> >
>> > \defineitemgroup[myitems][itemize]
>> > \setupmyitems[n,packed,margin=2em,before=before]
>> >
>> > Is there a rule for this glitch which makes it worth memorizing, or is
>> > this just a bug?
>> >
>> > 2. 'before' not working in nested item groups.
>> >
>> > \starttext
>> > \startitemize[before=before1]
>> > \item 1
>> > \startitemize[before=before2]
>> > \item 2
>> > \stopitemize
>> > \stopitemize
>> > \stoptext
>> >
>> > Both before1 and before2 should appear, but only before1 is shown.
>> >
>> > 3. How to wrap the line under the bulletin or number?
>> >
>> > To be more precise, the current wrapping behavior of, say, "\item 0 1
>> > 2 3 4 5 6 7 8 9" is:
>> >
>> > * 0 1 2 3 4 5 6 7
>> >   8 9
>> >
>> > How can we remove the indentation of the second line and make it like
>> >
>> > * 0 1 2 3 4 5 6 7
>> > 8 9
>> >
>> > 4. How to put the items on the same line?
>> >
>> > That is, for "\item 0 \item 1 \item 2", I would like it to be like
>> >
>> > * 0   * 1   * 2
>> >
>> > instead of
>> >
>> > * 0
>> > * 1
>> > * 2
>> >
>> > My context version: 2021.03.05 19:11, texlive.
>> >
>> > Any help with any of the problems above would be greatly appreciated.
>> >
>> > Best,
>> > Sylvain
>> >
>>
>> ___
>> 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] error: (nodes): fuzzy token cleanup in whatsit node ...

2021-09-06 Thread Sylvain Hubert via ntg-context
% context version: 2021.03.05 19:11
% This seems to be a bug of a very subtle layout problem.
% Inserting or removing anything will likely to suppress the bug

\defineitemgroup[choice][itemize]
\setupchoice[packed,columns,one]
\setupchoice[before={\blank[medium]}]

\starttext
.\blank[32*big]

\startitemize
\item 0

\startchoice[text]
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\stopitemize
\stoptext

% ! error:  (nodes): fuzzy token cleanup in whatsit node with type
whatsit and subtype 29mtx-context | fatal error: return code: 256
___
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] itemize problems

2021-09-06 Thread fv leung via ntg-context
I add

left=,right=,

in the second option group.

在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context  寫道:

> A few more information:
>
> For the 1st problem:
>
> It seems that \setupitemize accepts two option groups, to which
> n,packed and margin belong accordingly. However,
> \setupitemize[n][margin=2em] does not seem to work.
>
> For the 2nd problem:
>
> \setupitemize[columns,one], although doing nothing in theory, seems to
> fix the problem.
>
> For the 4th problem:
>
> I've found that we can do \setupitemize[A,text] which makes it like
>
> (A.) 0 (B.) 1 (C.) 2 (D.) 3
>
> The problem now is, how can we remove the parentheses around the item
> labels?
>
> On 07/09/2021, Sylvain Hubert  wrote:
> > Dear List,
> >
> > Here's a collection of four problems about item groups that I've just
> > encountered.
> >
> > 1. 'n' and 'packed' not playing well with other options.
> >
> > This works:
> >
> > \defineitemgroup[myitems][itemize][margin=2em,before=before]
> > \setupmyitems[n,packed]
> >
> > \starttext
> > text
> > \startmyitems
> > \item 1
> > \item 2
> > \stopmyitems
> >     \stoptext
> >
> > This does not:
> >
> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
> >
> > This does not either:
> >
> > \defineitemgroup[myitems][itemize]
> > \setupmyitems[n,packed,margin=2em,before=before]
> >
> > Is there a rule for this glitch which makes it worth memorizing, or is
> > this just a bug?
> >
> > 2. 'before' not working in nested item groups.
> >
> > \starttext
> > \startitemize[before=before1]
> > \item 1
> > \startitemize[before=before2]
> > \item 2
> > \stopitemize
> > \stopitemize
> > \stoptext
> >
> > Both before1 and before2 should appear, but only before1 is shown.
> >
> > 3. How to wrap the line under the bulletin or number?
> >
> > To be more precise, the current wrapping behavior of, say, "\item 0 1
> > 2 3 4 5 6 7 8 9" is:
> >
> > * 0 1 2 3 4 5 6 7
> >   8 9
> >
> > How can we remove the indentation of the second line and make it like
> >
> > * 0 1 2 3 4 5 6 7
> > 8 9
> >
> > 4. How to put the items on the same line?
> >
> > That is, for "\item 0 \item 1 \item 2", I would like it to be like
> >
> > * 0   * 1   * 2
> >
> > instead of
> >
> > * 0
> > * 1
> > * 2
> >
> > My context version: 2021.03.05 19:11, texlive.
> >
> > Any help with any of the problems above would be greatly appreciated.
> >
> > Best,
> > Sylvain
> >
>
> ___
> 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] itemize problems

2021-09-06 Thread Sylvain Hubert via ntg-context
A few more information:

For the 1st problem:

It seems that \setupitemize accepts two option groups, to which
n,packed and margin belong accordingly. However,
\setupitemize[n][margin=2em] does not seem to work.

For the 2nd problem:

\setupitemize[columns,one], although doing nothing in theory, seems to
fix the problem.

For the 4th problem:

I've found that we can do \setupitemize[A,text] which makes it like

(A.) 0 (B.) 1 (C.) 2 (D.) 3

The problem now is, how can we remove the parentheses around the item labels?

On 07/09/2021, Sylvain Hubert  wrote:
> Dear List,
>
> Here's a collection of four problems about item groups that I've just
> encountered.
>
> 1. 'n' and 'packed' not playing well with other options.
>
> This works:
>
> \defineitemgroup[myitems][itemize][margin=2em,before=before]
> \setupmyitems[n,packed]
>
> \starttext
> text
> \startmyitems
> \item 1
> \item 2
> \stopmyitems
> \stoptext
>
> This does not:
>
> \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
>
> This does not either:
>
> \defineitemgroup[myitems][itemize]
> \setupmyitems[n,packed,margin=2em,before=before]
>
> Is there a rule for this glitch which makes it worth memorizing, or is
> this just a bug?
>
> 2. 'before' not working in nested item groups.
>
> \starttext
> \startitemize[before=before1]
> \item 1
> \startitemize[before=before2]
> \item 2
> \stopitemize
> \stopitemize
> \stoptext
>
> Both before1 and before2 should appear, but only before1 is shown.
>
> 3. How to wrap the line under the bulletin or number?
>
> To be more precise, the current wrapping behavior of, say, "\item 0 1
> 2 3 4 5 6 7 8 9" is:
>
> * 0 1 2 3 4 5 6 7
>   8 9
>
> How can we remove the indentation of the second line and make it like
>
> * 0 1 2 3 4 5 6 7
> 8 9
>
> 4. How to put the items on the same line?
>
> That is, for "\item 0 \item 1 \item 2", I would like it to be like
>
> * 0   * 1   * 2
>
> instead of
>
> * 0
> * 1
> * 2
>
> My context version: 2021.03.05 19:11, texlive.
>
> Any help with any of the problems above would be greatly appreciated.
>
> Best,
> Sylvain
>
___
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] itemize problems

2021-09-06 Thread Sylvain Hubert via ntg-context
Dear List,

Here's a collection of four problems about item groups that I've just
encountered.

1. 'n' and 'packed' not playing well with other options.

This works:

\defineitemgroup[myitems][itemize][margin=2em,before=before]
\setupmyitems[n,packed]

\starttext
text
\startmyitems
\item 1
\item 2
\stopmyitems
\stoptext

This does not:

\defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]

This does not either:

\defineitemgroup[myitems][itemize]
\setupmyitems[n,packed,margin=2em,before=before]

Is there a rule for this glitch which makes it worth memorizing, or is
this just a bug?

2. 'before' not working in nested item groups.

\starttext
\startitemize[before=before1]
\item 1
\startitemize[before=before2]
\item 2
\stopitemize
\stopitemize
\stoptext

Both before1 and before2 should appear, but only before1 is shown.

3. How to wrap the line under the bulletin or number?

To be more precise, the current wrapping behavior of, say, "\item 0 1
2 3 4 5 6 7 8 9" is:

* 0 1 2 3 4 5 6 7
  8 9

How can we remove the indentation of the second line and make it like

* 0 1 2 3 4 5 6 7
8 9

4. How to put the items on the same line?

That is, for "\item 0 \item 1 \item 2", I would like it to be like

* 0   * 1   * 2

instead of

* 0
* 1
* 2

My context version: 2021.03.05 19:11, texlive.

Any help with any of the problems above would be greatly appreciated.

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

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


Re: [NTG-context] Problem getting lmtx version up

2021-07-17 Thread Michal Vlasák
On Sat Jul 17, 2021 at 7:30 AM CEST, Lutz Haseloff wrote:
> both binaries work in my system.
> (Galaxy A50, Userland, Kali Linux)

On Sat Jul 17, 2021 at 10:47 AM CEST, jdh wrote:
> Both binaries you provided ran successufully. I ran them both and they
> both exited with a 0 return code, when invoked with only the --help
> options.
>
> System ran on:
> HW: Raspberry Pi 4 Model B Rev 1.4
> CPU: ARM aarch64
> RAM: 8GB
> SSD: 1TB
>
> OS: aarch64 - Raspberry Pi 64 bit OS. Based on Debian/Linux 10

Lutz, jdh, thanks for testing, great to hear that it works!

Although now it remains to apply this technique to LuaMetaTeX. Without
access to source code I can't try anything, but the general ideas should
apply:

I used Zig for cross compiling. While Zig is a full fledged programming
language in its own right, it also has the ability to compile C/C++
(with built-in Clang). The more interesting part is that it also bundles
different C libraries for the different targets it supports for cross
compilation. This is a great match for Lua(Meta)TeX, because standard C
library is the only "external" dependency. Depending on the chosen
target (CPU+OS+ABI triple), the binary can then be fully statically
linked or dynamically linked against the target's system C library.

Zig exposes the "C compiler" functionality with two interfaces: the Zig
build system and the "zig cc" command. In theory "zig cc" should be a
drop-in replacement for "clang" or "gcc" [1] and therefore should be
usable with existing build systems used by LuaTeX/LuaMetaTeX. In
practice it is not that easy, because some "compiler feature detections"
of these build systems often try to run compiled results (and fail). But
in the best case (like with Lua) cross compilation may be as easy as:

# "bsd" is almost like "linux", but doesn't link "readline"
make CC="zig cc -target aarch64-linux-musl" bsd

The result is a fully statically linked executable, that can be used on
all Linux distributions. But because it is statically linked, dynamic
loading of external Lua libraries written in C is not possible.

The following will result in a binary that is dynamically linked against
(the target system) glibc and should be able to load even Lua libraries
written in C:

make CC="zig cc -target aarch64-linux-gnu.2.28" bsd

(Note that Zig support all relevant glibc versions, that means  that
compiling for older Linux distributions can be done from any OS, not
just ancient Debian or CentOS. Here "2.28" is old enough to support
jdh's Raspberry Pi OS -- and anything newer.)

Applying this to LuaMetaTeX may or may not be hard. Frankly I don't
know much about CMake. But I have experience converting LuaTeX (or
rather its subset) to another build systems:

1) https://github.com/vlasakm/mmtex/blob/ltex/build.zig

   This was used to produce the two binaries I sent previously.

   Usage (no setup required):

   wget 'https://github.com/vlasakm/mmtex/archive/refs/tags/cross-test2.zip'
   unzip cross-test2.zip
   cd mmtex-cross-test2/
   wget 'https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz'
   tar xf zig-linux-x86_64-0.8.0.tar.xz
   zig-linux-x86_64-0.8.0/zig build -Dtarget=aarch64-linux-musl
   qemu-aarch64 zig-out/bin/mmtex --help

   Something similar should work on Windows/Mac and for other targets
   (see `zig targets`).

2) https://github.com/vlasakm/mmtex/blob/master/mmtex/files/meson.build

   This one compiles full LuaTeX, although it doesn't support cross
   compilation and links to system zlib, libpng and zzliplib.

The Zig cross compilation is sadly limited
(https://ziglang.org/download/0.8.0/release-notes.html#Tier-1-Support),
but not because more exotic systems will never be supported, it's just
that nobody did the required work, yet.

The support for Linux (various architectures), macOS (aarch64+x86_64) +
Windows (x86_64) should be very good. I don't think there is other cross
compiler that is able to target the M1 Macs.

The Zig build you download from their website [2] is kind of huge, but
note that it includes LLVM+Clang+Zig in one single dependency free
binary + (efficiently packed) C libraries for many targets. I.e. this is
all you need for all your C/C++/Zig. Provided that you (as of now) don't
need anything other than Linux/Mac/Windows.

Hans, Mojca, is this something worth pursuing for LuaMetaTeX before
"native" compilation is available? I am interested in trying.

Michal Vlasák

[1]: 
https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html
[2]: https://ziglang.org/download/
___
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] Alignment with an enumeration

2021-04-12 Thread Fabrice Couvreur
Hi,
Is it possible that the first item is on the baseline of the definition
environment title ? Thank you.
Fabrice

\define\ItemCommand
{\hskip\zeropoint\relax\autoinsertnextspace}

  \setupitemgroup
[itemize]
[color=darkred,
style=bold,
 distance=\spaceamount]

  \setupitemgroup
[itemize:1]
[option={n,packed,fit,intext},
command=\ItemCommand]

  \setupitemgroup
[itemize:2]
[lefttext=,
righttext=,
option={a,text}]

\setupenumerations
  [before={},
   after={\blank},
   alternative=serried,
   number=no,
   title=yes,
   titleleft={(},
   titleright={)},
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   titlestyle=bold,
   width=broad]

\defineenumeration
   [definition]
   [text=Définition,
number=no,
headcommand=\groupedcommand{}{},
style=normal]

\starttext
\startdefinition
  \input knuth
\stopdefinition
\startdefinition
  \startitemize[n]
\startitem
  First item
\stopitem
\startitem
  Second item
\stopitem
  \stopitemize
\stopdefinition
\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] Hyphenation pattern for Esperanto

2021-03-01 Thread Alain Delmotte

  
  
I forgot to write that I am ready to
answer your questions.
(En Esperanto one avoids to write the
dates as numbers, because the users do not all understand the
same way: 3/9/2021 is it third of September or ninth of March?)
  
Alain

Le 22/02/2021 à 17:26, Tomas Hala a
  écrit :


  Hi Alain,

in my email, I used official language codes: be=Belarussian, bg=Bulgarian, sr=Serbian.

The \installlanguage command is very important because it contains
definitions of the most frequently used typographic elements of the 
given language, for details see below.

Looking forward for both lang-txt files. The sooner you will send it, the better.

The best,

Tomáš

Mon, Feb 22, 2021 ve 03:01:41PM +0100 Alain Delmotte napsal(a):
#Hi Tomáš,
# 
#Thanks for your message.
# 
#First which country is "be"? If Belgium, pay attention that there are
#three languages: Dutch (Flemish) French (a little bit different from
#France French) and German (1% of the population).
# 
#Could you explain me the meaning of:
# 
#Le 21/02/2021 à 23:48, Tomas Hala a écrit :
# 
#  And this one is also needed:
# 
#  #  \installlanguage
#  #    [\s!esperanto]
#  #    [\c!spacing=\v!packed,
#  #     %\c!leftsentence=\emdash,
#  #     %\c!rightsentence=\emdash,
#  #     %\c!leftsubsentence=\emdash,
#  #     %\c!rightsubsentence=\emdash,
#  #     %\c!leftquote=\lowerleftdoubleninequote,
#  #     %\c!rightquote=\upperrightdoublesixquote,
#  #     %\c!leftquotation=\lowerleftdoubleninequote,
#  #     %\c!rightquotation=\upperrightdoublesixquote,
#  #     %\c!date={\v!year,~m.,\space,\v!month,\space,\v!day,~d.},
#  #     \s!patterns=eo,
#  #     \s!lefthyphenmin=2,
#  #     \s!righthyphenmin=2]

Values for \installlanguage:

* spacing: packed means no difference between interword and intersentence spaces.
* (left|right)sentence: punctuation marks -- very often dashes -- for included parts in some sentences.
* (left|right)quotation: definition of primary quotation marks. 
* (left|right)quote: definition of secondary (nested) quotation marks.
* (left|right)hyphenmin: number of characters at the end of a line and at the beginning of the next line when the word is hyphenated.
* date: how the date should be typically typeset: order, spacing, or other signs or abbreviation or texts.

Those I do not know for eo, have been marked with a percent sign.

#I have seen that the \lowerleftdoubleninequote,... are sometimes given by
#the character itself “ ”,...
#For the date, is it the order of the part of the date yyy mm dd?
# 
#I did prepare the file lang-txt.lua and did send it to two friends for
#checking, I wait for their answer (I hope not to long).
# 
#I also have the pattern for hyphenation, the one from TeXLive uses
#fonctions to shorten the length of the file.
# 
#For French, I'll do it and send it to you.
# 
#Thanks for taking care of this.
# 
#  Regards,
# 
#Alain


  


___
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 reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
Thanks, that answered all my
requirements.
I suppose that the rule "not mixing
keywords and assignment in the same argument" is valid for all
setups having multiples commands.
Thanks,
Alain

Le 25/02/2021 à 23:46, Wolfgang
  Schuster a écrit :

Alain
  Delmotte schrieb am 25.02.2021 um 22:48:
  
  Hi!


I am trying to reduce the space inter two items in a
\start...\stopitemize.


I did setup in the beginning of the file:


\setupitemize[joinedup,packed,leftmargin=2em]



but I find that the inter-item space is too big for what I want
to create.


Is it possible to reduce that space?

  
  
  
  You can't put keywords and assignments in the same argument of a
  setup command, use separate arguments for each of them and it
  works.
  
  
  \setupitemize [each] [joinedup,packed] [leftmargin=2em]
  
  
  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
  
___
  

  


___
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 reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
This is ok.
There is still space before the items'
block. This could be handy.
Thanks,
Alain

Le 25/02/2021 à 23:17, jbf a écrit :


  
  Or maybe 
  
  inbetween={\blank[small]}
  Julian
  
  
  On 26/2/21 8:48 am, Alain Delmotte
wrote:
  
  

Hi!
I am trying to reduce the space
inter two items in a \start...\stopitemize.
I did setup in the beginning of
the file:
\setupitemize[joinedup,packed,leftmargin=2em]

  but I find that the inter-item space is too big for what I
  want to create.
Is it possible to reduce
  that space?


Thanks,


--
Alain




___
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 reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
This partly helps, because it suppress
the space before the items (first level) and the lines are at
the margin and there is still space between a first and a second
level itemize.
Thanks,
Alain

Le 25/02/2021 à 23:07, jbf a écrit :


  
  Check https://wiki.contextgarden.net/Enumerations
Would \setupitemize[nowhite] help?
  Julian
  On 26/2/21 8:48 am, Alain Delmotte
wrote:
  
  

Hi!
I am trying to reduce the space
inter two items in a \start...\stopitemize.
I did setup in the beginning of
the file:
\setupitemize[joinedup,packed,leftmargin=2em]

  but I find that the inter-item space is too big for what I
  want to create.
Is it possible to reduce
  that space?


Thanks,


--
Alain




___
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 reduce the inter-item space

2021-02-25 Thread Wolfgang Schuster

Alain Delmotte schrieb am 25.02.2021 um 22:48:

Hi!

I am trying to reduce the space inter two items in a \start...\stopitemize.

I did setup in the beginning of the file:

\setupitemize[joinedup,packed,leftmargin=2em]


but I find that the inter-item space is too big for what I want to create.

Is it possible to reduce that space?



You can't put keywords and assignments in the same argument of a setup 
command, use separate arguments for each of them and it works.


\setupitemize [each] [joinedup,packed] [leftmargin=2em]

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] How to reduce the inter-item space

2021-02-25 Thread jbf
Check https://wiki.contextgarden.net/Enumerations 
<https://wiki.contextgarden.net/Enumerations> Would 
\setupitemize[nowhite] help?


|Julian|
On 26/2/21 8:48 am, Alain Delmotte wrote:


Hi!

I am trying to reduce the space inter two items in a 
\start...\stopitemize.


I did setup in the beginning of the file:

\setupitemize[joinedup,packed,leftmargin=2em]


but I find that the inter-item space is too big for what I want to create.

Is it possible to reduce that space?


Thanks,


--

Alain



___
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 reduce the inter-item space

2021-02-25 Thread Alain Delmotte

  
  
Hi!
I am trying to reduce the space inter
two items in a \start...\stopitemize.
I did setup in the beginning of the
file:
\setupitemize[joinedup,packed,leftmargin=2em]

  but I find that the inter-item space is too big for what I want to
  create.
Is it possible to reduce
  that space?


Thanks,


--
Alain


  

___
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] Hyphenation pattern for Esperanto

2021-02-22 Thread Tomas Hala
Hi Alain,

in my email, I used official language codes: be=Belarussian, bg=Bulgarian, 
sr=Serbian.

The \installlanguage command is very important because it contains
definitions of the most frequently used typographic elements of the 
given language, for details see below.

Looking forward for both lang-txt files. The sooner you will send it, the 
better.

The best,

Tomáš

Mon, Feb 22, 2021 ve 03:01:41PM +0100 Alain Delmotte napsal(a):
#Hi Tomáš,
# 
#Thanks for your message.
# 
#First which country is "be"? If Belgium, pay attention that there are
#three languages: Dutch (Flemish) French (a little bit different from
#France French) and German (1% of the population).
# 
#Could you explain me the meaning of:
# 
#Le 21/02/2021 à 23:48, Tomas Hala a écrit :
# 
#  And this one is also needed:
# 
#  #  \installlanguage
#  #    [\s!esperanto]
#  #    [\c!spacing=\v!packed,
#  #     %\c!leftsentence=\emdash,
#  #     %\c!rightsentence=\emdash,
#  #     %\c!leftsubsentence=\emdash,
#  #     %\c!rightsubsentence=\emdash,
#  #     %\c!leftquote=\lowerleftdoubleninequote,
#  #     %\c!rightquote=\upperrightdoublesixquote,
#  #     %\c!leftquotation=\lowerleftdoubleninequote,
#  #     %\c!rightquotation=\upperrightdoublesixquote,
#  #     %\c!date={\v!year,~m.,\space,\v!month,\space,\v!day,~d.},
#  #     \s!patterns=eo,
#  #     \s!lefthyphenmin=2,
#  #     \s!righthyphenmin=2]

Values for \installlanguage:

* spacing: packed means no difference between interword and intersentence 
spaces.
* (left|right)sentence: punctuation marks -- very often dashes -- for included 
parts in some sentences.
* (left|right)quotation: definition of primary quotation marks. 
* (left|right)quote: definition of secondary (nested) quotation marks.
* (left|right)hyphenmin: number of characters at the end of a line and at the 
beginning of the next line when the word is hyphenated.
* date: how the date should be typically typeset: order, spacing, or other 
signs or abbreviation or texts.

Those I do not know for eo, have been marked with a percent sign.

#I have seen that the \lowerleftdoubleninequote,... are sometimes given by
#the character itself “ ”,...
#For the date, is it the order of the part of the date yyy mm dd?
# 
#I did prepare the file lang-txt.lua and did send it to two friends for
#checking, I wait for their answer (I hope not to long).
# 
#I also have the pattern for hyphenation, the one from TeXLive uses
#fonctions to shorten the length of the file.
# 
#For French, I'll do it and send it to you.
# 
#Thanks for taking care of this.
# 
#  Regards,
# 
#Alain
___
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   5   6   7   8   9   >