Re: [NTG-context] \setuphead for a section block

2018-10-23 Thread Pablo Rodriguez
On 10/23/18 9:25 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 23.10.18 um 21:18:
>> [...]
>> But wasn’t there a command similar to the following one for such purposes?
>>
>>  \setuphead[bodypart:chapter][style=\em]
>>
>> I remember that there was something similar to that command to setup
>> headings in a section block.
> 
> You’re thinking of \defineconversionset, \defineseparatorset etc. which 
> let you
> set values for certain sectionblocks but not \setuphead.

Many thanks for your reply, Wolfgang.

From \defineconversionset, I thought the same was valid for \setuphead.

Pablo
-- 
http://www.ousia.tk
___
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] \setuphead for a section block

2018-10-23 Thread Rik

On 10/23/2018 15:23, Rik wrote:

On 10/23/2018 15:18, Pablo Rodriguez wrote:

Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

 \setuphead[chapter][style=\bf]
 \startsectionblockenvironment[bodypart]
 \setuphead[chapter][style=\em]
 \stopsectionblockenvironment
 \starttext
 \startfrontmatter
 \chapter{Introduction}
 \stopfrontmatter
 \startbodymatter
 \chapter{Chapter}
 \stopbodymatter
 \stoptext

But wasn’t there a command similar to the following one for such 
purposes?


 \setuphead[bodypart:chapter][style=\em]



I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?

Many thanks for your help,

Pablo


\startsectionblockenvironment[bodypart]
\setuphead  [chapter][
  style=\tfc\HeadFont ...


Sorry, I meant to delete, not send.

--
Rik

___
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] \setuphead for a section block

2018-10-23 Thread Wolfgang Schuster



Pablo Rodriguez schrieb am 23.10.18 um 21:18:

Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

 \setuphead[chapter][style=\bf]
 \startsectionblockenvironment[bodypart]
 \setuphead[chapter][style=\em]
 \stopsectionblockenvironment
 \starttext
 \startfrontmatter
 \chapter{Introduction}
 \stopfrontmatter
 \startbodymatter
 \chapter{Chapter}
 \stopbodymatter
 \stoptext

But wasn’t there a command similar to the following one for such purposes?

 \setuphead[bodypart:chapter][style=\em]

I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?


You’re thinking of \defineconversionset, \defineseparatorset etc. which 
let you

set values for certain sectionblocks but not \setuphead.

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] \setuphead for a section block

2018-10-23 Thread Rik

On 10/23/2018 15:18, Pablo Rodriguez wrote:

Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

 \setuphead[chapter][style=\bf]
 \startsectionblockenvironment[bodypart]
 \setuphead[chapter][style=\em]
 \stopsectionblockenvironment
 \starttext
 \startfrontmatter
 \chapter{Introduction}
 \stopfrontmatter
 \startbodymatter
 \chapter{Chapter}
 \stopbodymatter
 \stoptext

But wasn’t there a command similar to the following one for such purposes?

 \setuphead[bodypart:chapter][style=\em]



I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?

Many thanks for your help,

Pablo


\startsectionblockenvironment[bodypart]
\setuphead  [chapter][
  style=\tfc\HeadFont ...

--
Rik

___
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] \setuphead for a section block

2018-10-23 Thread Pablo Rodriguez
Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

\setuphead[chapter][style=\bf]
\startsectionblockenvironment[bodypart]
\setuphead[chapter][style=\em]
\stopsectionblockenvironment
\starttext
\startfrontmatter
\chapter{Introduction}
\stopfrontmatter
\startbodymatter
\chapter{Chapter}
\stopbodymatter
\stoptext

But wasn’t there a command similar to the following one for such purposes?

\setuphead[bodypart:chapter][style=\em]

I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] \setuphead[part] - special look

2015-06-29 Thread Wolfgang Schuster



Procházka Lukáš Ing. - Pontex s. r. o. mailto:l...@pontex.cz
29. Juni 2015 14:05
Hello,

one more question.

When I place \part into \...bodymatter and \...appendices, the \part 
in body matter yields Díl  + number, which is OK, but in appendices 
it gives nothing + Roman number (I, II, ...).

You have to change the default conversion for the appendix.
What is the most systemic to \setuphead[part] to give Díl... in body 
matter and Dodatek... in appendices, and also to get letter 
numbering (A, B...) in appendices (so Dodatek A, Doadatek B, 
...)?

You have to set a label for the appendix with the appendixlabel key.

A sample source code with body matter and appendices is attached...

% Method 1: change the values of the predefined default conversion set,
% you can use name of the sectionblock as prefix (separated by a :) to set
% the values only for a certain part (e.g. the appendix) of your document

\defineconversionset[appendix:default][A,R][n]

% Method 2: Create your own conversion set and apply it to all sections
%
% \defineconversionset[bodypart:myconversion][n,n][n]
% \defineconversionset[appendix:myconversion][A,R][n]
% \setuphead[part,chapter,section][sectionconversionset=myconversion]

\setuphead
  [part]
  [placehead=yes,
   bodypartlabel=bodypart-mypart,
   appendixlabel=appendix-mypart]

\setuplabeltext[en][bodypart-mypart=Díl ,appendix-mypart=Dodatek ]

\starttext
\startbodymatter
\part{My First Part}
\input knuth
\stopbodymatter
\startappendices
\part{My First Appendix}
\input tufte
\stopappendices
\stoptext

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

Re: [NTG-context] \setuphead[part] - special look

2015-06-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello Wolfgang,

thanks again, it works perfectly.

Best regards,

Lukas


On Mon, 29 Jun 2015 14:33:41 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:




Procházka Lukáš Ing. - Pontex s. r. o. mailto:l...@pontex.cz
29. Juni 2015 14:05
Hello,

one more question.

When I place \part into \...bodymatter and \...appendices, the \part
in body matter yields Díl  + number, which is OK, but in appendices
it gives nothing + Roman number (I, II, ...).

You have to change the default conversion for the appendix.

What is the most systemic to \setuphead[part] to give Díl... in body
matter and Dodatek... in appendices, and also to get letter
numbering (A, B...) in appendices (so Dodatek A, Doadatek B,
...)?

You have to set a label for the appendix with the appendixlabel key.

A sample source code with body matter and appendices is attached...

% Method 1: change the values of the predefined default conversion set,
% you can use name of the sectionblock as prefix (separated by a :) to set
% the values only for a certain part (e.g. the appendix) of your document

\defineconversionset[appendix:default][A,R][n]

% Method 2: Create your own conversion set and apply it to all sections
%
% \defineconversionset[bodypart:myconversion][n,n][n]
% \defineconversionset[appendix:myconversion][A,R][n]
% \setuphead[part,chapter,section][sectionconversionset=myconversion]

\setuphead
   [part]
   [placehead=yes,
bodypartlabel=bodypart-mypart,
appendixlabel=appendix-mypart]

\setuplabeltext[en][bodypart-mypart=Díl ,appendix-mypart=Dodatek ]

\starttext
 \startbodymatter
 \part{My First Part}
 \input knuth
 \stopbodymatter
 \startappendices
 \part{My First Appendix}
 \input tufte
 \stopappendices
\stoptext

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] \setuphead[part] - special look

2015-06-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

one more question.

When I place \part into \...bodymatter and \...appendices, the \part in body matter yields Díl  + number, which 
is OK, but in appendices it gives nothing + Roman number (I, II, ...).

What is the most systemic to \setuphead[part] to give Díl... in body matter and Dodatek... in appendices, and also 
to get letter numbering (A, B...) in appendices (so Dodatek A, Doadatek B, ...)?

A sample source code with body matter and appendices is attached...

Best regards,

Lukas


On Tue, 23 Jun 2015 16:28:46 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:




Procházka Lukáš Ing. - Pontex s. r. o. mailto:l...@pontex.cz
23. Juni 2015 09:45
Hello,

I'm really satisfied with the way you coded the part page layout.

I've modified a bit your code - just to highlight the dependencies
(rendering setup, makeup and so on; if anyone interested, see the
attachment).

You can drop the \definebodyfontenvironment line when you use
\definefont to set the part fonts, e.g.

\definefont[PartText][SerifBold sa 5]
\setuphead[part][textstyle=PartText]


On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster
schuster.wolfg...@gmail.com wrote:


This method to set your own layout is also used by other command (e.g.
the list mechanism used for the table of contents) and the
\defineheadplacement has also a alternative key which is needed when you
want an inline heading (e.g. \setuphead[...][alternative=text]).


...


The necessary key would be endless with each new layout and with the
\defineheadplacement command to create your own without adding
additional keys but you can also use the command key instead of
\defineheadplacement. The advantage of \defineheadplacement is that you
can better structure the code in the setups environment because you
don't have to worry about spaces.

Wolfgang


As \defineheadplacement is concerned:

You mentioned this command in your response, but
\defineheadplacement is used nowhere in your code and there is no
info about on wiki.

Could you provide a MWE how \defineheadplacement is supposed to be used?

You shouldn't use it because Hans kept it only for backwards
compatibility and \defineheadplacement is the better alternative. You
can also use the same rendering (the content of the setups environment)
for different head alternatives where you set the differences with the
\defineheadalternative command.

% HeadA

\defineheadplacement[HeadA][vertical]#1#2%
   {\startframedtext
  #1\quad #2%
\stopframedtext}

\definehead[HeadA][section][alternative=HeadA]

% HeadB

\defineheadalternative[HeadB][renderingsetup=HeadB] % alternative=vertical

\startsetups[HeadB]
   \startframedtext
 \headnumbercontent \qquad \headtextcontent
   \stopframedtext
\stopsetups

\definehead[HeadB][section][alternative=HeadB]

\starttext

\HeadA{Knuth}

\input knuth

\HeadB{Tufte}

\input tufte

\stoptext

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

Ull-Gra.test2.mkiv
Description: Binary data


Ull-Gra.test2.pdf
Description: Adobe PDF document
___
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] \setuphead[part] - special look

2015-06-23 Thread Wolfgang Schuster



Procházka Lukáš Ing. - Pontex s. r. o. mailto:l...@pontex.cz
23. Juni 2015 09:45
Hello,

I'm really satisfied with the way you coded the part page layout.

I've modified a bit your code - just to highlight the dependencies 
(rendering setup, makeup and so on; if anyone interested, see the 
attachment).
You can drop the \definebodyfontenvironment line when you use 
\definefont to set the part fonts, e.g.


\definefont[PartText][SerifBold sa 5]
\setuphead[part][textstyle=PartText]

On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:



This method to set your own layout is also used by other command (e.g.
the list mechanism used for the table of contents) and the
\defineheadplacement has also a alternative key which is needed when you
want an inline heading (e.g. \setuphead[...][alternative=text]).


...


The necessary key would be endless with each new layout and with the
\defineheadplacement command to create your own without adding
additional keys but you can also use the command key instead of
\defineheadplacement. The advantage of \defineheadplacement is that you
can better structure the code in the setups environment because you
don't have to worry about spaces.

Wolfgang


As \defineheadplacement is concerned:

You mentioned this command in your response, but 
\defineheadplacement is used nowhere in your code and there is no 
info about on wiki.


Could you provide a MWE how \defineheadplacement is supposed to be used?
You shouldn't use it because Hans kept it only for backwards 
compatibility and \defineheadplacement is the better alternative. You 
can also use the same rendering (the content of the setups environment) 
for different head alternatives where you set the differences with the 
\defineheadalternative command.


% HeadA

\defineheadplacement[HeadA][vertical]#1#2%
  {\startframedtext
 #1\quad #2%
   \stopframedtext}

\definehead[HeadA][section][alternative=HeadA]

% HeadB

\defineheadalternative[HeadB][renderingsetup=HeadB] % alternative=vertical

\startsetups[HeadB]
  \startframedtext
\headnumbercontent \qquad \headtextcontent
  \stopframedtext
\stopsetups

\definehead[HeadB][section][alternative=HeadB]

\starttext

\HeadA{Knuth}

\input knuth

\HeadB{Tufte}

\input tufte

\stoptext

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

Re: [NTG-context] \setuphead[part] - special look

2015-06-23 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'm really satisfied with the way you coded the part page layout.

I've modified a bit your code - just to highlight the dependencies (rendering 
setup, makeup and so on; if anyone interested, see the attachment).

On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


This method to set your own layout is also used by other command (e.g.
the list mechanism used for the table of contents) and the
\defineheadplacement has also a alternative key which is needed when you
want an inline heading (e.g. \setuphead[...][alternative=text]).


...


The necessary key would be endless with each new layout and with the
\defineheadplacement command to create your own without adding
additional keys but you can also use the command key instead of
\defineheadplacement. The advantage of \defineheadplacement is that you
can better structure the code in the setups environment because you
don't have to worry about spaces.

Wolfgang


As \defineheadplacement is concerned:

You mentioned this command in your response, but \defineheadplacement is used 
nowhere in your code and there is no info about on wiki.

Could you provide a MWE how \defineheadplacement is supposed to be used?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

Ull-Gra.test2.mkiv
Description: Binary data


Ull-Gra.test2.pdf
Description: Adobe PDF document
___
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] \setuphead[part] - special look

2015-06-22 Thread Wolfgang Schuster



Procházka Lukáš Ing. - Pontex s. r. o. mailto:l...@pontex.cz
22. Juni 2015 11:42
Hello Wolfgang,

thank you for the solution, it pretty systemic.

Ad Ad 2: There was no question as succeeded placing page number and 
name into the page gold ratio, so just mentioned as one of the 
features required.


After some plying with your solution, I deduce:

We have to derive a new alternative for part (here partpage) as we 
CAN assign a new renderingsetup to this alternative but we CANNOT 
assign a rendering setup in the scope of \setuphead.


IOW, there is no \setuphead[part][renderingsetup=partpage].

If there was the option \setuphead[part][renderingsetup=partpage] we 
could simplify to:
This method to set your own layout is also used by other command (e.g. 
the list mechanism used for the table of contents) and the 
\defineheadplacement has also a alternative key which is needed when you 
want an inline heading (e.g. \setuphead[...][alternative=text]).


% No headalternative here

\startsetups[partpage]
   \startmakeup[part]
   \headsetupspacing
   \headnumbercontent
   \blank[big]
   \headtextcontent
   \stopmakeup
\stopsetups

\definemakeup
 [part]
 [align=middle,
  top=\vfill\vfill,
  bottom=\vfill\vfill\vfill]

\setuphead
 [part]
 [...
  renderingsetup=partpage,
  ...
 ]

...



Am I right?

(And, I understand that the aim is not to support all extraordinary 
request(s) in \setuphead by its keys/options - it is enough to have A 
way to get them, here using a headalternative...)
The necessary key would be endless with each new layout and with the 
\defineheadplacement command to create your own without adding 
additional keys but you can also use the command key instead of 
\defineheadplacement. The advantage of \defineheadplacement is that you 
can better structure the code in the setups environment because you 
don't have to worry about spaces.


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

Re: [NTG-context] \setuphead[part] - special look

2015-06-22 Thread Wolfgang Schuster



