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 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?

share|improve this question
1  
I have added a backslash before end{document} to make your code compilable. I hope you don't mind. :) –  hpesoj626 Jan 1 '13 at 1:15
add comment

1 Answer

up vote 1 down vote accepted

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}
share|improve this answer
    
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 Jan 1 '13 at 1:25
1  
@Niles1710373 See my edit –  hpesoj626 Jan 1 '13 at 1:37
add comment

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.