From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11336 invoked from network); 14 Jun 2023 03:47:52 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 14 Jun 2023 03:47:52 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 22814724F; Wed, 14 Jun 2023 05:47:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 KzF-Ynmm-5xu; Wed, 14 Jun 2023 05:47:18 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 57A007250; Wed, 14 Jun 2023 05:47:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 92EF47250 for ; Wed, 14 Jun 2023 05:47:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 xzJhGS_YonBK for ; Wed, 14 Jun 2023 05:47:14 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.160.179; helo=mail-qt1-f179.google.com; envelope-from=thangalin@gmail.com; receiver= Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 232BB724F for ; Wed, 14 Jun 2023 05:47:14 +0200 (CEST) Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-3f866383b25so15507651cf.2 for ; Tue, 13 Jun 2023 20:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686714430; x=1689306430; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=cu5d6xoVNKgPlBimmuC2YWWmPGNQ+nQDR50xkUfHXEc=; b=TX1p4//hLmI0UMOIECVt2hPJbRhL61DmtG6rKa/bGUZFDhdEbf0Z8Mlg1AuevGQpms VClOK1Ydh3HMoSmQ2YT29uM9echCmg2QelZukodDxmSX7nZ1FGnaZwyCCdzPVW5NFDE6 horDE0/4nttx8BD8vtXO7s5KnE+k4adPXjjj/WstIRhVx2UrPFn/VZMN5nfh0yuZajWW qPnS/inFywGN4kicDqMk6piDoNfXmsjq64VC45hvgAC4/fZIiiELcPiWhRnhgOyn9hNN JONp9Vke5s3oVuo8wHZFz6ytsGqFy77iAaloFsnaoQ/6MA9cLraV96FJIBbDIpoN4m7C uJzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686714430; x=1689306430; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cu5d6xoVNKgPlBimmuC2YWWmPGNQ+nQDR50xkUfHXEc=; b=XhYYudM/z5c+vfbx6eb5Pb1ErRESr6M4y0NSmmNBKd4E8eyadJLHrrRLeKRECXsoD5 vLYMxiQba5edXrJF8ZtFbT/hut9MoSZShFcZk4NokF66CYJfU2b9qhSfXc0r9HQ093bD ZVfWDeJscJ309wC6J9KK/BfeOWfGyCLDn4XqjlQrMdohXVWSXO5ODCD4LfsPOsp4Hell WzL/SkL8hTnyg4JQPv9TsQGV7oxOez8iUCzDl6MJBbNHCeyG6oqH+muQKBQg3yRn19pi KbDVZBj1cJyPoM7PYdHZOkwkcbqDXaKCzU/dEq7GviY+QvHc2bLSKl8r16hiQAJSEUmR wblg== X-Gm-Message-State: AC+VfDzA/VFamx/2HZsCYmAyfZYClV14eesFKF3h1bfbzILjLF+G7IOY 1pWkKeoSxmS6FaRFaRTNGYC5GcWmDcCIk9yM/z9HTkapUVE= X-Google-Smtp-Source: ACHHUZ4863siTeZgxvCbsRwWd7u3mlRIKr8rNYPCLO8sppT1v9KG0LCL0MxffLn7ANKBILCniR+CUXHpNR0pbGcQlgs= X-Received: by 2002:a05:622a:1794:b0:3f6:ad2f:3922 with SMTP id s20-20020a05622a179400b003f6ad2f3922mr977465qtk.8.1686714430473; Tue, 13 Jun 2023 20:47:10 -0700 (PDT) MIME-Version: 1.0 References: <2B49A49C-A649-48F5-8789-5F057EC30E15@gmail.com> In-Reply-To: Date: Tue, 13 Jun 2023 20:46:59 -0700 Message-ID: To: mailing list for ConTeXt users Subject: Re: [NTG-context] Protect the lettrine X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thangalin via ntg-context Reply-To: mailing list for ConTeXt users Cc: Thangalin Content-Type: multipart/mixed; boundary="===============3954746768041906629==" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" --===============3954746768041906629== Content-Type: multipart/alternative; boundary="0000000000007747b705fe0ece01" --0000000000007747b705fe0ece01 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for taking the time to reply, linguafalsa, I appreciate it. The source document is written in Markdown using KeenWrite, my Markdown editor. Inserting typesetting instructions into the document would defeat the software's architecture, hence being untenable. After the Markdown is transformed into XHTML, a specific theme instructs ConTeXt how to typeset the XHTML. Here's a video showing how theme selection works: https://youtu.be/3QpX70O5S30?list=3DPLB-WIt1cZYLm1MMx2FBG9KWzPIoWZMKu_&t=3D= 14 I hope this explains the situation more clearly about why changing the code between \starttext and \stoptext isn't an option, as you've done with introducing and using a macro. Greets! On Tue, Jun 13, 2023 at 7:33=E2=80=AFPM linguafalsa--- via ntg-context < ntg-context@ntg.nl> wrote: > On Tue, Jun 13, 2023 at 02:01:14PM -0700, Thangalin via ntg-context wrote= : > > Thanks Otared, > > > > Unfortunately, that's adding content between \starttext and \stoptext, > > which isn't tenable in my situation. The user is writing in Markdown, > which > > is automatically converted to XHTML then passed to ConTeXt, and so the > > setups need to account for this scenario without modifying the source > > document. > > > > Yeah yeah yeah, tenable. A lot of things aren't tenable. Anyhow, > What source document are you talking about here? > > You're already sourcing the lines after chapter one. As a matter of > fact, if you weren't sourcing, then you'd have zilch, nada, zero, empty, > null, void, an space, a separation, an abstract > > Just define Kermit Muffins and it should be good to go > > > \setupinitial[n=3D2] > > \def\KermitMuffins{\vbox{Kermit Muffins\par\hskip 1.3cm \tfd Meet me at > the second line}} > > \setuphead[chapter][ > after=3D{\placeinitial}, > page=3Dno, > ] > > \starttext > \chapter{one} > \KermitMuffins > > \chapter{two} > \input knuth > > Meet me at the second line. > \stoptext > > > > > Cheers! > > > > On Tue, Jun 13, 2023 at 1:30=E2=80=AFAM Otared Kavian via ntg-context < > > ntg-context@ntg.nl> wrote: > > > > > Hi, > > > > > > Adding \hfill\break to the short line solves the issue, but probably > there > > > is a better way to achieve the correct result. > > > > > > \setupinitial[n=3D2] > > > > > > \setuphead[chapter][ > > > after=3D{\placeinitial}, > > > page=3Dno, > > > ] > > > > > > \starttext > > > \chapter{one} > > > Kermit Ruffins \hfill\break % <--- > > > > > > Meet me at the second line. > > > > > > \chapter{two} > > > \input knuth > > > > > > Meet me at the second line. > > > \stoptext > > > > > > > > > > > > > Best regards: Otared > > > > > > On 13 Jun 2023, at 04:43, Thangalin via ntg-context < > ntg-context@ntg.nl> > > > wrote: > > > > > > I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapt= er > > > wherein the first letter is a lettrine. When the first paragraph is t= oo > > > short, the second paragraph overlaps the lettrine. > > > > > > % SOT > > > \setupinitial[n=3D2] > > > > > > \setuphead[chapter][ > > > after=3D{\placeinitial}, > > > page=3Dno, > > > ] > > > > > > \starttext > > > \chapter{one} > > > Kermit Ruffins > > > > > > Meet me at the second line. > > > > > > \chapter{two} > > > \input knuth > > > > > > Meet me at the second line. > > > \stoptext > > > % EOT > > > > > > Produces: https://i.stack.imgur.com/kNDqw.png > > > > > > How would you instruct ConTeXt to "protect" the lettrine such that > > > regardless of whether the first paragraph spans multiple lines, a sho= rt > > > first paragraph will still prevent the second paragraph from > overlapping > > > the lettrine? > > > > > > That is, the setups should work in both cases, without any knowledge > about > > > the first paragraph length being added between \starttext and > \stoptext. > > > > > > ConTeXt LMTX version: 2023.06.04 18:58 > > > > > > Thank you! > > > > > > > _________________________________________________________________________= __________ > > > If your question is of interest to others as well, please add an entr= y > to > > > the Wiki! > > > > > > maillist : ntg-context@ntg.nl / > > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > wiki : https://contextgarden.net > > > > > > > _________________________________________________________________________= __________ > > > > > > > > > Otared Kavian > > > e-mail: otared@gmail.com > > > Phone: +33 6 88 26 70 95 > > > > > > > > > > > > > > > > > > > _________________________________________________________________________= __________ > > > If your question is of interest to others as well, please add an entr= y > to > > > the Wiki! > > > > > > maillist : ntg-context@ntg.nl / > > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > wiki : https://contextgarden.net > > > > > > > _________________________________________________________________________= __________ > > > > > > > _________________________________________________________________________= __________ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : https://contextgarden.net > > > _________________________________________________________________________= __________ > > > -- > ... an anecdote from IBM's Yorktown Heights Research Center. When a > programmer used his new computer terminal, all was fine when he was sitti= ng > down, but he couldn't log in to the system when he was standing up. That > behavior was 100 percent repeatable: he could always log in when sitting > and > never when standing. > > Most of us just sit back and marvel at such a story; how could that > terminal > know whether the poor guy was sitting or standing? Good debuggers, thoug= h, > know that there has to be a reason. Electrical theories are the easiest = to > hypothesize: was there a loose wire under the carpet, or problems with > static > electricity? But electrical problems are rarely consistently reproducibl= e. > An alert IBMer finally noticed that the problem was in the terminal's > keyboard: the tops of two keys were switched. When the programmer was > seated > he was a touch typist and the problem went unnoticed, but when he stood h= e > was > led astray by hunting and pecking. > -- "Programming Pearls" column, by Jon Bentley in CACM > February 1985 > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > _________________________________________________________________________= __________ > --0000000000007747b705fe0ece01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for taking the time to rep= ly, linguafalsa, I appreciate it.

