Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-05-23 Thread Alan BRASLAU
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
___


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-17 Thread Alan BRASLAU
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
___


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-17 Thread Mojca Miklavec
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
___


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-17 Thread Hans Hagen

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
___


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-16 Thread Mojca Miklavec
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
___


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-16 Thread Hans Hagen

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
___


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-16 Thread Hans Hagen

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
___


[NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-15 Thread Alan BRASLAU
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
___