From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80618 Path: news.gmane.org!not-for-mail From: "Rogers, Michael K" Newsgroups: gmane.comp.tex.context Subject: Re: block with different formatting per line? Date: Sun, 3 Feb 2013 03:56:45 +0000 Message-ID: <1E5A50C784A8AD44B420EF5A1E9B2806C82321D2@e14mbx23n.Enterprise.emory.net> References: <510C4CBA.3010806@ingohohmann.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359863824 29225 80.91.229.3 (3 Feb 2013 03:57:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Feb 2013 03:57:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 03 04:57:23 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 1U1qhj-0006F6-DO for gctc-ntg-context-518@m.gmane.org; Sun, 03 Feb 2013 04:57:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8C406101F2; Sun, 3 Feb 2013 04:57:00 +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 rt28Y-mA7Du9; Sun, 3 Feb 2013 04:56:57 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C7720101E6; Sun, 3 Feb 2013 04:56:56 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 34D8D101E6 for ; Sun, 3 Feb 2013 04:56:55 +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 69mEZFi5S6KI for ; Sun, 3 Feb 2013 04:56:51 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id B3EF8101E2 for ; Sun, 3 Feb 2013 04:56:50 +0100 (CET) Original-Received: from ndb-mr2.cc.emory.edu (ndb-mr2.cc.emory.edu [170.140.52.250]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r134COqZ004494 for ; Sun, 3 Feb 2013 05:12:25 +0100 Original-Received: from e14edge1w.Emory.Edu (e14edge1w.eu.emory.edu [170.140.108.21] (may be forged)) by ndb-mr2.cc.emory.edu (8.13.8/8.13.8) with ESMTP id r133ukGH024920 for ; Sat, 2 Feb 2013 22:56:46 -0500 Original-Received: from E14CH3N.Enterprise.emory.net (10.240.8.115) by e14edge1w.Emory.Edu (170.140.108.21) with Microsoft SMTP Server (TLS) id 14.3.91.1; Sat, 2 Feb 2013 22:56:46 -0500 Original-Received: from E14MBX23N.Enterprise.emory.net ([fe80::b473:ef05:b37f:5ccd]) by e14ch3n.Enterprise.emory.net ([::1]) with mapi id 14.03.0091.001; Sat, 2 Feb 2013 22:56:46 -0500 Thread-Topic: [NTG-context] block with different formatting per line? Thread-Index: AQHOANImpuQ3ZA6uJ0u25YyYP7lDLJhn1yKA In-Reply-To: <510C4CBA.3010806@ingohohmann.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [170.140.30.131] Content-ID: <67F3DCE9B07E024BB6AD77A12DB994D9@Enterprise.emory.net> X-Emory-MailScanner-Information: Please contact the ISP for more information X-Emory-MailScanner-ID: r133ukGH024920 X-Emory-MailScanner: Found to be clean X-Emory-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.375, required 8, autolearn=disabled, RP_MATCHES_RCVD -0.38) X-Emory-MailScanner-From: mroge02@emory.edu X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=170.140.52.250; country=US; region=GA; city=Atlanta; postalcode=30322; latitude=33.7952; longitude=-84.3248; metrocode=524; areacode=404; http://maps.google.com/maps?q=33.7952,-84.3248&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01ITEcor8 - a43163c9f4fc - 20130203 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:80618 Archived-At: 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} \starttext \startMyLines First line in caps, Second in bold, Others normal. Others normal. Others normal. \stopMyLines And again: \startMyLines First line in caps, Second in bold, Others normal. Others normal. Others normal. \stopMyLines \stoptext Michael ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). ___________________________________________________________________________________ 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 ___________________________________________________________________________________