Procházka Lukáš Ing. - Pontex s. r. o. mailto:l...@pontex.cz
22. Juni 2015 09:35
Hello,

I'm trying to \setuphead[part] to have the following features:

1. Part head to fill the whole page.

2. Part number and name to be placed (approx.) in the golden ratio of 
the page.


3. Page background (for the \part only!) to be colored, e.g. blue.


\define[2]\MyPartCmd{%
{%
  \vbox to\vsize{%
\vfill\vfill%
#1
\blank[big]
#2
\vfill\vfill\vfill%
  }
}%
}

\define[1]\MyPartCmdText{%
  \hbox to\hsize{\hfill \bf DĂl #1\hfill}%
}

\definefontsize[e]
\definebodyfontenvironment[default][e=5.]

\define[1]\MyPartCmdNum{%
  \hbox to\hsize{\hfill \bfe\sc#1\hfill}%
}

\setuphead[part]
  [command=\MyPartCmd,
   numbercommand=\MyPartCmdText,
   textcommand=\MyPartCmdNum,
   placehead=yes,header=none,page=odd,
   
before={\setupbackgrounds[page][background=color,backgroundcolor=blue,state=start]}, 


   %after={\setupbackgrounds[page][background=]},
  ]

\starttext
  \showboxes
  \part{Part}
  \input knuth
\stoptext


The code above doesn't satisfy the features:

Ad 1: Some text (from knuth) appears in the bottom (should be solved 
by after=\page, but is there a better solution, e.g. to affect 
height of the \vbox in \MyPartCmd?)

The \page command is needed here.
Ad 3: I'm able to make only the part page blue (now all pages are 
blue; when I uncomment 
after={\setupbackgrounds[page][background=]},, no page is blue).
You can use the \pushbackground and \popbackground command to limit the 
background changes to a certain part of your document.

Could anyone help me to tune the \setuphead[part]?

\defineheadalternative
  [partpage]
  [renderingsetup=partpage]

\startsetups[partpage]

\startmakeup[part]
\headsetupspacing
\headnumbercontent
\blank[big]
\headtextcontent
\stopmakeup

\stopsetups

\definemakeup
  [part]
  [align=middle,
   top=\vfill\vfill,
   bottom=\vfill\vfill\vfill]

\setuphead
  [part]
  [placehead=yes,
   alternative=partpage,
   page=right,
   
before={\pushbackground[page]\setupbackgrounds[page][background=color,backgroundcolor=blue]},

   after={\page\popbackground},
   bodypartlabel=part,
   align=middle,
   numberstyle=\bfb,
   textstyle=\bfd\sc]

\setuplabeltext[en][part=DĂl ]

\starttext
  \part{Part}
  \input knuth
\stoptext

BTW: Where is Ad 2?

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

Re: [NTG-context] \setuphead[part] - special look

2015-06-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello Wolfgang,

thank you for the solution, it pretty systemic.

Ad Ad 2: There was no question as succeeded placing page number and name into 
the page gold ratio, so just mentioned as one of the features required.

After some plying with your solution, I deduce:

We have to derive a new alternative for part (here partpage) as we CAN assign a new 
renderingsetup to this alternative but we CANNOT assign a rendering setup in the scope of 
\setuphead.

IOW, there is no \setuphead[part][renderingsetup=partpage].

If there was the option \setuphead[part][renderingsetup=partpage] we could 
simplify to:


% No headalternative here

\startsetups[partpage]
   \startmakeup[part]
   \headsetupspacing
   \headnumbercontent
   \blank[big]
   \headtextcontent
   \stopmakeup
\stopsetups

\definemakeup
 [part]
 [align=middle,
  top=\vfill\vfill,
  bottom=\vfill\vfill\vfill]

\setuphead
 [part]
 [...
  renderingsetup=partpage,
  ...
 ]

...



Am I right?

(And, I understand that the aim is not to support all extraordinary request(s) in 
\setuphead by its keys/options - it is enough to have A way to get them, here using a 
headalternative...)

Thanks again.

Best regards,

Lukas


On Mon, 22 Jun 2015 10:51:46 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:



You can use the \pushbackground and \popbackground command to limit the
background changes to a certain part of your document.



\defineheadalternative
   [partpage]
   [renderingsetup=partpage]

\startsetups[partpage]

 \startmakeup[part]
 \headsetupspacing
 \headnumbercontent
 \blank[big]
 \headtextcontent
 \stopmakeup

\stopsetups

\definemakeup
   [part]
   [align=middle,
top=\vfill\vfill,
bottom=\vfill\vfill\vfill]

\setuphead
   [part]
   [placehead=yes,
alternative=partpage,
page=right,
before={\pushbackground[page]\setupbackgrounds[page][background=color,backgroundcolor=blue]},
after={\page\popbackground},
bodypartlabel=part,
align=middle,
numberstyle=\bfb,
textstyle=\bfd\sc]

\setuplabeltext[en][part=DĂl ]

\starttext
   \part{Part}
   \input knuth
\stoptext

BTW: Where is Ad 2?

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] \setuphead[part] - special look

2015-06-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'm trying to \setuphead[part] to have the following features:

1. Part head to fill the whole page.

2. Part number and name to be placed (approx.) in the golden ratio of the page.

3. Page background (for the \part only!) to be colored, e.g. blue.


\define[2]\MyPartCmd{%
{%
  \vbox to\vsize{%
\vfill\vfill%
#1
\blank[big]
#2
\vfill\vfill\vfill%
  }
}%
}

\define[1]\MyPartCmdText{%
  \hbox to\hsize{\hfill \bf DĂl #1\hfill}%
}

\definefontsize[e]
\definebodyfontenvironment[default][e=5.]

\define[1]\MyPartCmdNum{%
  \hbox to\hsize{\hfill \bfe\sc#1\hfill}%
}

\setuphead[part]
  [command=\MyPartCmd,
   numbercommand=\MyPartCmdText,
   textcommand=\MyPartCmdNum,
   placehead=yes,header=none,page=odd,
   
before={\setupbackgrounds[page][background=color,backgroundcolor=blue,state=start]},
   %after={\setupbackgrounds[page][background=]},
  ]

\starttext
  \showboxes
  \part{Part}
  \input knuth
\stoptext


The code above doesn't satisfy the features:

Ad 1: Some text (from knuth) appears in the bottom (should be solved by 
after=\page, but is there a better solution, e.g. to affect height of the 
\vbox in \MyPartCmd?)

Ad 3: I'm able to make only the part page blue (now all pages are blue; when I uncomment 
after={\setupbackgrounds[page][background=]},, no page is blue).

Could anyone help me to tune the \setuphead[part]?

Thank you in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

Ull-Gra.test.mkiv
Description: Binary data


Ull-Gra.test.pdf
Description: Adobe PDF document
___
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] \setuphead for all existing sections

2015-04-21 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

On Tue, 21 Apr 2015 00:38:18 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


The \setupheads command is only a synonym for \setuphead but there can be a 
difference between

\setuphead[..,..=..,..]

and

\setuphead[section][..,..=..,..]

Wolfgang


confirmed:


\setuphead[distance=2in]

\starttext
 \section{Sec}
   \subsection{Subsec}
\stoptext


the code above doesn't change the section distance, either.

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] \setuphead for all existing sections

2015-04-21 Thread Wolfgang Schuster

 Am 21.04.2015 um 08:55 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
 l...@pontex.cz:
 
 Hello,
 
 On Tue, 21 Apr 2015 00:38:18 +0200, Wolfgang Schuster 
 schuster.wolfg...@gmail.com wrote:
 
 The \setupheads command is only a synonym for \setuphead but there can be a 
 difference between
 
\setuphead[..,..=..,..]
 
 and
 
\setuphead[section][..,..=..,..]
 
 Wolfgang
 
 confirmed:
 
 
 \setuphead[distance=2in]
 
 \starttext
 \section{Sec}
   \subsection{Subsec}
 \stoptext
 
 
 the code above doesn't change the section distance, either.

The global setting is ignored because part, chapter and section already have a 
preset
value for the distance key which is used instead of the global value.

The section below section (subsection, subsubsection etc.) ignore the global 
setting
as well because subsection inherits the value from section.

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

Re: [NTG-context] \setuphead for all existing sections

2015-04-20 Thread Wolfgang Schuster

 Am 20.04.2015 um 20:43 schrieb Lukáš Procházka l...@pontex.cz:
 
 Hello Pablo,
 
 \setupheads doesn't work for this - see the test:
 
 
 \setupheads[distance=1in]
 \setuphead[subsection][distance=2in]
 
 \starttext
  \section{Sec}
\subsection{Subsec}
 \stoptext
 
 
 Subsection has the specified distance of 1 in, whilst the section doesn't.
 
 Section was altered by \setupheads, whilst subsection by \setuphead.
 
 Wiki http://wiki.contextgarden.net/Command/setupheads 
 http://wiki.contextgarden.net/Command/setupheads says that \setuphead has 
 some more options than \setupheads.

The \setupheads command is only a synonym for \setuphead but there can be a 
difference between

\setuphead[..,..=..,..]

and

\setuphead[section][..,..=..,..]

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

Re: [NTG-context] \setuphead for all existing sections

2015-04-20 Thread Lukáš Procházka

Hello Pablo,

\setupheads doesn't work for this - see the test:


\setupheads[distance=1in]
\setuphead[subsection][distance=2in]

\starttext
  \section{Sec}
\subsection{Subsec}
\stoptext


Subsection has the specified distance of 1 in, whilst the section doesn't.

Section was altered by \setupheads, whilst subsection by \setuphead.

Wiki http://wiki.contextgarden.net/Command/setupheads says that \setuphead has 
some more options than \setupheads.

- I guess it would be nice that \setupheads handles the distance key, too.

Best regards,

Lukas


On Fri, 17 Apr 2015 18:35:18 +0200, Pablo Rodriguez oi...@gmx.es wrote:


On 04/17/2015 12:00 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

is there a way to affect (setup) all sections that have been defined, like:


\setuphead[*][distance=1.5em]


instead of:


\setuphead[part,chapter,section,subsection,subsubsection][distance=1.5em]



Hi Lukáš,

\setupheads[distance=1.5em] should do the work.

I hope it helps,


Pablo



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] \setuphead for all existing sections

2015-04-20 Thread Pablo Rodriguez
On 04/20/2015 08:43 PM, Lukáš Procházka wrote:
 Hello Pablo,
 
 \setupheads doesn't work for this - see the test:

Hi Lukáš,

sorry, I thought that the plural of \setup... had the same options than
its singular form. My fault, since I was totally wrong.

I agree that it would be useful to have the same options from \setuphead
in \setupheads.


Pablo


 
 \setupheads[distance=1in]
 \setuphead[subsection][distance=2in]
 
 \starttext
\section{Sec}
  \subsection{Subsec}
 \stoptext
 
 
 Subsection has the specified distance of 1 in, whilst the section doesn't.
 
 Section was altered by \setupheads, whilst subsection by \setuphead.
 
 Wiki http://wiki.contextgarden.net/Command/setupheads says that
 \setuphead has some more options than \setupheads.
 
 - I guess it would be nice that \setupheads handles the distance key, too.
 
 Best regards,
 
 Lukas


-- 
http://www.ousia.tk
___
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] \setuphead for all existing sections

2015-04-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

is there a way to affect (setup) all sections that have been defined, like:


\setuphead[*][distance=1.5em]


instead of:


\setuphead[part,chapter,section,subsection,subsubsection][distance=1.5em]


The latter way needs to know all section names;
the former way allows to modify them all, without knowledge of their individual 
names.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] \setuphead for all existing sections

2015-04-17 Thread Pablo Rodriguez
On 04/17/2015 12:00 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
 Hello,
 
 is there a way to affect (setup) all sections that have been defined, like:
 
 
 \setuphead[*][distance=1.5em]
 
 
 instead of:
 
 
 \setuphead[part,chapter,section,subsection,subsubsection][distance=1.5em]
 

Hi Lukáš,

\setupheads[distance=1.5em] should do the work.

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
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] setuphead bug?

2014-10-07 Thread Meer, H. van der

There seems to be a problem in \setuphead, it produces a spurious else from the 
alternative=middle.

In the reference manual I see the possibilities: alternative = normal inmargin 
middle TEXT. Of these middle is the only one giving the else.

minimal example:

\setuphead[chapter][alternative=middle]
\starttext
\startchapter[title=TITLE]
\stopchapter
\stoptext

Is there a quick repair?

ConTeXt  ver: 2014.10.06 00:29 MKIV beta  fmt: 2014.10.6  int: english/english


Hans van der Meer





else-bug.pdf
Description: else-bug.pdf
___
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] setuphead bug?

2014-10-07 Thread Otared Kavian
Don’t you mean rather
\setuphead[chapter][align=middle]
instead of « alternative »?

Best regards: OK

On 07 Oct 2014, at 17:28, Meer, H. van der h.vanderm...@uva.nl wrote:

 
 There seems to be a problem in \setuphead, it produces a spurious else from 
 the alternative=middle. 
 
 In the reference manual I see the possibilities: alternative = normal 
 inmargin middle TEXT. Of these middle is the only one giving the else.
 
 minimal example:
 
 \setuphead[chapter][alternative=middle]
 \starttext
 \startchapter[title=TITLE]
 \stopchapter
 \stoptext
 
 Is there a quick repair?
 
 ConTeXt  ver: 2014.10.06 00:29 MKIV beta  fmt: 2014.10.6  int: english/english
 
 
 Hans van der Meer
 
 
 
 else-bug.pdf___
 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
 ___

___
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] setuphead bug?

2014-10-07 Thread Meer, H. van der
\setuphead[chapter][align=middle] works out ok for me. Thanks!

But then, \setuphead[chapter][alternative=middle] seems quite correct, 
following the manual. The else seems strange then.

Hans van der Meer



On 07 Oct 2014, at 17:59, Otared Kavian 
ota...@gmail.commailto:ota...@gmail.com wrote:

Don’t you mean rather
\setuphead[chapter][align=middle]
instead of « alternative »?

Best regards: OK

On 07 Oct 2014, at 17:28, Meer, H. van der 
h.vanderm...@uva.nlmailto:h.vanderm...@uva.nl wrote:


There seems to be a problem in \setuphead, it produces a spurious else from the 
alternative=middle.

In the reference manual I see the possibilities: alternative = normal inmargin 
middle TEXT. Of these middle is the only one giving the else.

minimal example:

\setuphead[chapter][alternative=middle]
\starttext
\startchapter[title=TITLE]
\stopchapter
\stoptext

Is there a quick repair?

ConTeXt  ver: 2014.10.06 00:29 MKIV beta  fmt: 2014.10.6  int: english/english


Hans van der Meer



else-bug.pdf___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nlmailto:ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nlhttp://www.pragma-ade.nl/ / 
http://tex.aanhet.nethttp://tex.aanhet.net/
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.nethttp://contextgarden.net/
___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nlmailto: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
___

___
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] setuphead bug?

2014-10-07 Thread Otared Kavian
Hi,

