It seems that the symbol # on the \url inside \footnote is producing an error when pdf is compiled. This is reproduced by the MWE below.

\usepackage[headheight=18pt,a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm, headsep=18pt]{geometry}
\usepackage[numbers, super]{natbib}
  formula = chemformula ,
  modules = all



! Illegal parameter number in definition of \Hy@tempa.
<to be read again>
l.20 ...rl{https://chemicalize.com/#/calculation}}
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
! Illegal parameter number in definition of \Hy@tempa.
<to be read again>

I search similar posts about # but couldn't find anything. Any help?


Define the url before the footnote with \urldef:




enter image description here

  • sorry, but if you include mhchem in preamble, this doesn't work. it seems, that mhchem is not compatible with url. tested with recent miktex. – Zarko Oct 6 '17 at 9:25
  • @Zarko: Works fine for me even with mhchem. (At least I get not error). Can you show your log-file? – Ulrike Fischer Oct 6 '17 at 9:29
  • log file: ! LaTeX error: "kernel/property-unknown" ! The key property '.value_required:' is unknown. ! See the LaTeX3 documentation for further information. ! For immediate help type H <return>. – Zarko Oct 6 '17 at 9:34
  • @Zarko Sounds like an outdated expl3. Did you run updates as user and as admin? (Edit: no, .value_required:n is the new code, .value_required: is old, so some package is probably outdated). – Ulrike Fischer Oct 6 '17 at 9:41
  • i use my pc as administrator. so far i didn't need to upgrade my miktex as user, it was sufficient as administrator. i should have recent expl3. – Zarko Oct 6 '17 at 9:53

I had a similar problem with Overleaf and an easy workaround was escaping the "#" with "\".

See example:

\footnote{Some constrains apply, see \url{https://developers.google.com/analytics/devguides/reporting/realtime/v3/devguide\#constraints}}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy