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.

Why does this code give me a badbox?

\documentclass[a4paper, 10pt, notitlepage]{article}
\begin{document}

\begin{minipage}[t]{1.0 \textwidth}
aaaaaaaaaaaaaaaaaaaaaaa
\end{minipage}

\end{document}

I'd like to understand the problem and not just fix it.

share|improve this question
    
did not get any badbox. I am using winEdt 6.2 version. There may be problem of packages and Text distribution version. –  itfeature.com Aug 11 '13 at 9:40
add comment

1 Answer

up vote 10 down vote accepted

Your minipage of width \textwidth starts a new paragraph and therefore is indented by the amount of \parindent (15pt in article), so it spills over into the right margin by that amount. An easy fix is to add \noindent before the minipage.

\documentclass[a4paper, 10pt, notitlepage]{article}

\begin{document}

\noindent \verb|\parindent|: \the\parindent

\noindent aaaaaaaaaaaaaaaaaaaaaaa

\begin{minipage}[t]{1.0 \textwidth}
aaaaaaaaaaaaaaaaaaaaaaa
\end{minipage}

\noindent\begin{minipage}[t]{1.0 \textwidth}
aaaaaaaaaaaaaaaaaaaaaaa
\end{minipage}

\end{document}

enter image description here

share|improve this answer
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.