latex 傍注の作り方

投稿者: | 2025-09-22

このサイトを参考にして、ほんの少しマクロを変えてみた

https://oversleptabit.com/archives/453

%%%%%%%%%%%%%% 傍注のマクロ
\usepackage[top=2cm, bottom=2cm, left=2cm, right=6.5cm]{geometry}
\setlength{\marginparwidth}{5.0cm}
\newcounter{marginparcnt}
\newcommand{\theMarginparcnt}{$\dagger$\arabic{marginparcnt}}
\newcommand{\kmar}[2][-7pt]{%
  \stepcounter{marginparcnt}%
  {\renewcommand{\baselinestretch}{0.9}{\textcolor{black}{\textsuperscript{\theMarginparcnt}}%
  \protect\marginpar{\vskip#1\footnotesize\color{black}%
    \textsuperscript{\theMarginparcnt}
    {#2}}\par}}}
%%%%%%%%%%%%%%%%%
\renewcommand{\baselinestretch}{2.3}
\setlength{\parindent}{0pt}

カテゴリー: TeX