ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Controlling Appearance of \inoutermargin
@ 2013-01-13  0:42 Malte Stien
  2013-01-13 21:44 ` Sietse Brouwer
  0 siblings, 1 reply; 2+ messages in thread
From: Malte Stien @ 2013-01-13  0:42 UTC (permalink / raw)
  To: ntg-context

Hi,

I have just changed one of my documents from single-page to double-page to be printed as a book. I have some margin remarks, that used to be on the left which I am now trying to move to the outer margin on odd and even pages (that is, left on even, right on odd pages). In doing so, I had to modify all of my \inmargin's to \inoutermargins (Please pull me up on this if this is not a good way of doing this; I found this in some forum, there does not seem to be a Wiki page about this command).

As it turns out, I am no longer able to control the appearance of these \inoutermargins using my \setupinmargin command. I have been playing with different options, like

  \setupinmargin[outer][style=\slx, color=darkgray, stack=yes]

or

  \setupinoutermargin[style=\slx, color=darkgray, stack=yes]

but cannot get it to work. Is there any documentation about the \inoutermargins command? Any hints?

Thank you,
Malte.

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Controlling Appearance of \inoutermargin
  2013-01-13  0:42 Controlling Appearance of \inoutermargin Malte Stien
@ 2013-01-13 21:44 ` Sietse Brouwer
  0 siblings, 0 replies; 2+ messages in thread
From: Sietse Brouwer @ 2013-01-13 21:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-13 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-13  0:42 Controlling Appearance of \inoutermargin Malte Stien
2013-01-13 21:44 ` Sietse Brouwer

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).