The source docum= ent is written in Markdown using KeenWrite, my Markdown editor. Inserting t= ypesetting instructions into the document would defeat the software's a= rchitecture, hence being untenable. After the Markdown is transformed into = XHTML, a specific theme instructs ConTeXt how to typeset the XHTML.

Here's a video showing how theme selection works:
=


I hope this explains the situation more clearly about why changing th= e code between \starttext and \stoptext isn't an option, as you've = done with introducing and using a macro.

Greet= s!

On Tue, Jun 13, 2023 at 7:33=E2=80=AFPM linguafalsa--- via ntg-= context <ntg-context@ntg.nl>= ; wrote:
On Tue,= Jun 13, 2023 at 02:01:14PM -0700, Thangalin via ntg-context wrote:
> Thanks Otared,
>
> Unfortunately, that's adding content between \starttext and \stopt= ext,
> which isn't tenable in my situation. The user is writing in Markdo= wn, which
> is automatically converted to XHTML then passed to ConTeXt, and so the=
> setups need to account for this scenario without modifying the source<= br> > document.
>

Yeah yeah yeah, tenable. A lot of things aren't tenable. Anyhow,
What source document are you talking about here?

You're already sourcing the lines after chapter one. As a matter of
fact, if you weren't sourcing, then you'd have zilch, nada, zero, e= mpty,
null, void, an space, a separation, an abstract

