# Unnecessary spacing within minipage

I am using minipage to create two column. Here is my sample simple code to to demonstrate the problem.

\documentclass{article}
\begin{document}
\begin{minipage}[t]{0.35\textwidth}
I am sovon. I finished my master.
\end{minipage}
\hfill
\begin{minipage}[t]{0.55\textwidth}
I am sovon, I finished my master.
\end{minipage}
\end{document}


and the output is:

I am sovon.  I finished my   I am sovon, I finished my master.
master.


The problem is with the unnecessary stretching and putting a extra space after first full-stop in first column. Why is that? how can I avoid that?

• Are you looking for \raggedright and possibly \noindent? – Steven B. Segletes Nov 2 '17 at 20:10
• yes, \raggedright worked. Actually I did not know that by default, it was full-justified. I have some knowledge lacking about text formatting. Thanks – sovon Nov 2 '17 at 22:37
• Glad to help. The \noindent might be used, prior to the first minipage, to prevent it from indenting. – Steven B. Segletes Nov 2 '17 at 23:22
• @StevenB.Segletes Would you like to write an answer? – CarLaTeX Nov 3 '17 at 4:01

I suggest two things:

1. Use \raggedright to avoid the stretched out lines, since default alignment is fully justified. One could make the whole document ragged, by placing it in the preamble, but here I just place it individually in the affected minipages, allowing the rest of the document to retain the default settings.

2. I applied a \noindent prior to the first minipage, so that the whole minipage was not indented relative to the left margin.

In the MWE, I also added a showframe to show the minipage position relative to the margins, and added some junk text in minipage #2 to show that, indeed, the \hfill was working as expected.

\documentclass{article}
\usepackage[pass,showframe]{geometry}
\begin{document}
\noindent
\begin{minipage}[t]{0.35\textwidth}
\raggedright
I am sovon. I finished my master.
\end{minipage}
\hfill
\begin{minipage}[t]{0.55\textwidth}
\raggedright
I am sovon, I finished my master. xxxxxxx xx
\end{minipage}
\end{document}