Code: Select all
\documentclass[a4paper,10pt]{article}
\ExplSyntaxOn
\RequirePackage{geometry}
\cs_new_protected:Nn \scand_leaf:
{ \geometry { paperwidth=21cm, paperheight=21cm,
left=8mm, right=8mm, top=8mm, bottom=8mm,
includehead, includefoot }}
\cs_new_protected:Nn \mangan_leaf:
{ \geometry { b5paper, left=8mm, right=8mm, top=8mm, bottom=8mm,
includehead, includefoot }}
\NewDocumentCommand {\leaf} { O{scand} }
{
\str_case:nnF {#1}
{
{scand} { \scand_leaf: }
{mangan} { \mangan_leaf: }
}
{
\scand_leaf:
%% \par leaf~Unsupported~Argument~#1
}
}
\ExplSyntaxOff
\leaf[alumin] % Generate text in document that alumin is unrecognised
\begin{document}
Some Text
\end{document}