From 5871ec80dacb6c153e6bdfdda911e6bf88df768e Mon Sep 17 00:00:00 2001 From: Joshua Lucas Date: Tue, 8 Jul 2025 17:24:19 -0500 Subject: [PATCH] Refine marginfig macro. --- PrimeManual.sty | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/PrimeManual.sty b/PrimeManual.sty index 2be2caf..28dc2b1 100644 --- a/PrimeManual.sty +++ b/PrimeManual.sty @@ -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