{\renewcommand\newpage{}\chapter{chaptername}}
(Thanks to Piet van Oostrum in this thread: suppress page break before
bib in book.)
Is there anyway to do this with \renewcommand\chapter ?
Thanks.
BK
Well, you always sort of hate to answer your own questions.
While {\renewcommand\newpage{}\chapter{chaptername}} is a very cool
hack, and I will use it again, I found a different way.
The \chapter command is defined like this in report.cls
\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
This statement adds the new page or pages before the chapter:
\if@openright\cleardoublepage\else\clearpage\fi
In the preamble of my doc I renewed the command and removed the
statement:
\makeatletter %keeps latex from stumbling over @ signs
\newcommand\chapter{\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\makeatother % resets @ signs to their normal usage in latex.
Works fine and does what I need.
So why do I need this? Okay. I am using twocolumns. Everytime I switch
the number of columns—that is use \onecolumn or \twocolumn—latex adds
a page break. When I switch \onecolumn before \chapter, both add a
page break. I figure \chapter is easier to fix than \onecolumn.
I would sure appreciate a prettier way to do this, but for now, it
works.
Oh, I cannot use the multicol package for this job because of its
limited support of floats.
Bob Kerstetter
http://villagehiker.com
> So why do I need this? Okay. I am using twocolumns. Everytime I switch
> the number of columns—that is use \onecolumn or \twocolumn—latex adds
> a page break. When I switch \onecolumn before \chapter, both add a
> page break. I figure \chapter is easier to fix than \onecolumn.
If you are switching between two and one-column by hand, then
try without the [twocolumn] option. Then \chapter doesn't think it
needs to say \twocolumn[...] for the chapter title.
Donald Arseneau as...@triumf.ca
> So why do I need this? Okay. I am using twocolumns. Everytime I switch
> the number of columns—that is use \onecolumn or \twocolumn—latex adds
> a page break. When I switch \onecolumn before \chapter, both add a
> page break. I figure \chapter is easier to fix than \onecolumn.
I can't reproduce this, I don't get unwanted page breaks:
\documentclass{report}
\usepackage{lipsum}
\begin{document}
\chapter{a}
\lipsum
\twocolumn
\chapter{b}
\lipsum
\onecolumn
\chapter{c}
\lipsum
\end{document}
--
Ulrike Fischer