ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* environment files and indenting
@ 2006-08-07 18:55 Sanjoy Mahajan
  2006-08-08  9:33 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Sanjoy Mahajan @ 2006-08-07 18:55 UTC (permalink / raw)


Not sure what I'm doing wrong here, but this is the minimal example I
could make.  The environment file ne.tex contains

\startenvironment ne
\setupindenting[medium,yes]
\stopenvironment

And the test file is

\environment ne
\starttext
\placeformula\startformula
x = 10
\stopformula
\stoptext

texexec'ing test.tex says:

Overfull \hbox (17.62474pt too wide) in paragraph at lines 4--4
[][] 

But if I inline the environment file, to get

\startenvironment ne
\setupindenting[medium,yes]
\stopenvironment
\starttext
\placeformula\startformula
x = 10
\stopformula
\stoptext

then texexec doesn't produce any overfull \hbox.

My guess is that the 17.6247pt overage is the amount of medium
indenting, and somehow the display math mode is getting confused and
trying to indent itself?

-Sanjoy

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

* Re: environment files and indenting
  2006-08-07 18:55 environment files and indenting Sanjoy Mahajan
@ 2006-08-08  9:33 ` Taco Hoekwater
  2006-08-08 11:53   ` Sanjoy Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2006-08-08  9:33 UTC (permalink / raw)




Sanjoy Mahajan wrote:
> But if I inline the environment file, to get
> 
> \startenvironment ne
> \setupindenting[medium,yes]
> \stopenvironment
> \starttext
> \placeformula\startformula
> x = 10
> \stopformula
> \stoptext
> 
> then texexec doesn't produce any overfull \hbox.

And also no PDF, because \stopenvironment executes \endinput :-)

Taco

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

* Re: environment files and indenting
  2006-08-08  9:33 ` Taco Hoekwater
@ 2006-08-08 11:53   ` Sanjoy Mahajan
  2006-08-08 13:21     ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Sanjoy Mahajan @ 2006-08-08 11:53 UTC (permalink / raw)


> And also no PDF, because \stopenvironment executes \endinput :-)

Whoops!  I'd been testing so many variants in order to find the
minimal file and had outsourced the checking to 'grep hbox' (rather
than reading through the texexec output by hand).  So I didn't even
notice the lack of a PDF file.

So that leaves the original problem, which is why the hbox is overfull
in this minimal file (that produces a PDF!):

\setupindenting[medium,yes]
\starttext
\placeformula\startformula
x = 10
\stopformula
\stoptext

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

* Re: environment files and indenting
  2006-08-08 11:53   ` Sanjoy Mahajan
@ 2006-08-08 13:21     ` Taco Hoekwater
  2006-08-08 16:23       ` Sanjoy Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2006-08-08 13:21 UTC (permalink / raw)




Sanjoy Mahajan wrote:
> So that leaves the original problem, which is why the hbox is overfull
> in this minimal file (that produces a PDF!):

The overfull box is caused by a strut. It is easily removed by

   \def\verticalstrut
       {\normalvbox {\hsize \zeropoint \noindent\strut }}

Taco

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

* Re: environment files and indenting
  2006-08-08 13:21     ` Taco Hoekwater
@ 2006-08-08 16:23       ` Sanjoy Mahajan
  2006-08-08 17:46         ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Sanjoy Mahajan @ 2006-08-08 16:23 UTC (permalink / raw)


> The overfull box is caused by a strut. It is easily removed by
>   \def\verticalstrut{\normalvbox {\hsize \zeropoint \noindent\strut }}

Easily removed, but not so easily found!  Thanks, that fixes it.
Looking at the standard definition of \verticalstrut (in
core-spa.tex):

  \def\verticalstrut  {\normalvbox{\hsize\zeropoint\strut}}

your fix adds a \noindent.  Is that a general solution (e.g. for a
subsequent release) or does it have side effects?

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

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

* Re: environment files and indenting
  2006-08-08 16:23       ` Sanjoy Mahajan
@ 2006-08-08 17:46         ` Taco Hoekwater
  0 siblings, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2006-08-08 17:46 UTC (permalink / raw)


Sanjoy Mahajan wrote:
>>The overfull box is caused by a strut. It is easily removed by
>>  \def\verticalstrut{\normalvbox {\hsize \zeropoint \noindent\strut }}
> 
> 
> Easily removed, but not so easily found!  Thanks, that fixes it.
> Looking at the standard definition of \verticalstrut (in
> core-spa.tex):
> 
>   \def\verticalstrut  {\normalvbox{\hsize\zeropoint\strut}}
> 
> your fix adds a \noindent.  Is that a general solution (e.g. for a
> subsequent release) or does it have side effects?

The release I just announced fixes the problem by using \forgetall
instead of \noindent. Side-effect do not matter because any effects
will stay local to the \normalvbox, and that is left right away.

Cheers, Taco

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

end of thread, other threads:[~2006-08-08 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07 18:55 environment files and indenting Sanjoy Mahajan
2006-08-08  9:33 ` Taco Hoekwater
2006-08-08 11:53   ` Sanjoy Mahajan
2006-08-08 13:21     ` Taco Hoekwater
2006-08-08 16:23       ` Sanjoy Mahajan
2006-08-08 17:46         ` Taco Hoekwater

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).