I am trying to build a class with a title block (using titling) such that the end user enters data into two fields. One variable is sopchaptertitle, and the other is sopchapternumber. I want to then concatenate them, and place the resulting title some distance from the top of the page and centered on the page. This will be followed by some distance of white space and the first section.
It should look something like this:

This is my code:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{sop}
% Passes and class options to the underlying article class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}
% Redefine the page margins
\RequirePackage[left=1in,right=1in,top=.75in,bottom=.75in]{geometry}
% Modifications to the section titles
\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}
\renewcommand*\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
% Title block
\RequirePackage{titling}
\newcommand{\sopchaptertitle}[1]{\newcommand{\thesopchaptertitle}{#1}}
\newcommand{\sopchapternumber}[1]{\newcommand{\thesopchapternumber}{#1}}
\let\oldtitle\title
\renewcommand{\title}[1]{\oldtitle{#1}\newcommand{\mythetitle}{#1}}
\let\oldpretitle\pretitle
\renewcommand{\pretitle}[1]{\oldpretitle{#1}\newcommand{\mythepretitle}{#1}}
\let\oldposttitle\posttitle
\renewcommand{\posttitle}[1]{\oldposttitle{#1}\newcommand{\mytheposttitle}{#1}}
\renewcommand{\maketitle}{%
\mythepretitle{\setlength{\droptitle}{12.0cm}\begin{center}\LARGE}
\mythetitle{\thesopchaptertitle\ \thesopchapternumber}
\mytheposttitle{\par\end{center}\vskip 0.5em}
}
%.... a page N of M section (which works)
% For easier customization of itemized, enumerated, and other lists
\RequirePackage{enumitem}
% For hyperlinked cross-references
\RequirePackage{hyperref}
% Ensure first page is correct style
\thispagestyle{plain}
% That's all, folks!
\endinput
It is being fed this:
\documentclass[10pt]{sop}
%
% SOP Standard Form Data
\sopchaptertitle{This is my procedure title}
\sopchapternumber{this is my procedure number D.4}
%...more of the above
%Here begins the actual document
\begin{document}
\maketitle
\section{Main Title}
\section{Approval}
Approval1....\makebox[1.5in]{\hrulefill}\\\vspace{1.5in}
Approval2....\makebox[1.5in]{\hrulefill}
\newpage
\section{Purpose and Discussion}
%...more of the above...
\end{document}
And I am getting these errors:
(/usr/share/texmf/tex/latex/oberdiek/rerunfilecheck.sty)))
! Missing = inserted for \ifnum.
<to be read again>
M
l.4 \sopchaptertitle
{this is my procedure title}
?
! Missing number, treated as zero.
<to be read again>
M
l.4 \sopchaptertitle
{this is my procedure title}
?
And
(/usr/share/texmf/tex/generic/oberdiek/gettitlestring.sty)) (./sop-test.out)
(./sop-test.out)
! Undefined control sequence.
\HyOrg@maketitle ->\mythepretitle
{\setlength {\droptitle }{12.0cm}\begin {c...
l.15
?
! Extra }, or forgotten \endgroup.
\HyOrg@maketitle ...12.0cm}\begin {center}\LARGE }
\mythetitle {\thesopchapt...
l.15
?
! Undefined control sequence.
\HyOrg@maketitle ... {center}\LARGE } \mythetitle
{\thesopchaptertitle \ \th...
l.15
?
! Undefined control sequence.
\HyOrg@maketitle ...apternumber } \mytheposttitle
{\par \end {center}\vskip ...
l.15
?
! Missing } inserted.
<inserted text>
}
l.15
?
The braces seem balanced, and everything but the droptitle seems to work.
Could someone please explain why droptitle is not functioning?

hyperrefinvolved but your code doesn't load it. – egreg Mar 7 at 17:31hyperref, as it's the package that uses the prefixHyOrgfor commands it redefines. – egreg Mar 7 at 20:18titlingpackage. – Yiannis Lazarides Mar 7 at 20:20