ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* prevent indent after usage of defined itemgroup
@ 2016-10-03 12:18 Mikael P. Sundqvist
  2016-10-03 12:40 ` Otared Kavian
  0 siblings, 1 reply; 6+ messages in thread
From: Mikael P. Sundqvist @ 2016-10-03 12:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

Dear list,

I don't know if I ask weird questions or if people are just occupied.
If I break some rule, please tell me... Anyways, here is another one:

It seems that the indentnext is ignored below. The resulting pdf is
attached. I use a rather updated ConTeXt standalone.

%%% Test file
\setupindenting[yes,medium]

\defineitemgroup[abc]
\setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]

\starttext
\startabc
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\stopabc
This text should not be indented.
\stoptext
%%% End test file

/Mikael

[-- Attachment #2: ctx-example12.pdf --]
[-- Type: application/pdf, Size: 6741 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: prevent indent after usage of defined itemgroup
  2016-10-03 12:18 prevent indent after usage of defined itemgroup Mikael P. Sundqvist
@ 2016-10-03 12:40 ` Otared Kavian
  2016-10-03 12:45   ` Mikael P. Sundqvist
  0 siblings, 1 reply; 6+ messages in thread
From: Otared Kavian @ 2016-10-03 12:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Mikael,

I don’t feel you ask weird questions at all… As far as I am concerned, when I cannot help answer a question I don’t reply, but usually I test what you send.

Regarding what you are mentionning, it seems that the following works fine to achieve what you want, but I don’t know why the indentnext keyword does have any effect.

Best regards: OK
%%%% Test file
\setupindenting[yes,medium]

\defineitemgroup[abc]
\setupitemgroup[abc][each][a,columns,three]
	[stopper=,
	right=),
	margin=0pt,
	before={\blank[big]},
	after={\blank[big]\noindent}, % here is the change
	inbetween={\blank[medium]}]

\starttext
\input knuth.tex
\startabc
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\stopabc
This text should not be indented. \input ward.tex


\stoptext
%%% End test file

> On 3 Oct 2016, at 14:18, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> 
> Dear list,
> 
> I don't know if I ask weird questions or if people are just occupied.
> If I break some rule, please tell me... Anyways, here is another one:
> 
> It seems that the indentnext is ignored below. The resulting pdf is
> attached. I use a rather updated ConTeXt standalone.
> 
> %%% Test file
> \setupindenting[yes,medium]
> 
> \defineitemgroup[abc]
> \setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]
> 
> \starttext
> \startabc
> \startitem First \stopitem
> \startitem Second \stopitem
> \startitem Third \stopitem
> \stopabc
> This text should not be indented.
> \stoptext
> %%% End test file
> 
> /Mikael
> <ctx-example12.pdf>___________________________________________________________________________________
> If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: prevent indent after usage of defined itemgroup
  2016-10-03 12:40 ` Otared Kavian
@ 2016-10-03 12:45   ` Mikael P. Sundqvist
  2016-10-03 15:01     ` Mikael P. Sundqvist
  0 siblings, 1 reply; 6+ messages in thread
From: Mikael P. Sundqvist @ 2016-10-03 12:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Oct 3, 2016 at 2:40 PM, Otared Kavian <otared@gmail.com> wrote:
> Hi Mikael,
>
> I don’t feel you ask weird questions at all… As far as I am concerned, when I cannot help answer a question I don’t reply, but usually I test what you send.
>
> Regarding what you are mentionning, it seems that the following works fine to achieve what you want, but I don’t know why the indentnext keyword does have any effect.
>
> Best regards: OK
> %%%% Test file
> \setupindenting[yes,medium]
>
> \defineitemgroup[abc]
> \setupitemgroup[abc][each][a,columns,three]
>         [stopper=,
>         right=),
>         margin=0pt,
>         before={\blank[big]},
>         after={\blank[big]\noindent}, % here is the change
>         inbetween={\blank[medium]}]
>
> \starttext
> \input knuth.tex
> \startabc
> \startitem First \stopitem
> \startitem Second \stopitem
> \startitem Third \stopitem
> \stopabc
> This text should not be indented. \input ward.tex
>
>
> \stoptext
> %%% End test file
>
>> On 3 Oct 2016, at 14:18, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>>
>> Dear list,
>>
>> I don't know if I ask weird questions or if people are just occupied.
>> If I break some rule, please tell me... Anyways, here is another one:
>>
>> It seems that the indentnext is ignored below. The resulting pdf is
>> attached. I use a rather updated ConTeXt standalone.
>>
>> %%% Test file
>> \setupindenting[yes,medium]
>>
>> \defineitemgroup[abc]
>> \setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]
>>
>> \starttext
>> \startabc
>> \startitem First \stopitem
>> \startitem Second \stopitem
>> \startitem Third \stopitem
>> \stopabc
>> This text should not be indented.
>> \stoptext
>> %%% End test file
>>
>> /Mikael
>> <ctx-example12.pdf>___________________________________________________________________________________
>> If your question is of interest to others as well, please add an 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
> ___________________________________________________________________________________

