2

I'm new to LaTeX and I'm creating a report for my project, the problem is that the font is not equivalent in all the PDF, and I inserted a PDF file containing a plot but it's not appearing in the place I put in the LaTeX code, but in another place.

One other thing, the margins of the page are so big, so only the page will fit for a small amount of information, and the break line between each line is two lines and not one line.

How can I solve these problems?

That's my code:

    % !TEX TS-program = pdflatex
    % !TEX encoding = UTF-8 Unicode

    % This is a simple template for a LaTeX document using the "article" class.
    % See "book", "report", "letter" for other types of document.

    \documentclass[11pt,a4paper,oneside]{report}
    \usepackage{fullpage}
    \renewcommand{\baselinestretch}{2}
    \author{Unknown}
    \title{test}

    \usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)

    \usepackage{graphicx} % support the \includegraphics command and options

    % \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
    \usepackage{amsmath}
    \usepackage{float}
    %%% PACKAGES

    % \usepackage{booktabs} % for much better looking tables
    \usepackage{array} % for better arrays (eg matrices) in maths
    % \usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
    \usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
    %\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
    % These packages are all incorporated in the memoir class to one degree or another...


    \begin{document}
    \maketitle



    %\date{} % Activate to display a given date or no date (if empty),
             % otherwise the current date is printed 
    \DeclareGraphicsExtensions{.pdf,.png,.jpg}

    \section{Introduction}

  8 lines of text in here


    \section{Global Analysis}
here is some text before the image
    \begin{figure}
    \includegraphics[width=400px , height=300px]{ng.pdf}
     \caption{image caption}
    \end{figure}

    \section{Local Analysis}

  Here is some text, maybe 6 lines ...
lockstep
  • 250,273
  • 5
    A lot of these points are covered in most introductions to LaTeX. I'd suggest you might want to look at http://tex.stackexchange.com/questions/11/what-is-the-best-book-to-start-learning-latex for some general guides. – Joseph Wright May 14 '11 at 19:23

1 Answers1

8
  • figures are intended to float to a place where it's good from a typesetting view. You can fix the place by adding the H option: \begin{figure}[H]. This requires the float package, you are already using it.

  • The undesired line spread is caused by the line \renewcommand{\baselinestretch}{2}, just remove it.

  • Regarding the margins, you can change them using the geometry package, for example: \usepackage[a4paper,hmargin={1cm,2cm},vmargin={2cm,3cm}]{geometry}

Stefan Kottwitz
  • 231,401
  • thanks for your reply , these tips works , but how to change the margins with this package ? i don't know how to use it. and one other issue , the section numbering started from 0 , how can i change this ? – weblover May 14 '11 at 19:07
  • 1
    @web: You never started a chapter, so the sections are all in the zeroth chapter and hence numbered as 0.*. If you do not want to use chapters, use the article document class. – Caramdir May 14 '11 at 19:12
  • @weblover: See documentation of geometry: http://mirrors.ctan.org/macros/latex/contrib/geometry/geometry.pdf – Marco Daniel May 14 '11 at 19:13