# How to pass a string to a custom documentclass for use in pre-compiled preambles in lualatex?

I've got a heavy class definition and want to modify it for the use with precompiled preambles.

## Minimal example

preamble.tex

\documentclass{myClass}


main.tex

\ifdefined\preambleloaded\typeout{\preambleloaded}\else\input{preamble}\fi

\usepackage{blindtext}

\begin{document}
\blindtext
\end{document}


myClass.cls

\def\filename{myClass}

\NeedsTeXFormat{LaTeX2e}
\RequirePackage{fixltx2e}
\ProcessOptions\relax

\RequirePackage[english]{babel}
\RequirePackage{etoolbox}

\newcommand*{\@Author}{George Orwell}

\AtBeginDocument{

Hello World! My name is \@Author!
\newline

}


To compile the preamble.tex I use:

lualatex -ini -job-name="main" "&lualatex preamble.tex\dump"


and for the main.tex

lualatex -shell-escape "&main main.tex"


in TexStudio with an up-to-date MikTex distribution.

Everything works fine so far and I get

## Actual question

Now I'd like to pass the Author name to the class by defining/redefining it in the preamble, something like this:

preamble.tex

\documentclass[Aldous Huxley]{myClass}


or

\documentclass{myClass}
\renewcommand{\@Author}{Aldous Huxley}


## How can I do that?

I've also seen this question, but can't manage to apply it to my case.

\documentclass{myClass}
\renewcommand{\@Author}{Aldous Huxley}


would work if @ was a letter at that point (which it isn't here) or simpler just use the class defined \Author command.

This will work:

preamble.tex

\documentclass{myClass}
\Author{Aldous Huxley}


myClass.cls

\def\filename{myClass}

\NeedsTeXFormat{LaTeX2e}
\RequirePackage{fixltx2e}
\ProcessOptions\relax

\RequirePackage[english]{babel}
\RequirePackage{etoolbox}

\newcommand*{\@Author}{George Orwell}

\AtBeginDocument{

Hello World! My name is \@Author!
\newline

}