How do I put a \url{} in a \marginnote{} without error using tufte-book document? I have already tried \marginnote{\url{http}} but I get the error illegal parameter number in definition of ...

  • 5
    The following: \documentclass{tufte-book} \begin{document} AAA \marginnote{\url{http}} \end{document} works OK (pdflatex, MikTeX). Additional information, in particular MWE, is needed. – Przemysław Scherwentke Dec 9 '13 at 6:43


It seems to work fine, if you load the url package. You need to escape special symbols like $, % or # using a preceeding \, as in \#. See also th example.




enter image description here

| improve this answer | |
  • 2
    I think the OP has got some illegal characters like # in the real url... – Stephan Lehmke Dec 9 '13 at 11:39
  • No it doesn't. See how third line it overflows because of the dashes (-) if you keep on adding more dashes it won't wrap. – user14492 Apr 2 '18 at 21:13
  • @user14492 \usepackage[hyphens]{url} – Henri Menke Apr 2 '18 at 21:21
  • Now I get option clash for url... – user14492 Apr 2 '18 at 21:29
  • 1
    @user14492 \PassOptionsToPackage{hyphens}{url} before \documentclass – Henri Menke Apr 2 '18 at 21:32

It works partially when you make a citation of the style \cite{some-citation}. I found it much better to use the call to \url{} inside the bibliography document as opposed to the call. It wraps the long URL just fine in the margin notes.


  title={What is a Codebook?},
  journal={ICPSR Find & Analyze Data},

and then cite the author with \cite{codebook}. This works just fine in my documents.

| improve this answer | |

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.