From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80697 Path: news.gmane.org!not-for-mail From: Ingo Hohmann Newsgroups: gmane.comp.tex.context Subject: Re: block with different formatting per line? Date: Wed, 06 Feb 2013 16:00:05 +0100 Message-ID: <51126FF5.8050107@ingohohmann.de> References: <510C4CBA.3010806@ingohohmann.de> <1E5A50C784A8AD44B420EF5A1E9B2806C82321D2@e14mbx23n.Enterprise.emory.net> <5111F284.70404@ingohohmann.de> <634360E3-F58A-4E97-97B3-BBE5C6516ECD@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1501994024==" X-Trace: ger.gmane.org 1360162824 20094 80.91.229.3 (6 Feb 2013 15:00:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Feb 2013 15:00:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 06 16:00:43 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U36UJ-000439-VO for gctc-ntg-context-518@m.gmane.org; Wed, 06 Feb 2013 16:00:40 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1BF4C10257; Wed, 6 Feb 2013 16:00:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 74+E4FCKwTvz; Wed, 6 Feb 2013 16:00:15 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 70911101F5; Wed, 6 Feb 2013 16:00:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4CACC101F5 for ; Wed, 6 Feb 2013 16:00:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id H7uRc5NrSV3e for ; Wed, 6 Feb 2013 16:00:08 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 2E0A0101E7 for ; Wed, 6 Feb 2013 16:00:08 +0100 (CET) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r16F06AU015077 for ; Wed, 6 Feb 2013 16:00:07 +0100 Original-Received: from [192.168.178.107] (hmbg-4d06faa8.pool.mediaWays.net [77.6.250.168]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0LdEZd-1UlTdf1UDB-00iT9G; Wed, 06 Feb 2013 16:00:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 In-Reply-To: <634360E3-F58A-4E97-97B3-BBE5C6516ECD@gmail.com> X-Provags-ID: V02:K0:HMaOho9i5AvUSG1pD7Q7MvXMo+O8h3Qdb5flLfTva/b +rEo/nxSvCVLBwGkeXG1Sk0ZP51Ov1EkL42rk/7PmMv3x6JwHB nSf/W3L6EGlw9W/XPeUUbtKNuxZsZvzO3RmFQjmehtICP4n8if B2UPN7j2XtpDpzqXJU2ugSxPYHjWv8QKK27dElL0hvJlEqxpow VafglDr+KSo6Dn1QWjXVtFXwGfI+TflqNV658r+oGpI19H087V ce035SlDapNyHJPJuRML6YotTNTSkouHUyoSpqc6MFMNGTIUf1 e9HK+rXRxYWX91IR+3sZyCBpnSuHRes6Vv8Ddu5IY14jox6aJE 6Rog5x76HJUXimsQ2t9M= X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.227.17.8; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07IV307iM - 23dfcd797721 - 20130206 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80697 Archived-At: This is a multi-part message in MIME format. --===============1501994024== Content-Type: multipart/alternative; boundary="------------000303020304020101000809" This is a multi-part message in MIME format. --------------000303020304020101000809 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/06/2013 02:29 PM, Wolfgang Schuster wrote: > > Am 06.02.2013 um 07:04 schrieb Ingo Hohmann >: > >> On 02/03/2013 04:56 AM, Rogers, Michael K wrote: >>> On Feb 1, 2013, at 6:16 PM, Ingo Hohmann wrote: >>> <...> >>> Here's a way to process the input lines. If there's a counter that counts the line number, there would be another way; but I couldn't find out that there was a counter. There may be better ways anyway. >>> >>> \define\FirstLine{\let\myLine\SecondLine\sc} >>> \define\SecondLine{\let\myLine\OtherLine\bf} >>> \define\OtherLine{\tf} >>> \definelines[doMyLines][command=\myLine] >>> \def\startMyLines{\let\myLine\FirstLine\startdoMyLines} >>> \def\stopMyLines{\stopdoMyLines} >> As I said that works, but while trying to understand this, I found >> that the documentation for \definelines doesn't mention the >> "command=" option. On the other hand it does mention "align=" and >> this doesn't work. Neither does \setuplines. >> >> I always get "undefined control sequence". > <...> > Make a complete example. I thought I could get away without it, because it's practically the answer to my question, just with alignment. For some reason, now that I started from scratch to show the example, it works. \define\FirstLine{\let\myLine\SecondLine\sc} \define\SecondLine{\let\myLine\OtherLine\bf} \define\OtherLine{\tf} % this align here didn't work \definelines[doMyLines][align=flushright,command=\myLine] % and this setup doesn't %\setupdoMyLines[align=flushright] \def\startMyLines{\let\myLine\FirstLine\startdoMyLines} \def\stopMyLines{\stopdoMyLines} \definelines[right][align=flushright] % I get an error here, too. %\setupright[align=flushright] \starttext \startright test \stopright \startMyLines First line in caps, Second in bold, Others normal. Others normal. Others normal. \stopMyLines \stoptext > BTW: I suggest to use my Lua example from the other thread. When I looked at it first, it was in the middle of the night. And it looked a bit over the moon for me. Now I think I can grab it, and it looks _very_ powerfull. Thank you. Ingo --------------000303020304020101000809 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 02/06/2013 02:29 PM, Wolfgang Schuster wrote:

Am 06.02.2013 um 07:04 schrieb Ingo Hohmann <context@ingohohmann.de>:

On 02/03/2013 04:56 AM, Rogers, Michael K wrote:
On Feb 1, 2013, at 6:16 PM, Ingo Hohmann <context@ingohohmann.de> wrote:
<...>
Here's a way to process the input lines.  If there's a counter that counts the line number, there would be another way; but I couldn't find out that there was a counter.  There may be better ways anyway.

\define\FirstLine{\let\myLine\SecondLine\sc}
\define\SecondLine{\let\myLine\OtherLine\bf}
\define\OtherLine{\tf}
\definelines[doMyLines][command=\myLine]
\def\startMyLines{\let\myLine\FirstLine\startdoMyLines}
\def\stopMyLines{\stopdoMyLines}
As I said that works, but while trying to understand this, I found that the documentation for \definelines doesn't mention the "command=" option. On the other hand it does mention "align=" and this doesn't work. Neither does \setuplines.

I always get "undefined control sequence".
<...>
Make a complete example.

I thought I could get away without it, because it's practically the answer to my question, just with alignment.
For some reason, now that I started from scratch to show the example, it works.

\define\FirstLine{\let\myLine\SecondLine\sc}
\define\SecondLine{\let\myLine\OtherLine\bf}
\define\OtherLine{\tf}

% this align here didn't work
\definelines[doMyLines][align=flushright,command=\myLine]

% and this setup doesn't
%\setupdoMyLines[align=flushright]

\def\startMyLines{\let\myLine\FirstLine\startdoMyLines}
\def\stopMyLines{\stopdoMyLines}

\definelines[right][align=flushright]

% I get an error here, too.
%\setupright[align=flushright]

\starttext

\startright
test
\stopright

\startMyLines
First line in caps,
Second in bold,
Others normal.
Others normal.
Others normal.
\stopMyLines

\stoptext

BTW: I suggest to use my Lua example from the other thread.

When I looked at it first, it was in the middle of the night. And it looked a bit over the moon for me. Now I think I can grab it, and it looks _very_ powerfull.


Thank you.

Ingo


--------------000303020304020101000809-- --===============1501994024== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1501994024==--