[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-06 Thread Jim
On Thu, Jun  6, 2024 at 11:04 (+0200), Aditya Mahajan wrote:

> On Wed, 5 Jun 2024, Jim wrote:

>> Hi,

>> I had the following structure which ended up at the bottom of a page:


> This is perhaps not related to what you asked but ...

>> \noindent
>> {\bf Blah blah blah }
>> \startitemize[intro,nowhite]

> Starting a paragraph with a group {...} can lead to unexpected outcome. It is 
> better to use \bold{...} here, or \dontleavehmode {\bf ... }. 

Aditya,

thanks for the information.  So far (in my ConTeXt journey) I haven't seen
anything with doing that, but I appreciate the advice.

I don't understand the full Zen of \dontleavehmode (in my poor
understanding I think it should be called \ensurehmode or something like
that), but given that I explicitly used \noindent, is that not an analogous
thing?

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: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-06 Thread Aditya Mahajan
On Wed, 5 Jun 2024, Jim wrote:

> Hi,
> 
> I had the following structure which ended up at the bottom of a page:
> 

This is perhaps not related to what you asked but ...

> \noindent
> {\bf Blah blah blah }
> \startitemize[intro,nowhite]

Starting a paragraph with a group {...} can lead to unexpected outcome. It is 
better to use \bold{...} here, or \dontleavehmode {\bf ... }. 

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] Re: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-05 Thread Jim
On Wed, Jun  5, 2024 at 18:04 (+0200), Henning Hraban Ramm wrote:

> Am 05.06.24 um 17:33 schrieb Jim:
>> Hi,

>> I had the following structure which ended up at the bottom of a page:
> …
>> Q1: Is there a Right Way to force ConTeXt to put an \item on the current 
>> page?

>> Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
>> to do an end-run around its calculations?

>> Note: to solve this problem the use of brute force has been authorized.

> Did you try \adaptlayout?
> https://wiki.contextgarden.net/Command/adaptlayout

> It might also help to put the itemize in a box (but that might end up on the
> next page).

Hi Hraban,

That works perfectly.  I didn't know about that command before, and my
google searches to find something like that didn't turn anything up.
Undoubtedly I used the wrong search terms.

I tried putting the \placefigure and the itemize in a box, thinking that if
all else failed I could put a negative \vskip at the bottom to make the box
shorter.  However, when I tried putting all that in a \vbox I got some
error messages which were not immediately illuminating (to me).

Thanks for the pointer.

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: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-05 Thread Henning Hraban Ramm

Am 05.06.24 um 17:33 schrieb Jim:

Hi,

I had the following structure which ended up at the bottom of a page:

…

Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?

Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
 to do an end-run around its calculations?

Note: to solve this problem the use of brute force has been authorized.


Did you try \adaptlayout?
https://wiki.contextgarden.net/Command/adaptlayout

It might also help to put the itemize in a box (but that might end up on 
the next page).


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] \item would fit, but was pushed to next page. Work-around or fix?

2024-06-05 Thread Jim
Hi,

I had the following structure which ended up at the bottom of a page:

---

\setupcaptions[number=no]
\placefigure[right]
{blah blah blah}
{%
\vskip -15pt
\externalfigure[DSC_2782][width=0.32\textwidth]
}
\noindent
{\bf Blah blah blah }
\startitemize[intro,nowhite]
\item blah blah blah blah blah blah!  blah blah blah blah, blah
  blah blah blah blah blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah.
\item blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah blah blah blah blah
  blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah.
\stopitemize



There was, in fact, room to put the last \item on the page (and even a bit
more), but ConTeXt insisted on moving the last \item to the next page.  I
assume that its calculations were a bit conservative for whatever reason,
but I really wanted the last item to be on the same page as its friends.

I tried some "tricks" that would have worked for me in plain TeX, but
ConTeXt was having none of that.

Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?

Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
to do an end-run around its calculations?

Note: to solve this problem the use of brute force has been authorized.

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: how to prevent item appearing in List of Figures

2024-05-30 Thread Rik Kabel
Bypass the place figure mechanism completely  by placing them on the page in an overlay. On May 30, 2024 04:22, Tomáš Hála  wrote:Hi Charlie,

I guess that \starttplacefigure[location={none},...] might help you.

Or (older) \placefigure[none][,,,]{...}{...}

Best,

Tomáš

> I haven’t typeset a book before and various things are a challenge. The most recent is the following.
> 
> I have \placelistoffigures some of which are logos (for the publisher and two granting bodies) that I have placed with:
> 
>    \setupcaptions[number=no]
> \starttplacefigure[
>  location={middle,high,low},
>  reference=fig:logo,
>  title=]
> {\externalfigure[FCLogo][width=0.045\textwidth]}
> \stopplacefigure 
> 
> These are not part of the text and I don’t want them to appear in the list.
> 
> The caption for the logo doesn’t appear in the List of Figures but the page number does. How can I prevent these particular graphics from being listed in the List of figures.
> 
> Thanks,
> Charlie
> 
> 
> 
> 
> 
> ___
> 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: how to prevent item appearing in List of Figures

2024-05-30 Thread Charles Doherty via ntg-context
Thanks Hraban,

Tomáš Hála suggested l \starttplacefigure[location={none},...] which works a 
treat. I will keep your suggestion in mind too. I am very grateful to you all.

Thank you,
Charlie

> On 30 May 2024, at 11:41, Henning Hraban Ramm  wrote:
> 
> If you don’t need them in the list and also no caption, I wouldn’t use floats 
> (\placefigure) at all, but just plain \externalfigure.
> 
> Hraban

***
CHARLES DOHERTY
13 BANCROFT ROAD
TALLAGHT
DUBLIN 
D24 YH2V
home: +353 1 2447483
Mobile: +353 863868629
charles.dohe...@icloud.com





___
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 prevent item appearing in List of Figures

2024-05-30 Thread Henning Hraban Ramm

Am 29.05.24 um 17:35 schrieb Charles Doherty via ntg-context:

I have \placelistoffigures some of which are logos (for the publisher and two 
granting bodies) that I have placed with:

\setupcaptions[number=no]
 \starttplacefigure[
  location={middle,high,low},
  reference=fig:logo,
  title=]
{\externalfigure[FCLogo][width=0.045\textwidth]}
\stopplacefigure

These are not part of the text and I don’t want them to appear in the list.


If you don’t need them in the list and also no caption, I wouldn’t use 
floats (\placefigure) at all, but just plain \externalfigure.


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: how to prevent item appearing in List of Figures

2024-05-30 Thread Tomáš Hála
Hi Charlie,

I guess that \starttplacefigure[location={none},...] might help you.

Or (older) \placefigure[none][,,,]{...}{...}

Best,

Tomáš

> I haven’t typeset a book before and various things are a challenge. The most 
> recent is the following.
> 
> I have \placelistoffigures some of which are logos (for the publisher and two 
> granting bodies) that I have placed with:
> 
>\setupcaptions[number=no]
> \starttplacefigure[
>  location={middle,high,low},
>  reference=fig:logo,
>  title=]
> {\externalfigure[FCLogo][width=0.045\textwidth]}
> \stopplacefigure 
> 
> These are not part of the text and I don’t want them to appear in the list.
> 
> The caption for the logo doesn’t appear in the List of Figures but the page 
> number does. How can I prevent these particular graphics from being listed in 
> the List of figures.
> 
> Thanks,
> Charlie
> 
> 
> 
> 
> 
> ___
> 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 prevent item appearing in List of Figures

2024-05-29 Thread Charles Doherty via ntg-context
Hi Mikael,

> I notice that you addressed Wolfgang, but you also sent to the list.
> One way could be to condition on being on a chapter page:
> 
> \setupheadertexts
>  [\doifelsefirstsectionpage{chapter}{\userpagenumber}{}]
> 
> \setupheadertexts
>  [\doifelsefirstsectionpage{chapter}{}{\getmarking[chapter]}]
>  [\doifelsefirstsectionpage{chapter}{}{\userpagenumber}]

Thank you for your suggestion. Along with your suggestion and that of  Wolfgang 
I get what I need. I thought I was sending to the list but I copied and pasted 
from an email and didn’t realise that Wolfgang was included. I have only ever 
written to the list many years ago.

I haven’t typeset a book before and various things are a challenge. The most 
recent is the following.

I have \placelistoffigures some of which are logos (for the publisher and two 
granting bodies) that I have placed with:

   \setupcaptions[number=no]
\starttplacefigure[
 location={middle,high,low},
 reference=fig:logo,
 title=]
{\externalfigure[FCLogo][width=0.045\textwidth]}
\stopplacefigure 

These are not part of the text and I don’t want them to appear in the list.

The caption for the logo doesn’t appear in the List of Figures but the page 
number does. How can I prevent these particular graphics from being listed in 
the List of figures.

Thanks,
Charlie





___
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: numbered itemize list item label alignment

2023-10-19 Thread Csikos Bela
 Eredeti levél Feladó: Aditya Mahajan Dátum: 
2023 október 15 22:32:37Tárgy: Re: [NTG-context] Re: numbered itemize list item 
label alignmentCímzett: mailing list for ConTeXt users On 
Sun, 15 Oct 2023, Wolfgang Schuster wrote:  > Csikos Bela schrieb am 15.10.2023 
um 15:51: > > Hello: > > > > I would like to make a long numbered itemize list, 
where the numbers > > increase up to three digits. > > I would like the 
numbered labels aligned to the right and the widest > > label's left side 
located at the left margin. > > I tried the below code but the 3 digit labels' 
left sides go into the left > > margin. How can I fix it? > > > > Code: > > > > 
\showframe > > \starttext > > \startitemize[n,broad][itemalign=flushright] > > 
\dorecurse{250}{\item } > > \stopitemize > > \stoptext > > You can use the 
width-key to set a value for the number, below is a example > for method > to 
calculate the width based on the number of items but I would use fixed > value 
> (e.g. width=2em) to let all items (independent of the entries) start on the > 
same position.  I normally use the `fit` key with an appropriate value of 
`distance`. For example:  \showframe[text][text]  \starttext  
\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright] 
\dorecurse{1}{\startitem xxx\stopitem} \stopitemize  \page  
\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright] 
\dorecurse{11}{\startitem xxx\stopitem} \stopitemize  \page  
\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright] 
\dorecurse{111}{\startitem xxx\stopitem} \stopitemize  \stoptext  Thank you, 
the fit option worked well.bcsikos___
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: numbered itemize list item label alignment

2023-10-15 Thread Aditya Mahajan
On Sun, 15 Oct 2023, Wolfgang Schuster wrote:

> Csikos Bela schrieb am 15.10.2023 um 15:51:
> > Hello:
> >
> > I would like to make a long numbered itemize list, where the numbers
> > increase up to three digits.
> > I would like the numbered labels aligned to the right and the widest
> > label's left side located at the left margin.
> > I tried the below code but the 3 digit labels' left sides go into the left
> > margin. How can I fix it?
> >
> > Code:
> >
> > \showframe
> > \starttext
> > \startitemize[n,broad][itemalign=flushright]
> > \dorecurse{250}{\item }
> > \stopitemize
> > \stoptext
> 
> You can use the width-key to set a value for the number, below is a example
> for method
> to calculate the width based on the number of items but I would use fixed
> value
> (e.g. width=2em) to let all items (independent of the entries) start on the
> same position.

