ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Using
@ 2023-08-04 17:42 Alex Leray
  2023-08-04 21:21 ` [NTG-context] Using Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Leray @ 2023-08-04 17:42 UTC (permalink / raw)
  To: Alan Braslau via ntg-context

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
 
{\headparameter \c!incrementnumber }\ifcsname \??headincrement 
\currentheadincrement \endcsname \lastnamedcs \else \settrue 
\c_strc_sectioning_increment \settrue \c_strc_sectionin...
\strc_sectioning_handle ... \currentheadsection 
}\strc_sectioning_initialize_autolevel 
\strc_sectioning_initialize_increment
 
 
\strc_sectioning_initialize_placement \strc_sectioning_initialize_number 
\the \everybeforesectionheadhandle \let \getheadn...
\strc_sectioning_start_named_section ...parameter \c!beforesection \the 
\everybeforehead \strc_sectioning_handle {#1}{#2}{#3}
 
                                                      \headparameter 
\c!insidesection
l.6 \startpoem[title={Glijden}][]


  1     \definehead[poem][section]
  2     \setuphead[poem][beforesection={\starttyping}, 
aftersection={\stoptyping}]
  3
  4     \starttext
  5
  6 >>  \startpoem[title={Glijden}][]
  7     Lorem ipsum dolor sit amet consectetur.
  8     \stoppoem
  9
10     \stoptext
11

mtx-context     | fatal error: return code: 256
```

Any idea?

thanks a lot!

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: Using
  2023-08-04 17:42 [NTG-context] Using Alex Leray
@ 2023-08-04 21:21 ` Hans Hagen
  2023-08-05 15:30   ` Alex Leray
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2023-08-04 21:21 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: Using
  2023-08-04 21:21 ` [NTG-context] Using Hans Hagen
@ 2023-08-05 15:30   ` Alex Leray
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Leray @ 2023-08-05 15:30 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-05 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).