Le 26 déc. 04, à 21:57, h h extern a écrit :
Christmas present ...
Thank you Hans for this present !! I just had to search the key to open this present, as I used an old ConTeXt version So I'm trying to switch to the texlive-2004 distribution (choosing the GUTenberg installation set) After some setup (m-bib has changed, ...) I could try your code and... *** it does exactly what I need ! *** Thank you very much ! Just a question. As you keep calling this environment "\startline" I suppose it is intended to be a standard option for "\startline" (which is a great news as I think it is quite usefull for numerous situations) But as the new version of context is not yet in the texlive-2004 (or as texlive-2005 is not yet out ;-) Would it not be a better idea to provide another environnement name to avoid conflict with the future standard startline environment? I tried to rename "startlines" to "startLines" with other hack, but it doesn't seem to be suffisant (but I didn't expect to!). Any way thank you for the solution !
\unprotect
\setuplines[\c!space=\v!default]
\def\startlines {\@@rgbefore \whitespace %\page[\v!preference]} gaat mis na koppen, nieuw: later \nobreak \begingroup \def\@@rgstepyes{\parindent\zeropoint}% \def\@@rgstepno {\parindent\zeropoint}% \edef\@@rgparindent{\the\parindent}% \globallet\@@rglinesteptoggle\!!plusone \processaction [\@@rgindenting] [ \v!yes=>\def\@@rgstepyes{\parindent\@@rgparindent}% \def\@@rgstepno {\parindent\@@rgparindent}, \v!odd=>\def\@@rgstepyes{\parindent\zeropoint }% \def\@@rgstepno {\parindent\@@rgparindent}, \v!even=>\def\@@rgstepno {\parindent\zeropoint }% \def\@@rgstepyes{\parindent\@@rgparindent}]% \typesettinglinestrue \setupwhitespace[\v!none]% \obeylines \let\checkindentation\relax \@@rgstepno \ignorespaces \gdef\afterfirstobeyedline % tzt two pass, net als opsomming {\gdef\afterfirstobeyedline {\nobreak \global\let\afterfirstobeyedline\relax}}% \def\obeyedline {\par \let\checkindentation\relax % else problems with odd/even \afterfirstobeyedline \ifdim\lastskip>\zeropoint \globallet\@@rglinesteptoggle\!!zerocount \else \doglobal\increment\@@rglinesteptoggle \fi \ifodd\@@rglinesteptoggle\relax \@@rgstepyes \else \@@rgstepno \fi \futurelet\next\dobetweenthelines}% \processaction [\@@rgspace] [ \v!on=>\obeyspaces \def\obeyedspace
{\mathortext\normalspace{\dontleavehmode{\tt\controlspace}}}, \v!yes=>\obeyspaces \def\obeyedspace {\mathortext\normalspace{\dontleavehmode\normalspace}}]% \GotoPar}
\protect
\starttext
\startlines test test test $a = 10$ \stoplines
\setuplines[space=on] \startlines test test test $a = 10$ \stoplines
\setuplines[space=yes] \startlines test test test $a = 10$ \stoplines
test test test $a = 10$
\stoptext
======
Maurice Diamantini wrote:
Well I agree that it's no more "typing" any more! So a special option for \setuplines would be more appropriate?