Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to be able to change the marginpar and right values for each page, depending if the page has notes or not. MWE:

\documentclass{article}
\usepackage[top=3cm, bottom=3cm, left=3cm, right=8cm, marginpar=5cm]{geometry}

\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}

\section{Title 1}
\lipsum[3]
\newpage

\section{Title 2}
\marginpar{%
    \lipsum[1]
}

\lipsum[3]

\end{document}

enter image description here

As you can see the problem is that the first page always has a large margin. I'm using Ubuntu 12.04 and thus using the 2009 version of texlive, and I'm unable to update it right now, so I can't use \newgeometry. Is there another option I can use?

share|improve this question
1  
If you are willing to switch it manually, you can use the example in this question: tex.stackexchange.com/questions/34368/… –  Andy Nov 8 '12 at 7:55
    
Simply download the new geometry package into the folder of you *.tex-file, then it will be used by pdfLaTeX instead of the old one in texmf-dist. –  Keks Dose Nov 8 '12 at 13:50

1 Answer 1

up vote 1 down vote accepted

Fixed. Just had to \usepackage{changepage} and \begin{adjustwidth}{}{-5cm} the section that I don't want to have margins. MWE:

\documentclass{article}
\usepackage[top=3cm, bottom=3cm, left=3cm, right=8cm, marginpar=5cm]{geometry}

\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{changepage}

\begin{document}

\section{Title 1}
\begin{adjustwidth}{}{-5cm}
\lipsum[3]
\end{adjustwidth}
\newpage

\section{Title 2}
\marginpar{%
    \lipsum[1]
}

\lipsum[3]

\end{document}

Result:

MWE working

share|improve this answer
    
Probably of interest for future readers: Standard way of handling oversize pages?. –  Speravir Nov 9 '12 at 3:52
1  
From the chngpage README: "The package provides broadly similar functionality to changepage, with which it is distributed. It is, however, considered obsolete, and should not be used in new documents." So, use changepage instead. –  Werner Nov 9 '12 at 5:31
    
Changed and tested, thanks. –  Havok Nov 9 '12 at 8:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.