Add command for generating unique secton labels.

This commit is contained in:
Silcantar
2025-09-15 23:55:17 -05:00
parent 5e578de497
commit f4ba849bb3
4 changed files with 96 additions and 9 deletions

View File

@@ -62,24 +62,24 @@
}
\NewDocumentCommand{\MarginFig}{
% #1: Options passed to \includegraphics.
O{}
% #2: Graphic file name.
% #1: Graphic file name.
m
% #2: Options passed to \includegraphics.
O{}
% #3: Label.
>{\TrimSpaces}m
% #4: Caption.
+m
}{
% This strut ensures that the margin figure is counted as part of the
% This mbox ensures that the margin figure is counted as part of the
% following paragraph and is vertically aligned with it.
%\strut {\setlength{\parskip}{0pt} \par} \strut
\mbox{
\marginalia{
\MarginHyperSetup
\begin{MyCaption}[
format={\RaggedOutside\small\color{captionColor}}
]{fig:#3}{#4}
\Centering\includegraphics[keepaspectratio,#1]{#2}
\Centering\includegraphics[keepaspectratio,#2]{#1}
\end{MyCaption}
}
}