ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: prevent indent after usage of defined itemgroup
Date: Mon, 3 Oct 2016 17:19:26 +0200	[thread overview]
Message-ID: <38BA32A0-FC31-4E4C-AFC4-F5CAB1CAE281@gmail.com> (raw)
In-Reply-To: <CAHy-LL9ieLxGqs5B23OgGHYmUYr1pzHiCvXFN60Up5CS_QH8ZQ@mail.gmail.com>

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
___________________________________________________________________________________

  reply	other threads:[~2016-10-03 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 12:18 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 [this message]
2016-10-03 22:16         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38BA32A0-FC31-4E4C-AFC4-F5CAB1CAE281@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).