ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Patzer <lists@homerow.info>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Part label and chapter numbers
Date: Mon, 4 Jan 2021 23:09:28 +0100	[thread overview]
Message-ID: <20210104230928.380f2779@homerow> (raw)
In-Reply-To: <138bedb9-f559-cf6b-db34-e012f8c19ddb@gmail.com>

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
___________________________________________________________________________________

  parent reply	other threads:[~2021-01-04 22:09 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 [this message]
2021-01-04 22:27       ` jbf

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=20210104230928.380f2779@homerow \
    --to=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).