From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17637 Path: main.gmane.org!not-for-mail From: h h extern Newsgroups: gmane.comp.tex.context Subject: Re: algorithms style : need \starttyping with TeX and math feature Date: Sun, 26 Dec 2004 21:57:14 +0100 Message-ID: <41CF25AA.8040604@wxs.nl> References: <41CC2657.7000508@guest.arnes.si> <200412251403.10518.john@wexfordpress.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1104137396 24879 80.91.229.6 (27 Dec 2004 08:49:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Dec 2004 08:49:56 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 27 09:49:49 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CiqZZ-0005gg-00 for ; Mon, 27 Dec 2004 09:49:49 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 526461279A; Mon, 27 Dec 2004 09:49:49 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07978-03; Mon, 27 Dec 2004 09:49:49 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6895A127B1; Mon, 27 Dec 2004 09:46:17 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CB5D61279A for ; Mon, 27 Dec 2004 09:46:15 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07949-03 for ; Mon, 27 Dec 2004 09:46:15 +0100 (CET) Original-Received: from mailrelay01.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 50D66127B5 for ; Mon, 27 Dec 2004 09:37:43 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id iBR8bfS1030211 for ; Mon, 27 Dec 2004 09:37:41 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 366A82D213; Mon, 27 Dec 2004 09:35:27 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id F1DA317B14 for ; Mon, 27 Dec 2004 08:35:25 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <200412251403.10518.john@wexfordpress.com> X-Virus-Scanned: ClamAV 0.80/540/Tue Oct 19 14:59:23 2004 clamav-milter version 0.80j on mailrelay01 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17637 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17637 Christmas present ... \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 ====== John Culleton wrote: > On Friday 24 December 2004 09:23, Mojca Miklavec wrote: > >>Maurice Diamantini wrote: >> > Well I agree that it's no more "typing" any more! >> > So a special option for \setuplines would be more appropriate? >> >>Exactly, \starttyping does exactly that what you don't want: it disables >>math and expansion of TeX commands. >> >> >>>Also, perhaps my request is simply an option of \startlines >>>which keep not only the lines break, but also the first >>>spaces of each line (in a verbatim font fors these space) >> >>In plain TeX you have a command \obeyspaces (apart from \obeylines). >>Nevertheless, whitespaces at the beginning of line are ignored when >>using \obeyspaces, so you additionally need to write an escaped >>whitespace '\ ' or \strut at the beginning of line (I guess there's a >>more efficient solution for that, but I'm no expert). >> >>But if you really only need whitespace at the beginning of line, >>probably make something like: >> \def\tab{\strut\hbox to 3em{}} % or any other size instead 3em >>instead of using \obeyspaces and simply put \tab where you need a >>certain amount of white space. >> >>Mojca >> > > Using eplain.tex you can say: > \verbatim > > |endverbatim > (note bar instead of backslash.) > > If you need a vertical bar in the verbatim text then just double it. > > Anything in between including blank spaces and lines is printed verbatim. > Context used to complain about one non-critical statement in the eplain file. > Actually it complains about the following statement but you can easily spot > the troublemaker. Delete it and eplain works fine with Context. Latest > versions of eplain may already have the fix, haven't tested them. > -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------