Re: [NTG-context] Enumeration numbering in the left margin

2021-11-20 Thread kauśika via ntg-context
On Saturday, November 20, 2021 8:34:52 PM IST Wolfgang Schuster wrote:
> Provide a complete minimal example to increase your chances for an answer.
> 
> Wolfgang

I was inspecting this just now and figured out that in one of the 
\defineenumeration I was inheriting another enumeration block which had the 
width parameter set.

So I rewrote the definition without inheriting anything. Now, 
alternative=leftmargin works just as expected. No problems.

My apologies to all for the oversight.

kauśika


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

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


Re: [NTG-context] Neste itemize in table (or vice-versa?)

2021-11-20 Thread Wolfgang Schuster via ntg-context

Alexandre Christe via ntg-context schrieb am 20.11.2021 um 16:19:

Dear all,

I'm trying something out in LMTX, which is to combine itemize with a 
table. Application could be to put a question and the answer in the 
next column.


A minimal example would be:

[...]

The numbering unfortunately starts with i) instead of a). Any 
recommendation which approach shall be preferred?


Use \itemtag to display the itemize counter, the commands ensures you 
get the correct value because most table environments process the cell 
content multiple times which lead to wrong counters.


\starttext

\startsetups [alexandre:1]
    \setupTABLE [start] [frame=off]
    \setupTABLE [c] [1] [width=.3\textwidth]
    \setupTABLE [c] [2] [width=.6\textwidth]
\stopsetups

\startitemize [a] [right=),stopper=]
\bTABLE[setups=alexandre:1]
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR

\eTABLE
\stopitemize

\startsetups [alexandre:2]
    \setupTABLE [start] [frame=off]
    \setupTABLE [c] [2] [width=.2\textwidth]
    \setupTABLE [c] [3] [width=.6\textwidth]
\stopsetups

\startitemize [a] [right=),stopper=]
\bTABLE[setups=alexandre:2]
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\eTABLE
\stopitemize

\startitemize [a] [right=),stopper=]
\starttabulate[|l|lw(.2\textwidth)|p|]
\NC \itemtag \NC Something \NC Something \NC\NR
\NC \itemtag \NC Something \NC Something \NC\NR
\NC \itemtag \NC Something \NC Something \NC\NR
\NC \itemtag \NC Something \NC Something \NC\NR
\stoptabulate
\stopitemize

\startitemize [a] [right=),stopper=]
\starttabulate[|l|lw(.2\textwidth)|p|]
\NI Something \NC Something \NC\NR
\NI Something \NC Something \NC\NR
\NI Something \NC Something \NC\NR
\NI Something \NC Something \NC\NR
\stoptabulate
\stopitemize

\stoptext

Wolfgang

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

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


[NTG-context] Neste itemize in table (or vice-versa?)

2021-11-20 Thread Alexandre Christe via ntg-context
Dear all,

I'm trying something out in LMTX, which is to combine itemize with a table.
Application could be to put a question and the answer in the next column.

A minimal example would be:

\starttext
\startitemize [a] [right=),stopper=]
\bTABLE[frame=off]
  \setupTABLE[column][1] [width=.3\textwidth]
  \setupTABLE[column][2] [width=.6\textwidth]
\bTR
  \bTD \item Something \eTD
  \bTD Something \eTD
\eTR
\bTR
  \bTD \item Something \eTD
  \bTD Something \eTD
\eTR
\bTR
  \bTD \item Something \eTD
  \bTD Something \eTD
\eTR
\bTR
  \bTD \item Something \eTD
  \bTD Something \eTD
\eTR
\eTABLE
\stopitemize
\stoptext

The numbering unfortunately starts with i) instead of a). Any
recommendation which approach shall be preferred?

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 / 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] Enumeration numbering in the left margin

2021-11-20 Thread Wolfgang Schuster via ntg-context

kauśika via ntg-context schrieb am 20.11.2021 um 14:28:

On Saturday, November 20, 2021 11:31:24 AM IST kauśika wrote:

Dear list,

I have the following enumeration block.

\defineenumeration[verse]
\setupenumeration[verse]
   [alternative=leftmargin,
text=,
width=fit,
distance=1em,
way=bysection]

I actually want to (flush) left align the enumeration's number inside the
left margin and give it a blue color. But even if I have
\setupmargindata[inleftmargin][color=bblue4,align=flushleft]
there is no alignment, no color.

However, if I do
\setupenumeration[verse]
   [alternative=leftmargin,
text=,
width=\leftmarginwidth,
headcolor=bblue4,
distance=0em,
way=bysection]
I am able to get the desired effect.

Is this the 'correct' way to do it? I mean to ask, am I doing something
wrong with \setupmargindata or is this expected behaviour.

Thanks,
kauśika

Also
\setupenumeration[verse]
   [alternative=left,
text=,
headcommand=\inleftmargin,
distance=0em,
way=bysection]
along with
\setupmargindata[inleftmargin][color=bblue4,align=flushleft]
achieves the required effect.

So then am I using alternative=leftmargin incorrectly?


Provide a complete minimal example to increase your chances for an answer.

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] Enumeration numbering in the left margin

2021-11-20 Thread kauśika via ntg-context
On Saturday, November 20, 2021 11:31:24 AM IST kauśika wrote:
> Dear list,
> 
> I have the following enumeration block.
> 
> \defineenumeration[verse]
> \setupenumeration[verse]
>   [alternative=leftmargin,
>text=,
>width=fit,
>distance=1em,
>way=bysection]
> 
> I actually want to (flush) left align the enumeration's number inside the
> left margin and give it a blue color. But even if I have
>\setupmargindata[inleftmargin][color=bblue4,align=flushleft]
> there is no alignment, no color.
> 
> However, if I do
> \setupenumeration[verse]
>   [alternative=leftmargin,
>text=,
>width=\leftmarginwidth,
>headcolor=bblue4,
>distance=0em,
>way=bysection]
> I am able to get the desired effect.
> 
> Is this the 'correct' way to do it? I mean to ask, am I doing something
> wrong with \setupmargindata or is this expected behaviour.
> 
> Thanks,
> kauśika

Also 
\setupenumeration[verse]
  [alternative=left,
   text=,
   headcommand=\inleftmargin,
   distance=0em,
   way=bysection]
along with
   \setupmargindata[inleftmargin][color=bblue4,align=flushleft]
achieves the required effect. 

So then am I using alternative=leftmargin incorrectly?

Thanks,
kauśika


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

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


Re: [NTG-context] Bug in lmt_arrow

2021-11-20 Thread Hans Hagen via ntg-context

On 11/20/2021 6:53 AM, Aditya Mahajan via ntg-context wrote:

On Mon, 15 Nov 2021, Hans Hagen wrote:


On 11/15/2021 4:07 AM, Aditya Mahajan wrote:

On Sun, 14 Nov 2021, Aditya Mahajan via ntg-context wrote:


On Sun, 14 Nov 2021, Hans Hagen wrote:



Spoke too soon. Now straight lines don't work:


new attempt (submitted to build)


The following still fails with ver 2021.11.19

 \starttext

 \startMPcode
   newpath p;
   ahfactor := 5;
   p := origin .. (3cm,0);
   draw lmt_arrow
[
  path = p,
  location = "percentage",
  percentage = 50,
  alternative = "curved",
]
withpen pencircle scaled 1bp;
 \stopMPcode
 \stoptext

I get an error:

metafun > log >
metafun > log > error: This can't happen (division by zero)
metafun > log >
bah, cycling between two failing tests ... new bin will be made on the 
farm in a moment


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
___