Hi, Let me prefix this first my saying that I'm new to ConTeXT, so apologies if there is an obvious solution to what I'm trying to do or I'm approaching it in the wrong way. I'm trying to style chapter headings so that they are right justified, with a line before them *on the same line*. In other words, the page should look like this, where vertical bars represent the edges of the text width: |------------------------------- 1.1 Some chapter --| Can anyone give me pointers on how to do this? I've trawled the wiki and the internet at large, but an inability to precisely word this leaves it difficult to find any previous example of this. Many thanks, Andrew
On Tue, Oct 21, 2008 at 7:00 PM, Andrew Ho
Hi,
Let me prefix this first my saying that I'm new to ConTeXT, so apologies if there is an obvious solution to what I'm trying to do or I'm approaching it in the wrong way. I'm trying to style chapter headings so that they are right justified, with a line before them *on the same line*. In other words, the page should look like this, where vertical bars represent the edges of the text width:
|------------------------------- 1.1 Some chapter --|
Can anyone give me pointers on how to do this? I've trawled the wiki and the internet at large, but an inability to precisely word this leaves it difficult to find any previous example of this.
Many thanks, Andrew
\define[2]\ChapterCommand {\line {\leaders\hbox {\vrule width 1pt height .5\strutht depth -\dimexpr.5\strutht-\linewidth\relax}\hfill #1\space#2}} \setuphead[chapter][command=\ChapterCommand] \starttext \chapter{Some chapter} \stoptext Works only for headers shorter than one line. Wolfgang
participants (2)
-
Andrew Ho
-
Wolfgang Schuster