答案1
这可能是个开始,但需要大量仔细的手动调整,它将文本设置为宽列分隔,并修补 marginpar 以将注释放在内部。但是,系统不会尝试避免不同列的边距注释发生冲突,您必须手动调整它们的垂直偏移。
\documentclass[twocolumn,twoside]{article}
\usepackage{etoolbox}
\def\a{One two three four filve six seven eight nine ten eleven twelve.}
\def\b{\a\ \a\ Red yellow blue. \a\ \a\ \a\ \a\ \a\ \a}
\newcounter{zzz}
\def\zz#1{{%
\refstepcounter{zzz}\textsuperscript{\thezzz}%
\marginpar{\textsuperscript{\thezzz}#1}%
}}
\makeatletter
\patchcmd\@addmarginpar{\if@firstcolumn}{\unless\if@firstcolumn}{}{}
\makeatother
\setlength\columnsep{3cm}
\begin{document}
\subsection{Zzzz}
\b aa bb\zz{this} \a\zz{zzzz}\b
\subsection{ZzZzzzz}
Zzzz\zz{that}. Apples\zz{fruit} oranges pears. \b\b\b\b
Something\zz{The other}
\a\zz{another note} \b\b\b
\end{document}
答案2
再次感谢 David Carlisle 提供的答案!在此基础上,我做了一些改进。文本不再那么容易发生冲突。(尽管还不完美)。格式也更好了。
如果其他人感兴趣的话,这里是代码:
\documentclass[10pt, a4paper, twocolumn, twoside, openright]{memoir}
\usepackage{etoolbox}
\usepackage{ragged2e}
\usepackage{qrcode} % for qr code example
\usepackage{lipsum} % for blindtext
\usepackage{fontawesome} % for symbols
\newcounter{mySideNoteCounter}
\makeatletter
\def\mySideNote#1{{%
\refstepcounter{mySideNoteCounter}\textsuperscript{\themySideNoteCounter}
\if@firstcolumn
\marginpar{\RaggedRight\fussy\footnotesize\textit{\textcolor{red}{\faCaretLeft~}\textsuperscript{\themySideNoteCounter}\\ #1}}
\else
\marginpar{\textsuperscript{\themySideNoteCounter}\RaggedLeft\fussy\footnotesize\textit{\textcolor{red}{~\faCaretRight}\\ #1}}
\fi
}}
\makeatother
\makeatletter
\patchcmd\@addmarginpar{\if@firstcolumn}{\unless\if@firstcolumn}{}{}
\makeatother
\setlength\columnsep{3.5cm}
\setlength\marginparsep{0.2cm}
\setlength\marginparwidth{3cm}
%\makeatletter
%\newcommand{\LorR}{%
% \if@firstcolumn
% LEFT%
% \else
% RIGHT%
% \fi
%}
%\makeatother
\begin{document}
\section{Section}
\subsection{Subsection}
TEXT\mySideNote{Information.\faBarChart}
\lipsum[1] Text text TEXT\mySideNote{Info}
\subsection{Subsection}
%\LorR
TEXT\mySideNote{A little note!}
Some text is written here. It is not very interesting. Just for testing. Simply ignore it.
TEXTTEXT\mySideNote{Here is a side note! Some interesting information here}
\lipsum[1]
\mySideNote{Look:\\\qrcode{https://www.ctan.org/tex-archive/macros/latex/contrib/qrcode?lang=en}} \lipsum[2]
HELLO\mySideNote{Some more information here!}
\lipsum[1]
TEXT\mySideNote{Look? There's another marginnote!}
\lipsum[5-8]
MORE TEXT \mySideNote{And again a margin note! Extraordinary, even some qr code!\\\qrcode{https://www.ctan.org/tex-archive/macros/latex/contrib/qrcode?lang=en}}
\lipsum[1]
\end{document}
这会给出以下结果:
欢迎提出任何关于如何实现分隔线的想法!我找不到答案。
另外,想知道如何按照 Frank Mittelbach 的说法来安排它,那也很有趣。也就是说,使用中间边距来做脚注。顶部边距用于左栏,底部边距用于右栏。
PS 我是最初发布该问题的用户 145210。当我完成注册时,它没有更新帐户。不知道那里发生了什么。