Personal tools
You are here: Home / Software / Latex Help

Latex Help

Home of information regarding latex usage, help and common mistakes

Introduction

Making your life easier ? with wysiwyg

  • rubber
  • lyx

 

Figures

 

   \begin{figure}[htb]
     \center{\includegraphics[width=\textwidth angle=-90]
         {figures/graphic.png}}
     \caption{\label{fig:my-label} My figure.  An example of a cool figure}
   \end{figure}

Figure placement can often be a problem.  LaTeX will not violate its typesetting rules. What LaTeX does is keep a queue of figures and place them as room becomes available. Even if you want to insist on putting a figure in a particular space, it may violate the typesetting rules, so TeX simply won't do it. One way to change this is to issue a \clearpage command. This foraces LaTeX to dump its image queue at the point in the file that the command is issued, instead of popping the image onto the queue.

 

The algoritm for image placement can also be modified via 3 commands.



Adjust figure placement:

sometimes figures do not appear anywhere close to where you specify them so how can this happen?

  • A figure can be too large for a page, in which case it gets held with all the other figures until the end of the section and then they all get printed.
  • There can be too much figure and not enough text. LaTeX has rules about how much text it requires a page to have; it will push figures back until it meets those rules. To change the rules, use the following:
       %%%%%%%%%%%%%%%%%%%%%%%%%%%% Setting to control figure placement
       % These determine the rules used to place floating objects like figures 
       % They are only guides, but read the manual to see the effect of each.
       \renewcommand{\topfraction}{.9}
       \renewcommand{\bottomfraction}{.9}
       \renewcommand{\textfraction}{.1}
    
    The larger the first two parameters and the smaller the last one, the more a page can be filled with figures and the less has to be text.

Using pgf

The latest pgf 1.18 has a problem. To fix it edit the file .../latex/pgf/compatibility/pgfcomp-version-0-65.sty with the following :

before :

\let\pgfdegree=\pgfsincos
\def\pgfsincos#1{%
   \pgfmathparse{#1}%
   \pgfmathcos@{#1}\pgf@y=\pgfmathresult pt%
   \pgfmathsin@{#1}\pgf@x=\pgfmathresult pt%
}
« September 2017 »
September
SuMoTuWeThFrSa
12
3456789
10111213141516
17181920212223
24252627282930