# ConTeXt: Combining footnotes with margin texts

Background

In my document I use modified footnotes that are defined like this:

\def\mya#1{%
\tfx\high{a#1}%
}

\definenote[aNote]
[before={\blank[4mm]},
after={\blank[-8mm]},
textcommand=\mya,
paragraph=yes,
rule=off]

\setupnotation[aNote]
[alternative=serried,
before={a},
numbercommand=\tf,
style={\switchtobodyfont[8.5pt]},
way=bysection,


which results in a block of footnotes without a footnote mark in the margin of the page.

Problem:

I would like to combine the footnote mechanism of ConTeXt with the possibility to annotate the footnotes via margin texts. Unfortunately, my attempts to implement this, for instance with

\aNote{This is my text.\inmargin{And this is an annotation.}}


or

\aNote{This is my text.\margindata[inouter]{And this is an annotation.}}


don't yield any result. The footnote is displayed, but not the margin text. I assume this has something to do with the footnote mark (maybe the space in the footer's margin is reserved for footnote marks only?).

Another approach I have tried is to put a footnote inside a footnote, like so:

\def\mya#1{%
\tfx\high{a#1}%
}

\definenote[aNote]
[before={\blank[4mm]},
after={\blank[-8mm]},
textcommand=\mya,
paragraph=yes,
rule=off]

\setupnotation[aNote]
[alternative=serried,
before={a},
numbercommand=\tf,
style={\switchtobodyfont[8.5pt]},
way=bysection,

\definenote[marginNote]

\setupnote[marginNote][location=none]
\setupnotation[marginNote][
align={flushleft,bottom},
location=bottom,
numbercommand=\gobbleoneargument
]
\setuptexttexts[margin][]
[{\framed[%
align={right,bottom},
frame=off,
width=\rightmarginwidth
]{\placenotes[marginNote]}}]
\starttext
This is my main text.\aNote{Footnote text.\marginNote{Something additional.}}
\stoptext


which is close to what I want to achieve, but the text in \marginNote should be displayed in the same line as the footnote it refers to.

Question:

Is there a way to combine these two mechanisms so that I get an annotated footnote? Or can my "footnote inside a footnote" example be altered in a way so that the second note it is in the same line as the first footnote?

Minimal working example

\def\mya#1{%
\tfx\high{a#1}%
}

\definenote[aNote]
[before={\blank[4mm]},
after={\blank[-8mm]},
textcommand=\mya,
paragraph=yes,
rule=off]

\setupnotation[aNote]
[alternative=serried,
before={a},
numbercommand= {\tf},
style={\switchtobodyfont[8.5pt]},
way=bysection,