Page Layout ⇒ vmargin | Margin Size Adjustment for odd and even Pages
-
- Posts: 14
- Joined: Tue Aug 07, 2012 2:50 pm
vmargin | Margin Size Adjustment for odd and even Pages
Hello,
I was a total LaTeX newbie recently and found my way to write my thesis, solving all the problems by myself. Just one is left.
I use a special document class that I found online. It is called "Thesis". In the class file the margins are defined with the vmargin package. In the output on each page the left margin is bigger than the right margin. I would like that for the even-numbered pages, the situation is reversed (otherwise it looks funny). How do I do that? Which package should I use?
Thank you in advance
I was a total LaTeX newbie recently and found my way to write my thesis, solving all the problems by myself. Just one is left.
I use a special document class that I found online. It is called "Thesis". In the class file the margins are defined with the vmargin package. In the output on each page the left margin is bigger than the right margin. I would like that for the even-numbered pages, the situation is reversed (otherwise it looks funny). How do I do that? Which package should I use?
Thank you in advance
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vmargin | Margin Size Adjustment for odd and even Pages
A class file that relies on an obsolete package should also be considered obsolete. I would recommend against this class, not least because there are much more sophisticated classes for writing a thesis [1]. Nevertheless the vmargin manual shows in Section 3.2 how to set margins subsequently.sdelandtsheer wrote:[…] In the class file the margins are defined with the vmargin package. […]
[1] The TeX Catalogue Online, Topic Index – Typesetting Theses and Papers for Journals
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 14
- Joined: Tue Aug 07, 2012 2:50 pm
Re: vmargin | Margin Size Adjustment for odd and even Pages
Thanks for the reply. As I said I was introduced to LaTeX recently, I liked it and used it while nevertheless doing some awesome mathematics research on HIV propagation that I need to submit by the end of the month. I realize I haven't chosen the right template but that's what google gave me, it looked fine at first look, now the layout is approved by the supervisor I am reluctant to change it and possibly have lots of problems with special formulas or special tables.
The vmargin package, as the manual says in section 3.2, sets the oddmargin and evenmargin to the same values (or else I did not get it). I need to change that. Either I get a helping answer here or I go trial and error by myself, possibly loosing a lot of time.
Thanks anyway
The vmargin package, as the manual says in section 3.2, sets the oddmargin and evenmargin to the same values (or else I did not get it). I need to change that. Either I get a helping answer here or I go trial and error by myself, possibly loosing a lot of time.
Thanks anyway
-
- Posts: 14
- Joined: Tue Aug 07, 2012 2:50 pm
Re: vmargin | Margin Size Adjustment for odd and even Pages
Got the cheap solution: I decided to print recto only... More paper, but one problem solved...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vmargin | Margin Size Adjustment for odd and even Pages
Au contraire, you got a helping answer. Section 3.2 clearly describes the commands that allow to change the margins. The given values are only examples and of course can be set arbitrarily. So, before criticizing answers kindly take a closer look at the manual you have been referred to. For that you don't need to be a LaTeX expert.sdelandtsheer wrote:[…] The vmargin package, as the manual says in section 3.2, sets the oddmargin and evenmargin to the same values (or else I did not get it). I need to change that. Either I get a helping answer here or I go trial and error by myself, possibly loosing a lot of time. […]
If you expected a more specific answer, you should have given an adequate problem description along with a proper minimal example and with the used class attached (in case this class is not listed on CTAN). This would allow others to comprehend the problem and test possible solutions.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 14
- Joined: Tue Aug 07, 2012 2:50 pm
vmargin | Margin Size Adjustment for odd and even Pages
Thanks for your patience. I still do not get it. Specifically :
In the manual:
And this is exactly what it is doing, the margins on the left are bigger than on the right. I do not see any other reference to odd or even pages in the class file.
Of note, the function \cleardoublepage works ok.
I know it is probably a stupid question. I am sorry for that. Thanks for your help.
In the manual:
In my class file :The first four parameters of the above two commands are used to setCode: Select all
\setmargins{leftmargin}{topmargin}{textwidth}{textheight}{headheight}{headsep}{footheight}{footskip}\setmarginsrb{leftmargin}{topmargin}{rightmargin}{bottommargin}{headheight}{headsep}{footheight}{footskip}\oddsidemargin
,\evensidemargin
,\textwidth
,\topmargin
, and\textheight
.
Code: Select all
Code, edit and compile here:
\def\baseclass{book}\usepackage{vmargin}\setmarginsrb { 1.5in} % left margin{ 0.6in} % top margin{ 1.0in} % right margin{ 0.8in} % bottom margin{ 20pt} % head height{0.25in} % head sep{ 9pt} % foot height{ 0.3in} % foot sep
Of note, the function \cleardoublepage works ok.
I know it is probably a stupid question. I am sorry for that. Thanks for your help.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vmargin | Margin Size Adjustment for odd and even Pages
Since you again did not provide a proper minimal example, I will do so to show you that your "problem" does not exist.
In the »book« class the option
And if you want to modify the margins, simply try the
If this behaviour is not shown in your document, build a proper minimal example. Otherwise this discussion remains academic thus is a waste of my time.
In the »book« class the option
twoside
is set by default. The vmargin manual says that the package respects two-sided printing. So the value for leftmargin
determines the inner margin and the value for rightmargin
determines the outer margin. And this is exactly shown by the below example.
Code: Select all
Code, edit and compile here:
\documentclass[12pt,english]{book}\usepackage[T1]{fontenc}\usepackage{babel}\usepackage{vmargin}\usepackage{blindtext} % Automatic generation of a dummy document%\setpapersize{USletter}\setmarginsrb{1.5in} % left margin{0.6in} % top margin{1.0in} % right margin{0.8in} % bottom margin{20pt} % head height{0.25in} % head sep{9pt} % foot height{0.3in} % foot sep\begin{document}\frontmatter\tableofcontents\listoffigures\listoftables\mainmatter\blinddocument\backmatter\end{document}
\setmarginsrb
command in the preamble of your document. If that does not work, consider a modification of your custom class file. Feel free to ask for assistance.If this behaviour is not shown in your document, build a proper minimal example. Otherwise this discussion remains academic thus is a waste of my time.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 14
- Joined: Tue Aug 07, 2012 2:50 pm
vmargin | Margin Size Adjustment for odd and even Pages
Hi.
Thanks for your example. My document does not show this behavior, apparently my custom class, somewhere, overrides the two-side default.
I found a quick fix :
at the beginning of the document (just before title page) solves the problem.
How beautiful it is now!
Thanks
Thanks for your example. My document does not show this behavior, apparently my custom class, somewhere, overrides the two-side default.
I found a quick fix :
\setboolean{@twoside}{true}
at the beginning of the document (just before title page) solves the problem.
How beautiful it is now!
Thanks