You are right, it seems that there is a trailing « else » somewhere in the 
sources… 
Actually the possible keys for « alternative= » are

 alternative=paragraph normal inmargin margin middle top bottom 
IDENTIFIER

and the following works fine also:

\setuphead[chapter] [number=no, alternative=middle] 
\starttext
 \startchapter[title=TITLE] 
\input knuth.tex
 \stopchapter
\stoptext

However, saying

\setuphead[chapter] [alternative=middle] 

gives the wrong result you mentioned, suggesting that there is somewhere an « 
else » which shouldn’t be there.
Maybe Hans H. with the above informations can nail it down?

Best regards: OK

On 07 Oct 2014, at 18:40, Meer, H. van der h.vanderm...@uva.nl wrote:

 \setuphead[chapter][align=middle] works out ok for me. Thanks!
 
 But then, \setuphead[chapter][alternative=middle] seems quite correct, 
 following the manual. The else seems strange then.
 
 Hans van der Meer
 
 
 
 On 07 Oct 2014, at 17:59, Otared Kavian ota...@gmail.com wrote:
 
 Don’t you mean rather
 \setuphead[chapter][align=middle]
 instead of « alternative »?
 
 Best regards: OK
 
 On 07 Oct 2014, at 17:28, Meer, H. van der h.vanderm...@uva.nl wrote:
 
 
 There seems to be a problem in \setuphead, it produces a spurious else from 
 the alternative=middle. 
 
 In the reference manual I see the possibilities: alternative = normal 
 inmargin middle TEXT. Of these middle is the only one giving the else.
 
 minimal example:
 
 \setuphead[chapter][alternative=middle]
 \starttext
 \startchapter[title=TITLE]
 \stopchapter
 \stoptext
 
 Is there a quick repair?
 
 ConTeXt  ver: 2014.10.06 00:29 MKIV beta  fmt: 2014.10.6  int: 
 english/english
 
 
 Hans van der Meer
 
 
 
 else-bug.pdf___
 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
 ___
 
 ___
 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
 ___
 
 ___
 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
 ___

___
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] setuphead bug?

2014-10-07 Thread Wolfgang Schuster

Am 07.10.2014 um 21:22 schrieb Otared Kavian ota...@gmail.com:

 Hi,
 
 You are right, it seems that there is a trailing « else » somewhere in the 
 sources… 
 Actually the possible keys for « alternative= » are
   
alternative=paragraph normal inmargin margin middle top bottom 
 IDENTIFIER
 
 and the following works fine also:
 
 \setuphead[chapter] [number=no, alternative=middle] 
 \starttext
  \startchapter[title=TITLE] 
 \input knuth.tex
  \stopchapter
 \stoptext
 
 However, saying
   
   \setuphead[chapter] [alternative=middle] 
 
 gives the wrong result you mentioned, suggesting that there is somewhere an « 
 else » which shouldn’t be there.
 Maybe Hans H. with the above informations can nail it down?

strc-ren.mkiv

\startsetups[\??headrenderings:\v!middle]
\vbox {
\headsetupspacing
\veryraggedcenter
\let\\\endgraf
\let\crlf\endgraf
\ifconditional\headshownumber
\strut
\headnumbercontent
\par
-   else
+   \else
\fakeheadnumbercontent % will also be done in the other ones (force 
consistency with numbered)
\fi
\begstrut
\headtextcontent
\endstrut
}
\stopsetups

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

Re: [NTG-context] setuphead bug?

2014-10-07 Thread Wolfgang Schuster

Am 07.10.2014 um 21:22 schrieb Otared Kavian ota...@gmail.com:

 Hi,
 
 You are right, it seems that there is a trailing « else » somewhere in the 
 sources… 
 Actually the possible keys for « alternative= » are
   
alternative=paragraph normal inmargin margin middle top bottom 
 IDENTIFIER
 
 and the following works fine also:
 
 \setuphead[chapter] [number=no, alternative=middle] 
 \starttext
  \startchapter[title=TITLE] 
 \input knuth.tex
  \stopchapter
 \stoptext
 
 However, saying
   
   \setuphead[chapter] [alternative=middle] 
 
 gives the wrong result you mentioned, suggesting that there is somewhere an « 
 else » which shouldn’t be there.
 Maybe Hans H. with the above informations can nail it down?

strc-ren.mkiv

\startsetups[\??headrenderings:\v!middle]
\vbox {
\headsetupspacing
\veryraggedcenter
\let\\\endgraf
\let\crlf\endgraf
\ifconditional\headshownumber
\strut
\headnumbercontent
\par
-   else
+   \else
\fakeheadnumbercontent % will also be done in the other ones (force 
consistency with numbered)
\fi
\begstrut
\headtextcontent
\endstrut
}
\stopsetups

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

Re: [NTG-context] setuphead bug?

2014-10-07 Thread Hans Hagen

On 10/7/2014 10:32 PM, Wolfgang Schuster wrote:


-   else
+   \else
 \fakeheadnumbercontent % will also be done in the other ones 
(force consistency with numbered)
 \fi


yes, a new thingie

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] setuphead style 'underline'?

2014-08-17 Thread Gerben Wierda
Is there a way to get underlined headers with \setuphead?
___
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] setuphead style 'underline'?

2014-08-17 Thread Matthias Weber
I am not sure whether that’s what you want, but I use


\setuphead  [section]
[numberstyle=bold,
style={\tfb\bf\ss},
page=yes,
continue=no,
before={\hairline},
after={\hairline\blank[.4cm]}

Matthias


On Aug 17, 2014, at 2:40 PM, Gerben Wierda gerben.wie...@rna.nl wrote:

 Is there a way to get underlined headers with \setuphead?
 ___
 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
 ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] setuphead style 'underline'?

2014-08-17 Thread Wolfgang Schuster

Am 17.08.2014 um 20:40 schrieb Gerben Wierda gerben.wie...@rna.nl:

 Is there a way to get underlined headers with \setuphead?

\setuphead[chapter][textcommand=\underbar]

\starttext
\chapter{\input ward }
\stoptext

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


Re: [NTG-context] setuphead interlinespace

2014-07-27 Thread Herbert Voss
Am 27.07.2014 04:06, schrieb Yuri Teixeira:
 Hello, From command/setuphead
 http://wiki.contextgarden.net/Command/setuphead I inferred this should
 work to set linespace to 1.5 within the chapter/section but it doesn't.
 Should it? I read on \setupinterlinespace and it's resetting mechanic
 but thought the parameter in setuphead would work. Also, I checked and
 this parameter is not mentioned in the manual, so maybe it does not exist.
 
 \setuphead[chapter][interlinespace=big]

sets the chapter title with a big interline space, not the following text:

\chapter{Some title with some more text to fill more tha a line}

will be of one half spacing

 \startchapter[title={Some title}]
 \setupinterlinespace[big]

this setting will be global not local. The reason why it is valid also
for the next chapter.

Herbert

___
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] setuphead interlinespace

2014-07-27 Thread Otared Kavian
Hi,

Have a look at the following wiki page:
http://wiki.contextgarden.net/setuplocalinterlinespace

It may help you achieve what you want to do.

Best regards: OK

On 27 Jul 2014, at 04:06, Yuri Teixeira yuriteixeira...@gmail.com wrote:

 Hello, From command/setuphead I inferred this should work to set linespace to 
 1.5 within the chapter/section but it doesn't. Should it? I read on 
 \setupinterlinespace and it's resetting mechanic but thought the parameter in 
 setuphead would work. Also, I checked and this parameter is not mentioned in 
 the manual, so maybe it does not exist.
 
 \setuphead[chapter][interlinespace=big]
 
 \starttext
 \chapter{Some title}
 Lines with 1.5 space? \input tufte
 
 \startchapter[title={Some title}]
 Try again? \input tufte
 \stopchapter
 
 \startchapter[title={Some title}]
 \setupinterlinespace[big]
 Now it works. \input tufte
 \stopchapter
 
 \startchapter[title={Some title}]
 But it leaks out of the previous start-stopchapter. \input tufte
 \stopchapter
 \stoptext
 
 Thank you for your attention,
 YT
 ___
 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
 ___

___
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] setuphead interlinespace

2014-07-27 Thread Yuri Teixeira
Thank you, this is really what I wanted. I found the source of my confusion
too: \setupinterlinespace is local inside \start-stopnarrower

\setupinterlinespace[5] % this has no effect before \starttext

\starttext
\input tufte % this is default small, not 5
\setupinterlinespace[big]
\input tufte % this is big

\startnarrower[left]
\setupinterlinespace[small]
\input tufte % this is small
\stopnarrower

\input tufte % this is big again
\stoptext


2014-07-27 5:51 GMT-03:00 Otared Kavian ota...@gmail.com:

 Hi,

 Have a look at the following wiki page:
 http://wiki.contextgarden.net/setuplocalinterlinespace

 It may help you achieve what you want to do.

 Best regards: OK

 On 27 Jul 2014, at 04:06, Yuri Teixeira yuriteixeira...@gmail.com wrote:

 Hello, From command/setuphead
 http://wiki.contextgarden.net/Command/setuphead I inferred this should
 work to set linespace to 1.5 within the chapter/section but it doesn't.
 Should it? I read on \setupinterlinespace and it's resetting mechanic but
 thought the parameter in setuphead would work. Also, I checked and this
 parameter is not mentioned in the manual, so maybe it does not exist.

 \setuphead[chapter][interlinespace=big]

 \starttext
 \chapter{Some title}
 Lines with 1.5 space? \input tufte

 \startchapter[title={Some title}]
 Try again? \input tufte
 \stopchapter

 \startchapter[title={Some title}]
 \setupinterlinespace[big]
 Now it works. \input tufte
 \stopchapter

 \startchapter[title={Some title}]
 But it leaks out of the previous start-stopchapter. \input tufte
 \stopchapter
 \stoptext

 Thank you for your attention,
 YT

 ___
 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

 ___




 ___
 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

 ___

___
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] setuphead interlinespace

2014-07-27 Thread Otared Kavian
You are right Yuri, I added your comment to the wiki page concerning 
setupinterlinespace:
http://wiki.contextgarden.net/Command/setupinterlinespace

Best regards: OK

On 27 Jul 2014, at 16:16, Yuri Teixeira yuriteixeira...@gmail.com wrote:

 Thank you, this is really what I wanted. I found the source of my confusion 
 too: \setupinterlinespace is local inside \start-stopnarrower
 
 \setupinterlinespace[5] % this has no effect before \starttext
 
 \starttext
 \input tufte % this is default small, not 5
 \setupinterlinespace[big]
 \input tufte % this is big
 
 \startnarrower[left]
 \setupinterlinespace[small]
 \input tufte % this is small
 \stopnarrower
 
 \input tufte % this is big again
 \stoptext
 
 
 2014-07-27 5:51 GMT-03:00 Otared Kavian ota...@gmail.com:
 Hi,
 
 Have a look at the following wiki page:
   http://wiki.contextgarden.net/setuplocalinterlinespace
 
 It may help you achieve what you want to do.
 
 Best regards: OK
 
 On 27 Jul 2014, at 04:06, Yuri Teixeira yuriteixeira...@gmail.com wrote:
 
 Hello, From command/setuphead I inferred this should work to set linespace 
 to 1.5 within the chapter/section but it doesn't. Should it? I read on 
 \setupinterlinespace and it's resetting mechanic but thought the parameter 
 in setuphead would work. Also, I checked and this parameter is not mentioned 
 in the manual, so maybe it does not exist.
 
 \setuphead[chapter][interlinespace=big]
 
 \starttext
 \chapter{Some title}
 Lines with 1.5 space? \input tufte
 
 \startchapter[title={Some title}]
 Try again? \input tufte
 \stopchapter
 
 \startchapter[title={Some title}]
 \setupinterlinespace[big]
 Now it works. \input tufte
 \stopchapter
 
 \startchapter[title={Some title}]
 But it leaks out of the previous start-stopchapter. \input tufte
 \stopchapter
 \stoptext
 
 Thank you for your attention,
 YT
 ___
 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
 ___
 
 
 ___
 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
 ___
 
 ___
 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
 ___

___
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] setuphead interlinespace

2014-07-26 Thread Yuri Teixeira
Hello, From command/setuphead
http://wiki.contextgarden.net/Command/setuphead I inferred this should
work to set linespace to 1.5 within the chapter/section but it doesn't.
Should it? I read on \setupinterlinespace and it's resetting mechanic but
thought the parameter in setuphead would work. Also, I checked and this
parameter is not mentioned in the manual, so maybe it does not exist.

\setuphead[chapter][interlinespace=big]

\starttext
\chapter{Some title}
Lines with 1.5 space? \input tufte

\startchapter[title={Some title}]
Try again? \input tufte
\stopchapter

\startchapter[title={Some title}]
\setupinterlinespace[big]
Now it works. \input tufte
\stopchapter

\startchapter[title={Some title}]
But it leaks out of the previous start-stopchapter. \input tufte
\stopchapter
\stoptext

Thank you for your attention,
YT
___
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] setuphead for in-paragraph head ?

2014-01-13 Thread Wolfgang Schuster

Am 13.01.2014 um 04:41 schrieb Otared Kavian ota...@gmail.com:

 Hi Wolfgang,
 
 Thanks for the tip: I’ll try to adapt what you suggest to the case of blocks 
 and question-hint-answer, and then let you know if I succeed.
 Out of curiosity, how can one access the counter associated to an enumeration 
 or an item?

You can use \rawcountervalue[name of the enumeration environment] or 
\convertedcounter[name of the environment].

 Also, if I understand correctly, the command
   \increment\QuestionCounter
 creates first a counter named QuestionCounter, if it does not exist yet, and 
 then increments its value: so one does not need anymore commands such as
   \newcounter\QuestionCounter
 before incrementing it. Am I right?

No, you don’t need \newcounter because \increment checks if the counter exists 
because it tries to increase the value. The \newcounter command which creates 
the counter can also be used to reset the value and not only to create the 
counter.

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

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Jaroslav Hajtmar

Hello Otared and Wolfgang.

Thanks for launching this example.
Is there a possibility to write the answers into a more compact form 
(more columns, one paragraph, etc) like in any textbooks? I tried 
experimenting, but I was unable to put answers into a compact form.

Thanks Jaroslav Hajtmar

Here is my modification of answer enumeration (not working):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
beforehead=,
afterhead=,
 before={\startcolumns[n=4]},
after=\stopcolumns,
width=0.5em,
text={},
headstyle={},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer
\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer


\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex



Dne 11.1.2014 20:01, Otared Kavian napsal(a):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
width=4.5cm,
text={Answer to question},
headstyle={\bi},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
   Compute $4\times 5$.
\endquestion

\beginhint
   Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
   $20$.
\endanswer

\beginquestion
   What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex


___
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] setuphead for in-paragraph head ?

2014-01-12 Thread Otared Kavian
Hi Jaroslav,

