From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72399 Path: news.gmane.org!not-for-mail From: Andreas Harder Newsgroups: gmane.comp.tex.context Subject: Re: Metafun manual section titles Date: Mon, 14 Nov 2011 01:19:41 +0100 Message-ID: References: <201111132324.23732.romain.diss@yahoo.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1321230014 15248 80.91.229.12 (14 Nov 2011 00:20:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2011 00:20:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 14 01:20:09 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RPkHQ-0000Ac-Nx for gctc-ntg-context-518@m.gmane.org; Mon, 14 Nov 2011 01:20:08 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 023AECB04D; Mon, 14 Nov 2011 01:20:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oEIXkXMDCBvm; Mon, 14 Nov 2011 01:19:56 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 73F1CCB0DC; Mon, 14 Nov 2011 01:19:56 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 20452CB04D for ; Mon, 14 Nov 2011 01:19:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qcbkKzR5x5ek for ; Mon, 14 Nov 2011 01:19:43 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id AEB6DCB0F2 for ; Mon, 14 Nov 2011 01:19:43 +0100 (CET) Original-Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAE0JgYL012582 for ; Mon, 14 Nov 2011 01:19:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 86164D2362 for ; Mon, 14 Nov 2011 01:19:42 +0100 (CET) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rbklLHJOQknx for ; Mon, 14 Nov 2011 01:19:42 +0100 (CET) X-CHKRCPT: Envelopesender noch aharder@uni-koblenz.de Original-Received: from [192.168.1.112] (91-67-184-190-dynip.superkabel.de [91.67.184.190]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id EAA90D2361 for ; Mon, 14 Nov 2011 01:19:41 +0100 (CET) In-Reply-To: <201111132324.23732.romain.diss@yahoo.fr> X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.26.64.15; country=DE; region=08; city=Koblenz; latitude=50.3500; longitude=7.6000; http://maps.google.com/maps?q=50.3500,7.6000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rFUMjGQD - 7a817806192d - 20111114 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72399 Archived-At: On 13.11.2011, at 23:24, Romain Diss wrote: > Hello, > = > I'm trying to make some section titles which look like the ones of the me= tafun = > manual: title and number underlined, with number in margin. I thougth it = would = > not be too hard but I can't do it. > = > Actually, I'm using a frame with an overlay with a \startuniqueMPgraphic = to = > underline the title but I can't make a frame for both the section number = which = > is in the margin and the text which is not. > = > I tried to make the underlining of the title text extend in the margin bu= t = > it's not easy because the frame background seems to be centered automatic= ally = > on the frame. Maybe I should adjust some offsets but how can I know the s= ize of = > the section number... > = > Anybody can help me on that problem ? Hi, you can try something like this: \setuplayout[width=3Dmiddle,backspace=3D4cm] \startuseMPgraphic{line} drawoptions(withcolor \MPcolor{\framedparameter{framecolor}}) ; draw bottomboundary OverlayBox withpen pencircle scaled 3pt ; = setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[head:line][\useMPgraphic{line}] \defineframedtext [framedHead] [align=3Dright,width=3Dfit, offset=3Doverlay,boffset=3D.25ex, frame=3Doff,framecolor=3Dyellow:4, background=3Dhead:line] \defineheadplacement [MyPlacement] [vertical] {\setwidthof{#1\hskip\leftmargindistance}\to\MyWidth\hskip-\MyWidth \startframedHead #1\hskip\leftmargindistance #2 \stopframedHead} \setuphead [chapter,section] [alternative=3DMyPlacement] \starttext \showframe \dorecurse{3}{ \chapter{Chapter #1} \dorecurse{3}{\section{Section ##1} \dorecurse{3}{\subsection{Subsection}} } } \stoptext But I=92m sure there are better solutions =85 Best wishes Andreas ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________