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
___