HarveySheppard/yLaTeX

yMarginDesign error "...\scr@load@hook undefined"

Opened this issue · 0 comments

Hello, is it possible for you to help me fix the yMarginDesign package in the same manner you fixed the infoBulle package for the pgf keys? I love using your packages and have been using them since 2018.

I know that you do not currently have the yMarginDesign on your GitHub repo, so I have included it here. Thanks for your help and time!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																			   %
%																			   %
%								yMarginDesign								   %
%																			   %
%																			   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Copyright Yves Zumbach 2017
%-------------------------------------------------------------------------------

% This work is distributed under the LPPL
%-------------------------------------------------------------------------------

% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is Yves Zumbach



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Required Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{xparse}
\RequirePackage{marginnote}
\RequirePackage{marginfix}
\RequirePackage{ragged2e}
\RequirePackage{interfaces-base}
\LoadInterface{pgfkeys}
\RequirePackage{xcolor}
\RequirePackage{changepage}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Global Options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Configuration command
\DeclareDocumentCommand{\yMarginDesignConfiguration}{m}{\pgfkeys{/yMarginDesign/.cd, #1}}

% Colors
\pgfkeys{
	/yMarginDesign/.cd,
	emph color/.store as color,
	emph color = black,
	text color/.store as color,
	text color = black,
}

% Marginparskip
\pgfkeys{
	/yMarginDesign/.cd,
	marginparskip/.store as dimen,
	marginparskip = 3mm,
}

% Size of the margin text
\pgfkeys{
/yMarginDesign/.cd,
size/.code = \footnotesize,
}

% Style of the margin title
\pgfkeys{%
	/yMarginDesign/.cd,
	titleFormat/.code = \normalsize\color{\pgfkeysvalueof{/yMarginDesign/emph color}}
}

% Marginpar alignment
% Default: inner of the page, only compatible with memoir
\pgfkeys{
	/yMarginDesign/alignment/.code = {\strictpagechecktrue\checkoddpage\ifoddpage\RaggedRight\else\RaggedLeft\fi}
}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Margin Paragraphs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Typeset a paragraph in the margin
\DeclareDocumentCommand{\marginElement}{m}{%
	\marginpar{{%
		\pgfkeys{/yMarginDesign/alignment}%
		\pgfkeys{/yMarginDesign/size}%
		\color{\pgfkeysvalueof{/yMarginDesign/text color}}
		#1\par\vspace{\pgfkeysvalueof{/yMarginDesign/marginparskip}}%
	}}\unskip%
}%

% The mark for the marginNote
\DeclareDocumentCommand{\marginMark}{m}{{\color{\pgfkeysvalueof{/yMarginDesign/emph color}}#1.~}}

\DeclareDocumentCommand{\printMarginNoteMark}{}{%
	\@ifpackageloaded{hyperref}%
		{{\hypersetup{linkcolor=\pgfkeysvalueof{/yMarginDesign/emph color}}\footnotemark}}%
		{\textcolor{\pgfkeysvalueof{/yMarginDesign/emph color}}{\footnotemark}}%
}

% Typeset a paragraph in the margin with a number (as a footnote) 
\DeclareDocumentCommand{\marginNote}{m}{%
	\printMarginNoteMark
	\ignorespaces%
	\marginElement{%
		\marginMark{\thefootnote}%
		\ignorespaces%
		#1%
	}%
}%

% Typeset a paragraph in the margin exactly at the exact position where the command is called
\DeclareDocumentCommand{\forcedMarginElement}{m}{%
	\marginnote{%
		\pgfkeys{/yMarginDesign/alignment}\footnotesize%
		#1%
	}%
}

% Typeset a paragraph in the margin exactly at the exact position where the command is called with a number (as a footnote)
\DeclareDocumentCommand{\forcedMarginNote}{m}{%
	\printMarginNoteMark
	\ignorespaces%
	\forcedMarginElement{%
			\sideMark[#1]{\thefootnote}%
			\ignorespaces%
			#1%
	}%
}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Margin Design Elements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareDocumentCommand{\marginTitle}{m}{{\pgfkeys{/yMarginDesign/titleFormat}#1}\\}