[dev-context] \setupnote

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sat Jan 14 19:55:59 CET 2012


Hi Hans,

When \setupnote is called in preamble footnotes are placed wrong.

%\setuppapersize[A4]
\setupnote[footnote][]
\starttext
Text\footnote{Note}.
\stoptext

This happens because \dimen\currentnoteins is set to 1pt (the current value of \textheight before \starttext).

The problem is the following setting in page-app.mkiv

   \setuplayout
     [fittingpage]
     [\c!width=\d_page_fitting_width,
      \c!height=\d_page_fitting_height,
      \c!location=\v!middle]

which changes the \textheight dimension (from the value set in page-lay.mkiv).

Merging \definelayout and \setuplayout from

   \definelayout
     [fittingpage]
     [\v!page]

   \setuplayout
     [fittingpage]
     [\c!width=\d_page_fitting_width,
      \c!height=\d_page_fitting_height,
      \c!location=\v!middle]

to

   \definelayout
     [fittingpage]
     [\v!page]
     [\c!width=\d_page_fitting_width,
      \c!height=\d_page_fitting_height,
      \c!location=\v!middle]

solves the problem.

Wolfgang


More information about the dev-context mailing list