ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Otared Kavian <otared@gmail.com>
Subject: Re: lmtx update
Date: Sat, 1 Aug 2020 16:17:30 +0200	[thread overview]
Message-ID: <ed455ae8-7ba2-ded0-16a8-4b8136b0f794@xs4all.nl> (raw)
In-Reply-To: <80B0EC05-905F-42FF-AD0C-8EFB7F1BF6A0@gmail.com>

On 8/1/2020 3:20 PM, Otared Kavian wrote:
>> On 31 Jul 2020, at 10:32, Hans Hagen <j.hagen@xs4all.nl> wrote:
>>
>> […]
>>
>> Other work in progress is: better columns in itemize, esp proper footnote support (not that I ever need that but I know users do so ...), experiments work ok, but I need to check spacing. In general, footnotes (will) behave a bit better, especially those used nested in other mechanisms. A side effect of more control is that we can do other tricks too and we're playing with it (kind of fun).
> 
> Hi Hans,
> 
> Thanks for your explanations.
> 
> Regarding footnotes, would it be possible to have a built-in support for writing the footnotes in the margin? (For instance, assuming that the layout is such that for instance the right margin takes 1/3 of the page width, then the footnotes would occupy the right margin, beginning at the top).
It depends on what you want. This works ok:

\setuplayout
   [cutspace=5cm,
    width=middle,
    margin=4cm]

\setuptexttexts
   [margin]
   [] [{\directsetup{notabene}}]

\startsetups notabene
     \vbox to \textheight \bgroup
         \setupalign[tolerant]
         \topskipcorrection
         \placenotes[endnote][before=,after=]
         \vfilll
     \egroup
\stopsetups

\starttext

test \endnote{\input ward }\par
test \endnote{x}\par
test \endnote{x}\par

\setups{notaflush}

\stoptext

This one handles overflow (suboptimal, nicer is stepwise flushing) but 
this one also flushes notes that have refs on the next page. It just 
indicates the usual: most can be done in tex without too much hassle but 
one always needs to think about the edge cases as users can drop 
anything in there and all can interfere.

\newbox\MyNoteOverflow

\startsetups notabene
      \setbox\scratchbox\vbox\bgroup
         \setupalign[tolerant]
         \ifvoid\MyNoteOverflow \else
             \unvbox\MyNoteOverflow
         \fi
         \placenotes[endnote][before=,after=]
     \egroup
     \scratchdimen\dimexpr\textheight-.5\lineheight\relax
     \ifdim\ht\scratchbox>\scratchdimen
         \global\setbox\MyNoteOverflow\box\scratchbox
         \setbox\scratchbox\vsplit \MyNoteOverflow to \scratchdimen
     \fi
     \vbox\bgroup
         \topskipcorrection
         \unvbox\scratchbox
         \vfilll
     \egroup
\stopsetups

\startsetups notaflush
     \doloop {
         \page
         \ifvoid\MyNoteOverflow
            \exitloop
         \else
            \null \page
         \fi
     }
\stopsetups

\starttext

test \endnote{\input ward }\par
test \endnote{x}\par
test \endnote{x}\par

\setups{notaflush}

\stoptext

Variants (i can make one but not with this warm weather) can use 
selective flushing (all kinds of things are possible with notes) but 
another challenge is to have an independent criterium hooked into the 
page builder (when i'm done with playing with extensions regarding pars 
i might give that a go ... as usual more a challenge than a need so i 
need some motive).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 14:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  8:32 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 [this message]
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       ` margin notes (was: lmtx update) Henning Hraban Ramm
2020-08-01 20:36         ` 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
2020-09-16 15:52 ebohoyod
2020-09-16 16:23 ` Wolfgang Schuster
     [not found]   ` <6f2953c3-4b09-e824-da78-46347ef5f4af@disroot.org>
2020-09-17  8:14     ` Eduardo Bohoyo
2020-09-17 10:35       ` Wolfgang Schuster
2020-09-17 10:50         ` Eduardo Bohoyo
2020-09-17 11:11           ` Eduardo Bohoyo
2021-08-19 17:57 Hans Hagen via ntg-context
2021-08-19 20:07 ` Aditya Mahajan via ntg-context
2021-08-20  5:52   ` Hans Hagen via ntg-context
     [not found] <mailman.0.1629453601.23792.ntg-context@ntg.nl>
2021-08-22 22:55 ` Benjamin Buchmuller via ntg-context
2021-08-23  6:21   ` Hans Hagen via ntg-context
2023-02-06 17:21 Hans Hagen via ntg-context

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=ed455ae8-7ba2-ded0-16a8-4b8136b0f794@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=otared@gmail.com \
    /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).