From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113889 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rik Kabel via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: startlines with long lines that break and indent Date: Sun, 26 Dec 2021 16:11:52 -0500 Message-ID: <5d7c2546-d86c-35cf-bad0-34b64c6b4030@rik.users.panix.com> References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5869430273095454051==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26255"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.4.1 Cc: Rik Kabel To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Dec 26 22:12:31 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1aog-0006fc-O3 for gctc-ntg-context-518@m.gmane-mx.org; Sun, 26 Dec 2021 22:12:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EEDA3286DDE; Sun, 26 Dec 2021 22:12:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JVgREkhwDt_V; Sun, 26 Dec 2021 22:11:58 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8C9D2280F53; Sun, 26 Dec 2021 22:11:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C02CD280F53 for ; Sun, 26 Dec 2021 22:11:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QCsr6SyoaAXS for ; Sun, 26 Dec 2021 22:11:55 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=166.84.1.89; helo=mailbackend.panix.com; envelope-from=context@rik.users.panix.com; receiver= Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8D479280AE2 for ; Sun, 26 Dec 2021 22:11:55 +0100 (CET) Original-Received: from [192.168.1.106] (cpe-69-204-136-231.nycap.res.rr.com [69.204.136.231]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4JMYQK1zcmzLQp for ; Sun, 26 Dec 2021 16:11:53 -0500 (EST) Content-Language: en-US In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:113889 Archived-At: This is a multi-part message in MIME format. --===============5869430273095454051== Content-Type: multipart/alternative; boundary="------------YGyGMKSSG6AlwAF7RJ9O2LZU" Content-Language: en-US This is a multi-part message in MIME format. --------------YGyGMKSSG6AlwAF7RJ9O2LZU Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2021-12-26 11:36, juh via ntg-context wrote: > Hi all, > > I am looking for a way to make startstoplines likes this: > > > This is a long line > that breaks, > the second line, > the third line. > > So if a line in the poem is too long it shall break and indent. > > TIA > juh You can play with something based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me. \define\Poemindent{3em} \define\Poeminset{14em} \definedelimitedtext[Poe] \setupwhitespace[medium] \showframe \startbuffer[Poem]   This is a long line that breaks,   the second line,   the third line.   The second stanza starts. \stopbuffer \setupdelimitedtext[Poe][   rightmargin=\Poeminset,   leftmargin={\dimexpr\Poemindent+\Poeminset\relax},       before={\setuplines[                    before=,                 inbetween={\blank[small]},                     after=,                ]               \startlines               \setupindenting[-\Poemindent,yes]               \startparagraph},        after=\stopparagraph              \stoplines,  ] \starttext \startparagraph  Here comes a poem – watch the lines break! \stopparagraph     \startPoe       \inlinebuffer[Poem]     \stopPoe \startparagraph  Now, it is gone. Good-bye. \stopparagraph \stoptext -- Rik --------------YGyGMKSSG6AlwAF7RJ9O2LZU Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2021-12-26 11:36, juh via ntg-context wrote:
Hi all,

I am looking for a way to make startstoplines likes this:


This is a long line
    that breaks,
the second line,
the third line.

So if a line in the poem is too long it shall break and indent.

TIA
juh

You can play with something based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me.

\define\Poemindent{3em}
\define\Poeminset{14em}
\definedelimitedtext[Poe]
\setupwhitespace[medium]
\showframe

\startbuffer[Poem]
  This is a long line that breaks,
  the second line,
  the third line.

  The second stanza starts.
\stopbuffer

\setupdelimitedtext[Poe][
  rightmargin=\Poeminset,
  leftmargin={\dimexpr\Poemindent+\Poeminset\relax},
      before={\setuplines[
                   before=,
                inbetween={\blank[small]},
                    after=,
               ]
              \startlines
              \setupindenting[-\Poemindent,yes]
              \startparagraph},
       after=\stopparagraph
             \stoplines,
 ]

\starttext

\startparagraph

 Here comes a poem – watch the lines break!

\stopparagraph

    \startPoe
      \inlinebuffer[Poem]
    \stopPoe

\startparagraph

 Now, it is gone. Good-bye.

\stopparagraph

\stoptext

--
Rik

--------------YGyGMKSSG6AlwAF7RJ9O2LZU-- --===============5869430273095454051== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5869430273095454051==--