# problem with urlstyle being overriden by apacite

I am using \usepackage{hyperref} and \urlstyle{rm} to produce urls in roman font in my documents. However, when I also include \usepackage{apacite} the font is no longer roman, but typewriter for the urls.

This code works correctly and displays the url in roman font:

\documentclass[12pt]{article}

\usepackage{hyperref}

\urlstyle{rm}

\begin{document}

\url{http://en.wikipedia.org/wiki/Function_(mathematics)}

\end{document}


Which generates this:

However, when I add the package apacite, it no longer displays in roman, but rather in typewriter font:

\documentclass[12pt]{article}
\usepackage{apacite}

\usepackage{hyperref}

\urlstyle{rm}

\begin{document}

\url{http://en.wikipedia.org/wiki/Function_(mathematics)}

\end{document}


Which generates this:

I have tried it with the \usepackage{apacite} coming after the \urlstyle{rm} but it doesn't make a difference.

-

Package apacite sets \urlstyle inside \AtBeginDocument to APACtt. Therefore switching back to rm should be done at a later time, e.g.:

\documentclass[12pt]{article}
\usepackage{apacite}

\usepackage{hyperref}

\AtBeginDocument{%
\urlstyle{APACrm}% APAC version of rm
% \urlstyle{rm}%
}

\begin{document}

\url{http://en.wikipedia.org/wiki/Function_(mathematics)}

\end{document}


-
How did you produce the blockquote in your answer with the transparent background? i.e. What markup did you use besides blockquote and how did you get an image with transparent background from your latex? –  Will Senn Sep 1 '14 at 12:03
@WillSenn Simple quote markup (> ...) with PNG image, generated via ghostscript's pngalpha device. –  Heiko Oberdiek Sep 1 '14 at 13:24