Re: [NTG-context] chapter numbers

2020-06-08 Thread jbf
A useful distinction to know. Do you think this is made clear on the 
wiki? In fact I am sure that the information is there precisely as you 
have put it, but the challenge (for the wiki and the wiki user) is to 
find it. Your many brief and to-the-point explanations of these little 
matters, Wolfgang, are like grains of gold in the sands, that one has to 
pan for.


Julian

On 9/6/20 5:25 am, Wolfgang Schuster wrote:

Duncan Hothersall schrieb am 08.06.2020 um 08:35:
Use \setuplabeltext instead of \setupheadtext. I agree 
the documentation suggests \setupheadtext should work the same way, 
but it doesn't seem to. You might also want a space after the word 
Chapter.


It works the same way but it's used for a different purpose.

The \setupheadtext command is used to change the default titles for 
\completecontent, \completeindex etc.


 begin example
\setupheadtext[en][content=Table of Contents]

\starttext
\completecontent
\stoptext
 end example

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
___ 


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


Re: [NTG-context] chapter numbers

2020-06-08 Thread Wolfgang Schuster

Duncan Hothersall schrieb am 08.06.2020 um 08:35:
Use \setuplabeltext instead of \setupheadtext. I agree the documentation 
suggests \setupheadtext should work the same way, but it doesn't seem 
to. You might also want a space after the word Chapter.


It works the same way but it's used for a different purpose.

The \setupheadtext command is used to change the default titles for 
\completecontent, \completeindex etc.


 begin example
\setupheadtext[en][content=Table of Contents]

\starttext
\completecontent
\stoptext
 end example

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
___


Re: [NTG-context] chapter numbers

2020-06-07 Thread jbf
Thanks Duncan. It can be quite a struggle working through potentially 
conflicting items in the documentation. I applaud the recent efforts to 
improve the overall presentation of the wiki, though. Your simple little 
change (plus the space!) works of course.


Julian


On 8/6/20 4:35 pm, Duncan Hothersall wrote:
Use \setuplabeltext instead of \setupheadtext. I agree 
the documentation suggests \setupheadtext should work the same way, 
but it doesn't seem to. You might also want a space after the word 
Chapter.


Duncan

On Mon, 8 Jun 2020 at 05:38, jbf > wrote:


I am attempting to get the word 'Chapter' to appear in the Chapter
title, followed by its number, and I attempted to do it simply with:

\setupheadtext[chapter=Chapter]
\setuphead
   [chapter]
   [header=empty]

What I get is simply the number, e.g. 1 My first chapter, 2 My second
chapter etc. \setupheadtext is being ignored. What am I doing wrong?

Julian


___
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

___



--
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400 www.capdm.com 
Registered in Scotland: SC168970       VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK 



Capture, author, publish, deliver and manage your learning materials.

*Sign up to the CAPDM newsletter here
*

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


Re: [NTG-context] chapter numbers

2020-06-07 Thread Duncan Hothersall
Use \setuplabeltext instead of \setupheadtext. I agree the documentation
suggests \setupheadtext should work the same way, but it doesn't seem to.
You might also want a space after the word Chapter.

Duncan

On Mon, 8 Jun 2020 at 05:38, jbf  wrote:

> I am attempting to get the word 'Chapter' to appear in the Chapter
> title, followed by its number, and I attempted to do it simply with:
>
> \setupheadtext[chapter=Chapter]
> \setuphead
>[chapter]
>[header=empty]
>
> What I get is simply the number, e.g. 1 My first chapter, 2 My second
> chapter etc. \setupheadtext is being ignored. What am I doing wrong?
>
> Julian
>
>
> ___
> 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
>
> ___
>


-- 
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400  www.capdm.com
Registered in Scotland: SC168970   VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK


Capture, author, publish, deliver and manage your learning materials.


*Sign up to the CAPDM newsletter here *
___
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
___


[NTG-context] chapter numbers

2020-06-07 Thread jbf
I am attempting to get the word 'Chapter' to appear in the Chapter 
title, followed by its number, and I attempted to do it simply with:


\setupheadtext[chapter=Chapter]
\setuphead
  [chapter]
  [header=empty]

What I get is simply the number, e.g. 1 My first chapter, 2 My second 
chapter etc. \setupheadtext is being ignored. What am I doing wrong?


Julian

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


Re: [NTG-context] Chapter numbers in the right margin

2005-03-23 Thread Randall Skelton
Many thanks to all who have offerred help with this.  I'll submit
these and a few more examples to the wiki after the Easter break.

Cheers,
Randall
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chapter numbers in the right margin

2005-03-23 Thread luigi.scarso
Hans Hagen wrote:
in addition to other answers
Sorry, mybe the time or a my bad day, i don't understand
Do you refer to  my answers ?
If yes
(please submit to wiki)
how to ?
(a my bad day,maybe tomorrow will be better)
luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chapter numbers in the right margin

2005-03-23 Thread Hans Hagen
Randall Skelton wrote:
Use textcommand only for text, numbercommand only for number,
command for both;
you can see some examples in sectionVariations in titles .

