On Sat, Dec  6, 2025 at 17:48 (+0100), Wolfgang Schuster wrote:

> Am 06.12.2025 um 17:34 schrieb Jim:
>> Hi,

>> In my continuing quest to adjust white space to my liking, I ran up against
>> an issue with \starttyping that I can't solve.  Here is the example:

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

>> \starttext

>> This is a line above \type{\starttyping}:
>> \starttyping
>> 1. this is typing (and has space above and below)
>> \stoptyping
>> This is a line below.

>> \hairline

>> This is a line above \type{\starttyping[before=,after=,]}
>> \starttyping[before=,after=,]
>> 2. this is typing (and has NO space above or below, just as I want)
>> \stoptyping
>> This is a line below.

>> \hairline

>> \setupwhitespace [big]

>> \midaligned{\type{*** \setupwhitespace[big]} now in effect ***}

>> \hairline

>> This is a line above \type{\starttyping}:
>> \starttyping
>> 3. this is typing (and has space above and below just like '1.')
>> \stoptyping
>> This is a line below.

>> \hairline

>> This is a line above \type{\starttyping[before=,after=,]}
>> \starttyping[before=,after=,]
>> 4. this is typing (and has space above and below, even with 
>> [before=,after=,])
>> \stoptyping
>> This is a line below.

>> \hairline

>> This is a line above
>> \type{\starttyping[before={\blank[disable]},after={\blank[disable]},]}
>> \starttyping[before={\blank[disable]},after={\blank[disable]},]
>> 5. this is typing (and has space below, even with
>>                    [before={\blank[disable]},after={\blank[disable]},])
>> \stoptyping
>> This is a line below.

>> \hairline

>> This is a line above \type{\starttyping[before={\blank[order:99,0pt]}},\\
>> \null\type{                              after={\blank[order:111,disable]}]}
>> \starttyping[before={\blank[order:99,0pt]},after={\blank[order:111,disable]},]
>> 6. this is typing (space above cancelled, space below still there, even
>> with after={\blank[order:111,disable] (or order:1,...)
>> \stoptyping
>> This is a line below.

>> \stoptext

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

>> Attached is the PDF I get when I run ConTeXt on the example above.


>> Q1: I had hoped that before=, and after=, would work as well when I have
>>      \setupwhitespace [big]
>> as when the whitespace is (I assume) [none], but that didn't work.
>> Can someone explain the Zen of why I am still getting space in this
>> case?

>>      (I first speculated that \startyping does something like putting out
>> the larger of two vertical space amounts (the \parskip and its default
>> before= and after= amounts), but that doesn't seem to be a full
>> explanation.)


>> Q2: I tried various and sundry incantations to remove the space above and
>> below the typing.  As seen, I did manage to remove the "above" space,
>> but the "below" space has resisted my pathetic attempts (some shown
>> above, others not included here) to remove it.

>> Can someone explain to me how I can remove the "below" space?
>>      (Or point me to a part of some documentation that explains it?)

> \setupwhitespace
>   [big]

> \setuptyping
>   [before={\blank[disable]},
> after={\blank[nowhite]}]

> \starttext

> Before
> \starttyping
> Inbetween
> \stoptyping
> After

> \stoptext

Wolfgang,

thanks very much for the help.  I had tried \blank[nowhite], but for
before=, not realizing it only works for after=.

                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to