0

I was creating a report using erdc template. I have modified erdc.cls because I don't have the fonts and don't want the hassle to install the non-free font it required.

What I did change inside the erdc.cls are: - comment out the font loading: \usepackage{mathgifg} - change every the font style : \fontseries{k} or \fontseries{h} with the more commonly supported b and m.

As substitute/override for the sans font, I load in the preamble section: \usepackage{berasans} and \usepackage{mathptmx} for the serif font.

If I compile this simple document:

\documentclass[oneside]{erdc}

\usepackage{mathptmx}
\usepackage{berasans}
\usepackage[T1]{fontenc}
\usepackage{blindtext}

\begin{document}
%   \maketitle
    \Blinddocument
\end{document}

I got error report:

Something's wrong--perhaps a missing \item. \Blinddocument

I could not trace the source of the problem. Please help, my experience in LaTeX are limited.

2

You shouldn't change a class without changing also its name.

Beside this: the definition of \section in the class is faulty. It uses \addpenalty without ensuring that it is in vertical mode. If you add a \par is should work:

\documentclass[oneside]{erdc}

\usepackage{mathptmx}
\usepackage{berasans}
\usepackage[T1]{fontenc}
\usepackage{blindtext}
\makeatletter
\renewcommand\section{%
  \par% added
  \addpenalty\@secpenalty\nobreak
  \secdef\@section\@ssection}
\makeatother  
\begin{document}
\Blinddocument
\end{document}
  • This is the answer, thank you so much. BTW, how do you trace to \section, when the log file mislead with "missing \item". – Yose Tuandrillo Apr 14 '18 at 14:04
  • And thank you for the reminder about the class naming. I have rename the modified class to erdc-x.cls, and re-install the original. – Yose Tuandrillo Apr 14 '18 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.