Just define Kermit Muffins and it should be good to go


\setupinitial[n=3D2]

\def\KermitMuffins{\vbox{Kermit Muffins\par\hskip 1.3cm \tfd Meet me at
the second line}}

\setuphead[chapter][
=C2=A0 after=3D{\placeinitial},
=C2=A0 page=3Dno,
]

\starttext
\chapter{one}
\KermitMuffins

\chapter{two}
\input knuth

Meet me at the second line.
\stoptext



> Cheers!
>
> On Tue, Jun 13, 2023 at 1:30=E2=80=AFAM Otared Kavian via ntg-context = <
> ntg-context@nt= g.nl> wrote:
>
> > Hi,
> >
> > Adding \hfill\break to the short line solves the issue, but proba= bly there
> > is a better way to achieve the correct result.
> >
> > \setupinitial[n=3D2]
> >
> > \setuphead[chapter][
> >=C2=A0 =C2=A0after=3D{\placeinitial},
> >=C2=A0 =C2=A0page=3Dno,
> > ]
> >
> > \starttext
> > \chapter{one}
> > Kermit Ruffins \hfill\break % <---
> >
> > Meet me at the second line.
> >
> > \chapter{two}
> > \input knuth
> >
> > Meet me at the second line.
> > \stoptext
> >




