Slightly improve some #14213 latex.py code (#14217)

This commit is contained in:
Jean-François B.
2025-12-26 20:12:57 +00:00
committed by GitHub
parent 515fe33b9c
commit 4ba6322265
+4 -1
View File
@@ -2287,7 +2287,10 @@ class LaTeXTranslator(SphinxTranslator):
+ CR
)
_lineno = _chunksize + 1
if _e[-1] == ']':
# _e always starts with r'[commandchars=\\\{\}' and ends with
# ']' but let's make sure, for maximal generality, that _e[:-1]
# does not trigger index out of range.
if _e:
_e = _e[:-1] + ',firstnumber=last]'
else:
_e = '[firstnumber=last]'