Fix vertical positioning of hyperlinks

This commit is contained in:
RunasSudo 2021-09-09 00:43:08 +10:00
parent 122c18fa69
commit ae62f90bf8
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,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'\makebox[0pt]{\hypertarget{<linkname>}{}}',
hyperlink = format(r'\makebox[0pt]{\raisebox{1em}{\hypertarget{<linkname>}{}}}',
linkname=sha.hexdigest()
)
else:
@ -182,7 +182,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'\makebox[0pt]{\hypertarget{<linkname>}{}}',
hyperlink = format(r'\makebox[0pt]{\raisebox{1em}{\hypertarget{<linkname>}{}}}',
linkname=sha.hexdigest()
)
else: