Fix TeX page breaking issues caused by hypertarget
This commit is contained in:
parent
dad59c3d3d
commit
7a7227e309
@ -96,7 +96,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'\hypertarget{<linkname>}{}',
|
hyperlink = format(r'\makebox[0pt]{\hypertarget{<linkname>}{}}',
|
||||||
linkname=sha.hexdigest()
|
linkname=sha.hexdigest()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -161,7 +161,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'\hypertarget{<linkname>}{}',
|
hyperlink = format(r'\makebox[0pt]{\hypertarget{<linkname>}{}}',
|
||||||
linkname=sha.hexdigest()
|
linkname=sha.hexdigest()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user