![](https://secure.gravatar.com/avatar/58128ef2fa853eca7f2503a152c340ae.jpg?s=120&d=mm&r=g)
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. Below a minimal example showing the blank line in between but not the one at the end. The ContextWiki site gives the same result. \starttext \startframedtext[strut=no,offset=0pt] \starttyping before blank line after blank line blank line follows \stoptyping \stopframedtext \stoptext yours sincerely, dr. H. van der Meer
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
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. Cheers, Taco
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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.
no, it's on purpose and therefore a feature
Below a minimal example showing the blank line in between but not the one at the end. The ContextWiki site gives the same result.
\starttext \startframedtext[strut=no,offset=0pt] \starttyping before blank line
after blank line blank line follows
\stoptyping \stopframedtext \stoptext
just add a \blank or \crlf after the typing 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Hans van der Meer
-
Taco Hoekwater