From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11599 Path: main.gmane.org!not-for-mail From: Patrick Gundlach Newsgroups: gmane.comp.tex.context Subject: Re: setuphead(s), subject, alternative=inmargin Date: Sun, 23 Mar 2003 15:56:03 +0100 Organization: privat Sender: ntg-context-admin@ntg.nl Message-ID: <87of42p1x8.fsf@gundla.ch> References: <87adfo3mag.fsf@gundla.ch> <1048255348.3e7b1b7500099@mail.virtual-earth.de> <87smtg22ia.fsf@gundla.ch> <1048427656.3e7dbc88af334@mail.virtual-earth.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048431549 3051 80.91.224.249 (23 Mar 2003 14:59:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 23 Mar 2003 14:59:09 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Mar 23 15:59:07 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18x6wF-0000n4-00 for ; Sun, 23 Mar 2003 15:59:07 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 28C7510B96; Sun, 23 Mar 2003 15:59:05 +0100 (MET) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by ref.ntg.nl (Postfix) with ESMTP id 0033E10B8E for ; Sun, 23 Mar 2003 15:56:34 +0100 (MET) Original-Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 18x6to-0004Io-00 for ntg-context@ntg.nl; Sun, 23 Mar 2003 15:56:36 +0100 Original-Received: from [129.217.137.136] (helo=levana) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 18x6tn-0003Op-00 for ntg-context@ntg.nl; Sun, 23 Mar 2003 15:56:36 +0100 Original-Received: from pg by levana with local (Exim 3.12 #1 (Debian)) id 18x6tH-0000Ub-00 for ; Sun, 23 Mar 2003 15:56:03 +0100 Original-To: ntg-context@ntg.nl X-Lieblings-Musik: a.c. In-Reply-To: <1048427656.3e7dbc88af334@mail.virtual-earth.de> (Mathias Picker's message of "Sun, 23 Mar 2003 14:54:16 +0100") Original-Lines: 52 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i586-pc-linux-gnu) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11599 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11599 Mathias Picker writes: Hello Mathias, > first, thanks! This solved my problem 90%. BIG Thanks!! good to hear, but usually the rest 10% are the most difficult ;-) > That's most of what I wanted!! Great. I'm still puzzling over how to change > the width of the hbox to \textwidth+\marginwidth\margindistance, but for now > I'm saved. Why do I want a wider hbox? I print white fonts on black > background, so the left shifted \hbox with a width of (I assume) \textwidth > looks different from what I wanted. But it works for now... OK, just in case you run pdfetex (see the e in between pdf and tex ;-}) you can use the \dimexpr ( .... ) primitive: \def\MyHead#1#2% {\vbox {\localheadsetup \begstrut % is this really needed? \hbox {\hskip-\marginwidth\hskip-\margindistance \framed[width=\dimexpr(\marginwidth+\margindistance+\textwidth), align=right, %raggedright frame=off, offset=2pt, background=color, backgroundcolor=black, foregroundcolor=white, ]{% \ifheadnumbercontent{#1}\kern\numberheaddistance\fi #2}}}} %\showframe \starttext \setuphead[section][alternative=command,number=no,command=\MyHead,style=\bf] \section{some quick fox jump over very lazy dogs} \input tufte \stoptext If you don't use pdfetex, you might think of switching. Or you could do some calculation to achieve the same. > Have a nice week, You, too. Patrick