I'm using the multibib package to differentiate between different types of references. Additionally to \cite{} I've defined the command \citemine{}.
Citing works perfectly fine, but sometimes I'd like to have references of both types inside one bracket. That is, rather than \cite{RefA}\citemine{RefB} resulting in [1][2] I'd like to have [1,2].
Update April 28th: I have come to a (nasty) solution that is just missing some minor detail. My updated MWE does result in [ 1, 2], but of course I like to have [1, 2]. I'm quite confused, because I have no idea where this additional space might come from. Any help is appreciated!
\documentclass[]{scrbook}
% bibstlye
\usepackage{cite}
\usepackage{multibib}
\newcites{mine}{my stuff}
\newcommand{\citeBoth}[2]{
\renewcommand{\citeleft}{}
\renewcommand{\citeright}{}
[#1,#2]
\renewcommand{\citeleft}{[}
\renewcommand{\citeright}{]}
}
\begin{document}
Two cite examples:
\cite{foo}
\cite{foo2}
\citemine{bar}
\citeBoth{\cite{foo, foo2}}{\citemine{bar}}
\bibliographystylemine{plain}
\bibliographymine{bibfile}
\bibliographystyle{plain}
\bibliography{bibfile}
\end{document}
and corresponding bibfile:
@Article{foo,
author={foo},
title={foo},
journal={foo},
year={200},
volume={60},
number={23},
pages={6641--8},
}
@Article{bar,
author={foo},
title={foo},
journal={foo},
year={200},
volume={60},
number={23},
pages={6641--8},
}
@Article{foo2,
author={foo2},
title={foo2},
journal={foo2},
year={200},
volume={60},
number={23},
pages={6641--8},
}

\renewcommand{\citeleft}{\unskip}inside of\citeBoth. – Steven B. Segletes Apr 28 '15 at 16:52