I normally use the `fit` key with an appropriate value of `distance`. For 
example:

\showframe[text][text]

\starttext

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{1}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{11}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{111}{\startitem xxx\stopitem}
\stopitemize

\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: numbered itemize list item label alignment

2023-10-15 Thread Wolfgang Schuster

Csikos Bela schrieb am 15.10.2023 um 15:51:

Hello:

I would like to make a long numbered itemize list, where the numbers 
increase up to three digits.
I would like the numbered labels aligned to the right and the widest 
label's left side located at the left margin.
I tried the below code but the 3 digit labels' left sides go into the 
left margin. How can I fix it?


Code:

\showframe
\starttext
\startitemize[n,broad][itemalign=flushright]
\dorecurse{250}{\item }
\stopitemize
\stoptext


You can use the width-key to set a value for the number, below is a 
example for method
to calculate the width based on the number of items but I would use 
fixed value
(e.g. width=2em) to let all items (independent of the entries) start on 
the same position.


\defineexpandable\ItemWidth
  {\ifnum\lastcountervalue[itemgroup:itemize]>99
 \widthofstring{000.}%
   \orelse\ifnum\lastcountervalue[itemgroup:itemize]>9
 \widthofstring{00.}%
   \else
 \widthofstring{0.}%
   \fi}

\showframe[text][text]

\starttext

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{1}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{11}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{111}{\startitem xxx\stopitem}
\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 / 
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: numbered itemize list item label alignment

2023-10-15 Thread Pablo Rodriguez
On 10/15/23 15:51, Csikos Bela wrote:
> Hello:
>
> I would like to make a long numbered itemize list, where the numbers
> increase up to three digits.
> I would like the numbered labels aligned to the right and the widest
> label's left side located at the left margin.
> I tried the below code but the 3 digit labels' left sides go into the
> left margin. How can I fix it?

Hi Csikos,

width is the key, such as in:

  \showframe\showgrid\showstruts
  \starttext
  \startitemize[n,broad][width=.125tw, itemalign=flushright]
  \dorecurse{250}{\item }
  \stopitemize
  \stoptext

I assigned ⅛ text width to the number width to clearly display it.

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://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] numbered itemize list item label alignment

2023-10-15 Thread Csikos Bela
Hello:I would like to make a long numbered itemize list, where the numbers 
increase up to three digits.I would like the numbered labels aligned to the 
right and the widest label's left side located at the left margin.I tried the 
below code but the 3 digit labels' left sides go into the left margin. How can 
I fix 
it?Code:\showframe\starttext\startitemize[n,broad][itemalign=flushright]\dorecurse{250}{\item
 }\stopitemize\stoptextThe resulted pdf is attached as 
context-itemize-label-alignment.pdf.Thank you in advance,bcsikos

context-itemize-label-alignment.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: item list inside a blockquote

2023-09-26 Thread Pablo Rodriguez
On 9/26/23 20:46, Wolfgang Schuster wrote:
> [...]
> The \startblockquote command removes the last skip to ensure only the
> space which is set by the environment appears in the output.

Many thanks for your explanation, Wolfgang.

> The default method to put some space before and after the environment is
> to use the spacebefore and spaceafter keys.

Now it is clear to me how the after and spaceafter differ in delimited
texts.

> It would interesting to know what you're trying to achieve with your
> combination of itemize and blockquote.

I’m quoting laws in footnotes, such as in:

   Relevant to the discusssion, see »Grundgesetz«, §73: :

 Der Bund hat die ausschließliche Gesetzgebung über:

   1. die auswärtigen Angelegenheiten;
   2. die Staatsangehörigkeit im Bunde;
   3. [...]

I need to quote the legal text and the list inside the legal text.

BTW, German legislation is only a sample.

I hope it is clear now,

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: item list inside a blockquote

2023-09-26 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 26.09.2023 um 20:32:

On 9/26/23 12:52, gerard.degreve wrote:

Hello Pablo,

Just try to do this :

\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}\strut]

Hi Gerard,

this also works with \null, but not well with small dimensions:

 \showframe\showgrid\showstruts
 \setuppapersize[A6]
 \setupitemgroup
[itemize][1]
[   before={\blank[quarterline]},
 after={\blank[quarterline]\null}]
 \starttext
 one
 \startblockquote
 \startitemize
  \item a.
 \stopitemize
 \stopblockquote
 two
 \stoptext

I tend to think this might be a bug.


The \startblockquote command removes the last skip to ensure only the 
space which is set by the environment appears in the output.


The default method to put some space before and after the environment is 
to use the spacebefore and spaceafter keys.


 begin example
\setupquotation
  [spacebefore=line,
    spaceafter=line]

\starttext

\samplefile{knuth}

\startblockquote
\samplefile{knuth-gpt}
\stopblockquote

\samplefile{knuthmath}

\stoptext
 end example

It would interesting to know what you're trying to achieve with your 
combination of itemize and blockquote.


Wolfgang

___
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: item list inside a blockquote

2023-09-26 Thread Pablo Rodriguez
On 9/26/23 12:52, gerard.degreve wrote:
> Hello Pablo,
>
> Just try to do this :
>> \setupitemgroup
>> [itemize][1]
>> [ before={\blank[.125th]},
>> after={\blank[.125th]}\strut]

Hi Gerard,

this also works with \null, but not well with small dimensions:

\showframe\showgrid\showstruts
\setuppapersize[A6]
\setupitemgroup
   [itemize][1]
   [   before={\blank[quarterline]},
after={\blank[quarterline]\null}]
\starttext
one
\startblockquote
\startitemize
 \item a.
\stopitemize
\stopblockquote
two
\stoptext

I tend to think this might be a bug.

Many thanks for your help again,

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: item list inside a blockquote

2023-09-26 Thread gerard.degreve
gerard.degreve: 

Hello Pablo,

Just try to do this :
\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}\strut]

Regards,

Gerard


Le 25-09-23 19:26:08, Pablo Rodriguez  a écrit :
Dear list,

I have the following sample:

\setuppapersize[A6]
\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}]
\starttext
one
\startblockquote
\startitemize
\item a
\stopitemize
\stopblockquote
two
\stoptext

The blockquote disables the space after the list, but not before.

Have I hit a bug or am I missing something?

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
___


--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com___
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] item list inside a blockquote

2023-09-25 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuppapersize[A6]
\setupitemgroup
   [itemize][1]
   [   before={\blank[.125th]},
after={\blank[.125th]}]
\starttext
one
\startblockquote
\startitemize
 \item a
\stopitemize
\stopblockquote
two
\stoptext

The blockquote disables the space after the list, but not before.

Have I hit a bug or am I missing something?

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: Text item groups

2023-07-16 Thread Pablo Rodriguez
On 7/15/23 21:46, Jairo A. del Rio wrote:
> Hi, list! I want to know how to make numbers in text item groups run
> along with text (for instance, wrt indentation) regardless of their
> position in text. In the following example:

Hi Jairo,

alignsymbol=yes might be what you need (if I’m getting your point right).

Complete sample that worked for me:

  \setupindenting[yes,medium]
  \starttext
  \startitemize[a,intext]
[left=(, right=), stopper=, alignsymbol=yes, indenting={yes,medium}]
  \startitem \input{jojomayer}\stopitem
  \startitem \input{jojomayer}\stopitem
  \startitem \input{jojomayer}\stopitem
  \stopitemize
  \stoptext

Just in case it might 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: Text item groups

2023-07-16 Thread Wolfgang Schuster

Jairo A. del Rio schrieb am 15.07.2023 um 21:46:
Hi, list! I want to know how to make numbers in text item groups run 
along with text (for instance, wrt indentation) regardless of their 
position in text. In the following example:


\setupindenting[yes,medium]

\starttext

\startitemize[a,text][textdistance=none]

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\stopitemize

\stoptext

Indentation is ignored altogether. Thank you in advance


\setupindenting[yes,medium]

\starttext

\samplefile{jojomayer}

\startitemize[a,intext][alignsymbol=yes,indenting=yes,width=\widthofstring{a.},distance=\spaceamount]
\startitem \samplefile{jojomayer}\stopitem
\startitem \samplefile{jojomayer}\stopitem
\startitem \samplefile{jojomayer}\stopitem
\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 / 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: Text item groups

2023-07-16 Thread Bruce Horrocks
I'm not quite sure what you mean by "run along with text". If you mean "keep in 
the same paragraph" then just remove the blank lines from your example, e.g.
\setupindenting[yes,medium]

\starttext

\startitemize[a,text][textdistance=none]

\startitem \input{jojomayer}\stopitem
\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\stopitemize

\stoptext

> On 15 Jul 2023, at 20:46, Jairo A. del Rio  wrote:
> 
> Hi, list! I want to know how to make numbers in text item groups run along 
> with text (for instance, wrt indentation) regardless of their position in 
> text. In the following example:
> 
> \setupindenting[yes,medium]
> 
> \starttext
> 
> \startitemize[a,text][textdistance=none]
> 
> \startitem \input{jojomayer}\stopitem
> 
> \startitem \input{jojomayer}\stopitem
> 
> \startitem \input{jojomayer}\stopitem
> 
> \stopitemize
> 
> \stoptext
> 
> Indentation is ignored altogether. Thank you in advance
> 
> Regards,
> 
> Jairo
> ___
> 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
> ___


—
Bruce Horrocks
Hampshire, UK

___
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] Text item groups

2023-07-15 Thread Jairo A. del Rio
Hi, list! I want to know how to make numbers in text item groups run along
with text (for instance, wrt indentation) regardless of their position in
text. In the following example:

\setupindenting[yes,medium]

\starttext

\startitemize[a,text][textdistance=none]

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\stopitemize

\stoptext

Indentation is ignored altogether. Thank you in advance

Regards,

Jairo
___
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] Is there an "align with item on facing page" option?

2022-09-25 Thread Bruce Horrocks via ntg-context
Is there a way to align text with an item on the facing page?

I'm typesetting author biographies for a book and I'm doing two per page. The 
author's name appears on a line of its own in \tfa size and then the bio text 
follows. Ideally I'd like their names aligned so that all four (on a two page 
spread) appear nicely symmetrical.

Currently I'm using \godown[\dimexpr80mm-\pagetotal] (for A5 pages) between 
each pair which works nicely in that if the first biography is too long it 
overlaps and I know to edit it to be shorter.

However, if the second biography is a little long, it pushes the first back up 
the page a little - maybe only one line - and then it no longer aligns with the 
the one on the facing page. If I could somehow tell ConTeXt to vertically align 
the author names then that might do the job?

I've tried using two frames above each other with fixed min and maxheight but 
then I can't get the author's thumbnail picture to place properly and have the 
text wrap around it.

