Quantcast
Channel: How to remove indentation from the first paragraph after \chapter in twocolumn mode? - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

How to remove indentation from the first paragraph after \chapter in twocolumn mode?

$
0
0

Here's the minimal example for my issue:

\documentclass[twocolumn]{book}\begin{document}\chapter{Test}This is a paragraph of text, which is hopefully long enough for the text to wrap on the next line and thus show the paragraph indent problem.\end{document}

When I compile it, it indents the paragraph after \chapter, whereas the first paragraph after each \section, \subsection, etc. is correctly not indented.

How can I disable indentation in this case without manually writing \noindent every time? I have tried the noindentafter package, but to no avail.

Edit: David Carlisle's answer below works well for the minimal example, but breaks with the xcolor package:

\documentclass[twocolumn]{book}\usepackage[table]{xcolor}\makeatletter\let\zzchapterhead\@makechapterhead\def\@makechapterhead#1{\zzchapterhead{#1}\aftergroup\@afterheading}\makeatother\begin{document}\chapter{Test}This is a paragraph of text, which is hopefully long enough for the text to wrap on the next line and thus show the paragraph indent problem.\end{document}

Edit 2: I fixed it with xcolor used by replacing one invocation of \aftergroup with seven:

\makeatletter\let\zzchapterhead\@makechapterhead\def\@makechapterhead#1{\zzchapterhead{#1}\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\@afterheading}\makeatother

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images