Page Layoutmemoir | Page Layout Issues

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
conjoa
Posts: 2
Joined: Fri Sep 16, 2011 3:49 pm

memoir | Page Layout Issues

Post by conjoa »

Hi

I am relatively new to LaTeX and I'm having a few issues with the document I am writing.

I have managed to add a header and footer to my document, however the main body of the document runs into my header (The footer is not affected). The header and footer does not appear on every page (in some cases this is desirable in others it is not.
  • Header+footer appear on title page - Not desired (I do not want them on this page).
  • Header + Footer are not on table of contents page or first page of chapters - Not desired (I would like them to appear on here as well) [Ideally I would only like the name and Id number in the header and the confidential and page number at the bottom].
The code I am using at the start of my document:

Code: Select all

\documentclass[oneside,12pt,a4paper]{memoir}

\usepackage{lipsum} % dummy text

\setlrmarginsandblock{3cm}{2.5cm}{*}
\setulmarginsandblock{2.5cm}{2.5cm}{*}

\checkandfixthelayout


\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{float}
\usepackage[cm]{fullpage}
\usepackage{titlesec}

\titlespacing*{\chapter}{0pt}{-0.5cm}{20pt}
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{0.5cm}{}[\hrule]
\usepackage{pifont}
\author{Name}
\title{Artifices Report}
%Header/Footer
\makepagestyle{myruled}
\makeheadrule {myruled}{\textwidth}{\normalrulethickness}
\makefootrule {myruled}{\textwidth}{\normalrulethickness}{\footruleskip}
\makeevenhead {myruled}{}{\small\itshape\leftmark}{{\small \textbf{Name}}\\[-0.15cm]{\tiny \textit{ID}}}
\makeoddhead {myruled}{}{\small\itshape\rightmark}{{\small \textbf{Name}}\\[-0.15cm]{\tiny \textit{ID}}}
\makeevenfoot {myruled}{Confidential}{} {\small Page \thepage}
\makeoddfoot {myruled}{Confidential}{} {\small Page \thepage}


\makeatother
\pagestyle{myruled}

\begin{document}
 \begin{titlepage}
\begin{top}
   
      \begin{center}\\[2.5cm]
% Upper part of the page
\textsc{\LARGE MPI001}\\[0.5cm]
\textsc{\Large Industrial Training Placement}\\[1.5cm]
% Title
\hrule\\[0.4cm]
{ \huge \bfseries TITLE}\\[0.4cm]
\hrule\\[1cm]
\textsc{\large Company}\\[0.5cm]

% Author and supervisor
\begin{minipage}{0.5\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
First \textsc{Name}\\
\emph{ID}
\vspace*{10pt}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{flushright} \large
\emph{For:}\\
Dr. First \textsc{NAME}\\
Mr. First \textsc{NAME}
\end{flushright}
\end{minipage}
\end{top}

\begin{center}
 {\large \today}\\[0.5cm]
 \textit{Confidential}\\
\end{center}
\vfill
% Bottom of the page
\begin{flushleft}
\section*{Abstract}
lorum ipsum
\end{flushleft}

\end{titlepage}
\pagebreak
\tableofcontents
\pagebreak
\chapter{Introduction}
\end{document}
I have written this based on other people tutorials and the memoir guide.

I also seem to be getting a T in the top left corner of my first page. I have deduced that it is coming from between the lines

Code: Select all

\begin{document}
 \begin{titlepage}
as if I enter

Code: Select all

\begin{document}
dd
 \begin{titlepage}
the dd comes before the T

I hope this helps you help me

Cheers

conjoa
Last edited by conjoa on Sat Sep 17, 2011 1:27 am, edited 1 time in total.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir | Page Layout Issues

Post by localghost »

Please check examples that you submit for absence of errors and minimal content. The majority of the packages you load are not necessary for the demonstration of the problem. So please clean up your code, fix the errors first and then report back with a proper minimal example that is compilable out of the box.

Just one hint beforehand. the fullpage package should not be used because in can cause trouble. It isn't needed at all because the memoir class has built-in mechanism for a complete page layout.


Best regards and welcome to the board
Thorsten
conjoa
Posts: 2
Joined: Fri Sep 16, 2011 3:49 pm

memoir | Page Layout Issues

Post by conjoa »

Thankyou for the advise

Is this better?

Code: Select all

\documentclass[oneside,12pt,a4paper]{memoir}

\usepackage{lipsum} % dummy text

\setlrmarginsandblock{3cm}{2.5cm}{*}
\setulmarginsandblock{2.5cm}{2.5cm}{*}

\checkandfixthelayout



\usepackage{titlesec}
\titlespacing*{\chapter}{0pt}{-0.5cm}{20pt}
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{0.5cm}{}[\hrule]
\usepackage{pifont}
\author{Name}
\title{Artifices Report}
%Header/Footer
\makepagestyle{myruled}
\makeheadrule {myruled}{\textwidth}{\normalrulethickness}
\makefootrule {myruled}{\textwidth}{\normalrulethickness}{\footruleskip}
\makeevenhead {myruled}{}{\small\itshape\leftmark}{{\small \textbf{Name}}\\[-0.15cm]{\tiny \textit{ID}}}
\makeoddhead {myruled}{}{\small\itshape\rightmark}{{\small \textbf{Name}}\\[-0.15cm]{\tiny \textit{ID}}}
\makeevenfoot {myruled}{Confidential}{} {\small Page \thepage}
\makeoddfoot {myruled}{Confidential}{} {\small Page \thepage}


\makeatother
\pagestyle{myruled}

\begin{document}
\newenvironment{titlepage}
 \begin{titlepage}
 \newenvironment{topsection}
\begin{topsection}
 \begin{center}
% Upper part of the page
\textsc{\LARGE MPI001}\\[0.5cm]
\textsc{\Large Industrial Training Placement}\\[1.5cm]
% Title
\hrule
\\[0.4cm]
{ \huge \bfseries TITLE}\\[0.4cm]
\hrule\\[1cm]
\textsc{\large Company}\\[0.5cm]

% Author and supervisor
\begin{minipage}{0.5\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
First \textsc{Name}\\
\emph{ID}
\vspace*{10pt}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{flushright} \large
\emph{For:}\\
Dr. First \textsc{NAME}\\
Mr. First \textsc{NAME}
\end{flushright}
\end{minipage}
\end{centre}
\end{topsection}

\begin{center}
 {\large \today}\\[0.5cm]
 \textit{Confidential}\\
\end{center}
\vfill
% Bottom of the page
\begin{flushleft}
\section*{Abstract}
lorum ipsum
\end{flushleft}

\end{titlepage}
\pagebreak
\tableofcontents
\pagebreak
\chapter{Introduction}
\end{document}
Removing fullpage fixed the text overlap issue and defining new environments has removed the T
Last edited by conjoa on Fri Sep 16, 2011 11:33 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir | Page Layout Issues

Post by localghost »

It seems that you didn't check your new example for functionality. Would you please fix all errors unexceptionally? Otherwise I'm pessimistic about specific help. Please follow the link in my last regarding the minimal example and obey the instructions. And please don't present another example that is full of errors.


Edit (17 Sep 2011, 10:10 CEST):
Your edits don't change the situation. Your example remains uncompilable.
Post Reply