3

I want to refer an url which contains % symbols, using BibTex.

If I just write %, the rest of the line becomes a comment. If I write \%, then the slash also appears.

    @MISC{ref,
      title="title",
      note="\url{http://www.abc.com/a%20b\%20c}"
    }

Help? Is there any macro for "%"?

  • @Sergio --- the percent symbol (without the backslash) works fine for me. Please add a minimal example of your LaTeX code that reproduces the problem. – Ian Thompson May 4 '11 at 15:50
4

Why don't you create any minimal example? The following works fine

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@MISC{ref,
      title="title",
      note="\url{http://www.abc.com/a%20b\%20c}"
    }
\end{filecontents}
\documentclass{article}
\usepackage{url}

\begin{document}
\cite{ref}
\bibliography{\jobname}
\bibliographystyle{plain}
\end{document}
2

"%20" is a space character. You can just use \url{http://www.abc.com/a b c and when the user clicks the URL they will be taken to a%20b%20c.

  • 1
    Yeah, that's right, but the problem is that when inside a url, the spaces are not shown. I solved it by doing \url{abc.com/a} \url{b} \url{c} – Sérgio May 4 '11 at 15:13
1

Have you tried http://www.abc.com/a\% 20b\% 20c?

  • still the same, it ignores the spaces and adds the slashes. Result: abc.com/a\%20b\%20c? – Sérgio May 4 '11 at 12:05
  • This answer works for me – Anson Yao Nov 25 '15 at 23:11

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.