ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alex Leray <alexandre@stdin.fr>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: Using
Date: Sat, 5 Aug 2023 17:30:51 +0200	[thread overview]
Message-ID: <9f314bba-5152-c4c8-48ad-6df0aae502ec@stdin.fr> (raw)
In-Reply-To: <2d538ffb-2213-6404-ffa4-024653638018@xs4all.nl>

Thanks Hans!

Le 4/08/23 à 23:21, Hans Hagen a écrit :
> 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
> ___________________________________________________________________________________

-- 
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___________________________________________________________________________________
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-08-05 15:33 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 ` [NTG-context] Using Hans Hagen
2023-08-05 15:30   ` Alex Leray [this message]

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=9f314bba-5152-c4c8-48ad-6df0aae502ec@stdin.fr \
    --to=alexandre@stdin.fr \
    --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).