ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Janneman <janerik.hagglof@bredband.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Section setup
Date: Sat, 17 Oct 2009 16:58:45 +0200	[thread overview]
Message-ID: <4AD9DBA5.1020707@bredband.net> (raw)
In-Reply-To: <hbav70$es2$1@ger.gmane.org>

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
___________________________________________________________________________________

  parent reply	other threads:[~2009-10-17 14:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13 17:05 Martin Scholz
2009-10-16 19:06 ` Mojca Miklavec
2009-10-16 23:22   ` Martin Scholz
2009-10-17  7:38     ` Mojca Miklavec
2009-10-17 14:58     ` Janneman [this message]
2009-10-17 15:40       ` Wolfgang Schuster
2009-10-17 15:46       ` Janneman
2009-10-17 15:54         ` Wolfgang Schuster
2009-10-17 16:12         ` Aditya Mahajan
2009-10-17 20:29           ` \starbuffer in own macros Andreas Harder
2009-10-18  9:14             ` Wolfgang Schuster
2009-10-18 10:02               ` Andreas Harder
2009-10-18 22:50                 ` Wolfgang Schuster
2009-10-19 14:13                   ` Andreas Harder
2009-10-19 15:53                     ` Wolfgang Schuster
2009-10-19 16:01                       ` Andreas Harder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD9DBA5.1020707@bredband.net \
    --to=janerik.hagglof@bredband.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).