Refine marginfig macro.

This commit is contained in:
2025-07-08 17:24:19 -05:00
parent e0e6969a63
commit 5871ec80da

View File

@@ -171,8 +171,8 @@
\textsf{\textbf{
\Glsentryname{#2}:% Create the title of the margin note.
}}
\glsdesc*{#2}
}[#1]% Create the text of the margin note.
\glsdesc*{#2}% Create the text of the margin note.
}[#1]%
}
% Put a footnote in a margin note.
@@ -180,16 +180,17 @@
\newcommand{\mnote}[2][0pt]{%
\footnotemark
\marginnote{
\footnotemark[\value{footnote}]#2}[#1]
\footnotemark[\value{footnote}]#2
}[#1]
}
\RequirePackage[hypcap=true]{caption}
\newcommand{\marginfig}[2]{%
\marginnote{
\newcommand{\marginfig}[3][0pt]{%
\marginnote{%
\captionsetup{type=figure}%
{\centering\includegraphics{#1}\par}
\captionof{figure}{#2}
}
{\centering\includegraphics{graphics/#2}\par}%
\captionof{figure}{#3}\label{fig:#3}%
}[#1]
}
%#endregion