如何才能使边注顶部对齐?
我尝试了诸如 heightadjust、deptadjust 等可选命令,但没有成功。
顺便说一句:我需要使用 marginnote-package。
\documentclass[fontsize=9pt, paper=a5]{scrreprt}
%\usepackage{showframe}
\usepackage[]{marginnote} % heightadjust deptadjust parboxrestore
\renewcommand*{\marginfont}{\sffamily\bfseries\footnotesize}
\usepackage{blindtext}
\begin{document}
\chapter{First Chapter}
{\Huge Huge to highlight the align effect.} \marginnote{121}
\blindtext
\marginnote{122} \blindtext
\end{document}
答案1
\documentclass[fontsize=9pt, paper=a5]{scrreprt}
%\usepackage{showframe}
\usepackage[]{marginnote} % heightadjust deptadjust parboxrestore
\renewcommand*{\marginfont}{\sffamily\bfseries\footnotesize}
\newsavebox\ABox\newsavebox\BBox
\newcommand\MarginNote[2][]{\sbox\ABox{#1#2}\sbox\BBox{#2}\marginnote{#2}[-\the\dimexpr\ht\ABox-\ht\BBox]}
\usepackage{blindtext}
\begin{document}
\chapter{First Chapter}
{\Huge Huge to highlight the align effect.} \MarginNote[\Huge]{121}
\blindtext
\MarginNote{122} \blindtext
\end{document}
如果没有可选参数则\MarginNote
始终使用当前字体大小。