Document ClassesProblem with margins in Report class

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
sina2010
Posts: 5
Joined: Mon Oct 25, 2010 5:35 pm

Problem with margins in Report class

Post by sina2010 »

Hi every one,
I am typing my thesis in latex and I am using Report document class for this purpose. the original problem for me was page numbering. I used Roman numbering and Arabic one for different pages and somehow latex was resetting the numbering for abstract page,...
I solved this problem by using \notitlepage as an option for report class. The new problem now is that I cant set the margins by myself. It seems when I use notitlepage command, the margins are automatically set to 2in from left and right and 1in from top and bottom. Could anyone let me know what should I do for this problem?
Thanks in advance.

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Problem with margins in Report class

Post by frabjous »

It would help greatly to have a minimal working example showing the undesired behavior.
sina2010
Posts: 5
Joined: Mon Oct 25, 2010 5:35 pm

Re: Problem with margins in Report class

Post by sina2010 »

I am using these packages :
\documentclass[12pt,notitlepage]{report}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{cite}
\usepackage{caption3}
\usepackage{multirow}
\usepackage{mathrsfs}
\usepackage{setspace}
\usepackage{slashbox}
%\usepackage{multirow}
\usepackage{rotating}
\usepackage{nomencl}
\usepackage{pdfpages}
\usepackage{float}
\usepackage{subfig}
\usepackage{simplemargins}
And these commands for margining:
\setleftmargin{1.5in}
\setrightmargin{1in}
\settopmargin{1in}
\setbottommargin{1in}

I disabled package by package and saw the output file, the problem still remains!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with margins in Report class

Post by localghost »

Please read the instructions entirely on the page that frabjous referred you to. It is essential to follow them unexceptionally. For several reasons your code is not compilable [1,2]. One is that you are using at least one package that is not available on CTAN.

[1] View topic: Board Rules — Everybody, by all means, read before posting!
[2] View topic: Avoidable mistakes


Best regards and welcome to the board
Thorsten
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Problem with margins in Report class

Post by frabjous »

To follow up on Thorsten's post, in particular, the package simplemargins is not on CTAN -- where did you obtain that? And is it publicly available? Have you tried setting margins with the geometry package instead?
sina2010
Posts: 5
Joined: Mon Oct 25, 2010 5:35 pm

Re: Problem with margins in Report class

Post by sina2010 »

I just saw a webpage talking about the margins stuff and recommending to use simplemargins package. I downloaded simplemargins.sty from internet ( I cant remember from where exactly)
Yes, I am using geometry package but it doesnt make effect on the margins!
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Problem with margins in Report class

Post by frabjous »

You've tried with

Code: Select all

\usepackage[top=1in,left=1.5in,bottom=1in,right=1in]{geometry}
?

If so, post a proper minimal working example showing how it doesn't work.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with margins in Report class

Post by localghost »

sina2010 wrote:I just saw a webpage talking about the margins stuff and recommending to use simplemargins package. I downloaded simplemargins.sty from internet ( I cant remember from where exactly)
Yes, I am using geometry package but it doesnt make effect on the margins!
Don't just load every package you come across in the net. You should preferably use packages that are listed on CTAN. These are official packages and mostly part of a common LaTeX distribution. And you don't need both packages. The preferable one is geometry. Set up the margins as frabjous already demonstrated.

And by the way, a simple search for »simplemargins.sty« in your favorite search engine yields possible sources of that package. But this package is far from being recommendable, not only because it's outdated (1993). The geometry package is more sophisticated. Another point against this package is that it sets the paper size self-handed to letter paper dimensions. Informations about that can only be found in the package file itself.

Code: Select all

\documentclass[11pt,notitlepage,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[%
  bindingoffset=0.5in,
  includeheadfoot,
  margin=1in
]{geometry}
\usepackage{fancyhdr}
\usepackage{blindtext}

% Page layout (fancyhdr)
\fancyhf{}
\lhead{\nouppercase{\leftmark}}
\rhead{\thepage}
\pagestyle{fancy}

\begin{document}
  \Blinddocument
\end{document}
Note that the blindtext package is only for producing dummy text thus is not part of the solution.
Post Reply