Any thoughts?
—
Bruce Horrocks
Hampshire, UK

___
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] item enumeration

2022-05-25 Thread Wolfgang Schuster via ntg-context

Jorge Manuel via ntg-context schrieb am 25.05.2022 um 12:22:

Hi to All

A have this piece of code that works in old ConText versions but with 
new versions (current version: 2022.04.19 19:53) don’t.


\def\legalconversion#1{
 \dorecurse{\numexpr\currentitemlevel-1}{%
 \rawcounter[itemgroup:\currentparentitemgroup][\recurselevel].}%
 #1%
}
\defineconversion[legal][\legalconversion]

How can fix this?


Are you looking for the repeat keyword?

\starttext

\setupitemize[1][width=\widthofstring    {0},distance=1em]
\setupitemize[2][width=\widthofstring  {0.0},distance=1em]
\setupitemize[3][width=\widthofstring{0.0.0},distance=1em]

\startitemize[n,repeat]
    \item one
    \startitemize[n]
    \item one-one
    \item one-two
    \stopitemize
    \item two
    \startitemize[n,repeat]
    \item two-one
    \startitemize[n]
    \item two-one-one
    \item two-one-two
    \stopitemize
    \item two-two
    \stopitemize
\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] item enumeration

2022-05-25 Thread Jorge Manuel via ntg-context
Hi to All

A have this piece of code that works in old ConText versions but with new 
versions (current version: 2022.04.19 19:53) don’t.

\def\legalconversion#1{
 \dorecurse{\numexpr\currentitemlevel-1}{%
 \rawcounter[itemgroup:\currentparentitemgroup][\recurselevel].}%
 #1%
}
\defineconversion[legal][\legalconversion]

How can fix this?

Thanks for you support

Jorge Magalhães
___
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 śrīrāma via ntg-context
On 4/16/22 5:31 PM Damien Thiriet via ntg-context wrote:
> Could you explain the whereabouts of calling to context.(start|stop)()?
> Some expansion stuff?

I must admit that I am not a (LuaMetaT)eXpert. My limited understanding is 
that it might be due to expansion and the behaviour of (start|stop)item, or 
equivalently (start|stop)itemgroupitem. It does not seem to group like (most?) 
other groups. (see strc-itm.mklx)

For instance if we switch to bold without grouping inside \(start|stop)item it 
cascades through.
  \startitemize[circle]
  \startitem \bf First \stopitem
  \startitem Second \stopitem
  \startitem Third \stopitem
  \startitem Fourth \stopitem
  \stopitemize

In fact, you could just put the lefttoright call inside context.(bgroup|  
egroup): see p. 196 of the cld manual. (start...stop are  anyway ConTeXt'ized 
versions of those).

Best,
  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? (ś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] right item marks for associative questions?

2022-04-12 Thread Wolfgang Schuster via ntg-context

Damien Thiriet via ntg-context schrieb am 12.04.2022 um 20:46:

Thank you for all your answers.
I will have a deeper look at them.
My first comments:


If you are certain that the there will be no
multi-line item

Unfortunately there are often some. History
teachers are not known for loving short texts,
at least in France.


Using the “columns" feature is one way to go

Might be, but I do not always give the same
number of answers on both columns

Something I forgot to put in my MWE is that I
randomize both lists. Messing the answers is a
good way to prevent pupils from cheating,
especially with long answers..
That makes a four columns table more cumbersome,
so I believe.


You can use different alignment settings to move the bullet points to 
the right side of your lists.


\starttext

\bTABLE[frame=off,width=.4\textwidth,columndistance=.2\textwidth,align={normal,lohi}]
  \bTR
    \bTD
  \startitemize[circle,random][align=righttoleft]
  \startitem {\lefttoright One} \stopitem
  \startitem {\lefttoright Two} \stopitem
  \startitem {\lefttoright Three} \stopitem
  \stopitemize
    \eTD
    \bTD
  \startitemize[circle,random]
  \startitem First \stopitem
  \startitem Second \stopitem
  \startitem Third \stopitem
  \startitem Foruth \stopitem
  \stopitemize
    \eTD
  \eTR
\eTABLE

\stoptext

Wolfgang

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

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


Re: [NTG-context] right item marks for associative questions?

2022-04-12 Thread Damien Thiriet via ntg-context
Thank you for all your answers.
I will have a deeper look at them. 
My first comments:

> If you are certain that the there will be no
> multi-line item
Unfortunately there are often some. History
teachers are not known for loving short texts,
at least in France.

> Using the “columns" feature is one way to go
Might be, but I do not always give the same
number of answers on both columns

Something I forgot to put in my MWE is that I 
randomize both lists. Messing the answers is a 
good way to prevent pupils from cheating, 
especially with long answers..
That makes a four columns table more cumbersome,
so I believe.

Damien

___
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-11 Thread śrīrāma via ntg-context
On 4/12/22 12:16 AM Damien Thiriet via ntg-context wrote:
> Hi!
> 
> I am used to giving associative questions to my pupils,
> something like
> 
> * connect the author with its ideas
> 
> Friedrich Nietzsche *  * "God is dead"
> Woody Allen *  * "Nietzsche is dead, God is dead 
>   and I don't feel so good"
> God *  * "Nietzsche is dead"
> 
> I design it as a two-cells xtable with itemized lists inside.
> How can I have the item mark on the right side?

If you are certain that the there will be no multi-line item (i.e. item text is 
short enough that it fits in slightly less than half of textwidth) you can use 
an enumeration, and put the contents inside a two-column layout:

%%% start example-1
  \define[1]\aitemcmd{\inframed[width=1cm,align=flushright,frame=off]{(#1)}}
  \defineenumeration
[aitem]
  \setupenumeration
[aitem]
[text=,
alternative=empty,
headstyle=normal,
width=fit,
align=flushright,
closesymbol={\getnumber[aitem]},
closecommand=\aitemcmd]

  \starttext
  \startcolumns[distance=1cm]
  \startitemize[n]
  \dorecurse{5}{
\startaitem
  whatever left
\stopaitem
  }
  \stopitemize

  \startitemize[a][left=(,right=),stopper=,width=1cm]
  \dorecurse{5}{
\startitem
  whatever right
\stopitem
  }
  \stopitemize
  \stopcolumns
  \stoptext
%%% stop example-1

[You can tweak the alternative, align, closesymbol, closecommand to get exactly 
what you want; the example above will give a somewhat symmetric layout]

More generally, if the text can multi-line, then I think TABLE (with proper 
alignment options) might be better-suited:

%%% start example-2
  \define\startItemize{
\bTABLE\setupTABLE[frame=on,align=lohi]
\setupTABLE[2][distance=1cm,align={flushright,lohi}]
\setupTABLE[2,3][width=0.05\textwidth]
\setupTABLE[1][align=flushright,width=0.4\textwidth]
\setupTABLE[4][align=flushleft,width=0.4\textwidth]
  }
  \define\stopItemize{\eTABLE}
  \define[1]\metI{\bTR \bTD #1 \eTD \bTD (\character{\currentTABLErow}) \eTD}
  \define[1]\Item{\bTD (\currentTABLErow) \eTD \bTD #1 \eTD  \eTR}

  \starttext
  \startItemize
  \dorecurse{5}{
  \metI {whatever here on the left}
  \Item {whatever here on the right}
  }
  \stopItemize
  \stoptext
%%% stop example-2

Best,
  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-11 Thread Jeong Dal via ntg-context
Dear Damien,

Using the “columns" feature is one way to go if you don’t mind the vertical 
alignment mismatch  in the third items.

Best regards,
Dalyoung

\starttext
\startitemize [8,columns]%,two]
\startitem Nietzsche \stopitem
\startitem Woody Allen \stopitem
\startitem God \stopitem
\startitem God is dead \stopitem
\startitem Nietzsche is dead, God is dead and I don't feel so good \stopitem
\startitem Nietzsche is dead \stopitem
\stopitemize
\stoptext




> 2022. 4. 12. 오전 3:46, Damien Thiriet via ntg-context  작성:
> 
> Hi!
> 
> I am used to giving associative questions to my pupils,
> something like
> 
> * connect the author with its ideas
> 
> Friedrich Nietzsche *  * "God is dead"
> Woody Allen *  * "Nietzsche is dead, God is dead 
>  and I don't feel so good"
> God *  * "Nietzsche is dead"
> 
> I design it as a two-cells xtable with itemized lists inside.
> How can I have the item mark on the right side?
> 
> \starttext
> \startitemize [8]
> \startitem Nietzsche \stopitem
> \startitem Allen \stopitem
> \startitem God \stopitem
> \stopitemize
> \stoptext
> 
> Greetings,
> 
> 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
> ___

___
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-11 Thread Pablo Rodriguez via ntg-context
On 4/11/22 20:46, Damien Thiriet via ntg-context wrote:
> [...]
> I design it as a two-cells xtable with itemized lists inside.
> How can I have the item mark on the right side?

Hi Damien,

I’m not sure I get your point, but this may be helpful:

 \startitem \inrightmargin{\currentitemnumber} Nietzsche\stopitem

Just in case it might give you some inspiration.

Cheers,

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

2022-04-11 Thread Damien Thiriet via ntg-context
Hi!

I am used to giving associative questions to my pupils,
something like

* connect the author with its ideas

Friedrich Nietzsche *  * "God is dead"
Woody Allen *  * "Nietzsche is dead, God is dead 
  and I don't feel so good"
God *  * "Nietzsche is dead"

I design it as a two-cells xtable with itemized lists inside.
How can I have the item mark on the right side?

\starttext
\startitemize [8]
\startitem Nietzsche \stopitem
\startitem Allen \stopitem
\startitem God \stopitem
\stopitemize
\stoptext

Greetings,

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] fixing indentation of xtable inside item

2021-11-22 Thread fv leung via ntg-context
add

\dontleavehmode

before the table

Andres Conrado Montoya via ntg-context  於 2021年11月23日
週二 上午7:58寫道:

> Considering the following MWE, I would like to know how I can get
> the table inside the item to be aligned with the item. It seems the
> tabel takes the width right, but it gets pushed to the left, disregarding
> the item's indentation.
>
> I think I read about this behaviour somewhere, but I have spent 4 hours
> looking for it in the manuals and I can't find it. :(
>
> Any help would be appreciated.
>
> %-----startwme
> \starttext
> \startitemize
> \item
>   Determine la {\sc an} de cada objetivo del microscopio, con los ángulos
> de la tabla y teniendo en cuenta lo siguiente: $n_{\text{aire}} = 1$ y
> $n_{\text{aceite de inmersión}} = 1.515$:
>   \blank
>   \startxtable[align=middle,option=stretch]
>   \startxtablebody[body]
>   \startxrow
>   \startxcell Objetivo 4x \stopxcell
>   \startxcell $n=1$ \stopxcell
>   \startxcell $\alpha=5.8$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \startxrow
>   \startxcell Objetivo 10x \stopxcell
>   \startxcell $n=1$ \stopxcell
>   \startxcell $\alpha=14.5$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \startxrow
>   \startxcell Objetivo 40x \stopxcell
>   \startxcell $n=1$ \stopxcell
>   \startxcell $\alpha=40.5$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \stopxtablebody
>   \startxtablefoot[foot]
>   \startxrow
>   \startxcell Objetivo 100x \stopxcell
>   \startxcell $n=1.515$ \stopxcell
>   \startxcell $\alpha=55.6$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \stopxtablefoot
>   \stopxtable
>
> \stopitemize
> \stoptext
> %-startwme
>
>
> --
> Andrés Conrado Montoya
> Andi Kú
> andresconr...@gmail.com
> http://sesentaycuatro.com
> http://messier87.com
> http://chiquitico.org
> 
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
> 
>
> “You develop an instant global consciousness, a people orientation, an
> intense dissatisfaction with the state of the world, and a compulsion to do
> something about it. From out there on the moon, international politics look
> so petty. You want to grab a politician by the scruff of the neck and drag
> him a quarter of a million miles out and say, ‘Look at that, you son of a
> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>
> ___
> 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] fixing indentation of xtable inside item

2021-11-22 Thread Andres Conrado Montoya via ntg-context
Considering the following MWE, I would like to know how I can get the table
inside the item to be aligned with the item. It seems the tabel takes the
width right, but it gets pushed to the left, disregarding the item's
indentation.

I think I read about this behaviour somewhere, but I have spent 4 hours
looking for it in the manuals and I can't find it. :(

Any help would be appreciated.

%-startwme
\starttext
\startitemize
\item
  Determine la {\sc an} de cada objetivo del microscopio, con los ángulos
de la tabla y teniendo en cuenta lo siguiente: $n_{\text{aire}} = 1$ y
$n_{\text{aceite de inmersión}} = 1.515$:
  \blank
  \startxtable[align=middle,option=stretch]
  \startxtablebody[body]
  \startxrow
  \startxcell Objetivo 4x \stopxcell
  \startxcell $n=1$ \stopxcell
  \startxcell $\alpha=5.8$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \startxrow
  \startxcell Objetivo 10x \stopxcell
  \startxcell $n=1$ \stopxcell
  \startxcell $\alpha=14.5$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \startxrow
  \startxcell Objetivo 40x \stopxcell
  \startxcell $n=1$ \stopxcell
  \startxcell $\alpha=40.5$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \stopxtablebody
  \startxtablefoot[foot]
  \startxrow
  \startxcell Objetivo 100x \stopxcell
  \startxcell $n=1.515$ \stopxcell
  \startxcell $\alpha=55.6$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \stopxtablefoot
  \stopxtable

\stopitemize
\stoptext
%-startwme


-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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] Blank line after \item: MkIV vs LMTX and how to properly get rid of it

2021-09-30 Thread Vladimir Lomov via ntg-context
Hello.

Consider the following small example:

 8< --
\starttext

\startitemize[n]
\item \input tufte
\item \placefigure[right,none]{}{\externalfigure[cow]}%
  \input tufte
\item \blank[overlay]%
  \placefigure[right,none]{}{\externalfigure[cow]}%
  \input tufte
\stopitemize

\startitemize[n,intext]
\item \input tufte
\item \placefigure[right,none]{}{\externalfigure[cow]}%
  \input tufte
\item \blank[overlay]%
  \placefigure[right,none]{}{\externalfigure[cow]}%
  \input tufte
\stopitemize

\stoptext
 8< --

I see a difference in MkIV and LMTX work:
- MkIV always put a blank line despite '\blank[overlay]' command;
- with \blank[overlay] and 'intext' option LMTX clutters item label (number in
  this case).

Q1: is this the expected behavior for MkIV and LMTX? I found a recipe with
  \blank[overlay] in the mailing list.
Q2: is it expected that LMTX will clutter item label when I use
  \blank[overlay]? I suspect the answer is "yes" due to the option name.
Q3: how to prevent blank line insertion in such case: an item with text
  framing a picture (on right side or on left side but the picture is below
  the item label)?

---
WBR, Vladimir Lomov

-- 
Without freedom of choice there is no creativity.
-- Kirk, "The return of the Archons", stardate 3157.4


signature.asc
Description: PGP signature
___
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] margin of inner item group

