I'm new to Latex and struggling to properly format a specific cover for my article.
I have the following code that fulfils what is expected from it and even compiles. However, the "Illegal parameter number in definition of \AP@" error appears when compiled.
What needs to change for the error to disappear?
\usepackage{afterpage}
\afterpage{
\newgeometry{textwidth=\paperwidth, textheight=\paperheight, noheadfoot, nomarginpar}
\newenvironment{capa}[2]{
\begin{list}{}{
\setlength{\topskip}{0pt}
\setlength{\leftmargin}{#1}
\setlength{\rightmargin}{#2}
\setlength{\listparindent}{0pt}
\setlength{\itemindent}{0pt}
\setlength{\parsep}{\parskip}
\setlength{\parindent}{0mm}
}
\item[]}{\end{list}}
\definecolor{grayish}{RGB}{89,89,89}
\centering
\includegraphics[scale=0.4]{xxxxxxxx} \\
\begin{capa}{7.9cm}{1.9cm}
\vspace*{65mm}
\noindent{
\textcolor{grayish}{\LARGE{xxxxxxxxx}}}
\vspace*{9mm}\\
\textcolor{grayish} {\LARGE { \noindent{ \textbf{xxxxxxxx}}} \\}
\vspace*{50mm}
\noindent { \textcolor{grayish} {\large{xxxxxxxxx}} \\ \\
\textcolor{grayish} {\large{xxxxxxxxx}}} \\
\\
\noindent {\textcolor{grayish} {\large{xxxxxxx }}\\
\textcolor{grayish} {\large{ \textit {xxxxxxxx}}}}
\vspace*{30mm}
\Small {ffffefefefe}
\newpage
\end{capa}
\restoregeometry}
Thanks for the help! Cheers.
capa, use##1and##2not#1and#2. But\newenvironmentwill work only once, it would be better to move this definition to somwhere else. – Dec 11 '18 at 15:04\newenvironmentpreamble-only... – Dec 11 '18 at 16:04