From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: notes in the margin
Date: Mon, 12 Feb 2018 12:49:40 +0100 [thread overview]
Message-ID: <75181E8F-C5C7-4518-8488-E7C8B3131718@fiee.net> (raw)
In-Reply-To: <4DE085F0-68F9-4441-BC06-FCFA33F4AE21@fiee.net>
[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]
Ahoi,
I’m still working on this issue.
For the usual cases, the current mechanism is good (see attachment).
* I gave up on the number placement in its own line (without text indent).
* Footnotes in captions mostly disappear.
* Footnotes in captions or other boxed environments (chapter title in my case) get misplaced, e.g. if a figure is narrower than \textwidth, the margin note is moved into the textarea by the difference.
\startplacefigure[location=here,title={Some caption\footnote{Source of the image. This disappeares or gets misplaced}}]
\externalfigure[cow]%[width=.8\textwidth]
\placelocalfootnotes % doesn’t change anything
\stopplacefigure
* Further, in some cases it would be good to move the margin note by a few lines higher or lower.
\inmargin has this first parameter: "+ - low" in reference, e.g. \inmargin [method=first,voffset=-6pt] in source typo-mar.mkiv)
I just need a way to transfer this option through \footnote: I used a global definition that I redefine where I need it:
\def\FNVOffset{0} % vertical shift of footnotes in negative lines
% this is unclean, but works quite well
\define\PlaceFootnote%
{\inmargin[voffset=\dimexpr-\FNVOffset\lineheight\relax]{\vtop{\placelocalnotes[footnote][before=,after=]}}}
\def\FNo#1{{\ss\tfx #1}}
\setupnote[footnote]
[location=text,
bodyfont=,
indenting=no,
before={\noindent},
next=\PlaceFootnote]
\setupnotation[footnote][
way=bychapter,
align=flushleft,
style={\ss\tfx},
indenting=no,
location=serried,
alternative=serried,
width=broad,
numbercommand=\FNo,
]
\setuptexttexts[margin][]
[{\framed[
align={flushleft,bottom},
frame=off,
height=\textheight,
width=\rightmarginwidth]{%
\strut\vfill\placenotes[footnote]}}]
\setupmargindata[inmargin][location=outer,stack=continue,align=flushleft,style={\ss\tfx}]
\setupmargindata[inouter][location=outer,stack=continue,align=flushleft,style={\ss\tfx}]
Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD
[-- Attachment #2: sidenotetest.tex --]
[-- Type: application/octet-stream, Size: 1957 bytes --]
%
\usemodule[visual]
\setuplayout[
location=doublesided,
width=12cm,
rightmargindistance=0.5cm,
rightmargin=5cm]
\setuppagenumbering[alternative=doublesided]
\setupmargindata[inmargin][location=outer,stack=continue,align=flushright]
\setupmargindata[inouter][location=outer,stack=continue,align=flushright,style={\ss\tfx}]
\def\FNVOffset{0} % Negative vertical offset of footnotes [lines]
\define\PlaceFootnote
{\inmargin[voffset=\dimexpr-\FNVOffset\lineheight\relax]{%
\vtop{\placelocalnotes[footnote][before=,after=]}}}
\def\FNo#1{{\ss\tfx #1}}
\setupnote[footnote]
[location=text,
bodyfont=,
indenting=no,
before={\noindent},
next=\PlaceFootnote]
\setupnotation[footnote][
way=bychapter,
align=flushleft,
style={\ss\tfx},
indenting=no,
location=serried,
alternative=serried,
width=broad,
numbercommand=\FNo,
]
\setuptexttexts[margin][]
[{\framed[
align={flushright,bottom},
frame=off,
height=\textheight,
width=\rightmarginwidth]{%
\strut\vfill\placenotes[footnote]}}]
% different approach:
\definecounter[Mnote][way=bychapter,prefix=no]
\def\mnote#1{%
\incrementcounter[Mnote]%
\high{\color[mnotemark]{\convertedcounter[Mnote]}}%
\inouter{{%
\ss\tfx%
\color[mnotemark]{\convertedcounter[Mnote]}\crlf #1\blank[yes]}}%
}
\starttext
\dorecurse{2}{
\startchapter[title={C \fakewords{2}{10}}]
\dorecurse{10}{
\startsection[title={\fakewords{1}{10} S\recurselevel\footnote{\fakewords{3}{20}}}]
\fakewords{10}{100})\footnote{\fakewords{3}{50}FN}
\fakewords{10}{100}\footnote{\fakewords{3}{50}FN}
\startplacefigure[location=here,
title={\fakewords{2}{10}\footnote{\color[red]{\fakewords{3}{50}CN}}}]
\fakeimage{3cm}{8cm}{5cm}{20cm}
%\fakeimage{0.5\textwidth}{\textwidth}{5\lineheight}{20\lineheight}
\stopplacefigure
\fakewords{10}{100}
\stopsection}
\stopchapter}
\stoptext
[-- Attachment #3: Type: text/plain, Size: 2 bytes --]
[-- Attachment #4: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next parent reply other threads:[~2018-02-12 11:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4DE085F0-68F9-4441-BC06-FCFA33F4AE21@fiee.net>
2018-02-12 11:49 ` Henning Hraban Ramm [this message]
2019-10-04 1:32 Andres Conrado Montoya
2019-10-04 7:57 ` Henning Hraban Ramm
-- strict thread matches above, loose matches on Subject: below --
2017-03-30 8:30 Henning Hraban Ramm
2017-04-04 8:27 ` Henning Hraban Ramm
2017-04-05 18:42 ` Pablo Rodriguez
2017-04-08 17:01 ` Henning Hraban Ramm
2017-04-09 11:05 ` Pablo Rodriguez
2017-04-09 19:46 ` Wolfgang Schuster
2017-10-24 7:54 ` Henning Hraban Ramm
2018-01-23 21:01 ` Henning Hraban Ramm
2001-12-20 22:54 Notes in the Margin Henning Hraban Ramm
2001-12-21 17:52 ` Hans Hagen
2001-12-21 22:51 ` Henning Hraban Ramm
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=75181E8F-C5C7-4518-8488-E7C8B3131718@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).