Many thanks, Otared. Your solution indeed works.

Best regards, Mikael
___________________________________________________________________________________
If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: prevent indent after usage of defined itemgroup
  2016-10-03 12:45   ` Mikael P. Sundqvist
@ 2016-10-03 15:01     ` Mikael P. Sundqvist
  2016-10-03 15:19       ` Otared Kavian
  0 siblings, 1 reply; 6+ messages in thread
From: Mikael P. Sundqvist @ 2016-10-03 15:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 4527 bytes --]

On Mon, Oct 3, 2016 at 2:45 PM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> On Mon, Oct 3, 2016 at 2:40 PM, Otared Kavian <otared@gmail.com> wrote:
>> Hi Mikael,
>>
>> I don’t feel you ask weird questions at all… As far as I am concerned, when I cannot help answer a question I don’t reply, but usually I test what you send.
>>
>> Regarding what you are mentionning, it seems that the following works fine to achieve what you want, but I don’t know why the indentnext keyword does have any effect.
>>
>> Best regards: OK
>> %%%% Test file
>> \setupindenting[yes,medium]
>>
>> \defineitemgroup[abc]
>> \setupitemgroup[abc][each][a,columns,three]
>>         [stopper=,
>>         right=),
>>         margin=0pt,
>>         before={\blank[big]},
>>         after={\blank[big]\noindent}, % here is the change
>>         inbetween={\blank[medium]}]
>>
>> \starttext
>> \input knuth.tex
>> \startabc
>> \startitem First \stopitem
>> \startitem Second \stopitem
>> \startitem Third \stopitem
>> \stopabc
>> This text should not be indented. \input ward.tex
>>
>>
>> \stoptext
>> %%% End test file
>>
>>> On 3 Oct 2016, at 14:18, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>>>
>>> Dear list,
>>>
>>> I don't know if I ask weird questions or if people are just occupied.
>>> If I break some rule, please tell me... Anyways, here is another one:
>>>
>>> It seems that the indentnext is ignored below. The resulting pdf is
>>> attached. I use a rather updated ConTeXt standalone.
>>>
>>> %%% Test file
>>> \setupindenting[yes,medium]
>>>
>>> \defineitemgroup[abc]
>>> \setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]
>>>
>>> \starttext
>>> \startabc
>>> \startitem First \stopitem
>>> \startitem Second \stopitem
>>> \startitem Third \stopitem
>>> \stopabc
>>> This text should not be indented.
>>> \stoptext
>>> %%% End test file
>>>
>>> /Mikael
>>> <ctx-example12.pdf>___________________________________________________________________________________
>>> If your question is of interest to others as well, please add an 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
>> ___________________________________________________________________________________
>
> Many thanks, Otared. Your solution indeed works.
>
> Best regards, Mikael

just a note and a small follow-up question. The \noindent implied a
problem if the \startabc \stopabc was inside another itemize (which it
usually is, since it is a) b) c) exercises), since then the space
specified in after= in both environments added up. The solution was to
use \noindentation instead of \noindent. I don't know why, though.

The small problem: In the file below, the text below is too close to
the integrals (this only happens if one has symbols like large
integral signs, otherwise the space is fine). Is there a way to handle
this automatically, or should I simply add a \blank manually in this
case?

Best regards, Mikael

%%% Test file
\setupindenting[yes,medium]

\defineitemgroup[abc]
\setupitemgroup[abc][each][a,columns,three][
stopper=,
right=),
margin=0pt,
before={\blank[medium]},
after={\blank[medium]\noindentation},
inbetween={\blank[small]},
]

\starttext
\startabc[two]
\startitem $\displaystyle\int x^3\,dx$ \stopitem
\startitem $\displaystyle\int e^{-s}\,ds$\stopitem
\startitem $\displaystyle\int \frac{1}{\sqrt{1-u^2}}\,du$ \quad
($|u|<1$)\stopitem
\startitem[Q:primitiva funktioner d] $\displaystyle\int
\frac{1}{t-1}\,dt$ \quad ($t>1$) \stopitem
\stopabc
How would the answer in \in{}{)}[Q:primitiva funktioner d] change if one instead
assumed $t<1$?
\stoptext
%%% End test file

[-- Attachment #2: ctx-listexample15.pdf --]
[-- Type: application/pdf, Size: 12209 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: prevent indent after usage of defined itemgroup
  2016-10-03 15:01     ` Mikael P. Sundqvist
