From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing ConTeXt users list for <ntg-context@ntg.nl>
Subject: Numbering in margin
Date: Tue, 18 Mar 2008 17:06:20 +0100 [thread overview]
Message-ID: <AC77CB9A-A8AA-4F5F-A3F3-DE29A9834F75@uni-bonn.de> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2008-03-18 16:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 16:06 Thomas A. Schmitz [this message]
2008-03-18 18:14 ` Thomas A. Schmitz
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=AC77CB9A-A8AA-4F5F-A3F3-DE29A9834F75@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.de \
--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).