From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80258 Path: news.gmane.org!not-for-mail From: Malte Stien Newsgroups: gmane.comp.tex.context Subject: Re: ntg-context Digest, Vol 103, Issue 37 Date: Tue, 15 Jan 2013 15:50:11 +1100 Message-ID: <355FF689-34FA-45DF-9856-F50E08E23899@stien.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358225418 2094 80.91.229.3 (15 Jan 2013 04:50:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 04:50:18 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 15 05:50:34 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TuyTq-0002Hd-7b for gctc-ntg-context-518@m.gmane.org; Tue, 15 Jan 2013 05:50:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 65B35101EB; Tue, 15 Jan 2013 05:50:17 +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 qPQf0x+DLB3M; Tue, 15 Jan 2013 05:50:15 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C1084101E5; Tue, 15 Jan 2013 05:50:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3383F101E5 for ; Tue, 15 Jan 2013 05:50:15 +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 HYmHZmLZq6Ct for ; Tue, 15 Jan 2013 05:50:14 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 14323101E2 for ; Tue, 15 Jan 2013 05:50:13 +0100 (CET) Original-Received: from homiemail-a34.g.dreamhost.com (caiajhbdccah.dreamhost.com [208.97.132.207]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0F4oBmh025519 for ; Tue, 15 Jan 2013 05:50:12 +0100 Original-Received: from homiemail-a34.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a34.g.dreamhost.com (Postfix) with ESMTP id D0FAC10049 for ; Mon, 14 Jan 2013 20:50:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=stien.de; h=content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; s=stien.de; bh=cRdvMiKBrpLaUbjbP6JS9a7JU60=; b=guf8wKmChi/suTjpkDQFOrSZwYfN 9y1RaMGIixLqbnI3o1+1Il26lXHtS+PcaZ1gYP6mIKlA/pnMfh2SjEtEpHf7fxbE k+kzvM8XpfcLqm1hLsbUAMLkfArshQ7Od0Iokw/lFeKpUmpB3xDzRGw7zejgZGh0 LNuYbI3Nfv7g52U= Original-Received: from [192.168.10.102] (smartw11.lnk.telstra.net [165.228.37.88]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: malte@stien.de) by homiemail-a34.g.dreamhost.com (Postfix) with ESMTPSA id 62FDC1001C for ; Mon, 14 Jan 2013 20:50:08 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0007 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=208.97.132.207; country=US; region=CA; city=Brea; postalcode=92821; latitude=33.9269; longitude=-117.8612; metrocode=803; areacode=714; http://maps.google.com/maps?q=33.9269,-117.8612&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03IM4ObXA - 62ae97ad755a - 20130115 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80258 Archived-At: Thank you, Sietse, That works a treat. And thank you for your idea of looking at the source code. I should do that more often to ease myself into understanding TeX a bit better. At the moment I still look at myself as a "user". Regards, Malte. On 14/01/2013, at 7:00 PM, ntg-context-request@ntg.nl wrote: > Date: Sun, 13 Jan 2013 22:44:59 +0100 > From: Sietse Brouwer > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] Controlling Appearance of \inoutermargin > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi Malte, > > This mail contains (1) an answer to your question; (2) a minimal > working example; (3) an explanation of how I found this out (I had > never heard of inoutermargin before). > > (1) An answer to your question. > > I grepped the ConTeXt source code for `inoutermargin`, and found out > it is an instance of the `margindata` class. This is its setup > command: > > \setupmargindata[inoutermargin][style=bold,color=red] > > (2) A minimal working example. It is nice to include an MWE when you > ask a question -- it makes things easier for people who want to try to > answer the question, because they don't have to think up their own > example. Anyway, I'm including this one for the benefit of people who > stumble across this e-mail from the future, and want to play with > \inoutermargin. :-) > > \setuppapersize[A8,landscape] % w x h is about 7.5x5 > \setuplayout[ > backspace=1cm, > width=3cm, > % > leftmargin=0.5cm, > leftmargindistance=2mm, > % > rightmargin=2cm, > rightmargindistance=2mm] > > > \setuppagenumbering[alternative=doublesided] > \showframe > > \startbuffer > asdf asdf asdf > \inoutermargin{bsdf} > \page[yes] > \stopbuffer > > \setupmargindata > [inoutermargin] > [style=bold,color=red] > > \starttext > \getbuffer > \getbuffer > \getbuffer > \stoptext > > (3) How I found the answer > > Whenever I want to learn about a command I don't know yet, I grep for > it in the source code. (I ignore bits like 'setup' or 'start'.) I've > even got a shell command for it, to make searching the source as easy > as possible: > > function grepcon { > cd /opt/context/tex/texmf-context/tex/context/base/ > grep -R $* * > } > > `grepcon inoutermargin` gave me two hits in mkii files, and one in > typo-mar.mkiv: > \definemargindata[inoutermargin][\v!outer][...various style > setups...]. That set me on the right track. If you frequently need to > work out how commands work, I cannot recommend enough that you make > your own source-searching function and use it enough. For me, at > least, it's enormously helpful. > > Cheers, > Sietse ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________