Taco Hoekwater wrote:
Hans van der Meer wrote:
Found something annoying with \starttyping...\stoptyping.
I wanted side by side two framed texts in verbatim, one of them one line longer than the other. Of course they should align there lines.
To accomplish this I put a blank line at the end of the shortest text. Alas, \starttyping does not honor a blank line at the end, although it does honors blank lines inbetween. I am inclined to call this a bug.
I agree, but only when \obeyemptylines is in effect (i have documents that depend on that auto-dropping of trailing empty lines in other cases). So my patch proposal is:
\def\presetemptylastverbatimline% {\ifcase \verbatimstatus \or \or \or \doflushverbatimline \else \kern \zeropoint \doverbatimnobreak \doflushverbatimline \fi %TH the next \kern is new \kern \zeropoint }
\def\obeyemptylines% {\let\donextemptyverbatimline\doemptyverbatimline %TH the next reassignment is new \let\presetlastverbatimline\presetemptylastverbatimline }
You have to add an \obeyemptylines command in your document(s), of course.
we can add such an option, but - how does it behave at page boundaries (extra kern) - when typing files so, we need a way to configure it per environment also, this patch does not honour the first empty lines how about a slight variation (taco's patch + another one + modes): \unprotect % vervalt: \donextemptyverbatimline \chardef\verbatimemptylinemode\zerocount \def\presetemptyverbatimline {\ifcase\verbatimstatus \global\chardef\verbatimstatus\plusone \or \ifcase\verbatimemptylinemode\or\or \doemptyverbatimline \fi \or \ifcase\verbatimemptylinemode\else \doemptyverbatimline \fi \or \doflushverbatimline \global\let\savedverbatimline\empty \doemptyverbatimline \global\chardef\verbatimstatus\plustwo \else \kern\zeropoint \doverbatimnobreak \doflushverbatimline \global\let\savedverbatimline\empty \doemptyverbatimline \global\chardef\verbatimstatus\plustwo \fi} \def\presetlastverbatimline {\ifcase \verbatimstatus \or \or \or \doflushverbatimline \else \kern \zeropoint \doverbatimnobreak \doflushverbatimline \fi \ifcase\verbatimemptylinemode\or\else \kern \zeropoint \fi } \def\obeyemptylines {\chardef\verbatimemptylinemode\plusone} \def\obeyallemptylines {\chardef\verbatimemptylinemode\plustwo} \obeyemptylines \obeyallemptylines \showgrid \setuplayout[grid=yes] \starttext xxx \starttyping 1test test test \stoptyping xxx \starttyping 2test test test \stoptyping xxx \starttyping 3test test test \stoptyping xxx \starttyping test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test \stoptyping \stoptext Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------