I'm setting the margin configurations for multiple environments. For instances firstenvironment
sets the margins using \setlength
, then I make use of the multicols package inside the new environment. The problem is that the text doesn't seem to respect the bottom margin in the first page where the environment is just being used, but the text in the next pages do respect the margins. The same happens when I create a second environment with its own margin configurations. Not sure why the margins are not activated immediately when the environment begins. Any suggestions would be welcome, thanks!
\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage{showframe} % show the frame margins
\usepackage{multicol}
\newenvironment{firstenvironment}{
\setlength{\hoffset}{0mm}
\setlength{\voffset}{0mm}
\setlength{\headsep}{20pt}
\setlength{\headheight}{4em}
\setlength{\textheight}{6in}
\setlength{\footskip}{10mm}}{}
\newenvironment{secondenvironment}{
\setlength{\hoffset}{0mm}
\setlength{\voffset}{0mm}
\setlength{\headsep}{5pt}
\setlength{\headheight}{2em}
\setlength{\textheight}{5in}
\setlength{\footskip}{20mm}}{}
\begin{document}
\begin{firstenvironment}
\setlength\columnsep{30pt}
\begin{multicols}{2}
{\Large\bf 1ST LIPSUM}\\
\lipsum[1-10]
\end{multicols}
\end{firstenvironment}
\newpage
\begin{secondenvironment}
\begin{multicols}{2}
{\Large\bf 2ND LIPSUM}\\
\lipsum[1-10]
\end{multicols}
\end{secondenvironment}
\end{document}
firstenvironment
andsecondenvironment
? If you not use them in document,multicolumns
work fine. These environment (as far as I see) only prevent thatmulticols
can be spread over more pages.\bf
in latex (it is not defined by default, just in some classes fro compatibility with documents from before 1994)\newgeometry
) you need to do a lot more than this and reset all the internal parameters, just setting\textheight
for example won't change the internal\vsize
that is the size tex will actually use for page breaking. It isn't clear what you want these environments to do but perhaps\newgeometry
is what you are looking for.