2021-09-07 Thread Sylvain Hubert via ntg-context
Thanks but I believe 'distance' means ' * <--> text',
while margin means '<--> * text'.

On 07/09/2021, fv leung via ntg-context  wrote:
> Use
>
> distance=...
>
> instead of
>
> margin=...
>
> .
>
> 在 2021年9月7日週二 16:58,Sylvain Hubert via ntg-context  寫道:
>
>> Dear List,
>>
>> Does anyone know how to set the margin of an inner item group? The
>> natural way does not seem to work:
>>
>> \showframe
>> \starttext
>> \startitemize[margin=5em]
>> \item 1
>> \startitemize[margin=10em]
>> \item 1
>> \item 2
>> \item 3
>> \stopitemize
>> \item 2
>> \item 3
>> \stopitemize
>> \stoptext
>>
>> In the doc above, only the outer item group has a margin.
>>
>> Any help will be 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] margin of inner item group

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

distance=...

instead of

margin=...

.

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

> Dear List,
>
> Does anyone know how to set the margin of an inner item group? The
> natural way does not seem to work:
>
> \showframe
> \starttext
> \startitemize[margin=5em]
> \item 1
> \startitemize[margin=10em]
> \item 1
> \item 2
> \item 3
> \stopitemize
> \item 2
> \item 3
> \stopitemize
> \stoptext
>
> In the doc above, only the outer item group has a margin.
>
> Any help will be 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] margin of inner item group

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

Does anyone know how to set the margin of an inner item group? The
natural way does not seem to work:

\showframe
\starttext
\startitemize[margin=5em]
\item 1
\startitemize[margin=10em]
\item 1
\item 2
\item 3
\stopitemize
\item 2
\item 3
\stopitemize
\stoptext

In the doc above, only the outer item group has a margin.

Any help will be 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] xtable as list item (again)

2021-06-16 Thread Pablo Rodriguez
On 6/16/21 9:56 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 15.06.2021 um 19:57:
>>[...]
>>\showframe\showstruts
>>\starttext
>>\startitemize[n][margin=yes]
>>\item a
>>\item
>>  \startembeddedxtable[option={stretch, width}]
>>  \dorecurse{25}{\startxrow
>>\startxcell \Characters{\recurselevel}\stopxcell
>>\startxcell \characters{\recurselevel}\stopxcell
>>  \stopxrow}
>>\stopembeddedxtable
>
> \item
>\startfixed
>  % put your table here
>\stopfixed

Many thanks for your help, Wolfgang.

This worked like a charm.

First time I’m aware of this command.

Many thanks for your help again,

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

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


Re: [NTG-context] xtable as list item (again)

2021-06-16 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 15.06.2021 um 19:57:

Dear list,

I already posted a similar question some time ago
(https://mailman.ntg.nl/pipermail/ntg-context/2021/101021.html), but I
got no reply.

I have the following sample:

   \showframe\showstruts
   \starttext
   \startitemize[n][margin=yes]
   \item a
   \item
 \startembeddedxtable[option={stretch, width}]
 \dorecurse{25}{\startxrow
   \startxcell \Characters{\recurselevel}\stopxcell
   \startxcell \characters{\recurselevel}\stopxcell
 \stopxrow}
   \stopembeddedxtable



\item
  \startfixed
% put your table here
  \stopfixed

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] xtable as list item (again)

2021-06-15 Thread Pablo Rodriguez
Dear list,

I already posted a similar question some time ago
(https://mailman.ntg.nl/pipermail/ntg-context/2021/101021.html), but I
got no reply.

I have the following sample:

  \showframe\showstruts
  \starttext
  \startitemize[n][margin=yes]
  \item a
  \item
\startembeddedxtable[option={stretch, width}]
\dorecurse{25}{\startxrow
  \startxcell \Characters{\recurselevel}\stopxcell
  \startxcell \characters{\recurselevel}\stopxcell
\stopxrow}
  \stopembeddedxtable
  \item b
  \stopitemize
  \stoptext

And I get two issues:

1. Item number in 2 is placed on the bottom of the xtable. I need it on
the top of the xtable.

2. There is an extra horizontal space before the xtable. How can I get
rid of it? (In my real-world document, the space before is huge. In any
case, it misplaces the xtable.)

Maybe my approach is wrong, but I need the xtable as part of a list (and
I need it to strecht it horizontally).

Does anyone know how to achieve this?

Many thanks for your help,

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

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


Re: [NTG-context] How to reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
Thanks for the link to the post.
Alain

Le 26/02/2021 à 19:57, Aditya Mahajan a
  écrit :


  On Fri, 26 Feb 2021, Alain Delmotte wrote:


  

Thanks, that answered all my requirements.

  
  
This post illustrates the effect of each keyword for spacing:

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


  
I suppose that the rule "not mixing keywords and assignment in the same
argument" is valid for all setups having multiples commands.

  
  
Yes, there are no commands in ConTeXt where keyword and assignments are mixed in the options.

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

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


  


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

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


Re: [NTG-context] How to reduce the inter-item space

2021-02-26 Thread Aditya Mahajan
On Fri, 26 Feb 2021, Alain Delmotte wrote:

> 
> Thanks, that answered all my requirements.

This post illustrates the effect of each keyword for spacing:

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

> I suppose that the rule "not mixing keywords and assignment in the same
> argument" is valid for all setups having multiples commands.

Yes, there are no commands in ConTeXt where keyword and assignments are mixed 
in the options.

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

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


Re: [NTG-context] 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] Forcing indentation on item groups

2021-02-02 Thread Jairo A. del Rio
Oh, cool. Thank you very much! :D

Jairo

El mar., 2 de feb. de 2021 11:46 p. m., Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> escribió:

> Jairo A. del Rio schrieb am 03.02.2021 um 00:37:
> > Hi list. I have the following example:
> >
> >
> > \setupindenting[yes,medium]
> >
> > \starttext
> >
> > \startitemize[n,text][stopper=,lefttext=(,righttext=)]
> >
> > \startitem A\stopitem
> >
> >
> > \startitem B\stopitem
> >
> >
> > \startitem C\stopitem
> >
> > \stopitemize
> >
> > \stoptext
> >
> > The item group doesn't follow indentation. Adding \leavevmode only has
> > effect on the first line, and only insert a spurious space from the
> > second item on. How would I solve this? To be clear, I want indenting
> > before numbers, i.e. (1), not (1). Thanks beforehand.
>
> \setupitemize [each] [margin=standard]
>
> 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] Forcing indentation on item groups

2021-02-02 Thread Wolfgang Schuster

Jairo A. del Rio schrieb am 03.02.2021 um 00:37:

Hi list. I have the following example:


\setupindenting[yes,medium]

\starttext

\startitemize[n,text][stopper=,lefttext=(,righttext=)]

