\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ysbeamerarticle}
\def\@classoptionslist{french}
\PassOptionsToClass{french,10pt,a4paper,DIV=18}{scrartcl}
\PassOptionsToClass{french,aspectratio=43}{beamer}
\RequirePackage{luacode}
\@ifundefined{beamerarticle}{\def\CLASSNAME{beamer}}{\ifnum \beamerarticle = 1  \def\CLASSNAME{scrartcl}\else \def\CLASSNAME{beamer}\fi}%
%
\begin{luacode*}
local beamer = [[\def\CLASSNAME{beamer}]]
local scrartcl = [[\def\CLASSNAME{scrartcl}]]
if string.sub(tex.jobname, -5) == "-PRES" then
tex.print(beamer)
elseif string.sub(tex.jobname, -6) == "-PRINT" then
tex.print(scrartcl)
end
\end{luacode*}
\LoadClass{\CLASSNAME}

\endinput
 
