LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2005, 04:29 PM   #1
FunkyRes
Member
 
Registered: Mar 2004
Distribution: CentOS
Posts: 174

Rep: Reputation: 30
LaTeX Gurus - figures, floats, and stuff


I've been using LaTeX for about 6 months.
I can honestly say that the results I get as a newbie are far far better than the results I have ever gotten out of anything else.

I started by using LyX, and now I still use LyX but I find myself using the ERT box (and preamble) quite a bit to get what I want. The LaTeX companion (second edition) sees daily use since I aquired it.

However, there is something I can't figure out how to do.
For my Calc III class, since I had it before (about a decade ago) and it is mostly review, I don't have to take the time to learn it - so I'm using that time to learn LaTeX and gnuplot better and am doing all my homework in LyX with graphs in gnuplot (using a cvs version of gnuplot that does 3D vectors)

First I enter the question - then the solution. Sometimes a gnuplot graph is part of the question.
The gnuplot stuff is done with pslatex terminal type (which only work well for pdf if use dvips -Ppdf and then run the ps file through Acrobat Distiller, but it looks so nice that way)

To include the gnuplot graphs I use raw LaTeX ERT box, not LyX - for example -

Code:
\begin{figure}[ht]
\input{my_cool_graph}
\caption{Graphing $f(x,y)=x^2*y^3$}
\end{figure}
If there is not enough space there for the figure, LaTeX will float it to the beginning of the next page - and take text that is suppose to come after the figure and put it at the bottom of the page before the figure.

I can manually adjust that by inserting a \clearpage before the figure, but part of the point of LaTeX is to as much as possible separate the user from manual formatting issues, and \clearpage produced wrong results (lot of excess white space) if it isn't needed.

Is there some kind of package that has a macro for figures that modifies the float so that if it needs to float to the next page, but only if it needs to float to the next page, it inserts a \clearpage for me?

Is there some kind of marker I can maybe put in the document saying "anything after here MUST come AFTER the figure"?

There must be a way to do what I want automatically.
I'm sure I'm not the first to run into this situation, where the placement of text after a figure really *does* need to come after the figure.

If I don't do it as a figure but just input the tex, it does what I want, but then it doesn't get the benefits of being a figure.

Any suggestions would be appreciated.
 
Old 08-26-2005, 05:03 PM   #2
FunkyRes
Member
 
Registered: Mar 2004
Distribution: CentOS
Posts: 174

Original Poster
Rep: Reputation: 30
Found it in the book -

in preamble

\usepackage{placeins}

Then where I have text that can not come before preceding figures, use

\FloatBarrier
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile for LaTeX file with figures enemorales Programming 1 11-15-2005 04:03 PM
Perl, integer and floats ivanatora Programming 2 04-06-2005 05:09 PM
LaTeX commands: texi2pdf, latex, dvipdf kaon Linux - Software 7 01-23-2005 03:32 PM
byte swapping for floats hypnoticSpectre Programming 1 11-08-2004 10:48 PM
LaTeX problem with figures guygriffiths Linux - Software 4 11-15-2003 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration