ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: jbf <roma83537@gmail.com>
To: Marco Patzer <lists@homerow.info>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Part label and chapter numbers
Date: Tue, 5 Jan 2021 09:27:01 +1100	[thread overview]
Message-ID: <1b9a82f6-9d64-93d4-e0b7-669067f0128b@gmail.com> (raw)
In-Reply-To: <20210104230928.380f2779@homerow>

Indeed the no-break spaces were the problem, something I had quite 
overlooked (so have made a 'message to brain' not to overlook this in 
the future). I did know about the use of %, but if one searches on the 
Contextgarden Wiki for \nobreakspace, one finds nothing. Clearly a TeX 
command that one just has to know!

Once again thank you for gently moving me in the right direction!

Julian

On 5/1/21 9:09 am, Marco Patzer wrote:
> On Tue, 5 Jan 2021 08:32:33 +1100
> jbf <roma83537@gmail.com> wrote:
>
>> and apologies if you didn't think I provided an MWE.
> The idea is that people can just copy-paste the code into an editor
> and keep tweaking. It doesn't have to produce the correct output,
> but it should compile. If you add an MWE you're more likely to get a
> response.
>
>> Of the three issues below, only the first is not resolved, meaning
>> that part=Section\nobreakspace does not make any difference, or put
>> another way, at least it stops things from throwing an error, but the
>> result I get is not 'Section 1. My title' but simply '1. My  title'.
> Here's what an MWE with the code I posted looks like:
>
> \setuphead
>    [part]
>    [placehead=yes,
>     bodypartlabel=part]
>
> \setuplabeltext
>    [part=Section\nobreakspace]
>
> \setuplabeltext
>    [chapter=Chapter\nobreakspace]
>
> \setuphead
>    [chapter]
>    [conversion=Words]
>
> \setuphead
>    [chapter]
>    [sectionsegments=chapter]
>
> \setuphead
>    [section]
>    [sectionsegments=chapter:section]
>
> \starttext
>    \startpart [title=Mypart]
>      \startchapter [title=Some Chapter]
>        \startsection [title=Some Section]
>          \samplefile{knuth}
>        \stopsection
>      \stopchapter
>    \stoppart
> \stoptext
>
> And the string “Section 1 Mypart” shows up there.
>
>> Below is exactly what I have in my preamble. Note that I have also
>> included \setuphead [section] which is the true 'section' level below
>> 'chapter'. Is it possible that this causes some confusion?
>> Unfortunately, the author still wants 'Part' to be actually named as
>> 'Section'!
>>
>> \setuphead
>>     [part]
>>     [
>>     placehead=yes,
>>     page=no,
>>     bodypartlabel=part
>> ]
> First, there a bunch of (U+00A0) NO-BREAK SPACEs in your code. I
> don't know if that's added by your mail client or if that's actually
> in your code. If it's also in the code: Context doesn't like it. The
> NO-BREAK SPACEs have to go.
>
> Second, you have a space (new line) after “bodypartlabel=part”. Add
> a comma, percent sign or move the closing bracket after the word
> “part”.
>
> Marco
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2021-01-04 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04  2:22 jbf
2021-01-04  9:27 ` Marco Patzer
     [not found]   ` <138bedb9-f559-cf6b-db34-e012f8c19ddb@gmail.com>
2021-01-04 22:09     ` Marco Patzer
2021-01-04 22:27       ` jbf [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=1b9a82f6-9d64-93d4-e0b7-669067f0128b@gmail.com \
    --to=roma83537@gmail.com \
    --cc=lists@homerow.info \
    --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).