Actually the formatting of what you put in the block determined for example by
\beginanswer
The answer is…
\endanswer
is independent of the block mechanism: you can use whatever structure you want. 
In the example we exchanged on, an enumeration such as
\startanswer
\stopanswer
where this \start \stop has been defined by \defineenumeration[answer], but you 
can use your own compact formatting instead of this.

Best regards: OK

On 12 janv. 2014, at 11:45, Jaroslav Hajtmar hajt...@gyza.cz wrote:

 Hello Otared and Wolfgang.
 
 Thanks for launching this example.
 Is there a possibility to write the answers into a more compact form (more 
 columns, one paragraph, etc) like in any textbooks? I tried experimenting, 
 but I was unable to put answers into a compact form.
 Thanks Jaroslav Hajtmar
 
 Here is my modification of answer enumeration (not working):
 
  begin question-hint-answer-blocks.tex
 \defineblock[question]
 \defineblock[hint]
 \defineblock[answer]
 
 \defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]
 
 \defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]
 
 \defineenumeration[answer]
[alternative=hanging,
beforehead=,
afterhead=,
 before={\startcolumns[n=4]},
after=\stopcolumns,
width=0.5em,
text={},
headstyle={},
stopper={.}]
 
 \setupblock[question][before={\startquestion},after={\stopquestion}]
 \setupblock[hint][before={\starthint},after={\stophint}]
 \setupblock[answer][before={\startanswer},after={\stopanswer}]
 
 \keepblocks[question]
 \hideblocks[hint]
 \hideblocks[answer]
 
 \starttext
 
 \section{Questions}
 
 \beginquestion
  Compute $4\times 5$.
 \endquestion
 
 \beginhint
  Use the fact that $2\times 5 = 10$.
 \endhint
 
 \beginanswer
  $20$.
 \endanswer
 
 \beginquestion
  What is the value of $100 / 10$?
 \endquestion
 
 \beginhint
 Remember that $10\times 10 = 100$.
 \endhint
 
 \beginanswer
 $10$
 \endanswer
 
 \beginquestion
  Compute $4\times 5$.
 \endquestion
 
 \beginhint
  Use the fact that $2\times 5 = 10$.
 \endhint
 
 \beginanswer
  $20$.
 \endanswer
 
 \beginquestion
  What is the value of $100 / 10$?
 \endquestion
 
 \beginhint
 Remember that $10\times 10 = 100$.
 \endhint
 
 \beginanswer
 $10$
 \endanswer
 
 \beginquestion
  Compute $4\times 5$.
 \endquestion
 
 \beginhint
  Use the fact that $2\times 5 = 10$.
 \endhint
 
 \beginanswer
  $20$.
 \endanswer
 
 \beginquestion
  What is the value of $100 / 10$?
 \endquestion
 
 \beginhint
 Remember that $10\times 10 = 100$.
 \endhint
 
 \beginanswer
 $10$
 \endanswer
 \beginquestion
  Compute $4\times 5$.
 \endquestion
 
 \beginhint
  Use the fact that $2\times 5 = 10$.
 \endhint
 
 \beginanswer
  $20$.
 \endanswer
 
 \beginquestion
  What is the value of $100 / 10$?
 \endquestion
 
 \beginhint
 Remember that $10\times 10 = 100$.
 \endhint
 
 \beginanswer
 $10$
 \endanswer
 
 
 \section{Hints to all questions}
 
 \useblocks[hint]
 
 \section{Answers to all questions}
 
 \useblocks[answer]
 
 \stoptext
  end question-hint-answer-blocks.tex
 
 
 
 Dne 11.1.2014 20:01, Otared Kavian napsal(a):
  begin question-hint-answer-blocks.tex
 \defineblock[question]
 \defineblock[hint]
 \defineblock[answer]
 
 \defineenumeration[question]
  [alternative=hanging,
  width=2.5cm,
  text={Question},
  headstyle={\bi},
  stopper={.}]
  
 \defineenumeration[hint]
  [alternative=hanging,
  width=4cm,
  text={Hint for question},
  headstyle={\bi},
  stopper={.}]
 
 \defineenumeration[answer]
  [alternative=hanging,
  width=4.5cm,
  text={Answer to question},
  headstyle={\bi},
  stopper={.}]
 
 \setupblock[question][before={\startquestion},after={\stopquestion}]
 \setupblock[hint][before={\starthint},after={\stophint}]
 \setupblock[answer][before={\startanswer},after={\stopanswer}]
 
 \keepblocks[question]
 \hideblocks[hint]
 \hideblocks[answer]
 
 \starttext
 
 \section{Questions}
 
 \beginquestion
   Compute $4\times 5$.
 \endquestion
 
 \beginhint
   Use the fact that $2\times 5 = 10$.
 \endhint
 
 \beginanswer
   $20$.
 \endanswer
 
 \beginquestion
   What is the value of $100 / 10$?
 \endquestion
 
 \beginhint
 Remember that $10\times 10 = 100$.
 \endhint
 
 \beginanswer
 $10$
 \endanswer
 
 \section{Hints to all questions}
 
 \useblocks[hint]
 
 \section{Answers to all questions}
 
 \useblocks[answer]
 
 \stoptext
  end question-hint-answer-blocks.tex
 
 ___
 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  : 

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Jaroslav Hajtmar

OK.  Thanx very much - for me it is a useful thing...
Jaroslav Hajtmar


Dne 12.1.2014 17:08, Otared Kavian napsal(a):

Hi Jaroslav,

Actually the formatting of what you put in the block determined for example by
\beginanswer
The answer is…
\endanswer
is independent of the block mechanism: you can use whatever structure you want. 
In the example we exchanged on, an enumeration such as
\startanswer
\stopanswer
where this \start \stop has been defined by \defineenumeration[answer], but you 
can use your own compact formatting instead of this.

Best regards: OK

On 12 janv. 2014, at 11:45, Jaroslav Hajtmar hajt...@gyza.cz wrote:


Hello Otared and Wolfgang.

Thanks for launching this example.
Is there a possibility to write the answers into a more compact form (more 
columns, one paragraph, etc) like in any textbooks? I tried experimenting, but 
I was unable to put answers into a compact form.
Thanks Jaroslav Hajtmar

Here is my modification of answer enumeration (not working):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
beforehead=,
afterhead=,
 before={\startcolumns[n=4]},
after=\stopcolumns,
width=0.5em,
text={},
headstyle={},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer
\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer


\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex



Dne 11.1.2014 20:01, Otared Kavian napsal(a):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
width=4.5cm,
text={Answer to question},
headstyle={\bi},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
   Compute $4\times 5$.
\endquestion

\beginhint
   Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
   $20$.
\endanswer

\beginquestion
   What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex

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

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Wolfgang Schuster

Am 11.01.2014 um 20:01 schrieb Otared Kavian ota...@gmail.com:

 I will put this example on the wiki, but before doing so I have another 
 question:
 can one add two automatic links at the end of each question so that one can 
 navigate easily to the respective hint or answer corresponding to that 
 question? Indeed if this were possible, one would add also two automatic 
 links to each hint going to its question and the corresponding answer, and 
 two other links to each answer going to its hint and question. One can do 
 this manually by adding a reference to each question, each hint and each 
 answer, but it would be nice to have this done automatically.

Not without writing your own environment where you generate a unique reference 
for each question, hint and answer.

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


Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Wolfgang Schuster

Am 12.01.2014 um 21:47 schrieb Otared Kavian ota...@gmail.com:

 
 On 12 janv. 2014, at 21:30, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 11.01.2014 um 20:01 schrieb Otared Kavian ota...@gmail.com:
 
 I will put this example on the wiki, but before doing so I have another 
 question:
 can one add two automatic links at the end of each question so that one can 
 navigate easily to the respective hint or answer corresponding to that 
 question? Indeed if this were possible, one would add also two automatic 
 links to each hint going to its question and the corresponding answer, and 
 two other links to each answer going to its hint and question. One can do 
 this manually by adding a reference to each question, each hint and each 
 answer, but it would be nice to have this done automatically.
 
 Not without writing your own environment where you generate a unique 
 reference for each question, hint and answer.
 
 If I understand well, one way might be something like (where 
 \theQuestionNumber stands for the number given by \startquestion)
 
 \define\StartQuestion{\startquestion[Q:\theQuestionNumber]}
 \define\StartHint{\startquestion[H:\theQuestionNumber]}
 \define\StartAnswer{\startquestion[A:\theQuestionNumber]}
 \define\StopQuestion{\par\in{Hint}[H:\theQuestionNumber]\par 
 \in{Answer}[A:\theQuestionNumber]\stopquestion}
 \define\StopHint{\par\in{Question}[Q:\theQuestionNumber]\par 
 \in{Answer}[A:\theQuestionNumber]\stophint}
 \define\StopAnswer{\par\in{Question}[Q:\theQuestionNumber]\par 
 \in{Hint}[H:\theQuestionNumber]\stopquestion}
 
 and then using \StartQuestion \StopQuestion, etc, instead of \startquestion 
 \stopquestion.
 But how can I refer to the \theQuestionNumber set by \startquestion?


When you have only questions and answers you can use the coupling key but in 
your case something like below is necessary:

\defineenumeration[Question]
\defineenumeration[Answer]

\define\startquestion
  {\increment\QuestionCounter
   \expanded{\startQuestion[reference=Question:\QuestionCounter]}}

\define\stopquestion
  {\stopQuestion
   \par
   \in{Answer}[Answer:\QuestionCounter]}

\define\startanswer
  {\expanded{\startAnswer[reference=Answer:\QuestionCounter]}}

\define\stopanswer
  {\stopAnswer
   \par
   \in{Question}[Question:\QuestionCounter]}

\setupinteraction[state=start]

\starttext

\startquestion
What is the answer to life the universe and everything?
\stopquestion

\page

\startanswer
42.
\stopanswer

\stoptext

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


Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-12 Thread Otared Kavian
Hi Wolfgang,

Thanks for the tip: I’ll try to adapt what you suggest to the case of blocks 
and question-hint-answer, and then let you know if I succeed.
Out of curiosity, how can one access the counter associated to an enumeration 
or an item?

Also, if I understand correctly, the command
\increment\QuestionCounter
creates first a counter named QuestionCounter, if it does not exist yet, and 
then increments its value: so one does not need anymore commands such as
\newcounter\QuestionCounter
before incrementing it. Am I right?

Best regards: OK

On 12 janv. 2014, at 22:40, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 […]
 When you have only questions and answers you can use the coupling key but in 
 your case something like below is necessary:
 
 \defineenumeration[Question]
 \defineenumeration[Answer]
 
 \define\startquestion
  {\increment\QuestionCounter
   \expanded{\startQuestion[reference=Question:\QuestionCounter]}}
 
 \define\stopquestion
  {\stopQuestion
   \par
   \in{Answer}[Answer:\QuestionCounter]}
 
 \define\startanswer
  {\expanded{\startAnswer[reference=Answer:\QuestionCounter]}}
 
 \define\stopanswer
  {\stopAnswer
   \par
   \in{Question}[Question:\QuestionCounter]}
 
 \setupinteraction[state=start]
 
 \starttext
 
 \startquestion
 What is the answer to life the universe and everything?
 \stopquestion
 
 \page
 
 \startanswer
 42.
 \stopanswer
 
 \stoptext
 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-11 Thread Wolfgang Schuster

Am 11.01.2014 um 00:36 schrieb Otared Kavian ota...@gmail.com:

 Hi Wolfgang,
 
 In mkiv, even using \startanswer, \stopanswer (and the same syntax with 
 questions and hints) the blocks mechanism seems to be broken.
 The error message is still the following:
 
 \dostopnormalblock ...meter \c!after \par \egroup 
   
 argument ...fact that $2\times 5 = 10$. \dostopnormalblock 
   \dostartnormalblock 
 {hint}...
 \dodowithpar ...dler \v!construction \endcsname #1
   \csname 
 \??constructionsto...
 
 When I understand a little bit more about that mechanism I’ll do other 
 testings and eventually ask Hans about what has been changed regarding blocks.

You have to convert the question, hint and answer environment.

What the block environment does is to save the content from the begin to the 
end block and hides it when you use \hideblocks[…]. To output the content of 
the environments you can use \useblocks[…].


