From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80643 Path: news.gmane.org!not-for-mail From: Ingo Hohmann Newsgroups: gmane.comp.tex.context Subject: Re: block with different formatting per line? Date: Mon, 04 Feb 2013 16:16:30 +0100 Message-ID: <510FD0CE.200@ingohohmann.de> References: <510C4CBA.3010806@ingohohmann.de> <1E5A50C784A8AD44B420EF5A1E9B2806C82321D2@e14mbx23n.Enterprise.emory.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359991313 24832 80.91.229.3 (4 Feb 2013 15:21:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 15:21:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 04 16:22:12 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 1U2Nrz-0003D1-Kd for gctc-ntg-context-518@m.gmane.org; Mon, 04 Feb 2013 16:22:07 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D88AC10223; Mon, 4 Feb 2013 16:21:48 +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 nx5Dm1PD6e7o; Mon, 4 Feb 2013 16:21:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9DD5E1020B; Mon, 4 Feb 2013 16:21:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2B6BB1020B for ; Mon, 4 Feb 2013 16:21:45 +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 aY1Knx+LQrVZ for ; Mon, 4 Feb 2013 16:21:43 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id C6CCC101F9 for ; Mon, 4 Feb 2013 16:21:43 +0100 (CET) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r14FLgu6028735 for ; Mon, 4 Feb 2013 16:21:42 +0100 Original-Received: from [192.168.178.101] (hmbg-4d06e1a4.pool.mediaWays.net [77.6.225.164]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0M5Kwt-1UtFJo2KyN-00zGZ1; Mon, 04 Feb 2013 16:16:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 In-Reply-To: <1E5A50C784A8AD44B420EF5A1E9B2806C82321D2@e14mbx23n.Enterprise.emory.net> X-Provags-ID: V02:K0:xOxj8chfpapoJsIZANc84ytTpf3bhANbahyyZonQV1D 6gz93LjgA/ieJ9tcpLzg+k0iq2W4AmFHmydwRaAApQ7UFScK54 MY/REbYFGhPbVUzeSwE9gQd69xsJKL+aQx2a5slxbhQRHhhDWl 847TOENE9zBwFswVFF9Zb115JdQJeQ/doJ9zi0BWBwPcS+449v XQfvnEs8SfPO7iX5IkSnlWLYR7Op/y7+DcjD8nkBkp9lkN6Poq IGx6HjdcirB8A4Qr2INbCdnCFuRpSRezRjlyA2H3GUzpFT1Eyy uAvf56/Hp5gadSSw03Vzkp/nsepK67c6+bpHfw690ZaJcqatRK 7ETZ5B3WOAZcms+CJc9g= X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.227.126.187; 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: 0NIUflGKz - c5764c0d38af - 20130204 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:80643 Archived-At: On 02/03/2013 04:56 AM, Rogers, Michael K wrote: > On Feb 1, 2013, at 6:16 PM, Ingo Hohmann wrote: > >> Hi, >> >> is it possible to define a block, where lines are automatically formatted differently? >> For example: >> first line in caps, >> second in bold, >> others normal. >> >> Is this possible? And how? > If you mean input lines, then yes. But if you mean output lines, then I don't know. It seems a well-defined task, but a hard task judging by how the line-breaking algorithm is described by Knuth. I'll leave that question to experts. > > 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} > Yes, that's exactly what I meant, and you even answered my next question, too. Thank you! Ingo ___________________________________________________________________________________ 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 ___________________________________________________________________________________