1

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

2

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}

output of code

|improve this answer|||||
  • 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
  • 1
    @pluton I've added an explanation. – Alan Munn Oct 30 '17 at 3:23

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.