diff --git a/legalmd/latex_renderer.py b/legalmd/latex_renderer.py index 8b7aed4..c36bb22 100644 --- a/legalmd/latex_renderer.py +++ b/legalmd/latex_renderer.py @@ -96,7 +96,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer): if token.full_label(): sha = hashlib.sha256() sha.update(token.full_label().encode('utf-8')) - hyperlink = format(r'\hypertarget{}{}', + hyperlink = format(r'\makebox[0pt]{\hypertarget{}{}}', linkname=sha.hexdigest() ) else: @@ -161,7 +161,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer): if token.full_label(): sha = hashlib.sha256() sha.update(token.full_label().encode('utf-8')) - hyperlink = format(r'\hypertarget{}{}', + hyperlink = format(r'\makebox[0pt]{\hypertarget{}{}}', linkname=sha.hexdigest() ) else: