ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* "\setuplabeltext [appendix=Appendix ]" broken mkiv
@ 2010-02-15 15:31 Alan BRASLAU
  2010-02-16 21:39 ` Mojca Miklavec
  0 siblings, 1 reply; 8+ messages in thread
From: Alan BRASLAU @ 2010-02-15 15:31 UTC (permalink / raw)
  To: ntg-context

1. Setting the labeltext "appendix=Appendix " with \startappendices
   is broken in mkiv; somewhat works in mkii. What am I doing wrong?
2. How to set the label correctly in the TOC?

Alan

Minimal example

\setuplabeltext [chapter=Chapter ]   % with trailing space; blank by default
\setuplabeltext [appendix=Appendix ] % with trailing space; blank by default
\setuphead [chapter] [placehead=yes]
\setuplist [chapter] [label=yes,width=5em,alternative=c]

\starttext

\startfrontmatter
\completecontent
\stopfrontmatter

\startbodymatter
\chapter {one}
\input knuth
\stopbodymatter

\startappendices
\chapter {first}
\input knuth
\stopappendices

\stoptext
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-15 15:31 "\setuplabeltext [appendix=Appendix ]" broken mkiv Alan BRASLAU
@ 2010-02-16 21:39 ` Mojca Miklavec
  2010-02-16 22:03   ` Hans Hagen
  2010-02-16 22:21   ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Mojca Miklavec @ 2010-02-16 21:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Feb 15, 2010 at 16:31, Alan BRASLAU wrote:
> 1. Setting the labeltext "appendix=Appendix " with \startappendices
>   is broken in mkiv; somewhat works in mkii. What am I doing wrong?
> 2. How to set the label correctly in the TOC?
>
> Alan
>
> Minimal example
>
> \setuplabeltext [chapter=Chapter ]   % with trailing space; blank by default
> \setuplabeltext [appendix=Appendix ] % with trailing space; blank by default
> \setuphead [chapter] [placehead=yes]
> \setuplist [chapter] [label=yes,width=5em,alternative=c]
>
> \starttext
>
> \startfrontmatter
> \completecontent
> \stopfrontmatter
>
> \startbodymatter
> \chapter {one}
> \input knuth
> \stopbodymatter
>
> \startappendices
> \chapter {first}
> \input knuth
> \stopappendices
>
> \stoptext

While you keep Hans and others busy, here's another thing that puzzled me:

\definehead[appendix][chapter]
\definehead[subappendix][section]

\starttext

\startappendices
\appendix{one}
\subappendix{one.one}
\appendix{two}
\subappendix{two.one}
\stopappendices

\stoptext

In mkii it gives A.1 and B.1 for numbering, but in mkiv it gives A.1
and B.2 (it forgets to reset the counter for "subappendix").

Mojca
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-16 21:39 ` Mojca Miklavec
@ 2010-02-16 22:03   ` Hans Hagen
  2010-02-16 22:21   ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2010-02-16 22:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 16-2-2010 22:39, Mojca Miklavec wrote:
> \definehead[appendix][chapter]
> \definehead[subappendix][section]
>
> \starttext
>
> \startappendices
> \appendix{one}
> \subappendix{one.one}
> \appendix{two}
> \subappendix{two.one}
> \stopappendices
>
> \stoptext

hm, looks like startappendices has no proper reset list
-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-16 21:39 ` Mojca Miklavec
  2010-02-16 22:03   ` Hans Hagen
@ 2010-02-16 22:21   ` Hans Hagen
  2010-02-17 17:44     ` Alan BRASLAU
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-02-16 22:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 16-2-2010 22:39, Mojca Miklavec wrote:

> While you keep Hans and others busy, here's another thing that puzzled me:
>
> \definehead[appendix][chapter]
> \definehead[subappendix][section]
>
> \starttext
>
> \startappendices
> \appendix{one}
> \subappendix{one.one}
> \appendix{two}
> \subappendix{two.one}
> \stopappendices
>
> \stoptext
>
> In mkii it gives A.1 and B.1 for numbering, but in mkiv it gives A.1
> and B.2 (it forgets to reset the counter for "subappendix").

\definestructureresetset      [\v!appendix:\s!default] [] [1] % why was 
this 0

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-16 22:21   ` Hans Hagen
@ 2010-02-17 17:44     ` Alan BRASLAU
  2010-02-17 21:30       ` Mojca Miklavec
  0 siblings, 1 reply; 8+ messages in thread
From: Alan BRASLAU @ 2010-02-17 17:44 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen, Mojca Miklavec

On Tuesday 16 February 2010 23:21:31 Hans Hagen wrote:
> On 16-2-2010 22:39, Mojca Miklavec wrote:
> > While you keep Hans and others busy, here's another thing that puzzled
> > me:
> >
> > \definehead[appendix][chapter]
> > \definehead[subappendix][section]
> >
> > \starttext
> >
> > \startappendices
> > \appendix{one}
> > \subappendix{one.one}
> > \appendix{two}
> > \subappendix{two.one}
> > \stopappendices
> >
> > \stoptext
> >
> > In mkii it gives A.1 and B.1 for numbering, but in mkiv it gives A.1
> > and B.2 (it forgets to reset the counter for "subappendix").
> 
> \definestructureresetset      [\v!appendix:\s!default] [] [1] % why was
> this 0

Why \definehead[appendix][chapter]?
Why not use \chapter{} and \section{}
within \startappendices\stopappendices?

\chapter{} and \section{} get put into the TOC.
 (However, there is a bug and they do not get the proper label:
  \setlabeltext [appendix=Appendix ] in the head;
  \setlabeltext [chapter=Chapter ] in the list.)

\appendix{} does not get put into the TOC
so it works like \title{} rather than \chapter{}

Another (related) bug:
within \startbackmatter\stopbackmatter
\chapter{} (also coming from \completecontent)
indeed does not add the labeltext to the head (and are unnumbered)
but does add the \setlabeltext [chapter=Chapter ] to the TOC yielding:
"Chapter  References"
"Chapter  Index"
"Chapter  Table of Contents"

Alan
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-17 17:44     ` Alan BRASLAU
@ 2010-02-17 21:30       ` Mojca Miklavec
  2010-02-17 21:36         ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2010-02-17 21:30 UTC (permalink / raw)
  To: Alan BRASLAU; +Cc: ntg-context, Hans Hagen

On Wed, Feb 17, 2010 at 18:44, Alan BRASLAU wrote:
>
> Why \definehead[appendix][chapter]?
> Why not use \chapter{} and \section{}
> within \startappendices\stopappendices?

I don't remember exactly (and it was bug anyway even if my code could
have been optimized), but I wanted to have different font size,
different position, different placement in TOC ("Appendix A - Title"
instea of just "A Title"), different page breaking, ... Though I still
didn't figure out how to have "Appendix A -" also printed out in TOC
(instead of plain "A").

So I simply defined another type of section (faster solution than
figuring out how to change appearance of chapter in appendices only).

> \chapter{} and \section{} get put into the TOC.
>  (However, there is a bug and they do not get the proper label:
>  \setlabeltext [appendix=Appendix ] in the head;
>  \setlabeltext [chapter=Chapter ] in the list.)
>
> \appendix{} does not get put into the TOC
> so it works like \title{} rather than \chapter{}

I defined the second list for that purpose (really ugly, but the
fastest way to get it done). But there was a tiny problem with that as
well (mkii more problematic) - I didn't manage to get the spacing
between two consecutive lists right. For example (compare mkii and
mkiv):

\definecombinedlist
	[contenta]
	[chapter,section]
	[level=section,
	 criterium=all,alternative=c,aligntitle=yes,width=2.5em]

\setuplist
	[chapter]
	[style=bold]

\setupwhitespace[big]

\starttext

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]
\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\blank % no effect in mkii at all - remains too narrow

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\blank\blank[big]

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\crlf % too big

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\chapter{a}
\section{a.1}
\section{a.2}
\chapter{b}
\section{b.1}
\section{b.2}

\stoptext

Mojca
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-17 21:30       ` Mojca Miklavec
@ 2010-02-17 21:36         ` Hans Hagen
  2010-05-23 12:02           ` Alan BRASLAU
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-02-17 21:36 UTC (permalink / raw)
  To: ntg-context

On 17-2-2010 22:30, Mojca Miklavec wrote:

> I defined the second list for that purpose (really ugly, but the
> fastest way to get it done). But there was a tiny problem with that as
> well (mkii more problematic) - I didn't manage to get the spacing
> between two consecutive lists right. For example (compare mkii and
> mkiv):

concerning tricks ... today i defined the hybrids between chapter/title, 
section/subject etc

\definehead[chaptle]      [chapter]
\definehead[suction]      [section]
\definehead[subsuction]   [subsection]
\definehead[subsubsuction][subsubsection]

\setuphead
   [chaptle,suction,subsuction,subsubsuction]
   [incrementnumber=list]

no numbers but title goes to toc.

I might even add them to the core some day

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: "\setuplabeltext [appendix=Appendix ]" broken mkiv
  2010-02-17 21:36         ` Hans Hagen
