ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Numbering in margin
@ 2008-03-18 16:06 Thomas A. Schmitz
  2008-03-18 18:14 ` Thomas A. Schmitz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas A. Schmitz @ 2008-03-18 16:06 UTC (permalink / raw)
  To: mailing ConTeXt users list for

Hi all,

I want some numbers to appear in the paragraph. It's for a commentary,  
so the numbering isn't continuous, but pretty arbitrary. The problem  
is, I need two sets of numbers (for sections and subsections), and I  
want both in the margin, like so:

1  1   Some text

    3   More text

    4   Even more

3  1   And more

    2   and so on

5      Sometimes, there are sections without subsections

So far, I have succeeded in doing this with some low-level trickery by  
defining two commands, LEVELONE and LEVELTWO:

\def\LEVELONE#1 {\dontleavehmode\llap{#1\kern1.8em \null}}

\def\LEVELTWO#1 {\dontleavehmode\llap{\tfx #1\kern1em \null}}

(I need to gobble the space after the command, that's why I included  
it in the \def). However, I'm wondering if there's a more ConTeXt-like  
way of doing this, since my next project will be to do this for xml  
files. I had tried with \inmargin[1] and \inmargin[2], but that didn't  
quite do what I expected. Any thoughts on this?

All best

Thomas

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Numbering in margin
  2008-03-18 16:06 Numbering in margin Thomas A. Schmitz
@ 2008-03-18 18:14 ` Thomas A. Schmitz
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas A. Schmitz @ 2008-03-18 18:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Mar 18, 2008, at 5:06 PM, Thomas A. Schmitz wrote:

> Hi all,
>
> I want some numbers to appear in the paragraph.

Oh shoot, please make that: "appear in the margin."

Thomas
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-18 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-18 16:06 Numbering in margin Thomas A. Schmitz
2008-03-18 18:14 ` Thomas A. Schmitz

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).