0

I am using \usepackage[super]{natbib} for my citations. When using that, the horizontal spacing in front of and after the citation are different. How do I increase the spacing in front of that citation, such that it is even?

\documentclass{article}

\usepackage[super]{natbib}

\begin{document}
foo~\cite{bibitem} bar.

\medskip

\begin{thebibliography}{9}
    \bibitem{bibitem} 
        Somewebsite,
        \\\texttt{http://www.thisissomerandomwebsite.com}
\end{thebibliography}
\end{document}

Thank you in advance.

0

Natbib discards the space when using the \cite command in super mode. Two possible solutions are to use \citenum, that does not discard spaces, and superscript that, or to define an open brace consisting of a space. The advantage of the first approach is that you can still use \cite to get a superscript close to the word (which is a bit more standard typographically speaking). The disadvantage is that you need to define a new command for combining \citenum and superscript. For the other approach this is reversed: you can use the \cite command but you cannot have a superscript close to the word anymore (unless you insert negative spacing manually).

MWE:

\documentclass{article}

\usepackage[super]{natbib}
% first approach
\newcommand{\citespace}[1]{%
\textsuperscript{\citenum{#1}}%
}
% second approach
\setcitestyle{open={\ }}
\begin{document}
foo\citespace{bibitem} bar. foo\cite{bibitem} bar.

\medskip

\begin{thebibliography}{9}
    \bibitem{bibitem} 
        Somewebsite,
        \\\texttt{http://www.thisissomerandomwebsite.com}
\end{thebibliography}
\end{document}

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.