ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Problem with \head inside \itemize
@ 2021-12-21 13:04 Benjamin Buchmuller via ntg-context
  2021-12-21 17:03 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Buchmuller via ntg-context @ 2021-12-21 13:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Benjamin Buchmuller

Not sure if this is the behavior to expect, but I would like to get formatted inline headers in itemize like:

– Unformatted item.
– *Head One.* Something bla bla.
– *Head Two.* Other bla bla.

From:

\setupitemize[each][2, headintext]
% \setupitemize[each][headstyle={\groupedcommand{\bf}{.\space\tf}}]
\setupitemize[each][headcolor=red, headstyle=bold]

\startitemize
\item Unformatted item.
\head Head One \par Something bla bla.
\starthead Head Two \stophead Other bla bla. % Even worse: No inline any more.
\stopitemize

However, headstyle= and headcolor= seem to spill all over … Is it a feature or a bug?

Thanks


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

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

* Re: Problem with \head inside \itemize
  2021-12-21 13:04 Problem with \head inside \itemize Benjamin Buchmuller via ntg-context
@ 2021-12-21 17:03 ` Wolfgang Schuster via ntg-context
  2021-12-23  8:06   ` Benjamin Buchmuller via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-12-21 17:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Benjamin Buchmuller via ntg-context
  Cc: Wolfgang Schuster, Benjamin Buchmuller

Benjamin Buchmuller via ntg-context schrieb am 21.12.2021 um 14:04:
> Not sure if this is the behavior to expect, but I would like to get formatted inline headers in itemize like:

The syntax for \starthead is

     \starthead {...} ... \stophead

where the argument within the braces is mandatory.

> – Unformatted item.
> – *Head One.* Something bla bla.
> – *Head Two.* Other bla bla.
>
> From:
>
> \setupitemize[each][2, headintext]
> % \setupitemize[each][headstyle={\groupedcommand{\bf}{.\space\tf}}]
> \setupitemize[each][headcolor=red, headstyle=bold]
>
> \startitemize
> \item Unformatted item.
> \head Head One \par Something bla bla.
> \starthead Head Two \stophead Other bla bla. % Even worse: No inline any more.
> \stopitemize
>
> However, headstyle= and headcolor= seem to spill all over … Is it a feature or a bug?

No bug, just a user error. When you put the head text in the argument of 
\starthead everything works as expected.

\starttext

\startitemize[headintext][headstyle=bold]
\startitem Unformatted item. \stopitem
\starthead {Head One.} Something bla bla. \stophead
\starthead {Head Two.} Other bla bla. \stophead
\stopitemize

\stoptext

Wolfgang

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

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

* Re: Problem with \head inside \itemize
  2021-12-21 17:03 ` Wolfgang Schuster via ntg-context
@ 2021-12-23  8:06   ` Benjamin Buchmuller via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Buchmuller via ntg-context @ 2021-12-23  8:06 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: Benjamin Buchmuller, mailing list for ConTeXt users

Thanks, Wolfgang, perfectly works! I added an example to the Wiki.

> On Dec 21, 2021, at 18:03, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> 
> Benjamin Buchmuller via ntg-context schrieb am 21.12.2021 um 14:04:
>> Not sure if this is the behavior to expect, but I would like to get formatted inline headers in itemize like:
> 
> The syntax for \starthead is
> 
>     \starthead {...} ... \stophead
> 
> where the argument within the braces is mandatory.
> 
>> – Unformatted item.
>> – *Head One.* Something bla bla.
>> – *Head Two.* Other bla bla.
>> 
>> From:
>> 
>> \setupitemize[each][2, headintext]
>> % \setupitemize[each][headstyle={\groupedcommand{\bf}{.\space\tf}}]
>> \setupitemize[each][headcolor=red, headstyle=bold]
>> 
>> \startitemize
>> \item Unformatted item.
>> \head Head One \par Something bla bla.
>> \starthead Head Two \stophead Other bla bla. % Even worse: No inline any more.
>> \stopitemize
>> 
>> However, headstyle= and headcolor= seem to spill all over … Is it a feature or a bug?
> 
> No bug, just a user error. When you put the head text in the argument of \starthead everything works as expected.
> 
> \starttext
> 
> \startitemize[headintext][headstyle=bold]
> \startitem Unformatted item. \stopitem
> \starthead {Head One.} Something bla bla. \stophead
> \starthead {Head Two.} Other bla bla. \stophead
> \stopitemize
> 
> \stoptext
> 
> Wolfgang

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

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

