I'm trying to use the titlesec package with the dgruyter style from this page, and I get a compilation error "Error: Entered in horizontal mode." Many questions already exist for this error, but none of the answers seem to apply: this error usually arises when using the package commands with e.g. the wrong number of arguments, here, it doesn't matter which commands I use, and even if I don't use any commands, compilation still fails.
Repro steps:
- Download popets.zip
- Unzip it:
unzip popets.zip && cd popets - In the directory, create a new file
repro.tex - Fix the error mentioned here:
sed -e '/ngerman/ s/^%*/%/' -i dgruyter_NEW.sty
\documentclass[USenglish,oneside,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[big]{dgruyter_NEW}
\usepackage[compact]{titlesec}
\begin{document}
\section{section}
content
\end{document}
- Try to compile it:
pdflatex repro. This returns the error! Package titlesec Error: Entered in horizontal mode.
Which part of the .sty file should I try removing or modifying to fix this? Alternatively, is there a way to reduce spacing before/after headings that doesn't involve the titlesec package? (This is all I want to do.)