Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10175: LaTeX: named footnote ref is linked to an incorrect footnote #10190

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -32,6 +32,8 @@ Bugs fixed
unhashable object
* #9529: LaTeX: named auto numbered footnote (ex. ``[#named]``) that is referred
multiple times was rendered to a question mark
* #10175: LaTeX: named footnote reference is linked to an incorrect footnote if
the name is also used in the different document
* #10181: napoleon: attributes are displayed like class attributes for google
style docstrings when :confval:`napoleon_use_ivar` is enabled
* #10122: sphinx-build: make.bat does not check the installation of sphinx-build
Expand Down
1 change: 1 addition & 0 deletions sphinx/writers/latex.py
Expand Up @@ -571,6 +571,7 @@ def depart_document(self, node: Element) -> None:

def visit_start_of_file(self, node: Element) -> None:
self.curfilestack.append(node['docname'])
self.body.append(CR + r'\sphinxstepscope' + CR)

def depart_start_of_file(self, node: Element) -> None:
self.curfilestack.pop()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_build_latex.py
Expand Up @@ -1197,6 +1197,7 @@ def test_latex_table_tabulars(app, status, warning):
tables = {}
for chap in re.split(r'\\(?:section|chapter){', result)[1:]:
sectname, content = chap.split('}', 1)
content = re.sub(r'\\sphinxstepscope', '', content) # filter a separator
tables[sectname] = content.strip()

def get_expected(name):
Expand Down Expand Up @@ -1266,6 +1267,7 @@ def test_latex_table_longtable(app, status, warning):
tables = {}
for chap in re.split(r'\\(?:section|chapter){', result)[1:]:
sectname, content = chap.split('}', 1)
content = re.sub(r'\\sphinxstepscope', '', content) # filter a separator
tables[sectname] = content.strip()

def get_expected(name):
Expand Down