From: Malte Stien <malte@stien.de>
To: ntg-context@ntg.nl
Subject: Re: ntg-context Digest, Vol 103, Issue 37
Date: Tue, 15 Jan 2013 15:50:11 +1100 [thread overview]
Message-ID: <355FF689-34FA-45DF-9856-F50E08E23899@stien.de> (raw)
In-Reply-To: <mailman.317.1358150417.2489.ntg-context@ntg.nl>
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 <sbbrouwer@gmail.com>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] Controlling Appearance of \inoutermargin
> Message-ID:
> <CAF=dkzyWB-aVxCKb_+Fo+_Jn+Hhdw9HBRvj7XOhGghwg=t4Pog@mail.gmail.com>
> 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
___________________________________________________________________________________
parent reply other threads:[~2013-01-15 4:50 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <mailman.317.1358150417.2489.ntg-context@ntg.nl>]
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=355FF689-34FA-45DF-9856-F50E08E23899@stien.de \
--to=malte@stien.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).