\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][alternative=hanging,text={Question},stopper={.}]
\defineenumeration[hint][alternative=hanging,text={Hint for 
question},stopper={.}]
\defineenumeration[answer]  [alternative=hanging,text={Answer to 
question},stopper={.}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion

\startquestion
  Compute $4\times 5$.
\stopquestion

\beginhint
\starthint
  Use the fact that $2\times 5 = 10$.
\stophint
\endhint

\beginanswer
\startanswer
  $20$.
\stopanswer
\endanswer

\endquestion

\beginquestion

\startquestion
  What is the value of $100 / 10$?
\stopquestion

\beginhint
\starthint
Remember that $10\times 10 = 100$.
\stophint
\endhint

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

\endquestion

\section{Hints}

\useblocks[hint]

\section{Answers}

\useblocks[answer]

\stoptext

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

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-11 Thread Otared Kavian
Hi Wolfgang,

Many thanks for your attention and insight.
With your code everything works as expected. In case others would be 
interested, I give here a slight modification of what you sent, which works 
very well with mkiv: I only added 
\setupblock[question][before={\startquestion},after={\stopquestion}]
so that one can just say \beginquestion \endquestion without having to enter 
each time \startquestion \stopquestion. I don’t know whether this is a good 
idea or not, as it may have side effects…

I will put this example on the wiki, but before doing so I have another 
question:
can one add two automatic links at the end of each question so that one can 
navigate easily to the respective hint or answer corresponding to that 
question? Indeed if this were possible, one would add also two automatic links 
to each hint going to its question and the corresponding answer, and two other 
links to each answer going to its hint and question. One can do this manually 
by adding a reference to each question, each hint and each answer, but it would 
be nice to have this done automatically.

Best regards: OK
PS: here is the complete example for question-hint-answer:

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
width=4.5cm,
text={Answer to question},
headstyle={\bi},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex


On 11 janv. 2014, at 10:12, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 
 Am 11.01.2014 um 00:36 schrieb Otared Kavian ota...@gmail.com:
 
 Hi Wolfgang,
 
 In mkiv, even using \startanswer, \stopanswer (and the same syntax with 
 questions and hints) the blocks mechanism seems to be broken.
 The error message is still the following:
 
 \dostopnormalblock ...meter \c!after \par \egroup 
   
 argument ...fact that $2\times 5 = 10$. \dostopnormalblock 
   \dostartnormalblock 
 {hint}...
 \dodowithpar ...dler \v!construction \endcsname #1
   \csname 
 \??constructionsto...
 
 When I understand a little bit more about that mechanism I’ll do other 
 testings and eventually ask Hans about what has been changed regarding 
 blocks.
 
 You have to convert the question, hint and answer environment.
 
 What the block environment does is to save the content from the begin to the 
 end block and hides it when you use \hideblocks[…]. To output the content of 
 the environments you can use \useblocks[…].
 
 
 \defineblock[question]
 \defineblock[hint]
 \defineblock[answer]
 
 \defineenumeration[question][alternative=hanging,text={Question},stopper={.}]
 \defineenumeration[hint][alternative=hanging,text={Hint for 
 question},stopper={.}]
 \defineenumeration[answer]  [alternative=hanging,text={Answer to 
 question},stopper={.}]
 
 \keepblocks[question]
 \hideblocks[hint]
 \hideblocks[answer]
 
 \starttext
 
 \section{Questions}
 
 \beginquestion
 
 \startquestion
   Compute $4\times 5$.
 \stopquestion
 
 \beginhint
 \starthint
   Use the fact that $2\times 5 = 10$.
 \stophint
 \endhint
 
 \beginanswer
 \startanswer
   $20$.
 \stopanswer
 \endanswer
 
 \endquestion
 
 \beginquestion
 
 \startquestion
   What is the value of $100 / 10$?
 \stopquestion
 
 \beginhint
 \starthint
 Remember that $10\times 10 = 100$.
 \stophint
 \endhint
 
 \beginanswer
 \startanswer
 $10$
 \stopanswer
 \endanswer
 
 \endquestion
 
 \section{Hints}
 
 \useblocks[hint]
 
 \section{Answers}
 
 \useblocks[answer]
 
 \stoptext
 
 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 / 

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-10 Thread Otared Kavian
Hi Wolfgang,

In mkiv, even using \startanswer, \stopanswer (and the same syntax with 
questions and hints) the blocks mechanism seems to be broken.
The error message is still the following:

\dostopnormalblock ...meter \c!after \par \egroup 
  
argument ...fact that $2\times 5 = 10$. \dostopnormalblock 
  \dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction \endcsname #1
  \csname \??constructionsto...

When I understand a little bit more about that mechanism I’ll do other testings 
and eventually ask Hans about what has been changed regarding blocks.
Best regards: OK

On 9 janv. 2014, at 18:41, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 […]
 When you enumerations in this form
 
 \beginanswer
 \answer $10$
 \endanswer
 
 you have to finish the paragraph, e.g. by adding \par
 
 \beginanswer
 \answer $10$\par
 \endanswer
 
 or better use the start/stop commands for the enumeration.
 
 \beginanswer
 \startanswer
 $10$
 \stopanswer
 \endanswer
 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Jean-Guillaume
Hi all,
this is my first message here.

In the subsection head, I would like to suppress the newline between the
number and the text, so it behaves like some kind of numbered subsubject.
I tried to modify some examples from the wiki, but without success. In
http://wiki.contextgarden.net/Command/setuphead , most of the options are
not explained.

My purpose is to define something like:

 \definehead[Exercise][subsection]
 \setuphead
  [Exercise]
  [alternative=Mine?,
  ...,
  numberstyle=bold]

So I can typeset a list of exercises in a compact way. I could use
enumerations but I don't think I should.

Thanks.
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Marco Patzer
On 2014–01–09 Jean-Guillaume wrote:

 In the subsection head, I would like to suppress the newline between the
 number and the text,

That's controlled by the “after” key.

 \setuphead
  [Exercise]
  [after=]

 My purpose is to define something like:
 
  \definehead[Exercise][subsection]
  \setuphead
   [Exercise]
   [alternative=Mine?,
   ...,
   numberstyle=bold]

Please provide full working examples next time. That makes it easier
for us and it's more likely you'll get a response.

 So I can typeset a list of exercises in a compact way. I could use
 enumerations but I don't think I should.

That depends on your document. You can use sections, enumerations or
Wolfgang's annotation module.

Marco


signature.asc
Description: Digital signature
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Jean-Guillaume
Thanks for your reply, Marco.

Here is a full example:

 \starttext
 \definehead[Exercise][subsection]
 \setuphead
[Exercise]
[after=]
\startExercise[]{(this is the exercise's title)}
The exercise's content.
\stopExercise
\stoptext


After contexting it, it looks like:

1
(this is the exercise's title) The exercise's content.


Actually, I would like to have the head's number and the head's title
on the same line. That is, whith no new line.

Jean-Guillaume
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Marco Patzer
On 2014–01–09 Jean-Guillaume wrote:

  \starttext
  \definehead[Exercise][subsection]
  \setuphead
 [Exercise]
 [after=]
 \startExercise[]{(this is the exercise's title)}
 The exercise's content.
 \stopExercise
 \stoptext

\definehead
  [Exercise] [subsection]
  [after=]

\starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
\stoptext

Marco


signature.asc
Description: Digital signature
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Jean-Guillaume
But this:

\definehead
  [Exercise] [subsection]
  [after=]
\starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
\stoptext

results to:

1 This is the exercise's title
The exercise's content.

and I would like it to be:

1 This is the exercise's title The exercise's content.

(When I can typeset that, I will see about formatting the number and so on.)

I'm sorry it wasn't very clear. Now I understand that I misunderstood
\startExercise{...} for \startExercise[title=...] and that's why I was
confused about which newline I want to get rid of.

Jean-Guillaume
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 14:23 schrieb Jean-Guillaume jng...@gmail.com:

 But this:
 
 \definehead
  [Exercise] [subsection]
  [after=]
 \starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
 \stoptext
 
 results to:
 
 1 This is the exercise's title
 The exercise's content.
 
 and I would like it to be:
 
 1 This is the exercise's title The exercise's content.
 
 (When I can typeset that, I will see about formatting the number and so on.)
 
 I'm sorry it wasn't very clear. Now I understand that I misunderstood
 \startExercise{...} for \startExercise[title=...] and that's why I was
 confused about which newline I want to get rid of.

\definehead
  [Exercise]
  [subsection]
  [alternative=text,
   distance=0.5em,
   insidesection=\ignorespaces]

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


Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian
Hi Jean Guillaume,

I guess Marco Patzer and Wolfgang Schuster gave you already the appropriate 
answers.
Nevertheless, I wanted to share with you the definitions I use for the kind of 
work you want to do:

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise, 
%   between=,
before=, 
after=\blank] 
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={}, 
number=hide,
number=no,
before={\ExoCommand}, 
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo 
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2 = a^2 + b^2$.
\stopexo


\startexo 
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4 = a^4 + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that 
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


Best regards: OK

On 9 janv. 2014, at 14:23, Jean-Guillaume jng...@gmail.com wrote:

 But this:
 
 \definehead
  [Exercise] [subsection]
  [after=]
 \starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
 \stoptext
 
 results to:
 
 1 This is the exercise's title
 The exercise's content.
 
 and I would like it to be:
 
 1 This is the exercise's title The exercise's content.
 
 (When I can typeset that, I will see about formatting the number and so on.)
 
 I'm sorry it wasn't very clear. Now I understand that I misunderstood
 \startExercise{...} for \startExercise[title=...] and that's why I was
 confused about which newline I want to get rid of.
 
 Jean-Guillaume
 ___
 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
 ___

___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Otared.
I will throw this one... Thanx.

Once I was using exercise-answer package for LaTeX.
Is there anything like this to use in ConTeXt?

Thanx
Jaroslav Hajtmar


Dne 9.1.2014 15:19, Otared Kavian napsal(a):

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise,
%   between=,
before=,
after=\blank]
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={},
number=hide,
number=no,
before={\ExoCommand},
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2  = a^2  + b^2$.
\stopexo


\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4  = a^4  + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian

On 9 janv. 2014, at 15:48, Jaroslav Hajtmar hajt...@gyza.cz wrote:

 Hello Otared.
 I will throw this one... Thanx.
 
 Once I was using exercise-answer package for LaTeX.
 Is there anything like this to use in ConTeXt?
 
 Thanx
 Jaroslav Hajtmar

Hello Jaroslav,

I have something like the following which was given to me by Hans a long time 
ago: unfortunately for some reason this does not work anymore with ConTeXt 
mkiv, but it is quite fine with mkii:

%%% begin question-hint-answer.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][location=hanging,text={Question},stopper={.}]
\defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}]
\defineenumeration[answer][location=hanging,text={Answer to 
question},stopper={.}]

\hideblocks[hint]
\hideblocks[answer]

\starttext
\section{Questions}

\beginquestion
\question Compute $4\times 5$.

\beginhint
\hint Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
\answer $20$.
\endanswer

\endquestion

\beginquestion
\question What is the value of $100 / 10$?

\beginhint
\hint Remember that $10\times 10 = 100$.
\endhint

\beginanswer
\answer $10$
\endanswer

\endquestion

\section{Hints}
\useblocks[hint]

\section{Answers}
\useblocks[answer]

\stoptext
%%% end question-hint-answer.tex

Best regards: OK



 
 
 Dne 9.1.2014 15:19, Otared Kavian napsal(a):
 %%% begin example-exercise.tex
 %%%
 % defining \startexo, \stopexo as an enumeration:
 \startsetups style:simple
 \defineenumeration[exo]
  [alternative=hanging,
  width=fit,
  stopper={.},
  text=Exercise,
 %between=,
  before=,
  after=\blank]
 \stopsetups % style:simple
 
 \startsetups style:textrule
 \definenumber[MyExoNumber][way=bysection,sectionumber=yes]
 \setuptextrules[rulecolor=darkred]
 \define\ExoCommand{\incrementnumber[MyExoNumber]
  \textrule[top]{Exercise \getnumber[MyExoNumber]}
  \startbackground[frame=off,leftframe=on,backgroundcolor=white,
  framecolor=darkred]}
 
 \defineenumeration[exo]
  [alternative=hanging,
  width=fit,
  text={},
  number=hide,
  number=no,
  before={\ExoCommand},
  after={\stopbackground\blank}]
 \stopsetups % style:textrule
 
 % end defining \startexo, \stopexo as an enumeration
 %%%
 
 %defining  numbered questions
 \defineconversion[exercise][\numbers]
 %\setupitemize[packed]
 \def\StartQuestions{%
  \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
 \def\StopQuestions{\stopitemize}
 \def\q{\item}
 
 % trye each of the following
 \setups[style:simple]
 %\setups[style:textrule]
 
 \starttext
 \startexo
 Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
 $(a+b)^2  = a^2  + b^2$.
 \stopexo
 
 
 \startexo
 Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
 $(a+b)^4  = a^4  + b^4$.
 \stopexo
 
 \startexo
 \StartQuestions
 \q Prove that
 \startformula
 \sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
 \stopformula
 
 \q Prove that for any $n \geq 1$ integer one has
 \startformula
 \sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
 \stopformula
 \StopQuestions
 \stopexo
 
 \stoptext
 %%% end example-exercise.tex
 
 ___
 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
 ___

___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Aditya Mahajan

On Thu, 9 Jan 2014, Otared Kavian wrote:



On 9 janv. 2014, at 15:48, Jaroslav Hajtmar hajt...@gyza.cz wrote:


Hello Otared.
I will throw this one... Thanx.

Once I was using exercise-answer package for LaTeX.
Is there anything like this to use in ConTeXt?

Thanx
Jaroslav Hajtmar


Hello Jaroslav,

I have something like the following which was given to me by Hans a long 
time ago: unfortunately for some reason this does not work anymore with 
ConTeXt mkiv, but it is quite fine with mkii:


(Untested): Change location=hanging to alternative=hanging.


%%% begin question-hint-answer.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][location=hanging,text={Question},stopper={.}]
\defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}]
\defineenumeration[answer][location=hanging,text={Answer to 
question},stopper={.}]



Aditya
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 16:36 schrieb Otared Kavian ota...@gmail.com:

 
 On 9 janv. 2014, at 15:48, Jaroslav Hajtmar hajt...@gyza.cz wrote:
 
 Hello Otared.
 I will throw this one... Thanx.
 
 Once I was using exercise-answer package for LaTeX.
 Is there anything like this to use in ConTeXt?
 
 Thanx
 Jaroslav Hajtmar
 
 Hello Jaroslav,
 
 I have something like the following which was given to me by Hans a long time 
 ago: unfortunately for some reason this does not work anymore with ConTeXt 
 mkiv, but it is quite fine with mkii:

Add \keepblocks[question].

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

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian
Hi Wolfgang, Hi Aditya,

Thanks for your attention.
Unfortunately adding 
\keepblocks[question] 
the example I sent before does not work in mkiv, and changing 
location=hanging
to
alternative=hanging
does not help neither…
The error message in mkiv is:
\dostopnormalblock ...meter \c!after \par \egroup 
  
argument ...fact that $2\times 5 = 10$. \dostopnormalblock 
  \dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction \endcsname #1
  \csname \??constructionsto…

So I don’t know what to do if one has to use mkiv.

Best regards: OK

On 9 janv. 2014, at 18:23, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 
 Am 09.01.2014 um 16:36 schrieb Otared Kavian ota...@gmail.com:
 
 
 On 9 janv. 2014, at 15:48, Jaroslav Hajtmar hajt...@gyza.cz wrote:
 
 Hello Otared.
 I will throw this one... Thanx.
 
 Once I was using exercise-answer package for LaTeX.
 Is there anything like this to use in ConTeXt?
 
 Thanx
 Jaroslav Hajtmar
 
 Hello Jaroslav,
 
 I have something like the following which was given to me by Hans a long 
 time ago: unfortunately for some reason this does not work anymore with 
 ConTeXt mkiv, but it is quite fine with mkii:
 
 Add \keepblocks[question].
 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 18:36 schrieb Otared Kavian ota...@gmail.com:

 Hi Wolfgang, Hi Aditya,
 
 Thanks for your attention.
 Unfortunately adding 
   \keepblocks[question] 
 the example I sent before does not work in mkiv, and changing 
   location=hanging
 to
   alternative=hanging
 does not help neither…
 The error message in mkiv is:
   \dostopnormalblock ...meter \c!after \par \egroup 
   
 argument ...fact that $2\times 5 = 10$. \dostopnormalblock 
   \dostartnormalblock 
 {hint}...
 \dodowithpar ...dler \v!construction \endcsname #1
   \csname \??constructionsto…
 
 So I don’t know what to do if one has to use mkiv.

When you enumerations in this form

\beginanswer
\answer $10$
\endanswer

you have to finish the paragraph, e.g. by adding \par

\beginanswer
\answer $10$\par
\endanswer

or better use the start/stop commands for the enumeration.

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

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

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Wolfgang, Otared and Aditya.
Thanks for your advice and treatments. It is there a complete working 
example?
I am sorry, but I am not able to achieve the proposed modifications to 
make it work.

Thanx.
Jaroslav Hajtmar






Dne 9.1.2014 18:41, Wolfgang Schuster napsal(a):


Am 09.01.2014 um 18:36 schrieb Otared Kavian ota...@gmail.com 
mailto:ota...@gmail.com:



Hi Wolfgang, Hi Aditya,

Thanks for your attention.
Unfortunately adding
\keepblocks[question]
the example I sent before does not work in mkiv, and changing
location=hanging
to
alternative=hanging
does not help neither…
The error message in mkiv is:
\dostopnormalblock ...meter \c!after \par \egroup

argument ...fact that $2\times 5 = 10$. \dostopnormalblock
\dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction \endcsname #1
\csname \??constructionsto…