Thanks for the reply.
The problem with separating the text and number is that the space
separating the text and number still appears in the chapter text.  On
a similar note, why doesn't  'show makeup' display the right margin
number?
\def\MyChapterNumberText#1{ 
  \inright{\begingroup 
\midaligned{#1}
  \endgroup}
}

\def\MyChapterText#1{
  \begingroup 
\leftaligned{#1}
  \endgroup
}

\setuphead
   [Topic, chapter]
   [numbercommand=\MyChapterNumberText,
textcommand=\MyChapterText,
numberstyle={\switchtobodyfont[48pt]},
textstyle={\switchtobodyfont[12pt]},
color=black,
number=yes,
page=right,
continue=no,
header=empty,
before=\vbox to 3cm\bgroup,
after=\vss\egroup]
\starttext
%\showmakeup
\chapter{This is a Chapter Title}
\input tufte
\section{This is a section title}
\input tufte \par \input knuth \par
\subsection{This is a sub-section title}
\input tufte \par \input knuth \par
\stoptext
in addition to other answers (please submit to wiki)
 no need for dunny \begingroups and spaces
\def\MyChapterNumberText#1%
  {\inright{\midaligned{#1}}}
\def\MyChapterText#1%
  {\leftaligned{#1}}
 set distance to 0pt (distance between number and text)
\setuphead
   [Topic,chapter]
   [numbercommand=\MyChapterNumberText,
textcommand=\MyChapterText,
numberstyle={\switchtobodyfont[48pt]},
textstyle={\switchtobodyfont[12pt]},
color=black,
number=yes,
page=right,
continue=no,
header=empty,
distance=0pt, % no number before it
before=\vbox to 3cm\bgroup,
after=\vss\egroup]
 an alternativ eis to set alternative=command and alike, but more fun is to 
hook in your own handler

 undocumented -)
\definemarginline[MyOuter] [location=outer,width=\outermarginwidth]
\def\MyPlaceHead#1#2{\vbox{\MyOuter{\midaligned{#1}}#2}}
\defineheadplacement[MyHead][vertical]#1#2{\MyPlaceHead{#1}{#2}}
\setuphead[chapter][alternative=MyHead]
 you rexample
\starttext
\showframe
\chapter{This is a Chapter Title}
\input tufte
\section{This is a section title}
\input tufte \par \input knuth \par
\subsection{This is a sub-section title}
\input tufte \par \input knuth \par
\stoptext

-
  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
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chapter numbers in the right margin

2005-03-22 Thread luigi.scarso
Randall Skelton wrote:
Use textcommand only for text, numbercommand only for number,
command for both;
you can see some examples in sectionVariations in titles .
   

Thanks for the reply.
The problem with separating the text and number is that the space
separating the text and number still appears in the chapter text.  On
a similar note, why doesn't  'show makeup' display the right margin
number?
\def\MyChapterNumberText#1{ 
 \inright{\begingroup 
   \midaligned{#1}
 \endgroup}
}

\def\MyChapterText#1{
 \begingroup 
   \leftaligned{#1}
 \endgroup
}

\setuphead
  [Topic, chapter]
  [numbercommand=\MyChapterNumberText,
   textcommand=\MyChapterText,
   numberstyle={\switchtobodyfont[48pt]},
   textstyle={\switchtobodyfont[12pt]},
   color=black,
   number=yes,
   page=right,
   continue=no,
   header=empty,
   before=\vbox to 3cm\bgroup,
   after=\vss\egroup]
\starttext
%\showmakeup
\chapter{This is a Chapter Title}
\input tufte
\section{This is a section title}
\input tufte \par \input knuth \par
\subsection{This is a sub-section title}
\input tufte \par \input knuth \par
\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
 

Sorry Randall; i'm sure that i don't understand what you want.
Maybe next code can help you...
\def\MyChapterCommand#1#2{%
\hbox to \textwidth{#1\hss #2}%
}
% or perhaps
%
%\def\MyChapterCommand#1#2{%
%\hbox to \textwidth{\llap{#1}\hss #2}%
%}
\setuphead
  [Topic, chapter]
  [%numbercommand=\MyChapterNumberText,
   %textcommand=\MyChapterText,
   command={\MyChapterCommand},
   numberstyle={\switchtobodyfont[48pt]},
   textstyle={\switchtobodyfont[12pt]},
   color=black,
   number=yes,
   page=right,
   continue=no,
   header=empty,
   before=\vbox to 3cm\bgroup,
   after=\vss\egroup]
luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chapter numbers in the right margin

2005-03-22 Thread Vit Zyka
Randall Skelton wrote:
Use textcommand only for text, numbercommand only for number,
command for both;
you can see some examples in sectionVariations in titles .

Thanks for the reply.
The problem with separating the text and number is that the space
separating the text and number still appears in the chapter text.  On
a similar note, why doesn't  'show makeup' display the right margin
number?
May be I do not understand you but you introduce spaces yourself in your 
 \My... Write % at the end of lines as shown:

\def\MyChapterNumberText#1{ 
  \def\MyChapterNumberText#1{%
  \inright{\begingroup 
\midaligned{#1}
 \midaligned{#1}%
  \endgroup}
   \endgroup}%
}
\def\MyChapterText#1{
 \def\MyChapterText#1{%
  \begingroup 
\leftaligned{#1}
 \leftaligned{#1}%
  \endgroup
}
Depends in which mode (horizontal, vertical) your code occures. (If 
\midaligned expands to \ignorespaces at the end then % is not needed there.)

vit

\setuphead
   [Topic, chapter]
   [numbercommand=\MyChapterNumberText,
textcommand=\MyChapterText,
numberstyle={\switchtobodyfont[48pt]},
textstyle={\switchtobodyfont[12pt]},
color=black,
number=yes,
page=right,
continue=no,
header=empty,
before=\vbox to 3cm\bgroup,
after=\vss\egroup]
\starttext
%\showmakeup
\chapter{This is a Chapter Title}
\input tufte
\section{This is a section title}
\input tufte \par \input knuth \par
\subsection{This is a sub-section title}
\input tufte \par \input knuth \par
\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
--
Vít Zýka --- http://typokvitek.com
Automatic document typesetting
Automaticka sazba dokumentu --
--

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chapter numbers in the right margin

2005-03-22 Thread Randall Skelton
> Use textcommand only for text, numbercommand only for number,
> command for both;
> you can see some examples in sectionVariations in titles .

Thanks for the reply.

The problem with separating the text and number is that the space
separating the text and number still appears in the chapter text.  On
a similar note, why doesn't  'show makeup' display the right margin
number?

\def\MyChapterNumberText#1{ 
  \inright{\begingroup 
\midaligned{#1}
  \endgroup}
}

\def\MyChapterText#1{
  \begingroup 
\leftaligned{#1}
  \endgroup
}

\setuphead
   [Topic, chapter]
   [numbercommand=\MyChapterNumberText,
textcommand=\MyChapterText,
numberstyle={\switchtobodyfont[48pt]},
textstyle={\switchtobodyfont[12pt]},
color=black,
number=yes,
page=right,
continue=no,
header=empty,
before=\vbox to 3cm\bgroup,
after=\vss\egroup]

\starttext

%\showmakeup

\chapter{This is a Chapter Title}
\input tufte

\section{This is a section title}
\input tufte \par \input knuth \par

\subsection{This is a sub-section title}
\input tufte \par \input knuth \par

\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chapter numbers in the right margin

2005-03-21 Thread luigi.scarso
Randall Skelton wrote:
Hi all,
Does anyone have a setuphead snipit and definition to place a large
chapter number in the right margin of the page on the first page of
each chapter?  I believe this should be similar (but simplier) than
what is done in 'ConTeXt an Excursion' but I wasn't able to find a
definition for that.  I'd be quite willing to put this up on the wiki
when I figure it out...
What I have so far doesn't really lead to much flexibility in terms of
positioning.  I'd like to be able to set both the horizontal and
vertical position of the chapter number.  I'd also like to have the
number shift vertically downwards for each new chapter.
\def\MyChapterText#1{#1 
 \inright{ \switchtobodyfont[MyTitling, 72pt] \rm \headnumber[chapter] }
}

\setuphead
  [Topic, chapter]
  [textcommand=\MyChapterText,
   style={\switchtobodyfont[MyTitling, 16pt]\sc},
   color=black,
   number=no,
   page=right,
   continue=no,
   header=empty,
   before=\vbox to 4cm\bgroup,
   after=\vss\egroup]
Many thanks,
Randall
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
 

From cont-eni.pdf, chapter Text elements:
\setuphead[...][..,..=..,..]
:
command\command#1#2
numbercommand\command#1
textcommand\command#1
:
Use textcommand only for text, numbercommand only for number,
command for both;
you can see some examples in sectionVariations in titles .
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Chapter numbers in the right margin

2005-03-21 Thread Randall Skelton
Hi all,

Does anyone have a setuphead snipit and definition to place a large
chapter number in the right margin of the page on the first page of
each chapter?  I believe this should be similar (but simplier) than
what is done in 'ConTeXt an Excursion' but I wasn't able to find a
definition for that.  I'd be quite willing to put this up on the wiki
when I figure it out...

What I have so far doesn't really lead to much flexibility in terms of
positioning.  I'd like to be able to set both the horizontal and
vertical position of the chapter number.  I'd also like to have the
number shift vertically downwards for each new chapter.

\def\MyChapterText#1{#1 
  \inright{ \switchtobodyfont[MyTitling, 72pt] \rm \headnumber[chapter] }
}

\setuphead
   [Topic, chapter]
   [textcommand=\MyChapterText,
style={\switchtobodyfont[MyTitling, 16pt]\sc},
color=black,
number=no,
page=right,
continue=no,
header=empty,
before=\vbox to 4cm\bgroup,
after=\vss\egroup]

Many thanks,
Randall
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context