splitbib support

Asked by SJO on 2010-07-15

Dear Xavier,

 Great work with the LaTex class. Just had a question. Does moderncv support splitbib?
 If not, are you planning to add support in the future?

Thanks,
S

Question information

Language:
English Edit question
Status:
Solved
For:
moderncv Edit question
Assignee:
Xavier Danaux Edit question
Solved by:
SJO
Solved:
2010-07-19
Last query:
2010-07-19
Last reply:
2010-07-15
Xavier Danaux (xdanaux) said : #1

Hi Shantanu,

I just discovered splitbit in your email, so I don't know :-)
Moderncv already supports multibib and natbib. I'll be happy to add support for splitbib if it is easy to do so. As I have never used splitbib, can you please let me know if it works out-of-the-box, or what specific errors you get?

Best regards,

Xavier

SJO (shj2545) said : #2

Hi Xavier,

SJO (shj2545) said : #3

Hi Xavier,

 Sorry, I hit a wrong button for the reply. Splitbib is similar to natbib, multibib in that it also redefines the \bibitem and \bibliography commands. Splitbib defines categories unlike multibib and automatically checks for duplicate references etc.

http://www.ctan.org/tex-archive/macros/latex/contrib/splitbib/

I just got multibib working correctly so for me personally, the need for splitbib has reduced for now.
Thanks for your email,
S

Xavier Danaux (xdanaux) said : #4

Ok. Note that I am happy implementing support for splitbib if you or someone else provides me a working moderncv example which shows the incompatibility.

Kind regards,

Xavier

Alexandre Martin (lindorf) said : #5

Xavier,
 here is an example that shows the incompatibility of splitbib and moderncv (then again, it might simply be an example that shows my incompetence in using splitbib and moderncv...).

First, a tex file that uses splitbib to generate a bibliography with sections and subsections:

%%%%%%%%%%%% FILE BEGINS HERE %%%%%%%%%%%%%%%%%

\documentclass[10pt,letterpaper,sans]{article}
\usepackage{fullpage}
\usepackage{splitbib}

\begin{document}

\setcounter{SBresetdepth}{1}
\SBtitlestyle{simple} \SBsubtitlestyle{dash}
\begin{category}{Publications in Refereed Journals}
 \begin{category}{Published}
  \SBentries{upper,springerlink:10.1007/s00300-003-0563-3,perfect,neutrinos}
 \end{category}
 \begin{category}{In Press}
  \SBentries{sloth}
 \end{category}
 \begin{category}{Under Review}
  \SBentries{miltner_thesis,meat}
 \end{category}
\end{category}

\begin{category}{Other}
  \SBentries{droso,brindley}
\end{category}

\nocite{upper,springerlink:10.1007/s00300-003-0563-3,sloth,perfect,neutrinos,miltner_thesis,meat,droso,brindley}

\bibliographystyle{unsrt}
\bibliography{sp}

\end{document}
%%%%%%%%%%%%% FILE ENDS HERE %%%%%%%%%%%%%%%%

Then, here is a failed attempt to use splitbib with moderncv:

%%%%%%%%%%%%% FILE sp.bib BEGINS HERE %%%%%%%%%%%%%%%%
\documentclass[10pt,letterpaper,sans]{moderncv}
\usepackage{fullpage}

\usepackage{splitbib}
\moderncvstyle{casual} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\name{John}{Doe}
\address{University of Life}{Hope, AK 99605}{USA} % optional, remove / comment the line if not wanted

\begin{document}
\makecvtitle

\setcounter{SBresetdepth}{1}
\SBtitlestyle{simple} \SBsubtitlestyle{dash}
\begin{category}{Publications in Refereed Journals}
 \begin{category}{Published}
  \SBentries{upper,springerlink:10.1007/s00300-003-0563-3,perfect,neutrinos}
 \end{category}
 \begin{category}{In Press}
  \SBentries{sloth}
 \end{category}
 \begin{category}{Under Review}
  \SBentries{miltner_thesis,meat}
 \end{category}
\end{category}

\begin{category}{Other}
  \SBentries{droso,brindley}
\end{category}

\nocite{upper,springerlink:10.1007/s00300-003-0563-3,sloth,perfect,neutrinos,miltner_thesis,meat,droso,brindley}

\bibliographystyle{unsrt}
\bibliography{sp}

\end{document}
%%%%%%%%%%%%% FILE ENDS HERE %%%%%%%%%%%%%%%%

The only way this even compiles is by having the package splitbib loaded before the \moderncv{casual} call. If it is declared after, which it probably needs to be, it fails with the Latex Error: Lonely \item ...

Hopefully, that will help you add splitbib compatibility (or help you tell me what i'm doing wrong...). I'm using moderncv 1.5.1, and compiling with TexLive 2012 through TexShop (Mac). THere is a mention of that same error for Lyx user, hopefully this is not the same problem... Thanks for your great work on this!

Finally, to be able to compile the two files reproduced in the above text, you'll need the sp.bib file, which will generate the bibliography:

%%%%%%%%%%%%% FILE BEGINS HERE %%%%%%%%%%%%%%%%
@article{brindley,
 Affiliation = {Sunnybrook and Women's College Health Sciences Centre, University of Toronto, Toronto},
 Author = {LAURENCE KLOTZ},
 Date-Added = {2013-08-05 20:08:37 +0000},
 Date-Modified = {2013-08-05 20:08:37 +0000},
 Journal = {British Journal of Urology International},
 Pages = {956-957},
 Title = {HOW (NOT) TO COMMUNICATE NEW SCIENTIFIC INFORMATION: A MEMOIR OF THE FAMOUS BRINDLEY LECTURE},
 Year = {2005}
}

@article{droso,
 Affiliation = {Department of Electrical Engineering, University of Washington},
 Author = {Angela J. Shum and Justin Crest and Gerold Schubiger and Babak A. Parviz},
 Date-Added = {2013-08-05 20:08:35 +0000},
 Date-Modified = {2013-08-05 20:08:35 +0000},
 Doi = {10.1002/adma.200602962},
 Journal = {Advance Materials},
 Pages = {3608--3612},
 Title = {Drosophila as a Live Substrate for Solid-State Microfabrication},
 Volume = {19},
 Year = {2007}
}

@article{meat,
 Author = {A. J. Fowler and A. Bejan},
 Date-Added = {2013-08-05 20:08:32 +0000},
 Date-Modified = {2013-08-05 20:08:32 +0000},
 Journal = {Int. J. Heat and Fluid Flow},
 Month = {December},
 Number = {4},
 Title = {The effect of shrinkage on the cooking of meat},
 Volume = {12},
 Year = {1991}
}

@mastersthesis{miltner_thesis,
 Author = {Miltner},
 Date-Added = {2013-08-05 20:08:30 +0000},
 Date-Modified = {2013-08-05 20:08:30 +0000},
 Month = {August},
 School = {London School of Economics and Political Science},
 Title = {SRSLY PHENOMENAL: AN INVESTIGATION INTO THE APPEAL OF LOLCATS},
 Year = {2011}
}

@article{neutrinos,
 Author = {M. V. Berry and N. Brunner and S. Popescu and P. Shukla},
 Date-Added = {2013-08-05 20:08:28 +0000},
 Date-Modified = {2013-08-05 20:08:28 +0000},
 Journal = {Journal of Physics A},
 Month = {October},
 Title = {Can apparent superluminal neutrino speeds be explained as a quantum weak measurement?},
 Year = {2011}
}

@article{perfect,
 Affiliation = {University of Miami},
 Author = {J. N. Rosholt and C. Emiliani and J Geiss and F. F. Kocky and Pl. J. Wangersky},
 Date-Added = {2013-08-05 20:08:25 +0000},
 Date-Modified = {2013-08-05 20:08:25 +0000},
 Journal = {The Journal of Geology},
 Title = {Absolute dating of deep-sea cores by the PA/TH method and Accumulation rates: a reply},
 Year = {1963}
}

@article{sloth,
 Author = {Eckhard W. Heymann and Camilo Flores Amasifu{\'e}n and Ney Shahuano Tello and Em{\'e}rita R. Tirado Herrera and Mojca Stojan-Dolar},
 Date-Added = {2013-08-05 20:08:23 +0000},
 Date-Modified = {2013-08-05 20:08:23 +0000},
 Doi = {10.1016/j.mambio.2010.03.003},
 Journal = {Mammalian Biology},
 Title = {Disgusting appetite: Two-toed sloths feeding in human latrines},
 Year = {2010}
}

@article{springerlink:10.1007/s00300-003-0563-3,
 Affiliation = {Faculty of Engineering and Science International University Bremen (IUB) P.O. Box 750561 28725 Bremen Germany},
 Author = {Meyer-Rochow, VictorBenno and Gal, Jozsef},
 Date-Added = {2013-08-05 20:08:21 +0000},
 Date-Modified = {2013-08-05 20:08:21 +0000},
 Issn = {0722-4060},
 Issue = {1},
 Journal = {Polar Biology},
 Keyword = {Biomedical and Life Sciences},
 Note = {10.1007/s00300-003-0563-3},
 Pages = {56-58},
 Publisher = {Springer Berlin / Heidelberg},
 Title = {Pressures produced when penguins pooh---calculations on avian defaecation},
 Url = {http://dx.doi.org/10.1007/s00300-003-0563-3},
 Volume = {27},
 Year = {2003}
}

@article{upper,
 Affiliation = {VETERANS ADMINISTRATION HOSPITAL, BROCKTON, MASSACHUSETTS},
 Author = {Dennis Upper},
 Date-Added = {2013-08-05 20:08:16 +0000},
 Date-Modified = {2013-08-05 20:08:16 +0000},
 Journal = {Journal of Applied Behavior Analysis},
 Number = {3},
 Pages = {497},
 Title = {The Unsuccessful self-treatment of a case of "writer's block"},
 Volume = {7},
 Year = {1974}
}
%%%%%%%%%%%%% FILE sp.bib ENDS HERE %%%%%%%%%%%%%%%%