ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Maurice Diamantini <Maurice.Diamantini@ensta.fr>
Cc: Maurice Diamantini <Maurice.Diamantini@ensta.fr>
Subject: Re: algorithms style : need \starttyping with TeX and math feature
Date: Mon, 3 Jan 2005 16:13:21 +0100	[thread overview]
Message-ID: <01649DF0-5D9A-11D9-B03E-000A9595B57C@ensta.fr> (raw)
In-Reply-To: <41CF25AA.8040604@wxs.nl>


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?

  reply	other threads:[~2005-01-03 15:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-24  8:07 Maurice Diamantini
2004-12-24  8:48 ` Maurice Diamantini
2004-12-24 14:23 ` Mojca Miklavec
2004-12-25 19:03   ` John Culleton
2004-12-26 20:57     ` h h extern
2005-01-03 15:13       ` Maurice Diamantini [this message]
2005-01-03 17:02         ` Hans Hagen
2005-01-03 14:52     ` Maurice Diamantini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01649DF0-5D9A-11D9-B03E-000A9595B57C@ensta.fr \
    --to=maurice.diamantini@ensta.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).