\startitem A\stopitem


\startitem B\stopitem


\startitem C\stopitem

\stopitemize

\stoptext

The item group doesn't follow indentation. Adding \leavevmode only has 
effect on the first line, and only insert a spurious space from the 
second item on. How would I solve this? To be clear, I want indenting 
before numbers, i.e. (1), not (1). Thanks beforehand.


\setupitemize [each] [margin=standard]

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] Forcing indentation on item groups

2021-02-02 Thread Jairo A. del Rio
Hi list. I have the following example:


\setupindenting[yes,medium]

\starttext

\startitemize[n,text][stopper=,lefttext=(,righttext=)]

\startitem A\stopitem


\startitem B\stopitem


\startitem C\stopitem

\stopitemize

\stoptext

The item group doesn't follow indentation. Adding \leavevmode only has
effect on the first line, and only insert a spurious space from the second
item on. How would I solve this? To be clear, I want indenting before
numbers, i.e. (1), not (1). Thanks beforehand.

Jairo
___
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] xtable as list item

2021-01-12 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \starttext
  \startitemize[n][margin=yes]
  \item a
  \item
\startembeddedxtable[option={stretch, width}]
\dorecurse{25}{\startxrow
  \startxcell \Characters{\recurselevel}\stopxcell
  \startxcell \characters{\recurselevel}\stopxcell
\stopxrow}
  \stopembeddedxtable
  \stopitemize
  \stoptext

I want to add the xtable as a list item. I’m experiencing two issues:

1. Item number is placed at the bottom of the xtable.

2. There is an added horizontal space, so that the xtable has a minimal
indentation that the first item doesn’t have. (In my real document, this
horizontal space is huge.)

Is there any way to suppress both issues?

Many thanks for your help,

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

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


Re: [NTG-context] indentation of item separators

2020-11-09 Thread Sylvain Hubert
On Mon, 9 Nov 2020 at 20:35, Pablo Rodriguez  wrote:

> On 11/9/20 8:09 PM, Sylvain Hubert wrote:
> > Dear List,
> >
> > In the following example, what is indented is the text instead of the
> > numbers.
> > [...]
> > Does anyone know how to indent the whole item group altogether?
>
> Hi Sylvain,
>
> margin is the option here, not indenting.
>
> You can see the difference:
>
>   \showframe\showgrid
>   \starttext
>   \startitemize[n, packed][indenting=2em]
>   \item abc
>   \stopitemize
>   \startitemize[n, packed][margin=2em]
>   \item def
>   \stopitemize
>   \startitemize[n, packed][margin=2em,indenting=2em]
>   \item ghi
>   \stopitemize
>   \stoptext
>
> I hope it helps,
>

Thanks again for the help, Pablo!

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] indentation of item separators

2020-11-09 Thread Pablo Rodriguez
On 11/9/20 8:09 PM, Sylvain Hubert wrote:
> Dear List,
>
> In the following example, what is indented is the text instead of the
> numbers.
> [...]
> Does anyone know how to indent the whole item group altogether?

Hi Sylvain,

margin is the option here, not indenting.

You can see the difference:

  \showframe\showgrid
  \starttext
  \startitemize[n, packed][indenting=2em]
  \item abc
  \stopitemize
  \startitemize[n, packed][margin=2em]
  \item def
  \stopitemize
  \startitemize[n, packed][margin=2em,indenting=2em]
  \item ghi
  \stopitemize
  \stoptext

I hope it helps,

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

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


[NTG-context] indentation of item separators

2020-11-09 Thread Sylvain Hubert
Dear List,

In the following example, what is indented is the text instead of the
numbers.

\starttext
\startitemize[n, packed][indenting=2em]
\item abc
\item def
\item ghi
\stopitemize
\stoptext

Does anyone know how to indent the whole item group altogether?

Thanks!

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] How to get the last item from an XML node

2020-09-22 Thread Denis Maier

Am 22.09.2020 um 09:18 schrieb Taco Hoekwater:




On 21 Sep 2020, at 18:31, Denis Maier  wrote:

Hi

struggling again: Shouldn't the code below give me the last element under 
? Right now \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} gives 
me nothing...

(Use case is that I want to have a frame above the table and one bar below. So 
I think I should wrap the last line in the \startxtablefoot ...\stopxtablefoot, 
i.e., I need one command for the last element, and one for the rest (Or is 
there a better way?). What would be the everything but the last?

What am I missing?


You need to read some more on the "Expressions and filters” chapter of the xml 
manual, as it does not work quite the way you think. Here is a quick fix:




\startxmlsetups xml:table:tbody
 \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)}


\xmlfilter{#1}{/tr[position()==last()]/command(xml:table:tbody:tr)}

Best wishes,
Taco


Thanks! That works. I have to admit, it's not entirely clear to me.

I adapted my pattern from the one given on page 78: /whocares/last()
Obviously, it's not that easy.

Best,
Denis


___
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 get the last item from an XML node

2020-09-22 Thread Taco Hoekwater


> On 21 Sep 2020, at 18:31, Denis Maier  wrote:
> 
> Hi
> 
> struggling again: Shouldn't the code below give me the last element under 
> ? Right now \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} 
> gives me nothing...
> 
> (Use case is that I want to have a frame above the table and one bar below. 
> So I think I should wrap the last line in the \startxtablefoot 
> ...\stopxtablefoot, i.e., I need one command for the last element, and one 
> for the rest (Or is there a better way?). What would be the everything but 
> the last?
> 
> What am I missing?

You need to read some more on the "Expressions and filters” chapter of the xml 
manual, as it does not work quite the way you think. Here is a quick fix:

> 
> 
> \startxmlsetups xml:table:tbody
> \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)}

\xmlfilter{#1}{/tr[position()==last()]/command(xml:table:tbody:tr)}

Best wishes,
Taco

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

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


[NTG-context] How to get the last item from an XML node

2020-09-21 Thread Denis Maier

Hi

struggling again: Shouldn't the code below give me the last element 
under ? Right now 
\xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} gives me nothing...