> >
> > Best regards: Otared
> >
> > On 13 Jun 2023, at 04:43, Thangalin via ntg-context <ntg-context@ntg.nl>=
> > wrote:
> >
> > I'm using KeenWrite Themes (specifically, Boschet) to typeset= a chapter
> > wherein the first letter is a lettrine. When the first paragraph = is too
> > short, the second paragraph overlaps the lettrine.
> >
> > % SOT
> > \setupinitial[n=3D2]
> >
> > \setuphead[chapter][
> >=C2=A0 =C2=A0after=3D{\placeinitial},
> >=C2=A0 =C2=A0page=3Dno,
> > ]
> >
> > \starttext
> > \chapter{one}
> > Kermit Ruffins
> >
> > Meet me at the second line.
> >
> > \chapter{two}
> > \input knuth
> >
> > Meet me at the second line.
> > \stoptext
> > % EOT
> >
> > Produces: https://i.stack.imgur.com/kNDqw.png
> >
> > How would you instruct ConTeXt to "protect" the lettrin= e such that
> > regardless of whether the first paragraph spans multiple lines, a= short
> > first paragraph will still prevent the second paragraph from over= lapping
> > the lettrine?
> >
> > That is, the setups should work in both cases, without any knowle= dge about
> > the first paragraph length being added between \starttext and \st= optext.
> >
> > ConTeXt LMTX version: 2023.06.04 18:58
> >
> > Thank you!
> >
> > _________________________________________________________________= __________________
> > If your question is of interest to others as well, please add an = entry to
> > the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > https://www.ntg.nl/mailman/listinfo/ntg-c= ontext
> > webpage=C2=A0 : https://www.pragma-ade.nl / http://context.aa= nhet.net
> > archive=C2=A0 : https://bitbucket.org/phg= /context-mirror/commits/
> > wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
> >
> > _________________________________________________________________= __________________
> >
> >
> > Otared Kavian
> > e-mail: ota= red@gmail.com <otared@gmail.com>
> > Phone: +33 6 88 26 70 95
> >
> >
> >
> >
> >
> > _________________________________________________________________= __________________
> > If your question is of interest to others as well, please add an = entry to
> > the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > https://www.ntg.nl/mailman/listinfo/ntg-c= ontext
> > webpage=C2=A0 : https://www.pragma-ade.nl / http://context.aa= nhet.net
> > archive=C2=A0 : https://bitbucket.org/phg= /context-mirror/commits/
> > wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
> >
> > _________________________________________________________________= __________________
> >

> ______________________________________________________________________= _____________
> If your question is of interest to others as well, please add an entry= to the Wiki!
>
> maillist : ntg= -context@ntg.nl / https://www.ntg.nl/mailman/list= info/ntg-context
> webpage=C2=A0 : https://www.pragma-ade.nl / http://context.aanhet.= net
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
> ______________________________________________________________________= _____________


--
... an anecdote from IBM's Yorktown Heights Research Center.=C2=A0 When= a
programmer used his new computer terminal, all was fine when he was sitting=
down, but he couldn't log in to the system when he was standing up.=C2= =A0 That
behavior was 100 percent repeatable: he could always log in when sitting an= d
never when standing.

Most of us just sit back and marvel at such a story; how could that termina= l
know whether the poor guy was sitting or standing?=C2=A0 Good debuggers, th= ough,
know that there has to be a reason.=C2=A0 Electrical theories are the easie= st to
hypothesize: was there a loose wire under the carpet, or problems with stat= ic
electricity?=C2=A0 But electrical problems are rarely consistently reproduc= ible.
An alert IBMer finally noticed that the problem was in the terminal's keyboard: the tops of two keys were switched.=C2=A0 When the programmer was= seated
he was a touch typist and the problem went unnoticed, but when he stood he = was
led astray by hunting and pecking.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -- "Programmin= g Pearls" column, by Jon Bentley in CACM February 1985

___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / https://www.ntg.nl/mailman/listinfo/= ntg-context
webpage=C2=A0 : https://www.pragma-ade.nl / http://context.aanhet.net
archive=C2=A0 :
https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
___________________________________________________________________________= ________
--0000000000007747b705fe0ece01-- --===============3954746768041906629== 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============3954746768041906629==--