I am doing documentation for my company i.e. writing countless documents which uses the same referred preamble in a file for itself.
The preamble is over 500 lines, so I want to avoid posting it here.
My only question is, when defining the document title in the documents, and defining the preamble in another file for itself, how do i display the title in the header? Not any sections, but the title itself.
Expanding on @Gunter's answer:
Some MWE:
\documentclass[11pt,norsk, fleqn, leqno]{extarticle}
\usepackage[a4paper, left=0.6in,right=0.6in,top=0.6in,bottom=0.9in,includeheadfoot]{geometry}
\usepackage{fancyhdr}
\makeatletter
\edef\mytitle{@title}
\makeatother
\lhead{picture}
\chead{\mytitle}
\rhead{\parbox[t]{2cm}{\hfill Side \thepage}}
\begin{document}
\textbf{\title{\LARGE A title of something}}
\maketitle
Test text.
\end{document}
When running this code I get the same error as in my other documents with the long preamble. Namely:
Undefined control sequence. [\edef\mytitle{\@title]
\makeatletterand\makeatotherpart as well? This is important for the\@titleto work. – Gunter Jun 07 '21 at 16:10