Difference between revisions of "Command/setupinmargin"

From Wiki
Jump to navigation Jump to search
(→‎Description: stack option explained)
(→‎Description: Added note on use of first bracket)
Line 66: Line 66:
  
 
Stack option is used to emulate LaTeX's marginpars (they're considered floats, hence the resulting margin notes do not overlap).
 
Stack option is used to emulate LaTeX's marginpars (they're considered floats, hence the resulting margin notes do not overlap).
 +
 +
The first bracket can be used to provide different setups for different margin text types. It defines which type of text the following parameters apply to. So the following code defines that any text placed in the margin using <code>\inright{...}</code> will be slanted:
 +
<texcode>
 +
\setupinmargin[right][style=slanted]
 +
</texcode>
 +
 +
The previous code does <i>not</i> alter the location of the <code>\inmargin</code> command. To do that you would use:
 +
<texcode>
 +
\setupinmargin[location=right,style=slanted]
 +
</texcode>
  
 
== Example ==
 
== Example ==

Revision as of 08:19, 2 June 2011

\setupinmargin

Syntax

\setupinmargin[...][...,...=...,...]
[...] left right number
location flushleft flushright both
style normal bold slanted boldslanted type cap small... command
before command
after command
align inner outer left right middle normal no yes
line number
distance dimension
separator text
width dimension
distance dimension
stack yes no
[...,...=...,...] see \setupframed

Description

Stack option is used to emulate LaTeX's marginpars (they're considered floats, hence the resulting margin notes do not overlap).

The first bracket can be used to provide different setups for different margin text types. It defines which type of text the following parameters apply to. So the following code defines that any text placed in the margin using \inright{...} will be slanted:

\setupinmargin[right][style=slanted]

The previous code does not alter the location of the \inmargin command. To do that you would use:

\setupinmargin[location=right,style=slanted]

Example

% For example:
\setupinmargin[style=slanted]

\starttext

This is an example of a simple margin note set in the slanted font
of the document. If used correctly, the note \inmargin{Here is a
simple margin note.} should print on the side with the command 
\type {\inmargin} placed in the text. You will of course want to 
adjust your margins to accommodate the type.  

\stoptext 


See also