From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77432 Path: news.gmane.org!not-for-mail From: "Rogers, Michael K" Newsgroups: gmane.comp.tex.context Subject: Re: A "Lorem ipsum" module? Date: Thu, 19 Jul 2012 01:27:37 +0000 Message-ID: <7F211FE8-9457-4D0D-AD7F-AB1C03806FD4@emory.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1039587632==" X-Trace: dough.gmane.org 1342661273 17877 80.91.229.3 (19 Jul 2012 01:27:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2012 01:27:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 19 03:27:53 2012 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 1SrfWy-0007qa-DD for gctc-ntg-context-518@m.gmane.org; Thu, 19 Jul 2012 03:27:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E506102B5; Thu, 19 Jul 2012 03:27:51 +0200 (CEST) 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 wxLk5M6ax9EZ; Thu, 19 Jul 2012 03:27:48 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 86A3B1020A; Thu, 19 Jul 2012 03:27:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 383E41020A for ; Thu, 19 Jul 2012 03:27:47 +0200 (CEST) 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 Slexl2kCk8n4 for ; Thu, 19 Jul 2012 03:27:44 +0200 (CEST) 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 3A844101F5 for ; Thu, 19 Jul 2012 03:27:44 +0200 (CEST) Original-Received: from ndb-mr2.cc.emory.edu (ndb-mr2.cc.emory.edu [170.140.52.250]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q6J1Rga4012223 for ; Thu, 19 Jul 2012 03:27:43 +0200 Original-Received: from e14edge2w.Emory.Edu (emoryfloatdmz.cc.emory.edu [170.140.52.254]) by ndb-mr2.cc.emory.edu (8.13.8/8.13.8) with ESMTP id q6J1RcUj016046 for ; Wed, 18 Jul 2012 21:27:38 -0400 Original-Received: from E14CH4W.Enterprise.emory.net (10.240.10.116) by e14edge2w.Emory.Edu (170.140.108.22) with Microsoft SMTP Server (TLS) id 14.2.283.3; Wed, 18 Jul 2012 21:27:38 -0400 Original-Received: from E14MBX23N.Enterprise.emory.net ([fe80::b473:ef05:b37f:5ccd]) by e14ch4w.Enterprise.emory.net ([::1]) with mapi id 14.02.0283.003; Wed, 18 Jul 2012 21:27:37 -0400 Thread-Topic: [NTG-context] A "Lorem ipsum" module? Thread-Index: AQHNZU2uXB8mjvEiwE2260eFNzdCog== 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: q6J1RcUj016046 X-Emory-MailScanner: Found to be clean X-Emory-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.009, required 8, autolearn=disabled, HTML_MESSAGE 0.00, T_RP_MATCHES_RCVD -0.01) 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: 0RHA1rG6h - 0971c34632a9 - 20120719 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:77432 Archived-At: --===============1039587632== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_7F211FE894574D0DAD7FAB1C03806FD4emoryedu_" --_000_7F211FE894574D0DAD7FAB1C03806FD4emoryedu_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On 2012-07-18 Marcin Borkowski wrote: > in LaTeX, there is quite a useful package called "lipsum", for > typesetting varioud amounts of "Lorem ipsum" stuff. Is there anything > like that in ConTeXt? (I know about \input knuth, \input tufte etc., > but that is not exactly what I have in mind, especially when giving a > sample of some design to a customer;).) The LaTeX lipsum seems to have been pre-download from lipsum.com. ConTeXt makes this relatively easy. The one problem that might = be solved better is that the paragraphs come in a single xml node separated= by single newlines. I defined a lines environment to make these into para= graphs, which is not as pretty as I would like. \startxmlsetups xml:Lorem:base \xmlsetsetup{Lorem}{*}{-} \xmlsetsetup{Lorem}{feed|lipsum}{xml:Lorem:*} \stopxmlsetups \xmlregisterdocumentsetup{Lorem}{xml:Lorem:base} \startxmlsetups xml:Lorem:feed \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:Lorem:lipsum \xmlflush{#1} \stopxmlsetups \definelines[LoremLines] \def\Lorem#1{% #1 =3D number of paragraphs to request \startLoremLines \xmlprocessfile{Lorem}{http://www.lipsum.com/feed/xml?amount=3D#1&what=3D= paras&start=3Dyes}{} \stopLoremLines } \starttext \setupindenting[yes,20pt] \setuplines[LoremLines][command=3D\blank,indenting=3Dyes] \Lorem{12} \stoptext ________________________________ 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_7F211FE894574D0DAD7FAB1C03806FD4emoryedu_ Content-Type: text/html; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable
On 2012-0= 7-18 Marcin Borkowski <mbork@???> wrote: 

> in LaTeX, there is quite a useful package called "lipsum", f= or 
> typesetting varioud amounts of "Lorem ipsum" stuff. Is there= anything 
> like that in ConTeXt? (I know about \input knuth, \input tufte etc.,&n= bsp;
> but that is not exactly what I have in mind, especially when giving a&= nbsp;
> sample of some design to a customer;).)
 

The LaTeX lipsum seems to have been pre-download from lipsum.com.  ConTeXt makes this relatively easy.  The one pro= blem that might be solved better is that the paragraphs come in a single xm= l node separated by single newlines.  I defined a lines environment to= make these into paragraphs, which is not as pretty as I would like.

\startxmlsetups xml:Lorem:base
\xmlse= tsetup{Lorem}{*}{-}
\xmlse= tsetup{Lorem}{feed|lipsum}{xml:Lorem:*}
\stopxmlsetups
\xmlregisterdocumentsetup{Lorem}{xml:Lorem:base}
\startxmlsetups xml:Lorem:feed
  \xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:Lorem:lipsum
  \xmlflush{#1}
\stopxmlsetups
\definelines[LoremLines]
\def\Lorem#1{% #1 =3D number of paragraphs to request
  \startLoremLines
  \xmlprocessfile{Lorem}{http://www.lipsum.com/feed/xml?amount=3D= #1&what=3Dparas&start=3Dyes}{}
  \stopLoremLines
}
\starttext
\setupindenting[yes,20pt]
\setuplines[LoremLines][command=3D\blank,indenting=3Dyes]
\Lorem{12}
\stoptext




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_7F211FE894574D0DAD7FAB1C03806FD4emoryedu_-- --===============1039587632== 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 ___________________________________________________________________________________ --===============1039587632==--