Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
reply to How can I show the PDF of my MWE ? is here –  texenthusiast Dec 12 '12 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) –  David Carlisle Dec 12 '12 at 15:16
add comment

2 Answers

up vote 5 down vote accepted

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)

share|improve this answer
    
So, the end of environment creates a new paragraph. Is it right? –  Sigur Dec 12 '12 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... –  David Carlisle Dec 12 '12 at 15:21
    
Simple fix to the problem. Thanks! –  Jeremy Dec 12 '12 at 15:28
add comment

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

share|improve this answer
    
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.) –  Jeremy Dec 12 '12 at 15:25
    
This is a good answer if needed to be done for the whole document. –  Jeremy Dec 12 '12 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. –  Frank Mittelbach Aug 23 '13 at 7:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.