Re: [NTG-context] Section setup

2009-10-17 Thread Aditya Mahajan

On Sat, 17 Oct 2009, Janneman wrote:


\definehead[paragraf][section]
\def\mynumbercommand#1{\bf{\S} #1 --}
\setuphead[paragraf][numbercommand=\mynumbercommand,alternative=inmargin]

\starttext

\paragraf[ref]{TEST}

\input tufte


\stoptext


Another option:

\definehead[paragraph][section]
\setuphead[paragraph][alternative=inmargin]

\setuplabeltext[paragraph={{§ },{ –}}]

\starttext

\dorecurse{5}
{\paragraph{A repeated quote}
\input knuth \endgraf}

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

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


Re: [NTG-context] Section setup

2009-10-17 Thread Wolfgang Schuster


Am 17.10.2009 um 17:46 schrieb Janneman:


Understood! ;-)

\definehead[paragraf][section]
\def\mynumbercommand#1{\bf{\S} #1 --}


\define[1]\MyNumberCommand{§ #1 –} % let's use the right signs when  
possible :)


\setuphead[paragraf][numbercommand= 
\mynumbercommand,alternative=inmargin]


\setuphead[paragraf][numbercommand= 
\MyNumberCommand,numberstyle=bold,alternative=inmargin]


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] Section setup

2009-10-17 Thread Janneman

Janneman skrev:

Martin Scholz skrev:

Am Fri, 16 Oct 2009 21:06:01 +0200 schrieb Mojca Miklavec:

 

On Tue, Oct 13, 2009 at 19:05, Martin Scholz wrote:
   

Hi List,

I'm trying to setup a new document in Context, and a newbee, so I now
want to setup the section head as following

§ Secnum - Sectitle

Where the § Secnum part is set up in the margin and the Sectitle over
the Text is there any solution how to get it done?
  

Not to be taken too seriously: you need to ask a more complex
(challenging) questions to get a better chance for an answer :) :) :)

It's best to study chapter 8 of cont-eni.pdf from pragma-ade.com to get
the idea of how to handle section modifications.

Here's one possible solution:

\def\mynumbercommand#1{§ #1 --}
\setuphead
[section]
[numbercommand=\mynumbercommand,
 alternative=inmargin]

You may get a bit too big distance, but you can do one of the following
tricks: a) shorten the distance between margin and text b) instead of
just "--" you can use something like
\hbox to 0.2mm{--\hss}
to fake negative spacing or add explicit negative kerning.

Mojca



Hi Mojca,

I'm a type of learner by reading the sourcecode, so it is easier for 
me if I see examples in the code then reading manuals... thanks for 
you help, will try your example later that day...


Thanks and greetings

Martin

___ 

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
___ 

  

Maybe a more simplified solution

\definehead[paragraf][section]
\setuphead[paragraf][before= {\crlf \S},after=,style=bold]
% or style=something else

\starttext

\paragraf[ref]{Paragraf title}

\input tufte

\stoptext


Cheers

Janneman
___ 

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
___ 


Understood! ;-)

\definehead[paragraf][section]
\def\mynumbercommand#1{\bf{\S} #1 --}
\setuphead[paragraf][numbercommand=\mynumbercommand,alternative=inmargin]

\starttext

\paragraf[ref]{TEST}

\input tufte


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

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


Re: [NTG-context] Section setup

2009-10-17 Thread Wolfgang Schuster


Am 17.10.2009 um 16:58 schrieb Janneman:


Maybe a more simplified solution

\definehead[paragraf][section]
\setuphead[paragraf][before= {\crlf \S},after=,style=bold]


don't do this, before and after are meant for vertical material like  
\blank or \thinrule 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
___


Re: [NTG-context] Section setup

2009-10-17 Thread Janneman

Martin Scholz skrev:

Am Fri, 16 Oct 2009 21:06:01 +0200 schrieb Mojca Miklavec:

  

On Tue, Oct 13, 2009 at 19:05, Martin Scholz wrote:


Hi List,

I'm trying to setup a new document in Context, and a newbee, so I now
want to setup the section head as following

§ Secnum - Sectitle

Where the § Secnum part is set up in the margin and the Sectitle over
the Text is there any solution how to get it done?
  

Not to be taken too seriously: you need to ask a more complex
(challenging) questions to get a better chance for an answer :) :) :)

