3

Is there a proper way to place and center enumerations in (outer)margin that

\defineenumeration[MyEnumeration][...]
\inmargin{
  \startMyEnumeration
    ...
  \stopMyEnumeration
}

or

\defineenumeration[MyEnumeration][...]
\inouter{
  \startMyEnumeration
    ...
  \stopMyEnumeration
}

Even that have some issues like not centering enumerations on doubleside: when rightside is good, leftside is on the page edge.

I tried to use alternative=margin, margin=yes and to play around with each enumeration properties but nothing seems to work.

I also tried to use \setupmargindata like in this link and all kinds of margins commands like here or here but I could not find a way to do what I want.

6

You can use the userdata environment to store the content for your enumeration in a buffer.

To place the enumeration together with the stored content in the margin you have to create a new alternative for the userdata environment. In the new alternative you can use the \margindata (or \inouter etc.) command to put the enumeration together with the content in the desired margin.

Below is a example for this method

\defineenumeration
  [MyEnumeration]
  [alternative=top,
   before=,
   after=,
   inbetween=,
   title=yes,
   text=Enum.]

\defineuserdataalternative
  [enumeration]
  [renderingsetup=enumeration:margin]

\startsetups[enumeration:margin]
  \margindata
    [inouter]
    {\startMyEnumeration[title=\userdataparameter{title},reference=\userdataparameter{reference}]
     \getinlineuserdata
     \stopMyEnumeration}
\stopsetups

\defineuserdata [Enumeration] [alternative=enumeration]

\setuplayout
  [width=10cm,
   rightmargin=6cm]

\starttext

\input tufte
\startuserdata [Enumeration] [title={Jojo Mayer}]
\input jojomayer
\stopuserdata
\input zapf

\stoptext

which results in the following output

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.