environment files and indenting
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
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
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
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.
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
participants (2)
-
Sanjoy Mahajan
-
Taco Hoekwater