From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: Using
Date: Fri, 4 Aug 2023 23:21:01 +0200 [thread overview]
Message-ID: <2d538ffb-2213-6404-ffa4-024653638018@xs4all.nl> (raw)
In-Reply-To: <52ddb9e4-af1d-fb6c-91ce-822147bc3df9@stdin.fr>
On 8/4/2023 7:42 PM, Alex Leray wrote:
> Hello,
>
> I'm trying to figure out why this is not working (whereas
> \startlines\stoplines works):
>
> ```
> \definehead[poem][section]
> \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}]
>
> \starttext
>
> \startpoem[title={Glijden}][]
> Lorem ipsum dolor sit amet consectetur.
> \stoppoem
>
> \stoptext
> ```
>
> I get the following traceback:
>
> ```
> tex error > tex error on line 6 in file
> /home/ali/work/being_human/test.tex: ! Undefined control sequence
>
>
> \strc_sectioning_initialize_increment ->\edef \currentheadincrement
verbatim is tricky because it changes the catcodes
here is a trick:
\definehead
[poem]
[section]
\setuphead
[poem]
[after=\startlines\tt, % after the head is placed
aftersection=\stoplines] % when we end this section
\startpoem[title={Glijden}]
Lorem ipsum dolor sit amet consectetur.
Lorem ipsum dolor sit amet consectetur.
\stoppoem
it is not pretty coding but it seems to work ok
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 / 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
___________________________________________________________________________________
next prev parent reply other threads:[~2023-08-04 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 17:42 [NTG-context] Using Alex Leray
2023-08-04 21:21 ` Hans Hagen [this message]
2023-08-05 15:30 ` [NTG-context] Using Alex Leray
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=2d538ffb-2213-6404-ffa4-024653638018@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=ntg-context@ntg.nl \
/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).