Latex错误 Illegal parameter number in definition of Hy@tempa

    科技2022-07-13  155

    问题描述

    在论文中添加一个url后:

    Take this \url{https://github.com/#abcd} for example.

    出现报错

    Illegal parameter number in definition of Hy@tempa

     

    解决方法

    参考  https://kba49.wordpress.com/2013/04/12/illegal-parameter-number-in-definition-of-hytempa/

    原解答:You used a # in a \url{} without escaping it. Escape it by prepending the # with a backslash, like so: \#.

    因此将之前的代码改为:

    Take this \url{https://github.com/\#abcd} for example.

    即可解决。

     

    经实验,无论是正文还是bibtex中的链接里的#都会导致该错误

     

    Processed: 0.008, SQL: 8