Text Formattingenumerate and figures

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

enumerate and figures

Post by Mini »

Hello,

When I use enumerate and place figures on the first line, the enumerate number is at the bottom of the figure.

I use the /clearpage command to help place graphics where I want them to be placed.

I would like to have the enumerate number at the top of the figure. How could this be done?

Thanks

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: enumerate and figures

Post by sommerfee »

How exactly do you place your figures? Do you have a small but complete example for us?
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

enumerate and figures

Post by Mini »

Hi,

Sure I do.

Notice that the it makes a new page after every figure aswell. I would like it to be 'continuous'.

And of course the numbers are at the 'bottom' of the figures, instead of the top.

Code: Select all

\documentclass[12pt, a4paper, fleqn, leqno]{article}
\pagestyle{empty}
\linespread{1.5}
\usepackage{polynom}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage[lmargin=1cm, rmargin=1cm, tmargin=1cm, bmargin=1cm]{geometry}
\usepackage{pst-eucl}
\newcommand{\cosec}{\operatorname{cosec}}

\begin{document}

\begin{enumerate}
\clearpage
  \item Blah
  \begin{figure}[!htb]
\begin{center}
        \begin{pspicture}(-3,-2)(4,2)
          \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-3,-2)(4,2)[$x$,-90][$f(x)$,180]
          \psplot[algebraic=true,plotpoints=1000, arrows=<->]{-2.5}{3.5}{(1/5)*(x-1)*(x-3)*(x+2)}
          \psdot(-2,0)
          \psdot[dotstyle=o](1,0)
          \psdot(3,0)
          \rput(-2,-0.4){-2}
          \rput(1,-0.4){1}
          \rput(3,-0.4){3}
        \end{pspicture}
\end{center}
\end{figure}
\clearpage
  \item
  \begin{figure}[!htb]
\begin{center}
        \begin{pspicture}(-3,-2)(4,2)
          \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-3,-2)(4,2)[$x$,-90][$f(x)$,180]
          \psplot[algebraic=true,plotpoints=1000, arrows=<->]{-2.5}{3.5}{(1/5)*(x-1)*(x-3)*(x+2)}
          \psdot(-2,0)
          \psdot[dotstyle=o](1,0)
          \psdot(3,0)
          \rput(-2,-0.4){-2}
          \rput(1,-0.4){1}
          \rput(3,-0.4){3}
        \end{pspicture}
\end{center}
\end{figure}
\clearpage
  \item
  \begin{figure}[!htb]
\begin{center}
        \begin{pspicture}(-3,-2)(4,2)
          \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-3,-2)(4,2)[$x$,-90][$f(x)$,180]
          \psplot[algebraic=true,plotpoints=1000, arrows=<->]{-2.5}{3.5}{(1/5)*(x-1)*(x-3)*(x+2)}
          \psdot(-2,0)
          \psdot[dotstyle=o](1,0)
          \psdot(3,0)
          \rput(-2,-0.4){-2}
          \rput(1,-0.4){1}
          \rput(3,-0.4){3}
        \end{pspicture}
\end{center}
\end{figure}
\end{enumerate}

\end{document} 
Thanks again!
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: enumerate and figures

Post by sommerfee »

It's not clear to me why you use the figure environment. This is a floating environment, i.e. LaTeX will maybe put its content somewhere else. So simply removing the figure environment should help.
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: enumerate and figures

Post by Mini »

Hi,

Thanks for your help. I'll check it out soon.

What is the figure environment for then? I've used it because tutorials etc used it so I just followed without thinking...

Thanks
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

enumerate and figures

Post by Montag »

Mini wrote:What is the figure environment for then? I've used it because tutorials etc used it so I just followed without thinking...
A bit searching online could have led you to
http://en.wikibooks.org/wiki/LaTeX/Floa ... d_Captions. ;)
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

enumerate and figures

Post by localghost »

Mini wrote:[…] What is the figure environment for then? I've used it because tutorials etc used it so I just followed without thinking […]
It can't do any harm if you do some basic reading [1]. Nearly all documents about LaTeX basics explain what these float environments are for and how they behave. And finally you could think about acquiring a book.

[1] View topic: LaTeX Resources for Beginners


Thorsten
Post Reply