0

I want to format my document so as to fit its contents as I would like, but not keep this format for the front page and the index; as I need large margins for notes & equations but this particular layout make the cover and index look very weird, everything being put on the side.

I use this code to custom its format:

\setlength{\oddsidemargin}{0cm} 
\setlength{\evensidemargin}{0cm}    
\setlength{\marginparwidth}{5cm}    
\setlength{\textwidth}{13cm}
\setlength{\textheight}{23cm}

and want to know if it is possible to either:

  • reset it locally while being true on global
  • set it on locally while being off on global

If this problem has no solution in LaTeX, I will simply save two documents, one unformatted and one formated and use pdf to merge the front page and index of the unformatted and the content of the formated.

Eldrin
  • 23
  • Please provide an MWE (from \documentclass... to \end{document) that we can compile to see the structure of your document and what you have tried. – Peter Wilson Jan 14 '21 at 20:01

1 Answers1

1

You can change the layout settings locally through the \geometry command provided by the geometry package. In the example below I just change the margins:

\documentclass[oneside]{book}
\usepackage{lipsum}
\usepackage{geometry}
  \geometry{margin=3cm}

\usepackage{makeidx} \makeindex

\begin{document}

\begin{titlepage} \textbf{Titlepage}\ \lipsum[1-4] \end{titlepage}

\tableofcontents

\newgeometry{margin=0.5cm}

\chapter{Small margins\index{Small Margins}}\lipsum

\restoregeometry

\chapter{Default margins\index{Default Margins}}\lipsum

\newgeometry{margin=6cm}

\chapter{Large margins\index{Large Margins}}\lipsum

\restoregeometry

\printindex

\end{document}

Ivan
  • 4,368