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 sure this is a simple question but would anybody be able to point out to me why the following generates overfull \hbox errors for the two \colchunk macros? It doesn't appear LaTeX needs to do any line breaking at all.

\documentclass[a4paper,10pt]{report}

\usepackage[utf8]{inputenc}
\usepackage{fullpage}
\usepackage{listings}
\usepackage{parcolumns}
\begin{document}

\begin{parcolumns}{2}
 \colchunk{
  \noindent\begin{minipage}{.45\textwidth}
  \begin{lstlisting}[language={[x86masm]Assembler}]
movzx ebx, cx
push ebx
call someFunc
  \end{lstlisting}
  \end{minipage}
 }

 \colchunk{
  \noindent\begin{minipage}{.45\textwidth}
  \begin{lstlisting}[language={[x86masm]Assembler}]
mov ecx, edx
  \end{lstlisting}
  \end{minipage}
 }

 \colplacechunks
\end{parcolumns}

\end{document}
share|improve this question
    
Depending on your usage, you can issue \par at the beginning of \colchunk, which takes care of the "Overfull \hbox warnings." You may have to adjust the vertical alignment then. However, there are other ways of performing this parcolumns approach that doesn't require such a fix. You could also use \linewidth for your minipage, which is marginally larger than .45\textwidth (by about 12.65pt). –  Werner Dec 31 '11 at 17:14
    
[Unrelated to your question] the parcolumns package allows you to form columns that can break across pages. Putting the content of a colchunk in a minipage negates this. –  cmhughes Dec 31 '11 at 17:55

1 Answer 1

up vote 4 down vote accepted

Use the option nofirstindent for the environment parcolumns. More information are given in the documentation

share|improve this answer

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.