@ 2016-10-03 15:19       ` Otared Kavian
  2016-10-03 22:16         ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Otared Kavian @ 2016-10-03 15:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Mikael,

I didn’t know the difference between \noindent and \noindentation… It reminds me of the subtle difference between \quote and \quotation, but I cannot tell you why there is such a difference.

Regarding the issue with the integral sign being too close to the line of text, since you are using \displaystyle in an inline math formula, I think the easiest solution is to add \blank[big] at the lines where such issues appear, or to change the amout of \blank in the « after= » key by saying for instance

	after={\blank[2*medium]\noindentation},

Best regards: OK

> On 3 Oct 2016, at 17:01, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> 
> On Mon, Oct 3, 2016 at 2:45 PM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>> On Mon, Oct 3, 2016 at 2:40 PM, Otared Kavian <otared@gmail.com> wrote:
>>> Hi Mikael,
>>> 
>>> I don’t feel you ask weird questions at all… As far as I am concerned, when I cannot help answer a question I don’t reply, but usually I test what you send.
>>> 
>>> Regarding what you are mentionning, it seems that the following works fine to achieve what you want, but I don’t know why the indentnext keyword does have any effect.
>>> 
>>> Best regards: OK
>>> %%%% Test file
>>> \setupindenting[yes,medium]
>>> 
>>> \defineitemgroup[abc]
>>> \setupitemgroup[abc][each][a,columns,three]
>>>        [stopper=,
>>>        right=),
>>>        margin=0pt,
>>>        before={\blank[big]},
>>>        after={\blank[big]\noindent}, % here is the change
>>>        inbetween={\blank[medium]}]
>>> 
>>> \starttext
>>> \input knuth.tex
>>> \startabc
>>> \startitem First \stopitem
>>> \startitem Second \stopitem
>>> \startitem Third \stopitem
>>> \stopabc
>>> This text should not be indented. \input ward.tex
>>> 
>>> 
>>> \stoptext
>>> %%% End test file
>>> 
>>>> On 3 Oct 2016, at 14:18, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>>>> 
>>>> Dear list,
>>>> 
>>>> I don't know if I ask weird questions or if people are just occupied.
>>>> If I break some rule, please tell me... Anyways, here is another one:
>>>> 
>>>> It seems that the indentnext is ignored below. The resulting pdf is
>>>> attached. I use a rather updated ConTeXt standalone.
>>>> 
>>>> %%% Test file
>>>> \setupindenting[yes,medium]
>>>> 
>>>> \defineitemgroup[abc]
>>>> \setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]
>>>> 
>>>> \starttext
>>>> \startabc
>>>> \startitem First \stopitem
>>>> \startitem Second \stopitem
>>>> \startitem Third \stopitem
>>>> \stopabc
>>>> This text should not be indented.
>>>> \stoptext
>>>> %%% End test file
>>>> 
>>>> /Mikael
>>>> <ctx-example12.pdf>___________________________________________________________________________________
>>>> If your question is of interest to others as well, please add an 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
>>> ___________________________________________________________________________________
>> 
>> Many thanks, Otared. Your solution indeed works.
>> 
>> Best regards, Mikael
> 
> just a note and a small follow-up question. The \noindent implied a
> problem if the \startabc \stopabc was inside another itemize (which it
> usually is, since it is a) b) c) exercises), since then the space
> specified in after= in both environments added up. The solution was to
> use \noindentation instead of \noindent. I don't know why, though.
> 
> The small problem: In the file below, the text below is too close to
> the integrals (this only happens if one has symbols like large
> integral signs, otherwise the space is fine). Is there a way to handle
> this automatically, or should I simply add a \blank manually in this
> case?
> 
> Best regards, Mikael
> 
> %%% Test file
> \setupindenting[yes,medium]
> 
> \defineitemgroup[abc]
> \setupitemgroup[abc][each][a,columns,three][
> stopper=,
> right=),
> margin=0pt,
> before={\blank[medium]},
> after={\blank[medium]\noindentation},
> inbetween={\blank[small]},
> ]
> 
> \starttext
> \startabc[two]
> \startitem $\displaystyle\int x^3\,dx$ \stopitem
> \startitem $\displaystyle\int e^{-s}\,ds$\stopitem
> \startitem $\displaystyle\int \frac{1}{\sqrt{1-u^2}}\,du$ \quad
> ($|u|<1$)\stopitem
> \startitem[Q:primitiva funktioner d] $\displaystyle\int
> \frac{1}{t-1}\,dt$ \quad ($t>1$) \stopitem
> \stopabc
> How would the answer in \in{}{)}[Q:primitiva funktioner d] change if one instead
> assumed $t<1$?
> \stoptext
> %%% End test file
> <ctx-listexample15.pdf>___________________________________________________________________________________
> If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: prevent indent after usage of defined itemgroup
  2016-10-03 15:19       ` Otared Kavian
@ 2016-10-03 22:16         ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2016-10-03 22:16 UTC (permalink / raw)
  To: ntg-context

On 10/3/2016 5:19 PM, Otared Kavian wrote:
> Hi Mikael,
>
> I didn’t know the difference between \noindent and \noindentation… It reminds me of the subtle difference between \quote and \quotation, but I cannot tell you why there is such a difference.

\noindent is a so called primitive operation while \noindentation is the 
normal interface (as often a bit more is needed than \noindent along)

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-03 22:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03 12:18 prevent indent after usage of defined itemgroup Mikael P. Sundqvist
2016-10-03 12:40 ` Otared Kavian
2016-10-03 12:45   ` Mikael P. Sundqvist
2016-10-03 15:01     ` Mikael P. Sundqvist
2016-10-03 15:19       ` Otared Kavian
2016-10-03 22:16         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).