# ASME latex class: indentation of first paragraphs

The ASME Latex class sadly activates indentations of first paragraphs. Do you know where this happens?

https://www.overleaf.com/latex/templates/asme-journal-article-template/wspcsrrzjpmq

Usually you shouldn't change the styles of journal classes, since they are designed that way to meet the requirements of the journal. But if you really want to do this, you can use the xpatch package to patch \@startsection, which is where the relevant boolean is set.

This class loads the outdated times package, and probably shouldn't be used unless you have to submit to the journal (in which case you shouldn't mess around with it at all.)

Explanation

The way \@startsection is defined in the LaTeX kernel, it suppresses the indentation after the section heading only if the before skip value (the skip above the heading) is negative. In the standard classes, this skip is negative, and so the indentation in suppressed. But in the asme2ej class, it's positive, and so the indentation is not suppressed.

\documentclass[twocolumn]{asme2ej}
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\@startsection}{\@afterindenttrue}{\@afterindentfalse}{}{}
\makeatother
\usepackage{lipsum}
\begin{document}
\section{A section}
\lipsum
\end{document}

• yes, their class is crap. However, we might have to use. I still do not understand one thing: by default, Latex does not indent first paragraphs. And this class seems to change this, but where? – pluton Oct 30 '17 at 3:14
• @pluton I've added an explanation. – Alan Munn Oct 30 '17 at 3:23