ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Thangalin via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Thangalin <thangalin@gmail.com>
Subject: Re: [NTG-context] Protect the lettrine
Date: Tue, 13 Jun 2023 14:11:43 -0700	[thread overview]
Message-ID: <CAANrE7px65A1D9UcgCRuGABkUtqRwuqXpCq8YOXXvFDyYV_crw@mail.gmail.com> (raw)
In-Reply-To: <CAANrE7oiz8U9ThvU4Tp4MNY7c_hfa4Osy-AckxWtwrO=55X7pA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3628 bytes --]

Here's the output I'm looking to achieve:

https://i.stack.imgur.com/XeZQS.png

Note how the second line honours the lettrine's width and padding, in the
same way that the second line of the first paragraph in Knuth's quote
respects the width and padding.

On Tue, Jun 13, 2023 at 2:01 PM Thangalin <thangalin@gmail.com> 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.
>
> Cheers!
>
> On Tue, Jun 13, 2023 at 1:30 AM 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=2]
>>
>> \setuphead[chapter][
>>   after={\placeinitial},
>>   page=no,
>> ]
>>
>> \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=2]
>>
>> \setuphead[chapter][
>>   after={\placeinitial},
>>   page=no,
>> ]
>>
>> \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 short
>> 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 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
>>
>> ___________________________________________________________________________________
>>
>>
>> Otared Kavian
>> e-mail: otared@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-context
>> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : https://contextgarden.net
>>
>> ___________________________________________________________________________________
>>
>

[-- Attachment #1.2: Type: text/html, Size: 5957 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2023-06-13 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  2:43 Thangalin via ntg-context
2023-06-13  8:29 ` Otared Kavian via ntg-context
2023-06-13 21:01   ` Thangalin via ntg-context
2023-06-13 21:11     ` Thangalin via ntg-context [this message]
2023-06-14  2:32     ` linguafalsa--- via ntg-context
2023-06-14  3:46       ` Thangalin via ntg-context
2023-06-14 17:43         ` linguafalsa--- via ntg-context
2023-06-14 21:32           ` Thangalin via ntg-context
2023-06-15  6:35             ` Max Chernoff via ntg-context
2023-06-16 18:25               ` Hans Hagen via ntg-context
2023-06-26  1:52                 ` Thangalin via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAANrE7px65A1D9UcgCRuGABkUtqRwuqXpCq8YOXXvFDyYV_crw@mail.gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=thangalin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).