- Improve wrap objects.

- Debug.
This commit is contained in:
2025-09-11 16:42:59 -05:00
parent d1fd2fef22
commit 0e68ac723d
6 changed files with 130 additions and 102 deletions

View File

@@ -61,34 +61,24 @@
}%
}
\NewDocumentCommand{\marginfig}{O{} m m +m}{%
% Syntax:
% \marginfig[
% (width|height)=lengthvalue, or any other optional \includegraphics
% parameters
% ]{
% graphic_file_name
% }{
% label
% }{
% caption
% }
%
\NewDocumentCommand{\marginfig}{
% #1: Options passed to \includegraphics.
O{}
% #2: Graphic file name.
m
% #3: Label.
>{\TrimSpaces}m
+m
}{%
% This strut ensures that the margin figure is counted as part of the
% following paragraph and is vertically aligned with it.
\strut%
\marginalia{%
\MarginHyperSetup%
% \captionsetup{%
% type = figure,%
% justification = RaggedOutside,%
% }%
\begin{MyCaption}[
format={\RaggedOutside\small\color{caption}}
]{fig:#3}{#4}
\Centering\includegraphics[keepaspectratio,#1]{#2}%
\end{MyCaption}
% \noindent\captionof{figure}{#4}%
% \label{fig:#3}%
}%
}