I'm using a two custom chapterstyle, one for the main document and one for the backmatter. While it is recognizing and rendering both styles, I get extra text. In the preamble I have the main style:
\usepackage{pgfornament}
\makechapterstyle{myheading-1}
{\renewcommand\chapternamenum{\fontsize{20}{20}\centering}
\renewcommand\printchaptername{}
\renewcommand\midchapskip{1ex}
\renewcommand\chaptitlefont{\fontsize{18}{18}\scshape\centering}
\renewcommand\afterchaptertitle{%
\par\centering%
\raisebox{1ex}{\pgfornament[scale=0.35]{88}}\par\nobreak\vspace{3ex}}
}
\chapterstyle{myheading-1}
\makepagestyle{chapter}
{\thispagestyle{empty}
}
And then I have my main document.
At the end, I have:
\backmatter
\makechapterstyle{afterwards}
{
\setlength{\beforechapskip}{-50pt}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\chaptitlefont{\fontsize{18}{18}\scshape\centering}
\renewcommand\afterchaptertitle{%
\par\centering%
\raisebox{1ex}{\pgfornament[scale=0.35]{88}}\par\nobreak\vspace{3ex}}
}
\chapterstyle{afterwards}
Followed by an about the author, reading list, and bibliography.
The new style renders correctly (it's the same style, set higher on the page) however, in the PDF exported I get a page that is empty of everything but the text "1ex."
How do I get rid of this extra text and what is a better way to include two different custom styles? (I initially tried including both styles in the preamble. Got lots of errors)
Notes: I am using memoir, and coding via Lyx. The backmatter and backmatter chapter style are in a "Tex Code" block between the final chapter and the beginning of the after-content.