2

I have the following code:

\documentclass{article}

\usepackage{url}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref} %Hyperlinks


\begin{document}

Fatal error: Call to undefined method stdClass::type() in \url{C:\wamp\www\mysite\sites\all\modules\userpoints\userpoints_rules.rules.inc}

\end{document}

It returns an error. However, when I comment the third line, there's no problem. Changing the order of the second and third line doesn't help. I need the hyperref package somewhere else in my document, so simply deleting the third line is not an option.

How can I solve this?

  • All thos backslashes are treated as control sequences. Replace them with forward shlashes, don't worry, this works on windows. Also, use \path instead of \url – Johannes_B Dec 18 '13 at 14:26
4

url (which is loaded automatically by hyperref) provides a command called \path which you can use.

\documentclass{article}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref} %Hyperlinks

\begin{document}

Fatal error: Call to undefined method stdClass::type() in \path{C:\wamp\www\mysite\sites\all\modules\userpoints\userpoints_rules.rules.inc}

\end{document}

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.