I am using apa7 package in writing a manuscript (\documentclass[man]{apa7}).
I am trying to add margin notes/annotation next to (some lines of) some paragraphs that summarize the gist of it, to show why I have written those paragraphs and why I've chosen to place it at that place in the manuscript.
Searching for similar questions on TeX.SE (e.g., the first 50 search results) did not lead me to a solution.
(I know apa7 manuscript document type has limitations and is not meant to look too good/pleasing, though, at this stage of our writing, I need to use APA manuscript formatting before it is typeset for publication.)
Desired result
Ideally, I would like such margin annotations to appear on the left side of the text, with a vertical direction:
Additionally, having a vertical line next to the paragraph would be helpful:
It would be great if it is done by a macro (?) that would allow turning it on/off in the preamble for the whole document (like this solution for colored comments) for, e.g., when we want a clean PDF without manually removing all the notes.
Current solution and shortcoming
As far as my not-so-deep knowledge of TeX allowed me, as a dirty remedy, I tried using \marginpar{...} and \todo[noline]{...} (from todonotes package) to somehow allow me to write on the margins.
However, I wasn't able to change the direction of the text.
Furthermore, the text wraps terribly bad, and I could not put them on the left margin.
Here is what I am getting:
And here is a (not-so-brief) MWE to reproduce it:
\documentclass[man]{apa7}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{bibliography.bib}
\usepackage{todonotes}
\title{Sample APA-Style Document Using the \textsf{apa7} Package with marginpar/todonotes}
\author{ManuHaq}
\affiliation{A University Somewhere}
\leftheader{ManuHaq}
\abstract{This is an MWE for TeX.SE, that asks for margin notes in an APA7 manuscript.}
\keywords{APA style, demonstration, marginpar, todonotes}
\begin{document}
\maketitle
As any dedicated reader can clearly see, the Ideal of practical reason is a representation of,as far as I know, the things in themselves; as I have shown elsewhere, the phenomenashould only be used as a canon for our understanding.
\marginpar[left]{A margin note that, unfortunately, doesn't wrap well :(}
The paralogisms of practical reasonare what first give rise to the architectonic of practical reason.
As will easily be shown inthe next section, reason would thereby be made to contradict, in view of theseconsiderations, the Ideal of practical reason, yet the manifold depends on the phenomena
Let us suppose that the noumena have nothing to do with necessity, sinceknowledge of the Categories is a posteriori.
Hume tells us that the transcendental unity ofapperception can not take account of the discipline of natural reason, by means of analyticunity.
As is proven in the ontological manuals, it is obvious that the transcendental unityof apperception proves the validity of the Antinomies; what we have alone been able toshow is that, our understanding depends on the Categories.
It remains a mystery why theIdeal stands in need of reason. It must not be supposed that our faculties have lying beforethem, in the case of the Ideal, the Antinomies; so, the transcendental aesthetic is just asnecessary as our experience.
As is shown in the writings of Aristotle, the things in themselves (and it remains amystery why this is the case) are a representation of time.
\todo[noline]{A todonote with no line. As you see, the text again doesn't wrap well :(}
Our concepts have lying before them the paralogisms of natural reason, but our a posteriori concepts have lying before them the practical employment of our experience.
Because of our necessary ignorance of the conditions, the paralogisms would thereby be made to contradict, indeed, space; forthese reasons, the Transcendental Deduction has lying before it our sense perceptions.
(Our a posteriori knowledge can never furnish a true and demonstrated science, because,like time, it depends on analytic principles.)
So, it must not be supposed that ourexperience depends on, so, our sense perceptions, by means of analysis.
\end{document}
One final wish
It would be great if the vertical margin note wrap if it exceeds the paragraph length, or just allow adding manual line breaks in it.




notedenvironment?) – psyguy Feb 07 '22 at 08:58\notefornextparagraph{Some notes next to the upcoming paragraph}such that instead of putting the paragraph inside the environment, it would attach the comment next to the upcoming paragraph? – psyguy Feb 08 '22 at 09:37\newenvironment{noted}[2][Periwinkle]{...}. However, I cannot use it to color the\rulecommand that draws the line; with\color{#1}\rule{...}{...}and\textcolor{#1}{\rule{...}{...}}I getIllegal parameter number in definition of \endnoted.andPackage xcolor Error: Undefined color '##1', among other errors. Could you enlighten me? – psyguy Feb 09 '22 at 12:08\def\passparameter{#1}in order to pass#1to the second half (implemented as\endnoted}. – John Kormylo Feb 09 '22 at 14:06