From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Thangalin <thangalin@gmail.com>
Subject: Re: Capitalize first word of first line within \startlines
Date: Wed, 4 Mar 2020 18:04:09 +0100 [thread overview]
Message-ID: <17137dcc-7a05-de5e-1527-5a98b9a43c55@xs4all.nl> (raw)
In-Reply-To: <CAANrE7qVaU3-rhegaUO1fX4mZcbKmRGnQY2xywP+7PH4vZx5EA@mail.gmail.com>
On 3/4/2020 5:09 PM, Thangalin wrote:
> Looking to uppercase the first word of a poem:
>
> \setupindenting[yes, 0.75em]
>
> \setupinitial[
> state=start,
> n=2,
> distance=\zeropoint,
> ]
>
> % This does not appear to work?
> \definealternativestyle[PoemFirstWord][\WORD][]
>
> \definefirstline[PoemFirstLine][
> alternative=word,
> style=PoemFirstWord,
> n=1,
> ]
>
> \definestartstop[poem][
> before={\startlines \setfirstline[PoemFirstLine] \placeinitial},
> after={\stoplines},
> ]
>
> \setuplines[indenting=odd]
>
> \starttext
> \startpoem
> Some say the world will end in fire,
> Some say in ice.
> From what I've tasted of desire
> I hold with those who favor fire.
> But if it had to perish twice,
> I think I know enough of hate
> To say that for destruction ice
> Is also great,
> And would suffice.
> \stoppoem
> \stoptext
>
> Any ideas why the first word is not capitalized?
because it is not applied to that stretch ... but i will send you
something to play with ... kind of braindead trivial piece of code but
it needs testing a bit
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2020-03-04 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 16:09 Thangalin
2020-03-04 17:04 ` Hans Hagen [this message]
[not found] ` <2d3e75b2-f5eb-91f4-85a6-f71c43861958@xs4all.nl>
[not found] ` <df1a45f0-3a44-b09f-0538-bb985a851648@gmail.com>
2020-03-05 1:46 ` Thangalin
2020-03-05 8:46 ` Hans Hagen
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=17137dcc-7a05-de5e-1527-5a98b9a43c55@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=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).