* Re: Problem with \head inside \itemize
  2021-11-22 13:30 ` Taco Hoekwater via ntg-context
@ 2021-11-22 14:59   ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2021-11-22 14:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Taco Hoekwater

On 11/22/2021 2:30 PM, Taco Hoekwater via ntg-context wrote:
> 
> 
>> On 22 Nov 2021, at 14:15, Jean-Philippe Rey via ntg-context <ntg-context@ntg.nl> wrote:
>>
>> Dear list,
>>
>> The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 LMTX
>> but produces an error with the current LMTX version (at least since ConTeXt  ver: 2021.09.26 17:00 LMTX).
>> Adding an explicit \par at the end of the \head line allows the example to work.
> 
> It seems like the newest LMTX versions don’t handle implicit \par (empty lines) as argument
> delimiter any more, the argument has to be terminated by the explicit string “\par", just
> like any other argument delimiter.
> 
> This is definitely a change, but I would vote for that change to stay. ;)
there is some experimental stuff involved

\starttext

     default: \the\autoparagraphmode \blank

     % 0x1 text | 0x2 macro | 0x4 go-on

     \autoparagraphmode0 \def\foo#1\par{[#1]} 0: \foo test\par test\par
     \autoparagraphmode1 \def\foo#1\par{[#1]} 1: \foo test\par test\par
     \autoparagraphmode2 \def\foo#1\par{[#1]} 2: \foo test\par test\par
     \autoparagraphmode4 \def\foo#1\par{[#1]} 4: \foo test\par test\par

\starttext

but inceed i'd like to get rid of par delimited commands (afaiks we have 
only two left) and \starthead .. \stophead is the way to go

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

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

* Re: Problem with \head inside \itemize
  2021-11-22 13:15 Jean-Philippe Rey via ntg-context
@ 2021-11-22 13:30 ` Taco Hoekwater via ntg-context
  2021-11-22 14:59   ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater via ntg-context @ 2021-11-22 13:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater



> On 22 Nov 2021, at 14:15, Jean-Philippe Rey via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear list,
> 
> The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 LMTX
> but produces an error with the current LMTX version (at least since ConTeXt  ver: 2021.09.26 17:00 LMTX).
> Adding an explicit \par at the end of the \head line allows the example to work.

It seems like the newest LMTX versions don’t handle implicit \par (empty lines) as argument 
delimiter any more, the argument has to be terminated by the explicit string “\par", just 
like any other argument delimiter. 

This is definitely a change, but I would vote for that change to stay. ;)

Best wishes,
Taco

— 
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)



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

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

* Problem with \head inside \itemize
@ 2021-11-22 13:15 Jean-Philippe Rey via ntg-context
  2021-11-22 13:30 ` Taco Hoekwater via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Philippe Rey via ntg-context @ 2021-11-22 13:15 UTC (permalink / raw)
  To: ntg-context; +Cc: Jean-Philippe Rey

Dear list,

The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 LMTX
but produces an error with the current LMTX version (at least since ConTeXt  ver: 2021.09.26 17:00 LMTX).
Adding an explicit \par at the end of the \head line allows the example to work.

Best regards,
JP

Here is the minimal failing example :

===================
\starttext
\startitemize
\head Title

text
\stopitemize
\stoptext
===================

and the corresponding log output :

===================
resolvers       | formats | executing runner 'run luametatex format': /Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./mfe-head.tex" --fmt=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:currentrun=1 --c:fulljobname="./mfe-head.tex" --c:input="./mfe-head.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin"
system          > 
system          > ConTeXt  ver: 2021.11.19 09:31 LMTX  fmt: 2021.11.22  int: english/english
system          > 
system          > 'cont-new.mkxl' loaded
open source     > level 1, order 1, name '/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 1, order 1, name '/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > files > jobname './mfe-head', input './mfe-head.tex', result './mfe-head'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 1, order 2, name './mfe-head.tex'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
tex error       > tex error on line 8 in file ./mfe-head.tex: The file ended when scanning an argument.

Title \par text \stopitemize \stoptext 

<line 3.8> 
    \stoptext

1     \starttext
2     \startitemize
3     \head Title
4     
5     text
6     \stopitemize
7     \stoptext
8 >>  
mtx-context     | fatal error: return code: 256
============================================

-- 
Jean-Philippe Rey
jean-philippe.rey@centralesupelec.fr
91192 Gif-sur-Yvette Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

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

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

end of thread, other threads:[~2021-12-23  8:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 13:04 Problem with \head inside \itemize Benjamin Buchmuller via ntg-context
2021-12-21 17:03 ` Wolfgang Schuster via ntg-context
2021-12-23  8:06   ` Benjamin Buchmuller via ntg-context
  -- strict thread matches above, loose matches on Subject: below --
2021-11-22 13:15 Jean-Philippe Rey via ntg-context
2021-11-22 13:30 ` Taco Hoekwater via ntg-context
2021-11-22 14:59   ` Hans Hagen via ntg-context

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).