如何在文档旁边的边距中创建简单的注释?

如何在文档旁边的边距中创建简单的注释?

我浏览了大量 SE 网站、软件包文档reledmacparallel许多其他页面,但还是找不到这个问题的简单答案。因此,为了帮助其他人,我将在这里发布答案。

我想要实现的目标是这样的: 右边距有很好的评论。

事实证明,我只是忽略了链接到维基百科页面。但如果这件事发生在我身上,也可能发生在其他人身上。

答案1

简单的答案是命令\marginpar{},或者为了获得更多的控制权,包marginnote。它们的用法如下所述这里。

上述问题中的示例是使用以下代码创建的:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{marginnote}

\begin{document}
Once upon a time, in the magical land of Equestria, there were two regal sisters who ruled together and created harmony for all the land. 
\marginpar{Comment 1}
To do this, the eldest used her unicorn powers to raise the sun at dawn; the younger brought out the moon to begin the night. Thus, the two sisters maintained balance for their kingdom and their subjects, all the different types of ponies.
$$sin^2(x)+cos^2(x) = 1$$
\marginnote{Comment 2}[-0.75cm]
More text explaining the Formula, discussing the deep philosophy behind math, science and nature in general.
\begin{figure}[h]
   \includegraphics[width=5cm]{example-image-a}
\end{figure}
\marginnote{Comment 3}[1cm]
And even more text. Did you know that 90\% of the Energy released in a thermonuclear supernova is being emitted via Neutrinos?

\end{document}

相关内容