ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: margin notes (was: lmtx update)
Date: Sat, 1 Aug 2020 19:19:28 +0200	[thread overview]
Message-ID: <40FEF417-8D44-41B1-AB23-B92AF9804C81@fiee.net> (raw)
In-Reply-To: <4C99E036-DBA9-4FB0-802E-90549CD1A080@gmail.com>



> Am 01.08.2020 um 18:57 schrieb Otared Kavian <otared@gmail.com>:
> 
> Hi Hraban,
> 
> Thank you for reminding me of the solution cooked up by Wolfgang for you a few years ago. That solution works fine when the notes are short enough, but in some cases the notes in the margin bump into each other (indeed it is not a good habit to have long notes, but in some cases one cannot avoid them).

One essential bit is missing in the wiki example:

\setupmargindata[inmargin][
  location=right,
  stack=continue, % !!
  align=flushright,
]

The code I’m actually using for our German literature magazine “Kritische Ausgabe” is much more elaborated, but also cluttered with obsolete stuff – I need to sort that out some time...
(I only deleted some styling.)

%%% Footnotes / Marginals

\setupmargindata[inmargin][
  location=right,
  stack=continue,
  align=flushright,
]
\setupmargindata[inouter][
  location=right,
  stack=continue,
  align=flushright,
]

\def\FNVOffset{0} % Negative vertical offset of footnotes in lines
% Manual tweaking was necessary for a while, when stacking didn’t work reliably.

\def\MarginNote#1{%
\inmargin[
  voffset=\dimexpr-\FNVOffset\lineheight\relax,
  width=\ColWidth,
  align=flushleft,
]{%
  \inframed[
    width=\ColWidth,
    align=right,
    frame=off,
    offset=overlay,
    strut=yes,
    ]{#1}%
  }%
}

\define\PlaceFootnote{%
\inmargin[
  voffset=\dimexpr-\FNVOffset\lineheight\relax,
  width=\ColWidth,
]{%
  \vtop{\placelocalnotes[footnote][before=,after=]}}%
}

\def\FNo#1{{#1~}}
% I never managed to get number and text in consecutive lines without indented text
% or at least a constant whitespace after the number.

\setupnote[footnote][
  location=text,
  bodyfont=,
  indenting=no,
  before={\noindentation},
  next=\PlaceFootnote,
]

\setupnotation[footnote][
	way=bychapter,
	align=flushleft,
  indenting=no,
  location=serried,
  alternative=serried,
  width=broad,
  numbercommand=\FNo,
] % footnote text

\setuptexttexts[margin][][%
  {\framed[
    align={flushright,bottom},
    frame=off,
    height=\textheight,
    width=\ColWidth,
  ]{%
    \strut\vfill\placenotes[footnote]}}%
]


Best, Hraban

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-08-01 17:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  8:32 lmtx update Hans Hagen
2020-07-31  8:40 ` Taco Hoekwater
2020-07-31 10:18   ` Hans Hagen
2020-08-01 13:20 ` Otared Kavian
2020-08-01 14:17   ` Hans Hagen
2020-08-01 16:20     ` Otared Kavian
2020-08-01 16:41   ` Henning Hraban Ramm
2020-08-01 16:57     ` Otared Kavian
2020-08-01 17:19       ` Henning Hraban Ramm [this message]
2020-08-01 20:36         ` margin notes (was: lmtx update) Otared Kavian
2020-08-01 21:01           ` Henning Hraban Ramm
2020-08-01 21:35             ` Otared Kavian
2020-08-02  3:30 ` lmtx update Aditya Mahajan
2020-08-03 17:37 ` Pablo Rodriguez

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=40FEF417-8D44-41B1-AB23-B92AF9804C81@fiee.net \
    --to=texml@fiee.net \
    --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).