TransWikia.com

custom page except front and index

TeX - LaTeX Asked by Megamonogoute on February 12, 2021

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.

One Answer

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 marginsindex{Small Margins}}lipsum

restoregeometry

chapter{Default marginsindex{Default Margins}}lipsum

newgeometry{margin=6cm}

chapter{Large marginsindex{Large Margins}}lipsum

restoregeometry    

printindex 
    
end{document}

Answered by Ivan on February 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP