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 use splitbib to create a sectioned bibliography in my CV, and I was wondering if there's a way to customize it to force new categories to start on a new page? I'm thinking that I'd have to do something with \SBtitlestyle, but I'm not sure what.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You could, e.g., define (and use) a new style clearpagebar that resembles the default style bar but adds a \clearpage at the start. (Note: In the following MWE, \nocite{*} at page 1 causes the first splitbib section to start at page 2.)

\documentclass{article}

\usepackage[nonewsec]{splitbib}

\makeatletter
\def\NMSB@styleclearpagebar#1#2{%
  \clearpage% NEW
  \hskip-\leftmargin%
  \vbox{%
    \medskip\par
    \vrule height \SBabovesepwidth depth 0pt width \textwidth
    \vskip.3\baselineskip\par\noindent
    {\null\hfill
      \csname SB\NMSB@level font\endcsname{#1#2}%
      \hfill\null}%
    \vskip-.4\baselineskip\par\noindent
    \vrule height \SBbelowsepwidth depth 0pt width \textwidth}}
\makeatother

\SBtitlestyle{clearpagebar}

\begin{category}{Books}
\SBentries{Knu86}
\end{category}
\begin{category}{Other works}
\SBentries{A01}
\end{category}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@book{Knu86,
  author = {Knuth, Donald E.},
  year = {1986},
  title = {The \TeX book},
}
\end{filecontents}

\begin{document}

\nocite{*}

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}
share|improve this answer
    
How does \clearpage differ from \newpage ? –  Suresh Sep 4 '12 at 19:41
2  
@Suresh It also deals with unprocessed floats. In the example above, it's not strictly necessary. See tex.stackexchange.com/questions/45609/… –  lockstep Sep 4 '12 at 20:51

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.