From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80718 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: Thu, 7 Feb 2013 04:32:36 +0000 Message-ID: <1E5A50C784A8AD44B420EF5A1E9B2806C8239CD2@e14mbx23n.Enterprise.emory.net> References: <510C4CBA.3010806@ingohohmann.de> <1E5A50C784A8AD44B420EF5A1E9B2806C82321D2@e14mbx23n.Enterprise.emory.net> <5111F284.70404@ingohohmann.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0178796986==" X-Trace: ger.gmane.org 1360211575 18468 80.91.229.3 (7 Feb 2013 04:32:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2013 04:32:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 07 05:33:16 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 1U3JAe-0000Y9-K4 for gctc-ntg-context-518@m.gmane.org; Thu, 07 Feb 2013 05:33:12 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 617BF10242; Thu, 7 Feb 2013 05:32:53 +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 T8QclTXJV8mm; Thu, 7 Feb 2013 05:32:49 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 370D6101EC; Thu, 7 Feb 2013 05:32:49 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BB091101EC for ; Thu, 7 Feb 2013 05:32:47 +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 G7GgOogHWbJm for ; Thu, 7 Feb 2013 05:32:43 +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 83322101EA for ; Thu, 7 Feb 2013 05:32:43 +0100 (CET) Original-Received: from ndb-mr1.cc.emory.edu (ndb-mr1.cc.emory.edu [170.140.52.40]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r174Wftn002847 for ; Thu, 7 Feb 2013 05:32:42 +0100 Original-Received: from e14edge2n.Emory.Edu (floatprod-lb1-dmz.cc.emory.edu [170.140.53.110]) by ndb-mr1.cc.emory.edu (8.13.8/8.13.8) with ESMTP id r174WcQ5000506 for ; Wed, 6 Feb 2013 23:32:38 -0500 Original-Received: from E14CH2W.Enterprise.emory.net (10.240.10.114) by e14edge2n.Emory.Edu (170.140.53.162) with Microsoft SMTP Server (TLS) id 14.2.318.1; Wed, 6 Feb 2013 23:32:38 -0500 Original-Received: from E14MBX23N.Enterprise.emory.net ([fe80::b473:ef05:b37f:5ccd]) by e14ch2w.Enterprise.emory.net ([::1]) with mapi id 14.03.0091.001; Wed, 6 Feb 2013 23:32:38 -0500 Thread-Topic: [NTG-context] block with different formatting per line? Thread-Index: AQHOANImpuQ3ZA6uJ0u25YyYP7lDLJhn1yKAgATazACAAXiLAA== In-Reply-To: <5111F284.70404@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] X-Emory-MailScanner-Information: Please contact the ISP for more information X-Emory-MailScanner-ID: r174WcQ5000506 X-Emory-MailScanner: Found to be clean X-Emory-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0, required 8, autolearn=disabled, HTML_MESSAGE 0.00, RP_MATCHES_RCVD -0.00) X-Emory-MailScanner-From: mroge02@emory.edu X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=170.140.52.40; 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: 07IVgwFFj - f2ff4207a5c5 - 20130207 (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:80718 Archived-At: --===============0178796986== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_1E5A50C784A8AD44B420EF5A1E9B2806C8239CD2e14mbx23nEnterp_" --_000_1E5A50C784A8AD44B420EF5A1E9B2806C8239CD2e14mbx23nEnterp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Feb 6, 2013, at 1:04 AM, Ingo Hohmann > wrote: 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 d= ifferently? 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 do= n'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 t= o 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 t= here 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=3D\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=3D" option. On= the other hand it does mention "align=3D" and this doesn't work. Neither d= oes \setuplines. I figured it out from the source, spac-lin.mkiv. One might see there that = the "align" key does not seem to be processed; it s a relic from a previous= version of ConTeXt, I suppose. Many macros have a "command" key, which us= ually seems to be a method for customizing the basic unit, in this case a l= ine. (The source is written in a certain style that makes it possible ofte= n to figure things out, even when the wiki is not up-to-date. I say "possi= ble" but not always easy. And there's always this maillist.) ________________________________ 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). --_000_1E5A50C784A8AD44B420EF5A1E9B2806C8239CD2e14mbx23nEnterp_ Content-Type: text/html; charset="iso-8859-1" Content-ID: <6CC2AA0C8547C24DB0B9233B350E9628@Enterprise.emory.net> Content-Transfer-Encoding: quoted-printable
On Feb 6, 2013, at 1:04 AM, Ingo Hohmann <context@ingohohmann.de> wrote:

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:

Hi,

is it possible to define a block, where lines are automatically formatted d=
ifferently?
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 ho=
w the line-breaking algorithm is described by Knuth.  I'll leave that quest=
ion 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 t=
here 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=3D\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 d= ocumentation for \definelines doesn't mention the "command=3D" op= tion. On the other hand it does mention "align=3D" and this doesn= 't work. Neither does \setuplines.

I figured it out from the source, spac-lin.mkiv.  One might = see there that the "align" key does not seem to be processed; it = s a relic from a previous version of ConTeXt, I suppose.  Many macros = have a "command" key, which usually seems to be a method for customizing the basic unit, in this case a line.  (The source is = written in a certain style that makes it possible often to figure things ou= t, even when the wiki is not up-to-date.  I say "possible" b= ut not always easy.  And there's always this maillist.)



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).
--_000_1E5A50C784A8AD44B420EF5A1E9B2806C8239CD2e14mbx23nEnterp_-- --===============0178796986== 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 ___________________________________________________________________________________ --===============0178796986==--