2

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.

lockstep
  • 250,273
Suresh
  • 16,511
  • 14
  • 55
  • 64

1 Answers1

2

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}
lockstep
  • 250,273
  • How does \clearpage differ from \newpage ? – Suresh Sep 04 '12 at 19:41
  • 2
    @Suresh It also deals with unprocessed floats. In the example above, it's not strictly necessary. See http://tex.stackexchange.com/questions/45609/is-it-wrong-to-use-clearpage-instead-of-newpage – lockstep Sep 04 '12 at 20:51