2

I have the following MWE

\documentclass[a4paper, 10pt]{memoir}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}

\usepackage[per-mode=symbol, exponent-product = \cdot, alsoload=hep, range-units=single, tophrase={--}, separate-uncertainty]{siunitx}


\chapterstyle{madsen}
\begin{document}

\chapter{Test 1}
Test 1

{\let\clearpage\relax\chapter{Test 2}}
Test 2

\end{document}

Due to the chapterstyle, a second horizontal line appears in the middle of the page. Is there a way to remove this?

1
  • 1
    I have added a backslash before end{document} to make your code compilable. I hope you don't mind. :)
    – hpesoj626
    Commented Jan 1, 2013 at 1:15

1 Answer 1

1

This is the default behavior of the madsen chapter style. So if you have two chapters in one page, you will get two horizontal lines in one page. You can break the page between chapters (which is the default behavior).

Case 1

If you want to totally remove the line between Chapter number and title, write

\renewcommand*{\afterchapternum}{%
    \par\hspace{1.5cm}\hrule\vskip\midchapskip}

after \chapterstyle{madsen}.

enter image description here

Case 2

To remove just the line in chapter two, write

{\renewcommand*{\afterchapternum}{%
    \par\vskip\midchapskip}
\let\clearpage\relax\chapter{Test 2}}

enter image description here

Here is the full code for the second case.

\documentclass[a4paper,10pt]{memoir}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}
\usepackage[per-mode=symbol, exponent-product = \cdot, alsoload=hep, range-units=single, tophrase={--}, separate-uncertainty]{siunitx}

\chapterstyle{madsen}

\begin{document}

\chapter{Test 1}
Test 1

{\renewcommand*{\afterchapternum}{%
    \par\vskip\midchapskip}
\let\clearpage\relax\chapter{Test 2}}
Test 2

\end{document}
2
  • is there really no way for me to get my desired behavior for just a single page, even though I'm using this chapter style? Perhaps by making one chapter and the second one can be something mimicking the graphical design of a chapter-title?
    – BillyJean
    Commented Jan 1, 2013 at 1:25
  • 1
    @Niles1710373 See my edit
    – hpesoj626
    Commented Jan 1, 2013 at 1:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .