From: "Mikael Persson" <mickep@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: \indenting[next] and math => no vertical space before the formula
Date: Wed, 30 Apr 2008 20:14:00 +0200 [thread overview]
Message-ID: <d5fddde00804301114r19d1167ua8779f5f68e46bec@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0804301301320.11283@nqv-yncgbc>
On Wed, Apr 30, 2008 at 7:02 PM, Aditya Mahajan <adityam@umich.edu> wrote:
>
> On Wed, 30 Apr 2008, Mikael Persson wrote:
>
> > On Tue, Apr 29, 2008 at 6:49 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> >> On Mon, 28 Apr 2008, Mikael Persson wrote:
> >>
> >> > Hello again,
> >> >
> >> > * snip *
> >> >>
> >> >> I could reproduce the result and have also a fix but I don't know what
> >> >> the correct
> >> >> reults should be and other people like Aditya should decide if it makes sense
> >> >> to change the current behaviour.
> >> >>
> >> >> \def\startdisplaymath
> >> >> {\ifgridsnapping
> >> >> \beforedisplayspace
> >> >> \snapmathtogrid\vbox
> >> > * snip *
> >> >> Wolfgang
> >> >
> >> > This fix seems not to solve the problem entirely. With this fix
> >> > applied, If one now put a formula inside an enumeration one gets
> >> > "double" space before the formula. This is a test file that shows the
> >> > problem:
> >>
> >> This is basically because in enumerations indenting is set to never.
> >>
> >> You can see the same affect with
> >>
> >> \setupindenting[no]
> >> \testtext
> >>
> >> One possible fix is to add
> >>
> >> indenting=(reset|next|first) %default is never
> >>
> >> to the \setupenumeration command. For example
> >>
> >>
> >> > \defineenumeration[example]
> >> > [text=Example,
> >> > location=serried,
> >> > width=fit,
> >> indenting=reset, %%<<<---- Add This
> >>
> >>> distance=0.5em,
> >> > way=bysection,
> >> > ]
> >>
> >> Another is to change \startdisplaymath to
> >>
> >>
> >> \def\startdisplaymath
> >> {\ifgridsnapping
> >> \beforedisplayspace
> >> \snapmathtogrid\vbox
> >>
> >> \bgroup
> >> \informulatrue
> >> %\forgetall % breaks side floats
> >> \else
> >> \bgroup
> >> \parskip\formulaparskip % ! !
> >> \informulatrue
> >> %\forgetall % otherwise backgrounds fail
> >> \ifdim\lastskip<\zeropoint\else
> >> \par
> >> \ifvmode \ifdim\parskip>\zeropoint\relax
> >> \whitespace \vskip-\parskip % kind of forces and cancels again
> >> \fi \fi
> >> \fi
> >> \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default
> >> \beforedisplayspace
> >> \par
> >> \ifvmode \ifdim\parskip>\zeropoint\relax \else
> >>
> >> \ifindentfirstparagraph
> >> \verticalstrut
> >> \vskip-\struttotal
> >> \vskip-\baselineskip
> >> \fi\fi
> >> \fi
> >> \fi
> >> $$\setdisplaydimensions
> >> \setpredisplaysize\lastlinewidth
> >> \startinnermath}
> >>
> >> But this is getting ugly.
> >>
> >> Aditya
> >>
> >
> > Thank you Aditya, but I don't get that to work. Both with
> >
> > ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int:
> > english/english (with the fix earlier in this thread)
> > and
> > ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int:
> > english/english (which is the one from new ubuntu, without the fix)
> >
> > this fails with the following error msg:
> >
> > %% Start error msg
> > ! Illegal unit of measure (pt inserted).
> > <to be read again>
> > \chardef
> > \@@in:reset ...rue \parindent \zerocount \chardef
> > \indentingtoggle \zerocount
> > \next1 #1,->\docomplexsetupindentingB {#1}
> > \doprocesscommaitem
> > \doprocesscommalist ...item \gobbleoneargument #1,
> > ]\relax \global \advance \...
> > <argument> ...ndenting ]\docomplexsetupindentingB
> > \checkeverypar \ifindentfi...
> >
> > \firstofoneargument #1->#1
> >
>
> An old bug (more than two month old :)
>
> Also add this
>
> \unprotect
> \defineindentingmethod [\v!reset] {\indentfirstparagraphtrue
> \parindent\zeropoint%AM was \zerocount
> \chardef\indentingtoggle\zerocount}
> \protect
> Aditya
Thank you Aditya (and also thank you Wolfgang!) Your help is really appreciated!
Micke P
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2008-04-30 18:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 10:15 Mikael Persson
2008-04-24 11:29 ` Wolfgang Schuster
2008-04-24 14:27 ` Aditya Mahajan
2008-04-24 17:28 ` Hans Hagen
2008-04-24 18:37 ` Mikael Persson
2008-04-24 18:43 ` Hans Hagen
2008-04-24 19:14 ` Mikael Persson
2008-04-24 19:34 ` Hans Hagen
2008-04-28 18:17 ` Mikael Persson
2008-04-29 4:49 ` Aditya Mahajan
2008-04-30 7:24 ` Mikael Persson
2008-04-30 7:33 ` Wolfgang Schuster
2008-04-30 7:45 ` Mikael Persson
2008-04-30 8:54 ` Wolfgang Schuster
2008-04-30 17:02 ` Aditya Mahajan
2008-04-30 18:14 ` Mikael Persson [this message]
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=d5fddde00804301114r19d1167ua8779f5f68e46bec@mail.gmail.com \
--to=mickep@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).