@ 2010-05-23 12:02           ` Alan BRASLAU
  0 siblings, 0 replies; 8+ messages in thread
From: Alan BRASLAU @ 2010-05-23 12:02 UTC (permalink / raw)
  To: Hans Hagen; +Cc: ntg-context

On Wednesday 17 February 2010 22:36:19 Hans Hagen wrote:
> On 17-2-2010 22:30, Mojca Miklavec wrote:
> > I defined the second list for that purpose (really ugly, but the
> > fastest way to get it done). But there was a tiny problem with that as
> > well (mkii more problematic) - I didn't manage to get the spacing
> > between two consecutive lists right. For example (compare mkii and
> 
> > mkiv):
> concerning tricks ... today i defined the hybrids between chapter/title,
> section/subject etc
> 
> \definehead[chaptle]      [chapter]
> \definehead[suction]      [section]
> \definehead[subsuction]   [subsection]
> \definehead[subsubsuction][subsubsection]
> 
> \setuphead
>    [chaptle,suction,subsuction,subsubsuction]
>    [incrementnumber=list]
> 
> no numbers but title goes to toc.
> 
> I might even add them to the core some day
> 
> Hans

Continuing an old thread... with four questions (and no tricks):

FIRST QUESTION:

"chaptle", "suction"?
I get it! But I did not immediately (maybe I am a bit slow). It's too clever 
to be easily retained so I suggest finding another solution.

Would not a better syntax be something like:
 \section [number=no] {Conclusions}
 \chapter [number=no] {A final word}
(from a user's point-of-view, I haven't looking into the programming)?


SECOND QUESTION:

\starttext
\startfrontmatter
 \chapter{Preface}
\stopfrontmatter

\startbodymatter
 \chapter{First chapter}
 \chapter{Second chapter}
\stopbodymatter

\startappendices
 \chapter{First appendix}
 \chapter{Second appendix}
\stopappendices

\startbackmatter
 \chapter{Concluding note}
\stopbackmatter

\stoptext

Yields:

Preface
1 First chapter
2 Second chapter
A First appendix
B Second appendix
Concluding note

As it should.

However, adding
 \setuplabeltext[chapter=Chapter ] % with trailing space; blank by default
gives a nice label in the header, yet also yields "Chapter A First 
appendix"... This is clearly wrong! Reading the source (strc-def.mkiv), I 
tried:
 \setuplabeltext [appendix=Appendix ] % with trailing space; blank by default
but this does not work. Is this a bug?

Note that I also tried:
 \definehead [appendix] [chapter]
 \setuplabeltext [appendix=Appendix ] % with trailing space; blank by default
 \definecombinedlist [content] [chapter,appendix]
and replaced \chapter with \appendix between \startappendices\stopappendics 
which sort-of works: 1) this is not elegant 2) does not appear in bookmarks.


THIRD QUESTION:

Adding
 \setuplist [chapter] [label=yes,width=5em]
to get the nice label to appear in the table of contents yields:

Chapter   Preface
Chapter 1 First chapter
Chapter 2 Second chapter
Chapter A First appendix
Chapter B Second appendix
Chapter   Concluding note

So this is NOT the way to go! Is there a simple and elegant solution?


FOURTH QUESTION:

Should not the numbering (1, 2, A, B) get included in the bookmarks? If this 
should not be so by default, can this feature be easily activated?  


Alan
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-05-23 12:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-15 15:31 "\setuplabeltext [appendix=Appendix ]" broken mkiv Alan BRASLAU
2010-02-16 21:39 ` Mojca Miklavec
2010-02-16 22:03   ` Hans Hagen
2010-02-16 22:21   ` Hans Hagen
2010-02-17 17:44     ` Alan BRASLAU
2010-02-17 21:30       ` Mojca Miklavec
2010-02-17 21:36         ` Hans Hagen
2010-05-23 12:02           ` Alan BRASLAU

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