So I don’t know what to do if one has to use mkiv.


When you enumerations in this form

\beginanswer
\answer $10$
\endanswer

you have to finish the paragraph, e.g. by adding \par

\beginanswer
\answer $10$\par
\endanswer

or better use the start/stop commands for the enumeration.

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

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


[NTG-context] setuphead and Table of Content

2013-03-31 Thread Malte Stien
Hello everyone,

I have defined my own set of heads with \setuphead like so, such that I can 
supply my own numbers:

  \definehead[foosection][section]
  \setuphead[foosection][number=yes, ownnumber=yes, sectionsegments=section] 

However, I need them to show up in the table of content. What's the trick?

Regards,
Malte.

___
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] setuphead and Table of Content

2013-03-31 Thread Sietse Brouwer
Hi Malte,

On 31 March 2013 11:53, Malte Stien ma...@stien.de wrote:
   \definehead[foosection][section]
   \setuphead[foosection][number=yes, ownnumber=yes, sectionsegments=section]

 However, I need them to show up in the table of content. What's the trick?

This is the trick:
\definecombinedlist[content][chapter,section,foosection,barsection,...]

The Table of Contents uses ConTeXt's combinedlist mechanism; to alter
the Table of Contents, redefine the list. (You have to redefine it;
\setupcombinedlist[content] alters how the list functions, but not
what goes into it.)

Useful wiki pages:
http://wiki.contextgarden.net/Titles (which is where I found the
\definecombinedlist trick)
http://wiki.contextgarden.net/Command/definecombinedlist (which
actually goes into lists and what they do)

In case you're curious: this is how the TOC is defined in strc-def.mkiv.
\definecombinedlist
[\v!content]
[\v!part,
\v!chapter,
\v!section,
\v!subsection,
\v!subsubsection,
\v!subsubsubsection,
\v!subsubsubsubsection]
[\c!level=\v!subsubsubsubsection,
\c!criterium=\v!local]

Hope this helps!

Cheers,

Sietse
___
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] \setuphead [bodypartlabel=]

2013-03-27 Thread Willi Egger
Hi Wolfgang,


nice feature.
However when applying it, the numbering of the chapters is not correct. - See 
attached minimal example

Willi

\starttext
\completecontent

\startchapter[title=Chapter in list]

\stopchapter
\startchapter[title=Chapter not in list, saveinlist=no]
\stopchapter
\startchapter[title=Chapter in list]
\stopchapter
\stoptext

On Mar 26, 2013, at 8:10 PM, Wolfgang Schuster wrote:

 
 Am 26.03.2013 um 19:54 schrieb Alan BRASLAU alan.bras...@cea.fr:
 
 All of this does not take care of handling NOchapter in marking,
 bookmarks, contents, etc. Consider:
 \setupheadertexts [chapter]
 \placebookmarks [chapter,section] [chapter]
 \definecombinedlist [content] [chapter,section,subsection]
 
 TOC entries can be suppressed with “saveinlist=no”.
 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \setuphead [bodypartlabel=]

2013-03-26 Thread Alan BRASLAU
\setuplabeltext [chapter=Chapter ]

enables a label in chapter headings.

Sometimes, one wants to have an unnumbered chapter-level structure that
otherwise appears in the table of contents, bookmarks, marking, etc.
without having to make many special definitions.

One suggests:
\definehead [NOchapter] [chapter]
\setuphead [NOchapter] [incrementnumber=no,number=no,bodypartlabel=]

\starttext
\startNOchapter [title=Introduction]
\stopNOchapter
\startchapter [title=First chapter]
\stopchapter
\stoptext

And then adding NOchapter to the contents combined list, to the
bookmarks, and so on, not to speak about marking. Ugh!

Much easier would be the occasional use of
\startchapter [title=Introduction,incrementnumber=no,number=no,bodypartlabel=]
\stopchapter
but this does not work! One gets: Chapter Introduction.
That this does not work I suppose might be somewhat of a bug...

Even better, more coherent, more logical, would be
\startchapter [title=Introduction,incrementnumber=no,number=no,label=no]
\stopchapter
(Note that label=no is used for lists).

This would also have the advantage of allowing the chapter labeltext to be 
defined
for each language, rather than be empty, so that it could then be simply turned 
on or off.
In fact, label=no would be the default setup.

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] \setuphead [bodypartlabel=]

2013-03-26 Thread Wolfgang Schuster

Am 26.03.2013 um 19:15 schrieb Alan BRASLAU alan.bras...@cea.fr:

 \setuplabeltext [chapter=Chapter ]
 
 enables a label in chapter headings.
 
 Sometimes, one wants to have an unnumbered chapter-level structure that
 otherwise appears in the table of contents, bookmarks, marking, etc.
 without having to make many special definitions.
 
 One suggests:
 \definehead [NOchapter] [chapter]
 \setuphead [NOchapter] [incrementnumber=no,number=no,bodypartlabel=]
 
 \starttext
 \startNOchapter [title=Introduction]
 \stopNOchapter
 \startchapter [title=First chapter]
 \stopchapter
 \stoptext

\startnamedsection[NOchapter][title=…]
…
\stopnamedsection
\startnamedsection[chapter][title=…]
…
\stopnamedsection

 And then adding NOchapter to the contents combined list, to the
 bookmarks, and so on, not to speak about marking. Ugh!
 
 Much easier would be the occasional use of
 \startchapter [title=Introduction,incrementnumber=no,number=no,bodypartlabel=]
 \stopchapter
 but this does not work! One gets: Chapter Introduction.
 That this does not work I suppose might be somewhat of a bug...
 
 Even better, more coherent, more logical, would be
 \startchapter [title=Introduction,incrementnumber=no,number=no,label=no]
 \stopchapter
 (Note that label=no is used for lists).
 
 This would also have the advantage of allowing the chapter labeltext to be 
 defined
 for each language, rather than be empty, so that it could then be simply 
 turned on or off.

\setuplabeltext[en][chapter=…]
\setuplabeltext[nl][chapter=…]

 In fact, label=no would be the default setup.

\setuplist[chapter][label=yes|no|none|NAME]

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


Re: [NTG-context] \setuphead [bodypartlabel=]

2013-03-26 Thread Alan BRASLAU
On Tue, 26 Mar 2013 19:25:27 +0100
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 26.03.2013 um 19:15 schrieb Alan BRASLAU alan.bras...@cea.fr:
 
  \setuplabeltext [chapter=Chapter ]
  
  enables a label in chapter headings.
  
  Sometimes, one wants to have an unnumbered chapter-level structure
  that otherwise appears in the table of contents, bookmarks,
  marking, etc. without having to make many special definitions.
  
  One suggests:
  \definehead [NOchapter] [chapter]
  \setuphead [NOchapter] [incrementnumber=no,number=no,bodypartlabel=]
  
  \starttext
  \startNOchapter [title=Introduction]
  \stopNOchapter
  \startchapter [title=First chapter]
  \stopchapter
  \stoptext
 
 \startnamedsection[NOchapter][title=…]
 …
 \stopnamedsection
 \startnamedsection[chapter][title=…]
 …
 \stopnamedsection
 
  And then adding NOchapter to the contents combined list, to the
  bookmarks, and so on, not to speak about marking. Ugh!
  
  Much easier would be the occasional use of
  \startchapter
  [title=Introduction,incrementnumber=no,number=no,bodypartlabel=]
  \stopchapter but this does not work! One gets: Chapter
  Introduction. That this does not work I suppose might be somewhat
  of a bug...
  
  Even better, more coherent, more logical, would be
  \startchapter
  [title=Introduction,incrementnumber=no,number=no,label=no]
  \stopchapter (Note that label=no is used for lists).
  
  This would also have the advantage of allowing the chapter
  labeltext to be defined for each language, rather than be empty, so
  that it could then be simply turned on or off.
 
 \setuplabeltext[en][chapter=…]
 \setuplabeltext[nl][chapter=…]
 
  In fact, label=no would be the default setup.
 
 \setuplist[chapter][label=yes|no|none|NAME]
 
 Wolfgang

All of this does not take care of handling NOchapter in marking,
bookmarks, contents, etc. Consider:
\setupheadertexts [chapter]
\placebookmarks [chapter,section] [chapter]
\definecombinedlist [content] [chapter,section,subsection]

Nor the fact that labeltext chapter is empty by default,
rather than simply disabled or turned-off.

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] \setuphead [bodypartlabel=]

2013-03-26 Thread Wolfgang Schuster

Am 26.03.2013 um 19:54 schrieb Alan BRASLAU alan.bras...@cea.fr:

 All of this does not take care of handling NOchapter in marking,
 bookmarks, contents, etc. Consider:
 \setupheadertexts [chapter]
 \placebookmarks [chapter,section] [chapter]
 \definecombinedlist [content] [chapter,section,subsection]

TOC entries can be suppressed with “saveinlist=no”.

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


[NTG-context] setuphead command ! Argument of \xxx has an extra }.

2013-01-25 Thread Jean-Philippe Rey
Hi,

I am trying to use a homemade command to display chapter heads but I 
systematically get the following error:

! Argument of \ChapterHead has an extra }.

Here is my minimal example


\def\ChapterHead#1#2{#1 --- #2}
\setuphead[chapter][command=\ChapterHead]
\starttext
\chapter{Hello}
Some text
\stoptext


This example works fine with MKII and with the texlive 2012 version of MKIV 
(ConTeXt ver: 2012.05.30 11:26). It fails with the last beta (2013.01.24 16:47 
MKIV) and also with 2012.11.22 14:55 MKIV.

I tried \setuphead[chapter][alternative=command,command=\ChapterHead]
and  \startchapter ... \stopchapter
but still get the same error.

You will find below the content of the log file produced by my minimal example.

Thanks for your help.




(/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2013.01.24 16:47 MKIV  fmt: 2013.1.25  int: english/english

system   cont-new.mkiv loaded
(/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   files  jobname: test-setuphead, input: test-setuphead, 
result: test-setuphead
fontslatin modern fonts are not preloaded
languageslanguage en is active
(test-setuphead.tex{/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
fontstypescripts  unknown: library 'loc'
{/Users/jprey/ConTeXt-2013.01.24/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/jprey/ConTeXt-2013.01.24/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsfallback modern rm 12pt is loaded

% begin of command line arguments
%
% noarrange= true
% input= ./test-setuphead.tex
% fulljobname  = ./test-setuphead.tex
% currentrun   = 1
% no-parse-first-line  = true
% arrange  = true
% script   = true
% synctex  = true
% kindofrun= 1
%
% end of command line arguments

% begin of command line files
%
% 1  ./test-setuphead.tex
%
% end of command line files

structuresectioning  chapter @ level 2: 0.1 - Hello
! Argument of \ChapterHead has an extra }.

system   tex  error on line 4 in file test-setuphead.tex: Argument of 
 ...

1 \def\ChapterHead#1#2{#1 --- #2}
2 \setuphead[chapter][command=\ChapterHead]
3 \starttext
4   \chapter{Hello}
5 Some text
6 \stoptext
7 

inserted text 
\par 
to be read again 
   }
\strc_rendering_inject_number_and_text ...ommand }
  \ifx \p_command \empty \di...
\strc_rendering_place_head_number_and_text ...ext 
  }\fi \strc_rendering_stop_...
\strc_sectioning_handle ...e_head_number_and_text 
  \else \strc_rendering_plac...
l.4 \chapter{Hello}
   
? 
! Emergency stop.

system   tex  error on line 4 in file test-setuphead.tex: Emergency 
stop ...

1 \def\ChapterHead#1#2{#1 --- #2}
2 \setuphead[chapter][command=\ChapterHead]
3 \starttext
4   \chapter{Hello}
5 Some text
6 \stoptext
7 

inserted text 
\par 
to be read again 
   }
\strc_rendering_inject_number_and_text ...ommand }
  \ifx \p_command \empty \di...
\strc_rendering_place_head_number_and_text ...ext 
  }\fi \strc_rendering_stop_...
\strc_sectioning_handle ...e_head_number_and_text 
  \else \strc_rendering_plac...
l.4 \chapter{Hello}
   
End of file on the terminal!

!  == Fatal error occurred, no output PDF file produced!

-- 
Jean-Philippe Rey Professeur - École Centrale Paris
jean-philippe@ecp.fr  92295 Châtenay-Malabry Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51




___
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] setuphead command ! Argument of \xxx has an extra }.

2013-01-25 Thread Marco Patzer
On 2013–01–25 Jean-Philippe Rey wrote:

 \def\ChapterHead#1#2{#1 --- #2}

\define[2]\ChapterHead{#1 --- #2}

or

\unexpanded\def\ChapterHead#1#2{#1 --- #2}

Marco


signature.asc
Description: Digital signature
___
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] setuphead command ! Argument of \xxx has an extra }.

2013-01-25 Thread Jean-Philippe Rey

Le 25 janv. 2013 à 17:00, Marco Patzer a écrit :

 On 2013–01–25 Jean-Philippe Rey wrote:
 
 \def\ChapterHead#1#2{#1 --- #2}
 
 \define[2]\ChapterHead{#1 --- #2}
 
 or
 
 \unexpanded\def\ChapterHead#1#2{#1 --- #2}


It works. Thank you very much.

-- 
Jean-Philippe Rey Professeur - École Centrale Paris
jean-philippe@ecp.fr  92295 Châtenay-Malabry Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51


___
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] setuphead command changes?

2012-12-09 Thread Wolfgang Schuster

Am 09.12.2012 um 02:35 schrieb revic...@caesar.elte.hu:

 Hi,
 
 The following minimal example works on live.contextgarden.net but with the 
 latest beta the command parameter doesn't seem work (the TEST does not 
 appear in the margin).
 
 \showframe
 \starttext
 \define[2]\cmd{\inmargin{TEST}}
 \startsubject[title=Title,command=\cmd]
 \input knuth
 \stopsubject
 \stoptext
 
 Can someone confirm this?


You have to use “alternative=command” before you can apply a command:

\define[2]\SubjectCommand
  {\inmargin{TEST}}

\setuphead
  [subject]
  [alternative=command,
   command=\SubjectCommand]

\showframe

\starttext
\startsubject[title=Title]
\input knuth
\stopsubject
\stoptext

When you want more control about the layout of your header use 
\defineheadalternative to create it:

\defineheadalternative
  [Subject]
  [alternative=horizontal,
   renderingsetup=Subject]

\startsetups[Subject]
  \headsetupspacing
  \inmargin{TEST}
\stopsetups

\setuphead
  [subject]
  [alternative=Subject,
   distance=0pt]

\showframe

\starttext
\startsubject[title=Title]%
\input knuth
\stopsubject
\stoptext

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


Re: [NTG-context] setuphead command changes?

2012-12-09 Thread reviczky

Am 09.12.2012 um 02:35 schrieb revic...@caesar.elte.hu:

 Hi,

 The following minimal example works on live.contextgarden.net but  
with the latest beta the command parameter doesn't seem work (the  
TEST does not appear in the margin).


 \showframe
 \starttext
 \define[2]\cmd{\inmargin{TEST}}
 \startsubject[title=Title,command=\cmd]
 \input knuth
 \stopsubject
 \stoptext

 Can someone confirm this?


