Page Layoutmargins from the cls file

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
fhrttn
Posts: 20
Joined: Thu Nov 16, 2017 2:43 pm

margins from the cls file

Post by fhrttn »

I have a problem with margins I could not adjust. Here is the part of the cls file. Left margin 3.5 cm, Right, Top and Bottom 2.5 cm and the page number should be 1.5 cm above the bottom of the page
can someone help on this issue ?

Code: Select all

\AtBeginDocument{
        \setlength{\voffset}{-5.4mm}
        \setlength{\hoffset}{14.6mm}
        \setlength{\oddsidemargin}{-5mm}      
        \setlength{\evensidemargin}{-14mm}     
        \setlength{\topmargin}{-10mm}          
        \setlength{\headheight}{10.0mm}         
        \setlength{\headsep}{5.0mm}             
        \setlength{\textheight}{247mm}         
        \setlength{\textwidth}{150mm}          
        \setlength{\marginparsep}{0mm}
        \setlength{\marginparwidth}{0mm}
        \setlength{\leftmargini}{1.25em}
        \setlength{\leftmarginii}{2.2em}
        \setlength{\leftmarginiii}{2.2em}
        \setlength{\leftmarginiv}{2.2em}
        \setlength{\leftmarginv}{2.2em}
        \setlength{\leftmarginvi}{2.2em}
        \setlength{\leftmargin}{0mm}
        \setlength{\labelsep}{.5em}
        \setlength{\labelwidth}{1.5em}
        \setlength{\footskip}{11mm}          
        \setlength{\topskip}{0mm}
        \setlength{\parindent}{0pt}           
        \setlength\parskip{10pt}
        \pagestyle{plain}
        \markright{}
        \onecolumn
        \raggedbottom
        \normalsize
        \normalfont
        \oneandonehalf
        \setcounter{tocdepth}{5}
        \setcounter{secnumdepth}{10}           
 }

\AtEndDocument

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

margins from the cls file

Post by Stefan Kottwitz »

Setting \voffset and such lengths is the stone age way of page setup. You see it now gets difficult.

Take a look at the geometry manual. That's the best way the page can be set up today, by options to the geometry package or by the \geometry command.

But the page length settings you showed here, they should be removed then, or commented out. Otherwise they override the geometry settings.

Stefan
LaTeX.org admin
fhrttn
Posts: 20
Joined: Thu Nov 16, 2017 2:43 pm

margins from the cls file

Post by fhrttn »

I deactivated them and I will try geometry package.
Thanks
Post Reply