5

I'm using the multicol package and have found that the paragraph immediately following the multicols environment is indented. This happens even when there is no blank line between the end of the environment and the beginning of the next paragraph.

Here is a MWE:

\documentclass{article}
\usepackage{multicol}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{multicols}{3}
    \lipsum[3-5]
\end{multicols}
\lipsum[2]
\end{document}

So how can I avoid the indent? Thanks!

PS. How can I show the PDF of my MWE here?

2
  • 1
    reply to How can I show the PDF of my MWE ? is here Dec 12, 2012 at 15:15
  • You can just upload the pdf as an image, the site will convert to a low res bitmap, although better is usually to crop it yourself in a bitmap editor and upload that (or use the standalone class which tries to automatically crop the page to the visible area) Dec 12, 2012 at 15:16

2 Answers 2

5

I assume the implied question is how to stop the indent. You can use \noindent to stop the indent for a single para or \setlength\parindent{0pt} to globally 0 the indentation. The following paragraph is just a normal paragraph there is no interaction from the preceding multicols (unlike a section head)

2
  • So, the end of environment creates a new paragraph. Is it right?
    – Sigur
    Dec 12, 2012 at 15:16
  • 2
    \end{env} doesn't necessarily imply a new para but in the case of multicols, it implies several ends of paragraph:-) The paragraph at the end of the multicol text is ended and the text balanced, the balanced two column text is placed onto the page, the page is then ended to invoke the output routine which will then switch back to the single column output routine re-inserting the page-so-far with the two columns as a box at the top of the page, inserting some vertical space and then finally starting a new paragraph for teh following text... Dec 12, 2012 at 15:21
3

I suggest to make the paragraph after a multicols environment responsive (with respect to its indentation) to \par (or an empty line) before it by appending \@doendpe to the definition of \endmulticols. (This is the mechanism used by list environments.)

\documentclass{article}

\usepackage{multicol}

\usepackage{etoolbox}

\makeatletter
\appto{\endmulticols}{\@doendpe}
\makeatother

\newcommand*{\sometext}{Lorem ipsum dolor sit amet, consectetuer
    adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
    adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
    libero, nonummy eget, consectetuer id, vulputate a, magna.}

\begin{document}

\sometext

\begin{multicols}{3}
    \sometext
\end{multicols}
%
\sometext

\bigskip

\sometext

\begin{multicols}{3}
    \sometext
\end{multicols}

\sometext

\end{document}

enter image description here

3
  • I suppose this would be something the multicol package author would have to do, right? (Now that you've edited the answer, I can see the answer to my follow-up question.)
    – jlconlin
    Dec 12, 2012 at 15:25
  • This is a good answer if needed to be done for the whole document.
    – jlconlin
    Dec 12, 2012 at 15:29
  • @Jeremy it is even a good answer if it is only needed some times in a document, basically it changes the need for saying \noindent to using or not using an empty line. However, it is not something I could add to multicols without breaking a lot of documents and in fact the standard usecase would be that the env ends the paragraph so requiring manual \noindent in the few exceptions is not that bad. Aug 23, 2013 at 7: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.