From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80693 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: block with different formatting per line? Date: Wed, 6 Feb 2013 14:29:50 +0100 Message-ID: <634360E3-F58A-4E97-97B3-BBE5C6516ECD@gmail.com> 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 (Mac OS X Mail 6.2 \(1499\)) Content-Type: multipart/mixed; boundary="===============0325709264==" X-Trace: ger.gmane.org 1360157397 29530 80.91.229.3 (6 Feb 2013 13:29:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Feb 2013 13:29:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 06 14:30:17 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 1U354r-0005ar-AJ for gctc-ntg-context-518@m.gmane.org; Wed, 06 Feb 2013 14:30:17 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5B81F10236; Wed, 6 Feb 2013 14:29:58 +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 H9KP7HHN+pWF; Wed, 6 Feb 2013 14:29:56 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id B5C6A101F7; Wed, 6 Feb 2013 14:29:56 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 726E8101F7 for ; Wed, 6 Feb 2013 14:29: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 HNSWZtGi3G5w for ; Wed, 6 Feb 2013 14:29:54 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 66FFC101F5 for ; Wed, 6 Feb 2013 14:29:54 +0100 (CET) Original-Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r16DTrmW011673 for ; Wed, 6 Feb 2013 14:29:53 +0100 Original-Received: by mail-bk0-f47.google.com with SMTP id jc3so627114bkc.20 for ; Wed, 06 Feb 2013 05:29:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:content-type:message-id:mime-version:subject:date :references:to:in-reply-to:x-mailer; bh=mE+HfnwHB7vXDEg3Dsin1L/zqZP2Fk3+tMzmGUURa2g=; b=Q4t7r4EBOcbw0ILFuQfwjWxVzVGdYg5U6WjiJV+plx9OLccoEG1T33wOra8LQWckFl AvTrDEjOXnG2qGM9p2eYTlZaAXGMsu4RDoTPyW7QV+1CyGoAixfV2lNZLekVgUKoKe1t rMGDQm43EPeSsKzfIYzwYEZQ+Xvvo3QMnoHYDwFB52J3KczAXdnxZ1ErUUyz7teqe7O2 w6ZRA+6NBI5FKUrzTPIRxRmdjsrQR8j9yj4vchbbISqOY+Ku7qAngtE3Ztpq/8+0XSfO Y75ldDXN2Kn9XRVkb5EXOc16dC2VVP7PJO2Jubki03wWo25aQphvMw+f+qbOxn8Z028l mhJA== X-Received: by 10.204.147.23 with SMTP id j23mr2575347bkv.76.1360157393189; Wed, 06 Feb 2013 05:29:53 -0800 (PST) Original-Received: from keima.localdomain (nrbg-4d073b98.pool.mediaWays.net. [77.7.59.152]) by mx.google.com with ESMTPS id o2sm1321014bkv.3.2013.02.06.05.29.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 05:29:52 -0800 (PST) In-Reply-To: <5111F284.70404@ingohohmann.de> X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.47; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RIV1tR8P - cdb4cbd5e5f7 - 20130206 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:80693 Archived-At: --===============0325709264== Content-Type: multipart/alternative; boundary="Apple-Mail=_DF7D3AF6-F3B4-4457-BFD1-1E380318E732" --Apple-Mail=_DF7D3AF6-F3B4-4457-BFD1-1E380318E732 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 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: >>=20 >>> Hi, >>>=20 >>> is it possible to define a block, where lines are automatically = formatted differently? >>> For example: >>> first line in caps, >>> second in bold, >>> others normal. >>>=20 >>> 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. >>=20 >> 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. >>=20 >> \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 does \setuplines. >=20 > I always get "undefined control sequence". >=20 > \definelines[doFirstBoldRight][command=3D\myLine] > \setupdoFirstBoldRight[align=3Dflushleft] =20 \setuplines[doFirstBoldRight][=85] > OR=20 >=20 > \definelines[doFirstBoldRight][align=3Dflushleft,command=3D\myLine] >=20 > gives the same error. >=20 > Do you have any idea what I am doing wrong? Make a complete example. BTW: I suggest to use my Lua example from the other thread. Wolfgang --Apple-Mail=_DF7D3AF6-F3B4-4457-BFD1-1E380318E732 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 context@ingohohmann.de>:
=20 =20
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 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=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 does \setuplines.

I always get "undefined control sequence".

\definelines[doFirstBoldRight][command=3D\myLine]
\setupdoFirstBoldRight[align=3Dflushleft]    =  

\setuplines[doFirstBoldRight]= [=85]

OR

\definelines[doFirstBoldRight][align=3Dflushleft,command=3D\myLine]
gives the same error.

Do you have any idea what I am doing = wrong?

Make a complete = example.

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

Wolfgang

= --Apple-Mail=_DF7D3AF6-F3B4-4457-BFD1-1E380318E732-- --===============0325709264== 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 ___________________________________________________________________________________ --===============0325709264==--