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