Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

url in roman font

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:

url in tt font

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

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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}

Result

share|improve this answer
    
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 at 12:03
    
@WillSenn Simple quote markup (> ...) with PNG image, generated via ghostscript's pngalpha device. –  Heiko Oberdiek Sep 1 at 13:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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