(Use case is that I want to have a frame above the table and one bar 
below. So I think I should wrap the last line in the \startxtablefoot 
...\stopxtablefoot, i.e., I need one command for the last element, and 
one for the rest (Or is there a better way?). What would be the 
everything but the last?


What am I missing?

Thanks again,
Denis

==
\setupxtable[frame=off,split=yes]
\setupxtable[head][topframe=on,bottomframe=on]
\setupxtable[body][]
\setupxtable[foot][bottomframe=on]

\startbuffer[test]



   
    
  5
  A
    
        
  7
  B
    
        
  2
  C
    
  


\stopbuffer

\startxmlsetups xml:test
    \xmlsetsetup{#1}{*}{-}
    \xmlsetsetup{#1}{article}{xml:*}
    \xmlsetsetup{#1}{table}{xml:table}
    \stopxmlsetups

\xmlregistersetup{xml:test}

\startxmlsetups xml:article
\starttext
    \xmlflush{#1}
\stoptext
\stopxmlsetups

\startxmlsetups xml:table
  \startembeddedxtable
        \xmlfilter{#1}{/tbody/command(xml:table:tbody)}
  \stopembeddedxtable
\stopxmlsetups

\startxmlsetups xml:table:tbody
    \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)}
\stopxmlsetups

\startxmlsetups xml:table:tbody:tr
    \startxrow
    \xmlfilter{#1}{/td/command(xml:table:tbody:tr:td)}
    \stopxrow
\stopxmlsetups

\startxmlsetups xml:table:tbody:tr:td
    \startxcell
        \xmlflush{#1}
    \stopxcell
\stopxmlsetups

\xmlprocessbuffer{test}{test}{}
==
___
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] lpath to select last item

2020-07-08 Thread Pablo Rodriguez
On 7/8/20 11:59 AM, Hans Hagen wrote:
> On 7/7/2020 10:46 PM, Pablo Rodriguez wrote:
>> [...]
>> Which would be the right lpath to select the last item in each list?
> This should work but we're one off so i need to fix that.
>
> \startbuffer[demo]
> 
>
>  first
>  any
>  last
>
> 
> \stopbuffer
>
> \startxmlsetups xml:demo:base
>\xmlsetsetup{#1}{document|ul|li}{xml:*}
>\xmlsetsetup{#1}{ul/li[1]}{xml:item:first}
>\xmlsetsetup{#1}{ul/li[-1]}{xml:item:last}
> \stopxmlsetups

Many thanks for your help, Hans.

This is like magic to me. But I’m afraid that my description was inaccurate.

I need to mark the last item from nested lists, but considering each
 (such as in my sample), not the whole document.

Just in case it isn’t clear, this is the XML source with desired items
marked:


Heading
  
list***this one***
  
Heading
  
list

   list ***this one***

  
Heading
  
list

  list
  
list   ***this one***
  

  


I hope it is clear now that it is the last item in a nested list, but
for each  element.

Many thanks for your help again,

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

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


Re: [NTG-context] lpath to select last item

2020-07-08 Thread Hans Hagen

On 7/7/2020 10:46 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

   \startbuffer[demo]
 
 Heading
   
 list
   
 Heading
   
 list
 
list
 
   
 Heading
   
 list
 
   list
   
 list
   
 
   
 
   \stopbuffer

   \startxmlsetups xml:demo:base
   \xmlsetsetup{#1}{document|h2|ul|li}{xml:*}
   %~ \xmlsetsetup{#1}{ul/li/!ul}{xml:last:item} % nothing changes
   %~ \xmlsetsetup{#1}{ul/li/!li}{xml:last:item} % blank item inserted
   %~ \xmlsetsetup{#1}{h2/**/ul/li}{xml:last:item} % nothing changes
   \xmlsetsetup{#1}{h2/***/ul/li/!ul}{xml:last:item} % shouldn’t be
this one?
   \stopxmlsetups

   \xmlregistersetup{xml:demo:base}

   \startxmlsetups xml:document
   \xmlflush{#1}
   \stopxmlsetups

   \startxmlsetups xml:h2
   \section{\xmlflush{#1}}
   \stopxmlsetups

   \startxmlsetups xml:ul
   \startitemize\xmlflush{#1}\stopitemize
   \stopxmlsetups

   \startxmlsetups xml:li
   \startitem\xmlflush{#1}\stopitem
   \stopxmlsetups

   \startxmlsetups xml:last:item
   \startitem\red\xmlflush{#1}\stopitem
   \stopxmlsetups

   \starttext
   \xmlprocessbuffer{main}{demo}{}
   \stoptext

I need to be able to select the last  (the one with no  child)
in the  element.

I thought that the lpath for that would be "h2/***/ul/li/!ul", but I
don’t know what I’m missing, since it doesn’t work at all.

Which would be the right lpath to select the last item in each list?

This should work but we're one off so i need to fix that.

\startbuffer[demo]

  
first
any
last
  

\stopbuffer

\startxmlsetups xml:demo:base
  \xmlsetsetup{#1}{document|ul|li}{xml:*}
  \xmlsetsetup{#1}{ul/li[1]}{xml:item:first}
  \xmlsetsetup{#1}{ul/li[-1]}{xml:item:last}
\stopxmlsetups

\xmlregistersetup{xml:demo:base}

\startxmlsetups xml:document
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:ul
 \startitemize
   \xmlflush{#1}
 \stopitemize
\stopxmlsetups

\startxmlsetups xml:li
  \startitem
\xmlflush{#1}
  \stopitem
\stopxmlsetups

\startxmlsetups xml:item:first
  \startitem
\color[blue]{\xmlflush{#1}}
  \stopitem
\stopxmlsetups

\startxmlsetups xml:item:last
  \startitem
\color[red]{\xmlflush{#1}}
  \stopitem
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext

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

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


[NTG-context] lpath to select last item

2020-07-07 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \startbuffer[demo]

Heading
  
list
  
Heading
  
list

   list

  
Heading
  
list

  list
  
list
  

  

  \stopbuffer

  \startxmlsetups xml:demo:base
  \xmlsetsetup{#1}{document|h2|ul|li}{xml:*}
  %~ \xmlsetsetup{#1}{ul/li/!ul}{xml:last:item} % nothing changes
  %~ \xmlsetsetup{#1}{ul/li/!li}{xml:last:item} % blank item inserted
  %~ \xmlsetsetup{#1}{h2/**/ul/li}{xml:last:item} % nothing changes
  \xmlsetsetup{#1}{h2/***/ul/li/!ul}{xml:last:item} % shouldn’t be
this one?
  \stopxmlsetups

  \xmlregistersetup{xml:demo:base}

  \startxmlsetups xml:document
  \xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xml:h2
  \section{\xmlflush{#1}}
  \stopxmlsetups

  \startxmlsetups xml:ul
  \startitemize\xmlflush{#1}\stopitemize
  \stopxmlsetups

  \startxmlsetups xml:li
  \startitem\xmlflush{#1}\stopitem
  \stopxmlsetups

  \startxmlsetups xml:last:item
  \startitem\red\xmlflush{#1}\stopitem
  \stopxmlsetups

  \starttext
  \xmlprocessbuffer{main}{demo}{}
  \stoptext

I need to be able to select the last  (the one with no  child)
in the  element.

I thought that the lpath for that would be "h2/***/ul/li/!ul", but I
don’t know what I’m missing, since it doesn’t work at all.

Which would be the right lpath to select the last item in each list?

Many thanks for your help,

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

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


Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Gerben Wierda


> On 1 May 2020, at 13:28, Hans Hagen  wrote:
> 
> On 5/1/2020 10:21 AM, Gerben Wierda wrote:
>> code it back to a \ ? E.g. something like
>>{ ‘\U{XXX}', '\' },
> \utfchar{100}
> \Uchar 100

Yes, but the question was: how do I code this in the XML and get it through my 
XML-lua-METAPOST-textext() path so that e.g.  or  in the XML end up 
as \ in my textext() string?

E.g. a 
 in XML becomes a \n when lmtx XML handling has read the XML (so 
gets transformed on read). I’ve been thinking about the route 
 -> \r -> \ 
(so, misusing \r to code a TeX-\ in the XML, but that would probably not robust.

The question is more: what is a good UTF8 character to use (the first 32 would 
be good candidates if they would work and end in the strings that xml.foo() of 
lmtx produces).

G

> 
> -
>  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] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Gerben Wierda


> On 1 May 2020, at 09:38, Hans Hagen  wrote:
> 
> On 5/1/2020 1:44 AM, Gerben Wierda wrote:
>>{ ‘\n', ‘\\strut' },
> often a \zwj or \zwno also works ok (has zero dimensions, contraty to strut; 
> you could also try \crlf

I tried \crlf{} and that worked too (the “{}” because I do not know what comes 
after even if I think any whitespace is eaten and to influence any catcode 
trickery, just feels it is more robust than a space).

Hans, an additional question about lmtx’s XML interface. As I want the TeX 
special characters to be able to be part of a label, I replace all of them. 
That works. But what if I would like a way to introduce TeX commands again by 
using some other UTF8 character, would there be a character that curvies the 
pass through lmtx, can be used in a lua table so that I can  (in a preferred 
order) get unescaped characters passed that flow?

E.g. code a \ as some weird UTF8 character in the XML file, and in that table I 
use

  local rep = lpeg.replacer {
   { '\n', '\\crlf{}' },
   { '{', '{\\textbraceleft}' },
   { '}', '{\\textbraceright}' },
   { '#', '{\\texthash}' },
   { '$', '{\\textdollar}' },
   { '&', '{\\textampersand}' },
   { '%', '{\\textpercent}' },
   { '\\','{\\textbackslash}' },
   { '|', '{\\textbar}' },
   { '_', '{\\textunderscore}' },
   { '~', '{\\textasciitilde}' },
   { '^', '{\\textasciicircum}' },
   { '"', "\"&ditto&\"" },
  }

code it back to a \ ? E.g. something like

   { ‘\U{XXX}', '\' },


> 
> 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] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Hans Hagen

On 5/1/2020 1:45 PM, Gerben Wierda wrote:




On 1 May 2020, at 13:28, Hans Hagen  wrote:

On 5/1/2020 10:21 AM, Gerben Wierda wrote:

code it back to a \ ? E.g. something like
{ ‘\U{XXX}', '\' },

\utfchar{100}
\Uchar 100


Yes, but the question was: how do I code this in the XML and get it through my 
XML-lua-METAPOST-textext() path so that e.g.  or  in the XML end up 
as \ in my textext() string?

E.g. a 
 in XML becomes a \n when lmtx XML handling has read the XML (so gets 
transformed on read). I’ve been thinking about the route 
 -> \r -> \ (so, 
misusing \r to code a TeX-\ in the XML, but that would probably not robust.

The question is more: what is a good UTF8 character to use (the first 32 would 
be good candidates if they would work and end in the strings that xml.foo() of 
lmtx produces).

you could try

\xmltexentity{foo}{[overloaded foo]}



-
  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] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Hans Hagen

On 5/1/2020 1:45 PM, Gerben Wierda wrote:




On 1 May 2020, at 13:28, Hans Hagen  wrote:

On 5/1/2020 10:21 AM, Gerben Wierda wrote:

code it back to a \ ? E.g. something like
{ ‘\U{XXX}', '\' },

\utfchar{100}
\Uchar 100


Yes, but the question was: how do I code this in the XML and get it through my 
XML-lua-METAPOST-textext() path so that e.g.  or  in the XML end up 
as \ in my textext() string?

E.g. a 
 in XML becomes a \n when lmtx XML handling has read the XML (so gets 
transformed on read). I’ve been thinking about the route 
 -> \r -> \ (so, 
misusing \r to code a TeX-\ in the XML, but that would probably not robust.

The question is more: what is a good UTF8 character to use (the first 32 would 
be good candidates if they would work and end in the strings that xml.foo() of 
lmtx produces).

did you try the attached approach? (a recent lmtx)

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
-


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

maillist : ntg-context@ntg.nl / 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 do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Hans Hagen

On 5/1/2020 10:21 AM, Gerben Wierda wrote:

code it back to a \ ? E.g. something like

    { ‘\U{XXX}', '\' },

\utfchar{100}
\Uchar 100

-
  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] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Hans Hagen

On 5/1/2020 1:44 AM, Gerben Wierda wrote:

    { ‘\n', ‘\\strut' },
often a \zwj or \zwno also works ok (has zero dimensions, contraty to 
strut; you could also try \crlf


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] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda

> On 30 Apr 2020, at 22:54, Wolfgang Schuster 
>  wrote:
> 
> Gerben Wierda schrieb am 30.04.2020 um 22:47:
>> In normal TeX, when I type
>> AapAap
>> I get something like
>> Aap
>> Aap
>> But inside a \framed[align=]{} the empty line disappears. How do I get it 
>> back?
>> Minimal example:
>> \starttext
>> TestingTesting
>> \page
>> \framed[align=flushleft]{TestingTesting}
>> \stoptext
> 
> Use \blank

Too happy too soon. And I recall I ran into this earlier a while ago in another 
setting ago. But I thought of a solution.

Background:

I am automatically converting input from an XML file to METAPOST/ConTeXt. The 
input may contain one or more newlines.The text must end up in 
\framed[align=??, width=??] to be typeset.

I use lua to convert and make it safe to pass to METAPOST as a string argument 
that METAPOST can pass on to textext(), using the following function:

function doubleQuotableEscapedConTeXtString( str)
  local rep = lpeg.replacer {
   { '\n', '\\blank ' },
   { '{', '{\\textbraceleft}' },
   { '}', '{\\textbraceright}' },
   { '#', '{\\texthash}' },
   { '$', '{\\textdollar}' },
   { '&', '{\\textampersand}' },
   { '%', '{\\textpercent}' },
   { '\\','{\\textbackslash}' },
   { '|', '{\\textbar}' },
   { '_', '{\\textunderscore}' },
   { '~', '{\\textasciitilde}' },
   { '^', '{\\textasciicircum}' },
   { '"', "\"&ditto&\"" },
  }
  return rep:match(str)
end

Where it now says \\blank, it used to say .

Problem

 gets me what I want if there is one \n (it turns into one new line), but 
with two \n in succession it still gets me only a single ’newline'
\\blank gets me what I want if there are multiple newlines, but gets me an 
extra empty line when I only want ’next line’ and multiple \blanks do not work 

But I found the solution by using \strut\\ instead of \blank. In the above 
table:

   { ‘\n', ‘\\strut' },

This fools ConTeXt in thinking there actually is something on that line and so 
multiple \\ will work.

G___
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 do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda


> On 30 Apr 2020, at 22:51, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 30.04.2020 um 22:47 schrieb Gerben Wierda :
>> 
>> In normal TeX, when I type 
>> 
>> AapAap
>> 
>> I get something like 
>> 
>> Aap
>> 
>> Aap
>> 
>> But inside a \framed[align=]{} the empty line disappears. How do I get it 
>> back?
> 
> Try \framedtext instead; multi line text needs a \vbox, and \framedtext does 
> that. (If I understood correctly.)
> 
> Maybe you need to set the align option.

I did set the align option to get a vbox.

G

> 
> Best, Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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 do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
Brilliant! Thank you!

> On 30 Apr 2020, at 22:54, Wolfgang Schuster 
>  wrote:
> 
> Gerben Wierda schrieb am 30.04.2020 um 22:47:
>> In normal TeX, when I type
>> AapAap
>> I get something like
>> Aap
>> Aap
>> But inside a \framed[align=]{} the empty line disappears. How do I get it 
>> back?
>> Minimal example:
>> \starttext
>> TestingTesting
>> \page
>> \framed[align=flushleft]{TestingTesting}
>> \stoptext
> 
> Use \blank
> 
> 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 do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Wolfgang Schuster

Gerben Wierda schrieb am 30.04.2020 um 22:47:

In normal TeX, when I type

AapAap

I get something like

Aap

Aap

But inside a \framed[align=]{} the empty line disappears. How do I get 
it back?


Minimal example:

\starttext

TestingTesting
\page

\framed[align=flushleft]{TestingTesting}
\stoptext


Use \blank

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 do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Henning Hraban Ramm


> Am 30.04.2020 um 22:47 schrieb Gerben Wierda :
> 
> In normal TeX, when I type 
> 
> AapAap
> 
> I get something like 
> 
> Aap
> 
> Aap
> 
> But inside a \framed[align=]{} the empty line disappears. How do I get it 
> back?

Try \framedtext instead; multi line text needs a \vbox, and \framedtext does 
that. (If I understood correctly.)

Maybe you need to set the align option.

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

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


[NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
In normal TeX, when I type 

AapAap

I get something like 

Aap

Aap

But inside a \framed[align=]{} the empty line disappears. How do I get it back?

Minimal example:

\starttext

TestingTesting
\page

\framed[align=flushleft]{TestingTesting}
\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] Item group parentheses

2020-01-07 Thread context

Hello,

could auto-generated syntax for \setupitemgroup be added to wiki?

There is no notice about "lefttext" or "righttext" keys:

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

(yes, keys "left" and "right" are mentioned here.)

TIA.

Best regards,

Lukas


On 2019-12-26 20:07, Wolfgang Schuster wrote:

Jairo A. del Rio schrieb am 26.12.2019 um 19:55:
I'm defining item groups in ConTeXt and I find the following issue: 
combining the "text" parameter with others automatically disables 
"left" and "right" keys, so numbers always appear enclosed in 
parentheses.


%What I expect:
%I. This ain't right
%What I get:
%(I) This ain't right
\defineitemgroup[erroneous]
\setupitemgroup[erroneous][1][R,text,continue][left=,right=.,stopper=]
\starttext
\starterroneous
\startitem This ain't right \stopitem
\stoperroneous
\stoptext

Maybe a bug, I want to know how to get the expected result. Thank you 
in advance.


You have to clear the values of the lefttext and righttext keys.

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] Item group parentheses

2019-12-26 Thread Wolfgang Schuster

Jairo A. del Rio schrieb am 26.12.2019 um 19:55:
I'm defining item groups in ConTeXt and I find the following issue: 
combining the "text" parameter with others automatically disables 
"left" and "right" keys, so numbers always appear enclosed in parentheses.


%What I expect:
%I. This ain't right
%What I get:
%(I) This ain't right
\defineitemgroup[erroneous]
\setupitemgroup[erroneous][1][R,text,continue][left=,right=.,stopper=]
\starttext
\starterroneous
\startitem This ain't right \stopitem
\stoperroneous
\stoptext

Maybe a bug, I want to know how to get the expected result. Thank you 
in advance.


You have to clear the values of the lefttext and righttext keys.

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] Item group parentheses

2019-12-26 Thread Jairo A. del Rio
I'm defining item groups in ConTeXt and I find the following issue:
combining the "text" parameter with others automatically disables "left"
and "right" keys, so numbers always appear enclosed in parentheses.

%What I expect:
%I. This ain't right
%What I get:
%(I) This ain't right
\defineitemgroup[erroneous]
\setupitemgroup[erroneous][1][R,text,continue][left=,right=.,stopper=]
\starttext
\starterroneous
\startitem This ain't right \stopitem
\stoperroneous
\stoptext

Maybe a bug, I want to know how to get the expected result. Thank you in
advance.


texstudio_HP2542.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] Setting tabulate table width with \textwidth inside an item group

2019-02-27 Thread Clyde Johnston
Thanks Wolfgang.  This is exactly what I was looking for and thanks for the
explanatory notes on the inter-column width.  New knowledge is always good!
:-D

I put braces around the contents of the items to make them consistent with
\starthead command which does not seem to contain the headstyle setting in
\startitemize to the head block.

Do I need braces for \starthead but not for \startitem?

\showframe

\starttext
\startitemize[n,3*broad,repeat][headstyle={\bf}]
\starthead A header \stophead
\startitemize[n,3*broad]
\startitem
\input ward
\starttabulate[|cp(.25\localhsize)|cp|]
\HL
\NC Column A \NC Column B \NC \NR
\HL
\NC 1 \NC 2 \NC \NR
\NC 2 \NC 3 \NC \NR
\NC 3 \NC 4 \NC \NR
\NC 4 \NC 5 \NC \NR
\NC 5 \NC 6 \NC \NR
\BL
\stoptabulate
\input ward
\stopitem
\startitemize[n,3*broad]
\stopitemize
\stoptext



-Original Message-
From: Wolfgang Schuster [mailto:wolfgang.schuster.li...@gmail.com] 
Sent: Thursday, February 28, 2019 12:13 AM
To: mailing list for ConTeXt users; Clyde Johnston
Subject: Re: [NTG-context] Setting tabulate table width with \textwidth
inside an item group

Clyde Johnston schrieb am 27.02.19 um 22:49:
> Dear List:
> 
> I have a tabulate table inside an indented item group and I would like 
> to set the width of the table to the \hbox size of the surrounding 
> text.  If I use \textwidth as a width parameter, the table spills into 
> the right margin (see attached).
> 
> What is the correct parameter to use to set the width of the table to 
> the width of the text in the item group?
> 
> _MWE_
> 
> \starttext
> 
> \showframe
> 
> \startitemize[n,3*broad]
> 
>      \startitem{%
> 
>      \input ward
> 
>      \starttabulate[|cp(.25\textwidth)|cp(.75\textwidth)|]
> 
>      \HL
> 
>      \NC Column A \NC Column B \NC \NR
> 
>      \HL
> 
>      \NC 1 \NC 2 \NC \NR
> 
>      \NC 2 \NC 3 \NC \NR
> 
>      \NC 3 \NC 4 \NC \NR
> 
>      \NC 4 \NC 5 \NC \NR
> 
>      \NC 5 \NC 6 \NC \NR
> 
>      \BL
> 
>      \stoptabulate
> 
>      \input ward
> 
>      }
> 
>      \stopitem
> 
> \stopitemize
> 
> \stoptext


1. There is a space between the columns which has to taken into account when
you set the width of the columns, in your example your tables has a width of
textwidth plus the distance between the columns.

2. \textwidth doesn’t in the argument for the items but you can use the
\localhsize length to get the current width of the text block.

3. You can let ConTeXt calculate the width of the second column which saves
you from guessing the needed value for the column width.

4. You don’t need braces around the content for the items.

\showframe

\starttext

\startitemize[n,3*broad]
 \startitem
 \input ward
 \starttabulate[|cp(.25\localhsize)|cp|]
 \FL
 \NC Column A \NC Column B \NC \NR
 \ML
 \NC 1 \NC 2 \NC \NR
 \NC 2 \NC 3 \NC \NR
 \NC 3 \NC 4 \NC \NR
 \NC 4 \NC 5 \NC \NR
 \NC 5 \NC 6 \NC \NR
 \LL
 \stoptabulate
 \input ward
 \stopitem
\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
___


Re: [NTG-context] Setting tabulate table width with \textwidth inside an item group

2019-02-27 Thread Wolfgang Schuster

Clyde Johnston schrieb am 27.02.19 um 22:49:

Dear List:

I have a tabulate table inside an indented item group and I would like 
to set the width of the table to the \hbox size of the surrounding 
text.  If I use \textwidth as a width parameter, the table spills into 
the right margin (see attached).


What is the correct parameter to use to set the width of the table to 
the width of the text in the item group?


_MWE_

\starttext

\showframe

\startitemize[n,3*broad]

     \startitem{%

     \input ward

     \starttabulate[|cp(.25\textwidth)|cp(.75\textwidth)|]

     \HL

     \NC Column A \NC Column B \NC \NR

     \HL

     \NC 1 \NC 2 \NC \NR

     \NC 2 \NC 3 \NC \NR

     \NC 3 \NC 4 \NC \NR

     \NC 4 \NC 5 \NC \NR

     \NC 5 \NC 6 \NC \NR

     \BL

     \stoptabulate

     \input ward

     }

     \stopitem

\stopitemize

\stoptext



1. There is a space between the columns which has to taken into account 
when you set the width of the columns, in your example your tables has a 
width of textwidth plus the distance between the columns.


2. \textwidth doesn’t in the argument for the items but you can use the 
\localhsize length to get the current width of the text block.


3. You can let ConTeXt calculate the width of the second column which 
saves you from guessing the needed value for the column width.


4. You don’t need braces around the content for the items.

\showframe

\starttext

\startitemize[n,3*broad]
\startitem
\input ward
\starttabulate[|cp(.25\localhsize)|cp|]
\FL
\NC Column A \NC Column B \NC \NR
\ML
\NC 1 \NC 2 \NC \NR
\NC 2 \NC 3 \NC \NR
\NC 3 \NC 4 \NC \NR
\NC 4 \NC 5 \NC \NR
\NC 5 \NC 6 \NC \NR
\LL
\stoptabulate
\input ward
\stopitem
\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] Setting tabulate table width with \textwidth inside an item group

2019-02-27 Thread Clyde Johnston
Dear List:

 

I have a tabulate table inside an indented item group and I would like to
set the width of the table to the \hbox size of the surrounding text.  If I
use \textwidth as a width parameter, the table spills into the right margin
(see attached).

 

What is the correct parameter to use to set the width of the table to the
width of the text in the item group?

 

MWE

 

\starttext

\showframe

\startitemize[n,3*broad]

\startitem{%

\input ward

\starttabulate[|cp(.25\textwidth)|cp(.75\textwidth)|]

\HL

\NC Column A \NC Column B \NC \NR

\HL

\NC 1 \NC 2 \NC \NR

\NC 2 \NC 3 \NC \NR

\NC 3 \NC 4 \NC \NR

\NC 4 \NC 5 \NC \NR

\NC 5 \NC 6 \NC \NR

\BL

\stoptabulate

\input ward

}

\stopitem

\stopitemize

\stoptext

 

Thanks,

Clyde

 



mwe.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] How to adjust inter item vertical space

2019-01-18 Thread Wolfgang Schuster



jdh schrieb am 16.01.19 um 10:48:


I want to fit a page with an itemized group of items.
The normal vertical spacing is to large and the [packed] doesn't give enough 
seperation between
items.  I should think that there's a simple way to adjust this with 
\setupitemize  command or even with \startitemize.  Is there?

I did try  \setupitemize[inbetween=\whitespace[medium]] , but it didn't do much 
or seemed to be applied
to every line and not just between item and 'medium' doesn't give much 
information.  Is there some way to specify a measurement to seperate between 
items such as   .5cm  for example?

\setupitemize [each] [inbetween={\blank[small]}]

or

\setupitemize [each] [inbetween={\blank[5mm]}]

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 adjust inter item vertical space

2019-01-16 Thread Otared Kavian
Hi,

You can define your own white space and then attribute it to each item, as in 
the following:

\setupwhitespace[big]
\startsetups[mywhitespace]
\setupwhitespace[small]
\setupblank[small]
\stopsetups
\setupitemize[each][inner=\directsetup{mywhitespace}]

\starttext
\input knuth

\startitemize
\dorecurse{3}{%
\startitem 
\input ward
\stopitem}
\stopitemize
\stoptext

Best regards: OK


> On 16 Jan 2019, at 10:48, jdh  wrote:
> 
> 
> 
> I want to fit a page with an itemized group of items.
> The normal vertical spacing is to large and the [packed] doesn't give enough 
> seperation between
> items.  I should think that there's a simple way to adjust this with 
> \setupitemize  command or even with \startitemize.  Is there?
> 
> I did try  \setupitemize[inbetween=\whitespace[medium]] , but it didn't do 
> much or seemed to be applied
> to every line and not just between item and 'medium' doesn't give much 
> information.  Is there some way to specify a measurement to seperate between 
> items such as   .5cm  for example?
> 
> 
> 
> Thanks
> ___
> 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 adjust inter item vertical space

2019-01-16 Thread jdh


I want to fit a page with an itemized group of items.
The normal vertical spacing is to large and the [packed] doesn't give enough 
seperation between
items.  I should think that there's a simple way to adjust this with 
\setupitemize  command or even with \startitemize.  Is there?

I did try  \setupitemize[inbetween=\whitespace[medium]] , but it didn't do much 
or seemed to be applied
to every line and not just between item and 'medium' doesn't give much 
information.  Is there some way to specify a measurement to seperate between 
items such as   .5cm  for example?



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

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

Re: [NTG-context] line break after \item, but not \stopitem

2018-10-09 Thread Wolfgang Schuster



Hans Hagen schrieb am 09.10.18 um 10:28:
inbetween is actually meant for spacing so there is logic deep down 
that put is between seccessive items depending on curcumstances  
hard to beat heuristics


Whether the second level \startitemize uses before or inbetween depends 
on the \c_strc_itemgroups_spacing_mode value which has no option to 
change it on the user level.


The simpler solution for the original problem is to use a enumeration 
for the first level items.


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

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

Re: [NTG-context] line break after \item, but not \stopitem

2018-10-09 Thread Damien Thiriet
Hans,

Thank you for your answer. 

> you can do this:
> 
> \setuppapersize[S6]
> \setupitemize[1][before={\page}]
> 
> \starttext
> 
> \startitemize[n]
> \startitem \input knuth \stopitem
> \stopitemize
> 
> \startitemize[continue]
> \startitem \input ward
>\startitemize[a]
>   \startitem first point \stopitem
>   \startitem second point \stopitem
>   \stopitem
>\stopitemize
> \stopitem
> \stopitemize
> 
> \stoptext
>

Unfortunately, I have a huge amount of level
1 items, only 10% of them enclosing some level-2 itemization. I bet it 
would be easier to insert \page with a perl script after each first 
\stopitem than embedding those 90% items within an itemization (as far
as I understand). That's what I did when I converted my beamer
presentation into conTeXt ones. In this case however,   the code would be 
far less readable, since those \page will be only for screen mode.

Is there any key I could use to introduce page breaks after each level 1
\stopitem ? 

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] line break after \item, but not \stopitem

2018-10-09 Thread Hans Hagen

On 10/9/2018 9:21 AM, Damien Thiriet wrote:

Hi list,

I am designing a presentation for my pupils (some lng exercices to
learn LibreOfficeDraw by doing). To be sure that they don't misview any
question, I decided to force a pagebreak after each first level item.

A question on TSE gave me the proper key to \setupitemize, but I am
facing an issue I didn't expect.

Given this MWE

\setuppapersize[S6]
\setupitemize[1][inbetween={\page}]

\starttext
\startitemize[n]
\startitem \input knuth
\stopitem
\startitem \input ward
\startitemize[a]
   \startitem first point \stopitem
   \startitem second point \stopitem
   \stopitem
\stopitemize


\stopitem
  \stopitemize


\stoptext

I expected a page break after each 1 level \stopitem, that is after
knuth's text and "second point". However the text is breaking before
first point, that is at the beginning of level 2 startitemize, which is
AFAIK semantically part of a level 1 item.
Do you have any idea to force page break *after* "second point" and not
*before* "first point" ?
inbetween is actually meant for spacing so there is logic deep down that 
put is between seccessive items depending on curcumstances  hard to 
beat heuristics


you can do this:

\setuppapersize[S6]
\setupitemize[1][before={\page}]

\starttext

\startitemize[n]
\startitem \input knuth \stopitem
\stopitemize

\startitemize[continue]
\startitem \input ward
   \startitemize[a]
  \startitem first point \stopitem
  \startitem second point \stopitem
  \stopitem
   \stopitemize
\stopitem
\stopitemize

\stoptext




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

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

[NTG-context] line break after \item, but not \stopitem

2018-10-09 Thread Damien Thiriet
Hi list,

I am designing a presentation for my pupils (some lng exercices to
learn LibreOfficeDraw by doing). To be sure that they don't misview any
question, I decided to force a pagebreak after each first level item.

A question on TSE gave me the proper key to \setupitemize, but I am
facing an issue I didn't expect.

Given this MWE

\setuppapersize[S6]
\setupitemize[1][inbetween={\page}]

\starttext
\startitemize[n]
\startitem \input knuth 
\stopitem
\startitem \input ward 
   \startitemize[a]
  \startitem first point \stopitem
  \startitem second point \stopitem
  \stopitem
   \stopitemize
\stoptext

I expected a page break after each 1 level \stopitem, that is after
knuth's text and "second point". However the text is breaking before
first point, that is at the beginning of level 2 startitemize, which is
AFAIK semantically part of a level 1 item.
Do you have any idea to force page break *after* "second point" and not
*before* "first point" ?

Thanks,

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
___

[NTG-context] Align an item with the top of a picture

2017-04-17 Thread Fabrice Couvreur
Hello,
How to align item a. With the top of the picture?
Thank you
Fabrice

\useMPlibrary[dum]
\starttext
\startlinecorrection[blank]
  \startmidaligned
\startcombination[2*1]
{\externalfigure[dummy][height=6cm]}{}
{\framedtext[location=hang,width=5cm,frame=off]{\startitemize[a]
\item
\item
\item
\item
\stopitemize}}{}
\stopcombination
\stopmidaligned
\stoplinecorrection
\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] two framed item lists side by side

2017-03-01 Thread Pablo Rodriguez
On 02/09/2017 06:21 PM, Csikos Bela wrote:
> Dear context user:
> 
> I would like to put two itemized lists side by side (1cm between them), top 
> aligned.
> I inserted each lists in framedtext and tried to use combinations but the 
> distance
> between the two frames is too big, and the list are not top aligned.
> What would be a correct solution? I don't need the frame to be drawn.
> Why distance=1cm and width=12cm have no effect in my code?

Hi Csikos,

I guess another approach (not ideal,  but it works) would be to use an
xtable:

\showframe
\setupitemize[each][packed,joinedup,n]
[stopper=.~,itemalign=flushright]
\starttext
\startxtable[split=yes, option=stretch]
\startxrow
\startxcell
\startitemize
    \item In The Flesh? 3:19
    \item The Thin Ice  2:29
\item Another Brick In The Wall (Part 1)3:09
\item The Happiest Days Of Our Lives1:50
\stopitemize
\stopxcell
\startxcell
\startitemize
    \item Hey You   4:41
\item Is There Anybody Out There?   2:40
\stopitemize
\stopxcell
\stopxrow
\stopxtable
\stoptext

Font size must be smaller, otherwise it won’t fit in page margins.

Just in case it might help,

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

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

[NTG-context] two framed item lists side by side

2017-02-09 Thread Csikos Bela
Dear context user:

I would like to put two itemized lists side by side (1cm between them), top 
aligned.
I inserted each lists in framedtext and tried to use combinations but the 
distance
between the two frames is too big, and the list are not top aligned.
What would be a correct solution? I don't need the frame to be drawn.
Why distance=1cm and width=12cm have no effect in my code?

Thanks,

bcsikos

code:

\setupitemize[each][packed,joinedup,n][stopper=.~,itemalign=flushright]
\setupframedtext[width=5.5cm,frame=off,offset=0pt]
\setupcombinations[width=12cm,distance=1cm]
\starttext
\startcombination[2]
{\startframedtext
\startitemize
\item In The Flesh? 3:19
\item The Thin Ice  2:29
\item Another Brick In The Wall (Part 1)3:09
\item The Happiest Days Of Our Lives1:50
\stopitemize
\stopframedtext
}{}{
\startframedtext
\startitemize
\item Hey You   4:41
\item Is There Anybody Out There?   2:40
\stopitemize
\stopframedtext
}{}
\stopcombination
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] item list: indent only first 2 or 3 lines

2016-03-16 Thread Peter Münster
Hi,

I would like to produce an item list like this:


- bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
  bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blaaa bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blaaa bla
bla bla bla bla bla bla bla bla

or

- bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
  bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
  bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blaaa bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blaaa bla
bla bla bla bla bla bla bla bla

How could I do this please?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Awesome Fonts in item lists

2015-11-04 Thread Romain Diss
Hi,

>> is there a simple way to use Font Awesome Icons in ConTeXt, for
>> example as symbols in an item list.
> Sure, you can grab the otf version of font awesome and load it like
> any other font.
Thank you for the response. The problem is that my text editor use a
font that can not display the Font Awesome icons in my TeX source file,
so I need a way to make command to call an icon without copying and
pasting it. Something like:
\def\fa-arrow-left{%character with unicode []}

Thank you.

-- 
Romain Diss
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Awesome Fonts in item lists

2015-11-04 Thread Mica Semrick
Sure, you can grab the otf version of font awesome and load it like any other 
font.

-m

On November 4, 2015 10:06:48 AM PST, Romain Diss  wrote:
>> I'm not a font expert with ConteXt so maybe my question is trivial
>but
>> is there a simple way to use Font Awesome Icons in ConTeXt, for
>example
>> as symbols in an item list.
>I forgot to give a link for those who doesn't know Font Awesome:
>https://fortawesome.github.io/Font-Awesome/cheatsheet/
>
>-- 
>Romain Diss
>___
>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://tex.aanhet.net
>archive  : http://foundry.supelec.fr/projects/contextrev/
>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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Awesome Fonts in item lists

2015-11-04 Thread Romain Diss
> I'm not a font expert with ConteXt so maybe my question is trivial but
> is there a simple way to use Font Awesome Icons in ConTeXt, for example
> as symbols in an item list.
I forgot to give a link for those who doesn't know Font Awesome:
https://fortawesome.github.io/Font-Awesome/cheatsheet/

-- 
Romain Diss
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Awesome Fonts in item lists

2015-11-04 Thread Romain Diss
Hi all,

I'm not a font expert with ConteXt so maybe my question is trivial but
is there a simple way to use Font Awesome Icons in ConTeXt, for example
as symbols in an item list.

Thanks in advance.

All the best.

-- 
Romain Diss
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

  1   2   3   4   >