[Tex/LaTex] How to change font-size of title text using \makeatletter

fontsizetitles

I tried to change the size of my title, and found this: How can I change the font size of the authors and the affiliation in Latex?, but I was unable to do it because an error message kept popping up that said:

No \title given. [...{\fontsize{40pt}{49.2pt}\selectfont\@title]

Any help would be welcome!

Here is my code so far:

\documentclass[11pt]{article} 

\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{fadings,patterns}
\renewcommand{\baselinestretch}{1.5}
\usepackage[margin=1.4in]{geometry}

\makeatletter
{\LARGE \@title}{\fontsize{40pt}{49.2pt}\selectfont\@title}{}{}
\makeatother

\newsavebox{\tempbox}
\newcommand\tikztextbf[1]{%
  \begin{tikzfadingfrompicture}[name=tikztitle]
    \node [text=white] {\normalfont \Large \bfseries #1};
  \end{tikzfadingfrompicture}
  \begin{lrbox}{\tempbox}%
    \begin{tikzpicture}
      \node [text=white,inner sep=0pt,outer sep=0pt] (textnode) {\normalfont \Large \bfseries #1};
      \shade[path fading=tikztitle,fit fading=false,left color=green,right color=black]
      (textnode.south west) rectangle (textnode.north east);
\end{tikzpicture}%
  \end{lrbox}
  \textbf{\usebox\tempbox{}}%
}

\title{\tikztextbf{The logic of tautologies!!}} 
\author{D.R.}
\date{}

\begin{document}

\maketitle
\end{document}

Best Answer

Just change

\normalfont \Large \bfseries

to

\fontsize{40pt}{49.2pt}\selectfont

or whatever you wish it to be.

{\LARGE \@title}{\fontsize{40pt}{49.2pt}\selectfont\@title}{}{}

This tells LaTeX to do the following:

  1. Switch to \LARGE.
  2. Typeset the title.
  3. Switch to 40pt font with 49.2pt baseline skip.
  4. Typeset the title again.

Moreover, you are telling LaTeX to do this before:

  1. \begin{document};
  2. specifying a title.

Try to see it from LaTeX's perspective: what can it do but complain?