ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Andres Conrado Montoya <andresconrado@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: notes in the margin
Date: Thu, 3 Oct 2019 20:32:53 -0500	[thread overview]
Message-ID: <CAGhDZhBHeyMvFCarbh6DQJuUdGeVkvm93B3EdjxmoEsXEeYztw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2936 bytes --]

I've been tinkering with this problem. It's kind of frustrating not having
a right solution for this.
After trying and failing to the last solution published by Hraban on
2018-02-12, I tried to implement my own approach, from the other way
around, I mean: not trying to implement notes as marginal material, but to
implement the *marginalia* as some type of notes. A different type, apart
from footnotes, with their own counter, etc.

Below, a MWE, with some caveats:.
1. This is a poor quality hack. I'm not a developer.
2. If notes are too long, they clash with each other. I tried to understand
the options that would allow me to move them up or down, according to the
Wiki (https://wiki.contextgarden.net/Command/inmargin), but they don't seem
to do anything, or I don't understand how to work with them. But if there
is actually a way to manually instruct \inmargin to move up or down, it
should be easy to make it work as an optional third argument, for example.
3. The counter introduces some horizontal space that I cant manage to
remove except by introducing manual negative \hspace. The MWE doesn't
include that space, to display the isse.
4.  There are probably a ton of issues I have not thought about, but this
seems to work for this project I'm working on, at least.

%%%%%%%%%%% Start MWE

\setuplayout[
    topspace=0.722in,
    header=0.311in,
    footer=0.622in,
    width=4.211in,
    height=9.622in,
    backspace=1.311in,
    rightmargin=1.8in,
    margindistance=24pt
]
\definecounter[marginales][way=bytext,prefix=no]
\def\romanMarginales{\convertnumber{r}{\rawcountervalue[marginales]}}
\def\marginal{\dosingleempty\doMarginal}
\def\doMarginal[#1]#2{%
  \incrementnumber[marginales]
  \iffirstargument
    \high{\romanMarginales}\inouter[#1]{\romanMarginales.\ #2}
  \else
    \high{\romanMarginales}\inouter{\romanMarginales.\ #2}
  \fi
}

\starttext
\dorecurse{6}{\input weisman And so on, and so on\marginal{This is a test,
with some words and some more words.}.\par \input thuan\par}
\stoptext

%%%%%%%%%%%%%%% Stop MWE

Andrés Conrado Montoya
Andi Kú
andresconrado@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org
----------------------------------------
Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.
----------------------------------------

“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell

[-- Attachment #1.2: Type: text/html, Size: 3720 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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
___________________________________________________________________________________

             reply	other threads:[~2019-10-04  1:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04  1:32 Andres Conrado Montoya [this message]
2019-10-04  7:57 ` Henning Hraban Ramm
     [not found] <4DE085F0-68F9-4441-BC06-FCFA33F4AE21@fiee.net>
2018-02-12 11:49 ` 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=CAGhDZhBHeyMvFCarbh6DQJuUdGeVkvm93B3EdjxmoEsXEeYztw@mail.gmail.com \
    --to=andresconrado@gmail.com \
    --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).