You have to use #8220;alternative=command#8221; before you can  
apply a command:


\define[2]\SubjectCommand
  {\inmargin{TEST}}

\setuphead
  [subject]
  [alternative=command,
   command=\SubjectCommand]

\showframe

\starttext
\startsubject[title=Title]
\input knuth
\stopsubject
\stoptext


Thanks. I only apply commands for certain headings, so is there a way  
to have that working within the startsubject or is it not inheriting  
from setupheads?


\define[2]\SubjectCommand
  {\inmargin{TEST}}

\showframe

\starttext
\startsubject[title=Intro]
\input knuth
\stopsubject
\startsubject[title=Title,alternative=command,command=\SubjectCommand]
\input knuth
\stopsubject
\stoptext

This still doesn't show me the margin-text, whereas your example is fine.

When you want more control about the layout of your header use  
\defineheadalternative to create it:


\defineheadalternative
  [Subject]
  [alternative=horizontal,
   renderingsetup=Subject]

\startsetups[Subject]
  \headsetupspacing
  \inmargin{TEST}
\stopsetups

\setuphead
  [subject]
  [alternative=Subject,
   distance=0pt]

\showframe

\starttext
\startsubject[title=Title]%
\input knuth
\stopsubject
\stoptext


That is great, thanks!

Adam

___
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] setuphead command changes?

2012-12-09 Thread Wolfgang Schuster

Am 09.12.2012 um 12:22 schrieb revic...@caesar.elte.hu:

 Thanks. I only apply commands for certain headings, so is there a way to have 
 that working within the startsubject or is it not inheriting from setup heads?


You can use the optional second argument for \start… to set your own arguments.