It's best to study chapter 8 of cont-eni.pdf from pragma-ade.com to get
the idea of how to handle section modifications.

Here's one possible solution:

\def\mynumbercommand#1{§ #1 --}
\setuphead
[section]
[numbercommand=\mynumbercommand,
 alternative=inmargin]

You may get a bit too big distance, but you can do one of the following
tricks: a) shorten the distance between margin and text b) instead of
just "--" you can use something like
\hbox to 0.2mm{--\hss}
to fake negative spacing or add explicit negative kerning.

Mojca



Hi Mojca,

I'm a type of learner by reading the sourcecode, so it is easier for me 
if I see examples in the code then reading manuals... thanks for you 
help, will try your example later that day...


Thanks and greetings

Martin

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

Maybe a more simplified solution

\definehead[paragraf][section]
\setuphead[paragraf][before= {\crlf \S},after=,style=bold]
% or style=something else

\starttext

\paragraf[ref]{Paragraf title}

\input tufte

\stoptext


Cheers

Janneman
___
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] Section setup

2009-10-17 Thread Mojca Miklavec
> Hi Mojca,
>
> I'm a type of learner by reading the sourcecode

That's perfect! In ConTeXt that's pretty important. The starting point is here:
http://source.contextgarden.net/tex/context/base

Mojca

PS: I guess you had other kind of sourcecode in mind, but the
statement above is still true. Anyway: there are quite some examples
in the manual. You could also start browsing manual sources.
(http://context.aanhet.net/svn/manuals/)
___
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] Section setup

2009-10-16 Thread Martin Scholz
Am Fri, 16 Oct 2009 21:06:01 +0200 schrieb Mojca Miklavec:

> On Tue, Oct 13, 2009 at 19:05, Martin Scholz wrote:
>> Hi List,
>>
>> I'm trying to setup a new document in Context, and a newbee, so I now
>> want to setup the section head as following
>>
>> § Secnum - Sectitle
>>
>> Where the § Secnum part is set up in the margin and the Sectitle over
>> the Text is there any solution how to get it done?
> 
> Not to be taken too seriously: you need to ask a more complex
> (challenging) questions to get a better chance for an answer :) :) :)
> 
> It's best to study chapter 8 of cont-eni.pdf from pragma-ade.com to get
> the idea of how to handle section modifications.
> 
> Here's one possible solution:
> 
> \def\mynumbercommand#1{§ #1 --}
> \setuphead
>   [section]
>   [numbercommand=\mynumbercommand,
>alternative=inmargin]
> 
> You may get a bit too big distance, but you can do one of the following
> tricks: a) shorten the distance between margin and text b) instead of
> just "--" you can use something like
> \hbox to 0.2mm{--\hss}
> to fake negative spacing or add explicit negative kerning.
> 
> Mojca
> 
Hi Mojca,

I'm a type of learner by reading the sourcecode, so it is easier for me 
if I see examples in the code then reading manuals... thanks for you 
help, will try your example later that day...

Thanks and greetings

Martin

___
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] Section setup

2009-10-16 Thread Mojca Miklavec
On Tue, Oct 13, 2009 at 19:05, Martin Scholz wrote:
> Hi List,
>
> I'm trying to setup a new document in Context, and a newbee, so I now
> want to setup the section head as following
>
> § Secnum - Sectitle
>
> Where the § Secnum part is set up in the margin and the Sectitle over the
> Text is there any solution how to get it done?

Not to be taken too seriously: you need to ask a more complex
(challenging) questions to get a better chance for an answer :) :) :)

It's best to study chapter 8 of cont-eni.pdf from pragma-ade.com to
get the idea of how to handle section modifications.

Here's one possible solution:

\def\mynumbercommand#1{§ #1 --}
\setuphead
[section]
[numbercommand=\mynumbercommand,
 alternative=inmargin]

You may get a bit too big distance, but you can do one of the following tricks:
a) shorten the distance between margin and text
b) instead of just "--" you can use something like
\hbox to 0.2mm{--\hss}
to fake negative spacing or add explicit negative kerning.

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

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


[NTG-context] Section setup

2009-10-13 Thread Martin Scholz
Hi List,

I'm trying to setup a new document in Context, and a newbee, so I now 
want to setup the section head as following

§ Secnum - Sectitle

Where the § Secnum part is set up in the margin and the Sectitle over the 
Text is there any solution how to get it done?

Greetings

Martin

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