LaTeX forum ⇒ Page Layoutmargins from the cls file

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

margins from the cls file

Postby fhrttn » Fri Jun 22, 2018 3:07 pm

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 ?
  1. \AtBeginDocument{
  2. \setlength{\voffset}{-5.4mm}
  3. \setlength{\hoffset}{14.6mm}
  4. \setlength{\oddsidemargin}{-5mm}
  5. \setlength{\evensidemargin}{-14mm}
  6. \setlength{\topmargin}{-10mm}
  7. \setlength{\headheight}{10.0mm}
  8. \setlength{\headsep}{5.0mm}
  9. \setlength{\textheight}{247mm}
  10. \setlength{\textwidth}{150mm}
  11. \setlength{\marginparsep}{0mm}
  12. \setlength{\marginparwidth}{0mm}
  13. \setlength{\leftmargini}{1.25em}
  14. \setlength{\leftmarginii}{2.2em}
  15. \setlength{\leftmarginiii}{2.2em}
  16. \setlength{\leftmarginiv}{2.2em}
  17. \setlength{\leftmarginv}{2.2em}
  18. \setlength{\leftmarginvi}{2.2em}
  19. \setlength{\leftmargin}{0mm}
  20. \setlength{\labelsep}{.5em}
  21. \setlength{\labelwidth}{1.5em}
  22. \setlength{\footskip}{11mm}
  23. \setlength{\topskip}{0mm}
  24. \setlength{\parindent}{0pt}
  25. \setlength\parskip{10pt}
  26. \pagestyle{plain}
  27. \markright{}
  28. \onecolumn
  29. \raggedbottom
  30. \normalsize
  31. \normalfont
  32. \oneandonehalf
  33. \setcounter{tocdepth}{5}
  34. \setcounter{secnumdepth}{10}
  35. }
  36.  
  37. \AtEndDocument

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9403
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Jun 22, 2018 4:50 pm

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
Site admin

fhrttn
Posts: 14
Joined: Thu Nov 16, 2017 2:43 pm

Postby fhrttn » Mon Jun 25, 2018 10:26 am

I deactivated them and I will try geometry package.
Thanks


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 4 guests