You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Overleaf编译报错:\Hy@babelnormalise多余}及pdfTeX错误求助

解决Overleaf中LaTeX编译的Argument of \Hy@babelnormalise has an extra }及pdfTeX错误

错误分析

从编译日志来看,核心问题出在表格目录文件(output.lot)的超链接代码中:

  • PubMed链接里的\relax导致\Hy@babelnormalise命令解析出错,出现多余的}匹配问题;
  • 进而触发垂直模式下无法执行\pdfendlink的pdfTeX错误;
  • 回滚版本后错误未消除,大概率是Overleaf未自动清理旧的辅助文件(如.lot、.aux),残留了错误代码。

解决步骤

  • 清理辅助文件重新编译:在Overleaf左上角点击「Menu」,选择「Recompile from scratch」,强制删除所有旧辅助文件后重新编译。也可手动删除项目中的.aux、.lot、.lof、.toc、.out等文件。
  • 修正超链接代码:检查表格标题中的PubMed链接,移除多余的\relax,确保URL格式正确。例如将错误写法:
    \href{https://pubmed.ncbi.nlm.nih.gov/?term=\relax}{...}
    
    修改为:
    \href{https://pubmed.ncbi.nlm.nih.gov/?term=}{...}
    
    若URL包含特殊字符,可使用\detokenize包裹URL部分避免解析冲突:
    \href{\detokenize{https://pubmed.ncbi.nlm.nih.gov/?term=your-search-term}}{PubMed链接}
    
  • 检查包加载顺序:确保hyperref包在babel包之后加载,避免两者冲突:
    \usepackage[english]{babel}
    \usepackage{hyperref}
    
  • 临时应急方案:若需快速编译,可临时关闭超链接显示,添加参数:
    \usepackage[hidelinks]{hyperref}
    
    或暂时注释掉表格标题中的超链接代码,先完成编译再逐步排查。

错误日志详情

Argument of \Hy@babelnormalise has an extra }.

‪output.lot, 6‬

\par
l.6 ...nih.gov/?term=\relax }}{2}{table.caption.8}
%
I've run across a }' that doesn't seem to match anything. For example, \def\a#1{...}' and \a}' would produce this error. If you simply proceed now, the \par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your }' was spurious, just type 2' and it will go away.

Runaway argument?
https://pubmed.ncbi.nlm.nih.gov/?term=\relax
! Paragraph ended before \Hy@babelnormalise was complete.

\par
l.6 ...nih.gov/?term=\relax }}{2}{table.caption.8}
%
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

pdfTeX error (ext1): \pdfendlink cannot be used in vertical mode.

‪main.tex, 6‬
\close@pdflink ...\Hy@VerboseLinkStop \pdfendlink

l.6 ...nih.gov/?term=\relax }}{2}{table.caption.8}
%

内容的提问来源于stack exchange,提问作者Lou

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.22 12:55:36