Fix vertical positioning of hyperlinks
This commit is contained in:
parent
122c18fa69
commit
ae62f90bf8
@ -109,7 +109,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
|
|||||||
if token.full_label():
|
if token.full_label():
|
||||||
sha = hashlib.sha256()
|
sha = hashlib.sha256()
|
||||||
sha.update(token.full_label().encode('utf-8'))
|
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()
|
linkname=sha.hexdigest()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -182,7 +182,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
|
|||||||
if token.full_label():
|
if token.full_label():
|
||||||
sha = hashlib.sha256()
|
sha = hashlib.sha256()
|
||||||
sha.update(token.full_label().encode('utf-8'))
|
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()
|
linkname=sha.hexdigest()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user