My goal is to write something like this within a LaTex document:
\section{Introduction}
\makemarksummary{section{Introduction}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua\mymark{Elephants}.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip exea commodo consequat\mymark{Ducks}.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident\mymark{Leopards}, sunt in culpa qui officia deserunt mollit
anim id est laborum.
And have it render something like this:
1 Introduction
Elephants - Ducks - Leopards
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Additional things I'd like to do include:
Remove duplicates in the
makemarksummary
(so if I have two \mymark{Elephants}, only one instance is displayed)Be able to sort the order of the
mymarks
withinmakemarksummary
Also include a second argument in
mymark
so I can display the content of that as amarginpar
This question is tagged with "labels" because I had to tag something, but I am not talking about marking specific objects (such as a \section
), but rather points within text (more like \marginpar
or \footnote
). Additionally, sorry if this is a duplicate question - it feels like some existing command or package must do this already, but I can't work out how to articulate it well enough to search for it.
\makemarksummary
command? – siracusa Oct 23 at 11:22.aux
) and have it read back in on the next run. I can't honestly see why you'd want to do this - it is hard to think of a use case, so I don't know that I'd expect somebody else to have invented this particular wheel already. – cfr Oct 24 at 3:14