ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: reference bug: MkiV
Date: Thu, 3 Nov 2011 22:04:06 +0100	[thread overview]
Message-ID: <AF24BC8F-05D3-48A0-90C8-E1CEA530EBFD@googlemail.com> (raw)
In-Reply-To: <op.v4d0t1ojpw6hmh@ishamid-pc>


Am 03.11.2011 um 21:35 schrieb Idris Samawi Hamid ادريس سماوي حامد:

> What am I doing wrong? or should we just officially forget about the marginframed mechanism and stick to margindata only??

Just to be clear, the name of the whole thing is margin data and you define a new command with \definemargindata. 

To describe what’s the difference between \setupmargindata and \setupmarginframed is a wrote a very simple version of \inmargin.

\def\imrand#1%
  {\vadjust
     {\llap
        {\smash[h]{\inframed{#1}}%
         \hskip\leftmargindistance}}}

\starttext \showframe

text text text text \imrand{margin} text text text text
text text text text text text text text text text text
text text text text text text text text text text text

\stoptext

You can split my \imrand command in two parts, the first \vadjust{\llap{…}} which puts the argument in the margin, to make changes at this part you use \setupmargindata where you can control with the “location” key on which side the text should appear (“left” for the left margin, “right” for the right margin, “inner” for the inner margin etc.) and in which block (“margin=edge” for the edge and “margin=margin” for the margin). The second part is \framed, to make changes at this part you can use the \setupmarginframed command (e.g. to disable/enable the frame). The question is now why not only one command for both but the answer is simple, both have keys with the same name (e.g. location) which expect different argument and only when you use different setup commands total control about the environment is possible.

You can find a overview about all keys and their values in my new command reference: https://bitbucket.org/wolfs/commands/downloads

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

  reply	other threads:[~2011-11-03 21:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 18:47 Idris Samawi Hamid ادريس   سماوي حامد
2011-11-01 18:59 ` Wolfgang Schuster
2011-11-01 19:20   ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-01 20:03     ` Wolfgang Schuster
2011-11-03 20:12       ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-03 20:23         ` Wolfgang Schuster
2011-11-03 20:35           ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-03 21:04             ` Wolfgang Schuster [this message]
2011-11-03 21:35               ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-03 20:17       ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-03 20:24         ` Wolfgang Schuster
2011-11-04  9:13           ` Hans Hagen
2011-11-05 14:05             ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-05 14:07           ` Idris Samawi Hamid ادريس   سماوي حامد
2011-11-03 20:18       ` Idris Samawi Hamid ادريس   سماوي حامد

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=AF24BC8F-05D3-48A0-90C8-E1CEA530EBFD@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).