\define\SubectCommand
  {\doifsomething
 {\structureuservariable{text}}
 {\inmargin{\structureuservariable{text

\setuphead[section][commandbefore=\SubectCommand]

\starttext

\startsubject[title=Ward]
\input ward
\stopsubject

\startsubject[title=Knuth][text=XXX]
\input knuth
\stopsubject

\startsubject[title=Tufte]
\input tufte
\stopsubject

\stoptext

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


Re: [NTG-context] setuphead command changes?

2012-12-09 Thread Wolfgang Schuster

Am 09.12.2012 um 15:46 schrieb Wolfgang Schuster wolfgang.schus...@gmail.com:

 
 Am 09.12.2012 um 12:22 schrieb revic...@caesar.elte.hu:
 
 Thanks. I only apply commands for certain headings, so is there a way to 
 have that working within the startsubject or is it not inheriting from setup 
 heads?
 
 
 You can use the optional second argument for \start… to set your own 
 arguments.
 
 \define\SubectCommand
  {\doifsomething
 {\structureuservariable{text}}
 {\inmargin{\structureuservariable{text
 
 \setuphead[section][commandbefore=\SubectCommand]


Should be:

\define\SubjectCommand
  {\doifsomething
 {\structureuservariable{text}}
 {\inmargin{\structureuservariable{text

\setuphead[subject][commandbefore=\SubjectCommand]

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


[NTG-context] setuphead command changes?

2012-12-08 Thread reviczky

Hi,

The following minimal example works on live.contextgarden.net but with  
the latest beta the command parameter doesn't seem work (the TEST  
does not appear in the margin).


\showframe
\starttext
\define[2]\cmd{\inmargin{TEST}}
\startsubject[title=Title,command=\cmd]
\input knuth
\stopsubject
\stoptext

Can someone confirm this?

Adam


___
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] setuphead and newline

2012-10-25 Thread WolfgangZ

Hello,
I'm trying to insert a newline between the number and the head text 
(chaper). Where do I have to put the \crlf ?


It sohould look like:

1
This is the chapter text


Many thanks in advance
WolfgangZ


___
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] setuphead and newline

2012-10-25 Thread Marco Patzer
2012-10-25 WolfgangZ:

Hi WolfgangZ

 I'm trying to insert a newline between the number and the head text 
 (chaper). Where do I have to put the \crlf ?
 
 It sohould look like:
 
 1
 This is the chapter text

\defineheadalternative
  [mine]
  [renderingsetup=mine]

\startsetups [mine]
  \headsetupspacing
  \startframedtext [offset=none, frame=off]
\headnumbercontent\\
\headtextcontent
  \stopframedtext
\stopsetups

\setuphead
  [section]
  [alternative=mine]

\starttext
  \startsection [title=FooBar]
  \stopsection
\stoptext


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


Re: [NTG-context] setuphead and newline

2012-10-25 Thread Wolfgang

Am 25.10.2012 15:10, schrieb Marco Patzer:

2012-10-25 WolfgangZ:

Hi WolfgangZ


I'm trying to insert a newline between the number and the head text
(chaper). Where do I have to put the \crlf ?

It sohould look like:

1
This is the chapter text


\defineheadalternative
   [mine]
   [renderingsetup=mine]

\startsetups [mine]
   \headsetupspacing
   \startframedtext [offset=none, frame=off]
 \headnumbercontent\\
 \headtextcontent
   \stopframedtext
\stopsetups

\setuphead
   [section]
   [alternative=mine]

\starttext
   \startsection [title=FooBar]
   \stopsection
\stoptext


Marco

___


Hi Marco,
it works alsmost as I need, but I don't manage to get the text on grid. 
I tried linecorrection=on option at the framed text as well as 
\startlinecorrection.
I'm also wondering why the chapter number is above the first line, see 
screenshot.

Best regards
WolfgangZ
PS. I'm using MKIV
attachment: grid.png___
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] setuphead and newline

2012-10-25 Thread Wolfgang Schuster

Am 25.10.2012 um 19:27 schrieb Wolfgang wol...@gmx.net:

 it works alsmost as I need, but I don't manage to get the text on grid. I 
 tried linecorrection=on option at the framed text as well as 
 \startlinecorrection.
 I'm also wondering why the chapter number is above the first line, see 
 screenshot.

Make a minimal example which demonstrates the problem because otherwise it’s 
not possible to tell what needs to be changed.

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


[NTG-context] setuphead broken?

2012-09-13 Thread John Devereux

Hi,

\setuphead seems to be broken for me in recent context (following
upgrade of a ~year-old system).

Problem happens when use the command= key.

An example from the wiki fails, as does my own code.

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file: 
/opt/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2012.09.10 00:57

==


\setuppapersize[A5]
\setupexternalfigures[location=default] % needed only for the wiki to the find 
the figure

\useexternalfigure[section-1][cow][width=5cm,height=1cm]
\useexternalfigure[section-2][mill.png][width=5cm,height=1cm]

\setuphead
   [section]
   [command=\MySectionCommand]
\setuphead
   [subsection]
   [command=]

\def\MySectionCommand#1#2%
   {\externalfigure[section-\currentheadnumber]}

\starttext

\section{One}
\subsection{First subsection of Section One}
\section{Two}

\stoptext

==




ERROR: Argument of \MySectionCommand has an extra }.

--- TeX said ---

system   tex  error on line 19 in file test2.tex: Argument of  ...

 9[command=\MySectionCommand]
10 \setuphead
11[subsection]
12[command=]
13 
14 \def\MySectionCommand#1#2%
15{\externalfigure[section-\currentheadnumber]}
16 
17 \starttext
18 
19   \section{One}
20 \subsection{First subsection of Section One}
21 \section{Two}
22 
23 \stoptext

inserted text 
\par 
to be read again 
   }
\strc_rendering_inject_number_and_text ...ommand }
  \ifx \p_command \empty \di...
\strc_rendering_place_head_number_and_text ...ext 
  }\fi \strc_rendering_stop_...
\strc_sectioning_handle ...e_head_number_and_text 
  \else \strc_rendering_plac...
l.19 \section{One}
  
--- HELP ---
From the .log file...

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.


==





-- 

John Devereux
___
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] setuphead broken?

2012-09-13 Thread Wolfgang Schuster

Am 13.09.2012 um 12:14 schrieb John Devereux j...@devereux.me.uk:

 
 Hi,
 
 \setuphead seems to be broken for me in recent context (following
 upgrade of a ~year-old system).
 
 Problem happens when use the command= key.
 
 An example from the wiki fails, as does my own code.
 
 mtx-context | ConTeXt Process Management 0.60
 mtx-context |
 mtx-context | main context file: 
 /opt/context/tex/texmf-context/tex/context/base/context.mkiv
 mtx-context | current version: 2012.09.10 00:57
 
 ==
 
 
 \setuppapersize[A5]
 \setupexternalfigures[location=default] % needed only for the wiki to the 
 find the figure
 
 \useexternalfigure[section-1][cow][width=5cm,height=1cm]
 \useexternalfigure[section-2][mill.png][width=5cm,height=1cm]
 
 \setuphead
   [section]
   [command=\MySectionCommand]
 \setuphead
   [subsection]
   [command=]
 
 \def\MySectionCommand#1#2%
   {\externalfigure[section-\currentheadnumber]}

Use \define[2]\MySectionCommand{…} or \unexpanded\def\MySectionCommand#1#2{…}.

To get the section number for the figure you have to replace 
“\currentheadnumber” with “\namedheadnumber{section}”.

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


Re: [NTG-context] setuphead broken?

2012-09-13 Thread John Devereux
Wolfgang Schuster wolfgang.schus...@gmail.com writes:

 Am 13.09.2012 um 12:14 schrieb John Devereux j...@devereux.me.uk:

 
 Hi,
 
 \setuphead seems to be broken for me in recent context (following
 upgrade of a ~year-old system).
 
 Problem happens when use the command= key.
 
 An example from the wiki fails, as does my own code.
 
 mtx-context | ConTeXt Process Management 0.60
 mtx-context |
 mtx-context | main context file: 
 /opt/context/tex/texmf-context/tex/context/base/context.mkiv
 mtx-context | current version: 2012.09.10 00:57
 
 ==
 
 
 \setuppapersize[A5]
 \setupexternalfigures[location=default] % needed only for the wiki to the 
 find the figure
 
 \useexternalfigure[section-1][cow][width=5cm,height=1cm]
 \useexternalfigure[section-2][mill.png][width=5cm,height=1cm]
 
 \setuphead
   [section]
   [command=\MySectionCommand]
 \setuphead
   [subsection]
   [command=]
 
 \def\MySectionCommand#1#2%
   {\externalfigure[section-\currentheadnumber]}

 Use \define[2]\MySectionCommand{…} or \unexpanded\def\MySectionCommand#1#2{…}.

 To get the section number for the figure you have to replace 
 “\currentheadnumber” with “\namedheadnumber{section}”.

 Wolfgang

Wow that was fast, thanks Wolfgang.

I started to change the examples in the wiki
http://wiki.contextgarden.net/Titles. But I realised we need to
distinguish MKIV from MKII and I don't really know what I am doing...



-- 

John Devereux
___
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] \setuphead and testpage

2012-07-14 Thread Wolfgang Schuster

Am 14.07.2012 um 00:32 schrieb Hans Hagen:

 On 13-7-2012 10:02, Wolfgang Schuster wrote:
 Hi Hans,
 
 can you add a testpage option to \setuphead?
 
 %\setuphead[section][testpage=4]
 \setuphead[section][before={\testpage[4]\blank[2*big]}]
 
 \starttext
 
 \section{First}
 
 \dorecurse{36}{Line \recurselevel\par}
 
 \section{Second}
 
 \dorecurse{36}{Line \recurselevel\par}
 
 \stoptext
 
 Are we sure about that key? (a conditional page entry is also an option, like 
 page=lines:4 or so

Adding the \testpage functionality to \page (and providing \blank like options, 
e.g. lines:4,offset:1cm)
is another solution and has the advantage that you don’t need another key for 
\setuphead etc.

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


[NTG-context] \setuphead and testpage

2012-07-13 Thread Wolfgang Schuster
Hi Hans,

can you add a testpage option to \setuphead?

%\setuphead[section][testpage=4]
\setuphead[section][before={\testpage[4]\blank[2*big]}]

\starttext

\section{First}

\dorecurse{36}{Line \recurselevel\par}

\section{Second}

\dorecurse{36}{Line \recurselevel\par}

\stoptext

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


Re: [NTG-context] \setuphead and testpage

2012-07-13 Thread Hans Hagen

On 13-7-2012 10:02, Wolfgang Schuster wrote:

Hi Hans,

can you add a testpage option to \setuphead?

%\setuphead[section][testpage=4]
\setuphead[section][before={\testpage[4]\blank[2*big]}]

\starttext

\section{First}

\dorecurse{36}{Line \recurselevel\par}

\section{Second}

\dorecurse{36}{Line \recurselevel\par}

\stoptext


Are we sure about that key? (a conditional page entry is also an option, 
like page=lines:4 or so


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] \setuphead and \startchapter request

2012-03-19 Thread Alan BRASLAU
I would like to use, for example,

\setuphead [chapter] [after={\placecontent\blank}]

But sometimes, I would like to use something like

\startchapter [number=no,incrementnumber=no,after=,
title={Conclusions of the first part}]

\stopchapter


1. I request to have after=, (and other setup head keywords)
taken into account, or some other mechanism, so as here
not to \placecontent for a specific instance of \startchapter.

2. If I have:
\setuplabeltext [chapter=Chapter ] % with trailing space; blank by default
would there be some way to specify chapter=, (or another mechanism)
to have the Chapter label blank for a specific instance of \startchapter?

Thanks

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] \setuphead and \startchapter request

2012-03-19 Thread Wolfgang Schuster

Am 19.03.2012 um 12:45 schrieb Alan BRASLAU:

 I would like to use, for example,
 
 \setuphead [chapter] [after={\placecontent\blank}]
 
 But sometimes, I would like to use something like
 
 \startchapter [number=no,incrementnumber=no,after=,
   title={Conclusions of the first part}]
 
 \stopchapter

You know \starttitle, it’s the unnumbered version of \startchapter.

 1. I request to have after=, (and other setup head keywords)
 taken into account, or some other mechanism, so as here
 not to \placecontent for a specific instance of \startchapter.

We have the following key for \setuphead:

- beforesection (called before \startchapter),
- insidesection (called after \startchapter) and
- aftersection (called after \stopchapter)

 2. If I have:
 \setuplabeltext [chapter=Chapter ] % with trailing space; blank by default
 would there be some way to specify chapter=, (or another mechanism)
 to have the Chapter label blank for a specific instance of \startchapter?

The easiest way is to create a new heading for this purpose.

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


Re: [NTG-context] \setuphead and \startchapter request

2012-03-19 Thread Alan BRASLAU
Wolfgang,

Thank you for the suggestions.
However, I have tried many such, things...



On Mon, 19 Mar 2012 12:50:14 +0100
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:

 
 Am 19.03.2012 um 12:45 schrieb Alan BRASLAU:
 
  I would like to use, for example,
  
  \setuphead [chapter] [after={\placecontent\blank}]
  
  But sometimes, I would like to use something like
  
  \startchapter [number=no,incrementnumber=no,after=,
  title={Conclusions of the first part}]
  
  \stopchapter
 
 You know \starttitle, it’s the unnumbered version of \startchapter.

Yes, of course, but \starttitle does not, by design, add an entry
to the TOC, nor a bookmark. And

\starttitle [title={Conclusions}]
\writetolist[chapter]{}{Conclusions}% works
\bookmark{Conclusions}% Does not work!

is less elegant than

\startchapter [number=no,incrementnumber=no,title={Conclusions}]

(but does have the advantage of suppressing the Chapter label.)


 We have the following key for \setuphead:
 
 - beforesection (called before \startchapter),
 - insidesection (called after \startchapter) and
 - aftersection (called after \stopchapter)

You suggest that I use insidesection={\placecontent\blank}
rather than after={\placecontent\blank}. OK, this works.

However, in both cases, the contents get placed after the above
\starttitle (or \startchapter) commands, something that one really does
not want. Alternately, adding \placecontent\blank everywhere else is
sloppy.


  2. If I have:
  \setuplabeltext [chapter=Chapter ] % with trailing space; blank by
  default would there be some way to specify chapter=, (or another
  mechanism) to have the Chapter label blank for a specific instance
  of \startchapter?
 
 The easiest way is to create a new heading for this purpose.

I do not really want to create new headings for this purpose,
if I can avoid it, and should be unnecessary.
The suggestion would be for specific instances of \startchapter etc.
to be able to take \setuphead keywords as local definitions.

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] \setuphead and \startchapter request

2012-03-19 Thread Wolfgang Schuster

Am 19.03.2012 um 16:16 schrieb Alan BRASLAU:

 Wolfgang,
 
 Thank you for the suggestions.
 However, I have tried many such, things…


Is this what you want?

\setuphead[title][incrementnumber=list]
\setuplist[title][width=2em] % default value for chapter entry

\setuphead[chapter][insidesection=\texsetup{chapter:list}]

\startsetups[chapter:list]

  \doif{\structureuservariable{list}}{yes}{\placelist[section]}

\stopsetups

\setupinteraction[state=start]

\placebookmarks[chapter,title]

\starttext

\startfrontmatter

\starttitle[saveinlist=no,title=Content]

\placelist[chapter,title]

\stoptitle

\stopfrontmatter

\startbodymatter

\starttitle[title=This is a \tex{title}]

\input knuth

\stoptitle

\startchapter[title=This is a \tex{chapter}][list=yes]

\startsection[title=Tufte]

\input tufte

\stopsection

\startsection[title=Ward]

\input ward

\stopsection

\stopchapter

\startchapter[title=This is another \tex{chapter}]

\startsection[title=Knuth]

\input knuth

\stopsection

\startsection[title=Zapf]

\input zapf

\stopsection

\stopchapter

\stopbodymatter

\stoptext

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


Re: [NTG-context] \setuphead problem

2012-03-03 Thread Wolfgang Schuster

Am 02.03.2012 um 17:35 schrieb Alan Bowen:

 Wolfgang—
 
 In both MKII and MKIV (using the latest standalone which I installed this 
 morning), with
 
 
 \setupheader[state=high]
 \setuppagenumbering[alternative=doublesided]
 \setuppagenumbering[location=,]
 \setuphead[title][page={header,yes}]  
   \definehead[BookTitle][title]
   \setuphead[BookTitle][before={\noindent\textrule},style=rm]
   \setuphead[BookTitle][header=high]
   \setupheadertexts[text]
   [\cap{A.\ U.\ Thor}]
   [\pagenumber]
   [\pagenumber]
   [\it{The Journal}]   
 
 \starttext
 \dorecurse{6}{\input knuth}
 \page[makeup]
 \BookTitle{{\em An Indubitably Important Book} by A.\ U.\ Thor}
 \dorecurse{10}{\input knuth}
 \page[makeup]
 \stoptext
 
 the problem remains, that is, the header on the page preceding the page with 
 the title is not suppressed. The same is true when I have 
 \setuphead[title][page={blank,yes}], except then there are no headers at all 
 after the page with the title on it. Does it work for you?

Remove \page[makeup] before \BookTitle and the header disappears.

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

Re: [NTG-context] \setuphead problem

2012-03-03 Thread Alan Bowen
Excellent, Wolfgang. You are right. Many thanks. But if I may impose just a
little longer on your patience, let me explain my problem further.

In my example, that \page[makeup] to be removed stood for a key element in
the sequence
\page[makeup]
\stoptext
\stopcomponent
that typically closes a component in the prd file that I use to produce
volumes of a journal.

Without \page[makeup], when I run my prd file, the page number of a
component is appears on the last page of the preceding component. If I keep
the \page[makeup], each component is followed by a blank page (with header)
that precedes the title page of the new component.

In short my example replicated what I was seeing but fixing the example
does not fix the original problem. Is there a canonical way to close
components in MKIV that I have missed? (This env/prd setup *does* work in
MKII—I have 8 volumes to show for it.)

All best, Alan

On Sat, Mar 3, 2012 at 3:37 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 02.03.2012 um 17:35 schrieb Alan Bowen:

 Wolfgang—

 In both MKII and MKIV (using the latest standalone which I installed this
 morning), with


 \setupheader[state=high]
 \setuppagenumbering[alternative=doublesided]
 \setuppagenumbering[location=,]
 \setuphead[title][page={header,yes}]
  \definehead[BookTitle][title]
 \setuphead[BookTitle][before={\noindent\textrule},style=rm]
 \setuphead[BookTitle][header=high]
  \setupheadertexts[text]
 [\cap{A.\ U.\ Thor}]
 [\pagenumber]
  [\pagenumber]
 [\it{The Journal}]

 \starttext
 \dorecurse{6}{\input knuth}
 \page[makeup]
 \BookTitle{{\em An Indubitably Important Book} by A.\ U.\ Thor}
 \dorecurse{10}{\input knuth}
 \page[makeup]
 \stoptext

 the problem remains, that is, the header on the page preceding the page
 with the title is not suppressed. The same is true when I have 
 \setuphead[title][page={blank,yes}],
 except then there are no headers at all after the page with the title on
 it. Does it work for you?


 Remove \page[makeup] before \BookTitle and the header disappears.

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

Re: [NTG-context] \setuphead problem

2012-03-03 Thread Wolfgang Schuster

Am 03.03.2012 um 14:43 schrieb Alan Bowen:

 Excellent, Wolfgang. You are right. Many thanks. But if I may impose just a 
 little longer on your patience, let me explain my problem further.
 
 In my example, that \page[makeup] to be removed stood for a key element in 
 the sequence
 \page[makeup]
 \stoptext
 \stopcomponent
 that typically closes a component in the prd file that I use to produce 
 volumes of a journal.

Why do you use \stoptext before \stopcomponent?

 Without \page[makeup], when I run my prd file, the page number of a component 
 is appears on the last page of the preceding component. If I keep the 
 \page[makeup], each component is followed by a blank page (with header) that 
 precedes the title page of the new component.
 
 In short my example replicated what I was seeing but fixing the example does 
 not fix the original problem. Is there a canonical way to close components in 
 MKIV that I have missed? (This env/prd setup does work in MKII—I have 8 
 volumes to show for it.)

Can you make a example or send me the files offlist.

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

Re: [NTG-context] \setuphead problem

2012-03-03 Thread Alan Bowen
Many thanks, Wolfgang, I will send you the files off list.

Alan

On Sat, Mar 3, 2012 at 9:58 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 03.03.2012 um 14:43 schrieb Alan Bowen:

 Excellent, Wolfgang. You are right. Many thanks. But if I may impose just
 a little longer on your patience, let me explain my problem further.

 In my example, that \page[makeup] to be removed stood for a key element in
 the sequence
 \page[makeup]
 \stoptext
 \stopcomponent
 that typically closes a component in the prd file that I use to produce
 volumes of a journal.


 Why do you use \stoptext before \stopcomponent?

 Without \page[makeup], when I run my prd file, the page number of a
 component is appears on the last page of the preceding component. If I keep
 the \page[makeup], each component is followed by a blank page (with header)
 that precedes the title page of the new component.

 In short my example replicated what I was seeing but fixing the example
 does not fix the original problem. Is there a canonical way to close
 components in MKIV that I have missed? (This env/prd setup *does* work in
 MKII—I have 8 volumes to show for it.)


 Can you make a example or send me the files offlist.

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

Re: [NTG-context] \setuphead problem

2012-03-02 Thread Alan Bowen
Wolfgang—

I checked and the example fails in both MKII andf MKIV. My apologies for
carelessness. The problem arose originally in the pagination/headers for
components in a component/product structure that I am tying to set using
MKIV. In trying to devise a simple example by adapting the code in my MKII
environment file (which runs without any problems), I was so focused on
getting the code to run in MKIV that I neglected to run that code *by itself
* through MKII.

So, the question remains: What should I include or change in this example
to keep the header associated with a given title off the preceding page in
MKIV? Or is this expected behavior and my example, then, a poor one for my
purposes?

Alan

On Thu, Mar 1, 2012 at 6:24 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 01.03.2012 um 18:37 schrieb Alan Bowen:

  The following code works in MKII; but in MKIV, I get the header text on
 the page before the page with the title. How can I fix this?

 Can you show the output of mkii and mkiv because i can’t see a difference
 between both.

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

Re: [NTG-context] \setuphead problem

2012-03-02 Thread Wolfgang Schuster

Am 02.03.2012 um 14:11 schrieb Alan Bowen:

 Wolfgang—
 
 I checked and the example fails in both MKII andf MKIV. My apologies for 
 carelessness. The problem arose originally in the pagination/headers for 
 components in a component/product structure that I am tying to set using 
 MKIV. In trying to devise a simple example by adapting the code in my MKII 
 environment file (which runs without any problems), I was so focused on 
 getting the code to run in MKIV that I neglected to run that code by itself 
 through MKII.
 
 So, the question remains: What should I include or change in this example to 
 keep the header associated with a given title off the preceding page in MKIV? 
 Or is this expected behavior and my example, then, a poor one for my purposes?

\setuphead[title][page={header,yes}]

or

\setuphead[title][page={blank,yes}]

surpress the header on the proceeding page.

BTW: \setupsectionblock[BookTitle][number=no,page=yes] is nonsense because 
“BookTitle” is not a sectionblock.

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

Re: [NTG-context] \setuphead problem

2012-03-02 Thread Alan Bowen
Wolfgang—

In both MKII and MKIV (using the latest standalone which I installed this
morning), with

\setupheader[state=high]

\setuppagenumbering[alternative=doublesided]

\setuppagenumbering[location=,]

\setuphead[title][page={header,yes}]

\definehead[BookTitle][title]

\setuphead[BookTitle][before={\noindent\textrule},style=rm]

\setuphead[BookTitle][header=high]

\setupheadertexts[text]

[\cap{A.\ U.\ Thor}]

[\pagenumber]

[\pagenumber]

[\it{The Journal}]


\starttext

\dorecurse{6}{\input knuth}

\page[makeup]

\BookTitle{{\em An Indubitably Important Book} by A.\ U.\ Thor}

\dorecurse{10}{\input knuth}

\page[makeup]

\stoptext


the problem remains, that is, the header on the page preceding the page
with the title is not suppressed. The same is true when I have
\setuphead[title][page={blank,yes}],
except then there are no headers at all after the page with the title on
it. Does it work for you?


Alan


On Fri, Mar 2, 2012 at 10:30 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 02.03.2012 um 14:11 schrieb Alan Bowen:

 Wolfgang—

 I checked and the example fails in both MKII andf MKIV. My apologies for
 carelessness. The problem arose originally in the pagination/headers for
 components in a component/product structure that I am tying to set using
 MKIV. In trying to devise a simple example by adapting the code in my MKII
 environment file (which runs without any problems), I was so focused on
 getting the code to run in MKIV that I neglected to run that code *by
 itself* through MKII.

 So, the question remains: What should I include or change in this example
 to keep the header associated with a given title off the preceding page in
 MKIV? Or is this expected behavior and my example, then, a poor one for my
 purposes?


 \setuphead[title][page={header,yes}]


 or

 \setuphead[title][page={blank,yes}]

 surpress the header on the proceeding page.

 BTW: \setupsectionblock[BookTitle][number=no,page=yes] is nonsense because
 “BookTitle” is not a sectionblock.

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

Re: [NTG-context] \setuphead problem

2012-03-01 Thread Wolfgang Schuster

Am 01.03.2012 um 18:37 schrieb Alan Bowen:

 The following code works in MKII; but in MKIV, I get the header text on the 
 page before the page with the title. How can I fix this? 

Can you show the output of mkii and mkiv because i can’t see a difference 
between both.

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


[NTG-context] \setuphead[ownnumber=yes]; disabling parental numbers

2011-03-01 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

what exactly should the ownnumber=yes|no option do in \setuphead?

The following code crashes Ctx:

---
%\setuphead[subsection][number=no] % OK
\setuphead[subsection][ownnumber=yes] % ERROR

\starttext
  \chapter{Ch1}
\section{Sec1}
  \subsection{SSec1}
\stoptext
---

Is it possible to disable parental numbers? - To get sequence like this:

A. ChapterA
B. ChapterB
B.1 Section1
B.2 Section2
1 Subsection1 (no parental numbers here [= B.2], only those of subsection)
2 Subsection2

I tried:

\setuphead[subsection,subsubject][number=no,ownnumber=yes]

hoping this should do the job but it didn't; at least problem with 
ownnumber=yes.

Any idea?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] \setuphead[ownnumber=yes]; disabling parental numbers

2011-03-01 Thread Wolfgang Schuster

Am 01.03.2011 um 18:09 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 what exactly should the ownnumber=yes|no option do in \setuphead?

It disables the automatic numbering to allow you set your own number.

\definehead[topic][section]
\setuphead [topic][ownnumber=yes]

\starttext
\section{Section}
\topic{3}{Topic}
\stoptext

 The following code crashes Ctx:
 
 ---
 %\setuphead[subsection][number=no] % OK
 \setuphead[subsection][ownnumber=yes] % ERROR
 
 \starttext
  \chapter{Ch1}
\section{Sec1}
  \subsection{SSec1}
 \stoptext
 ---
 
 Is it possible to disable parental numbers? - To get sequence like this:

\setuphead[subsection][sectionsegments=subsection]

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


Re: [NTG-context] \setuphead[ownnumber=yes]; disabling parental numbers

2011-03-01 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... Works perfectly, thanks a lot!

Lukas



what exactly should the ownnumber=yes|no option do in \setuphead?


It disables the automatic numbering to allow you set your own number.

\definehead[topic][section]
\setuphead [topic][ownnumber=yes]

\starttext
\section{Section}
\topic{3}{Topic}
\stoptext


Is it possible to disable parental numbers?


\setuphead[subsection][sectionsegments=subsection]

Wolfgang



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Sec4.mkiv
Description: Binary data


t-Sec4.pdf
Description: Adobe PDF document
___
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
___


  1   2   >