I am working on a document that uses a custom class. I want to change the class so that it would use the babel[magyar] instead of the english version.
However, when I try to do so, I get the following error message:
E: .../Tester.tex:10 Undefined control sequence \begin{abstract}
My document uses a custom definition for the abstract
environment, which works properly if babel is imported using:
\RequirePackage{babel}
Whenever I change this to:
\def\magyarOptions{defaults=safest}
\RequirePackage[magyar]{babel}
then compilation fails and I get the shown error message.
Can someone tell me how does this happens?
Update: I was asked to provide a minimum working example instead of the specification, here I used the article class, and replaced newenvironment with renewenvironment.
\documentclass{article}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\def\magyarOptions{defaults=safest}
\RequirePackage[magyar]{babel}
\renewenvironment{abstract}{
\checktoopen
\tttypeout{\abstractname}
\null\vfil
\thispagestyle{plain}
\begin{center}
{\huge\textit{\abstractname} \par}
\bigskip
\end{center}
}
\begin{document}{}
\begin{abstract}
The Thesis Abstract is written here (and usually kept to just this page). The page is kept centered vertically so can expand into the blank space above the title too\ldots
%% TODO: megírni
\end{abstract}
\section{asda}
This is a test document.
\end{document}
\documentclass{...}
, the required\usepackage
's,\begin{document}
, and\end{document}
. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.\checktoopen
and\tttypeout
within the definition of abstract. Not the \begin{abstract} itself.\checktoopen
andtttypeout
... i know those commands. The custom class is based onbook
, which does not define an abstract environment. Hence, the class file defines it itself.\RequirePackage
instead of\usepackage
? The former is meant only for package writers.