Text FormattingMinipage is not working

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
farmerd
Posts: 3
Joined: Tue Jan 10, 2012 4:51 am

Minipage is not working

Post by farmerd »

Hello,

I am somewhat new to Latex in that I used it 5 years ago. I never used minipage but I am trying to use it now. I went through some previous posts and found one example using a figure next to some equation. Anyway, the code was very similar to mine, I tried to apply it, although no changes were really needed. I will post my simplified code below. The code outputs a list up to item 3, but that is it, no enumerated split page. It should create a split page a and b. By the way is "enumerate" obsolete, I saw something on this site that said as much, under "obsolete packages and document classes". As I digress, here is the code.

Code: Select all

\documentstyle[12pt]{article}
\begin{document}
\begin{enumerate}

\item The first item.

\item The second item.

\item The third item is an enumerated minipage.
	\begin{enumerate}
		\begin{minipage}[b][60mm]
			\item Item a
		\end{minipage}

		\begin{minipage}[b][60mm]
			\item Item b
		\end{minipage}
	\end{enumerate}

\end{enumerate}
\end{document}      

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Minipage is not working

Post by Stefan Kottwitz »

Hi farmerd,

welcome to the board!
  • Don't use \documentstyle, this is obsolete, use \documentclass instead.
  • For the width argument of minipage, use curly braces instead of square brackets. Curly braces are for mandatory arguments, such as the width here, brackets are for optional arguments, such as the alignment here.
  • The enumerate envirnonment is not obsolete. There are packages which extend this enviroment, such as the enumitem package.
Here is your code, changed to be working:

Code: Select all

\documentclass[12pt]{article}
\begin{document}
\begin{enumerate}

\item The first item.

\item The second item.

\item The third item is an enumerated minipage.
   \begin{enumerate}
      \begin{minipage}[b]{60mm}
         \item Item a
      \end{minipage}

      \begin{minipage}[b]{60mm}
         \item Item b
      \end{minipage}
   \end{enumerate}

\end{enumerate}
\end{document}
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Minipage is not working

Post by localghost »

farmerd wrote:[…] By the way is "enumerate" obsolete, I saw something on this site that said as much, under "obsolete packages and document classes". […]
As the quoted topic title says, it's about about packages and document classes that are considered obsolete. Hence it lists the enumerate package, and not the enumerate environment.


Best regards and welcome to the board
Thorsten
farmerd
Posts: 3
Joined: Tue Jan 10, 2012 4:51 am

Re: Minipage is not working

Post by farmerd »

Stefan,

Thank you for your reply. I made the change from \documentstyle to \documentclass, but I still get the same output. My version of texniccenter is "1 Beta 7.01 - unstable('Greengrass')". I downloaded it sometime ago maybe 7 - 10 years back. I never noticed the unstable descriptor before and it seemed to work for other things, like writing a thesis. I am not sure why this won't work as the code is really straight forward, I am stumped.
farmerd
Posts: 3
Joined: Tue Jan 10, 2012 4:51 am

Minipage is not working

Post by farmerd »

localghost wrote: As the quoted topic title says, it's about about packages and document classes that are considered obsolete. Hence it lists the enumerate package, and not the enumerate environment.
Is there an easy way to tell whether it is a package or an environment, or do you just know through experience?

farmerd
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Minipage is not working

Post by localghost »

farmerd wrote:Is there an easy way to tell whether it is a package or an environment, or do you just know through experience? […]
It is both. But only the macro package is obsolete and superseded by the enumitem package, which not only customizes the enumerate environment.
Post Reply