Skip to content

Commit 70ff1fe

Browse files
committed
Merge tag 'docs-6.8-fixes3' of git://git.lwn.net/linux
Pull two documentation build fixes from Jonathan Corbet: - The XFS online fsck documentation uses incredibly deeply nested subsection and list nesting; that broke the PDF docs build. Tweak a parameter to tell LaTeX to allow the deeper nesting. - Fix a 6.8 PDF-build regression * tag 'docs-6.8-fixes3' of git://git.lwn.net/linux: docs: translations: use attribute to store current language docs: Instruct LaTeX to cope with deeper nesting
2 parents c46ac50 + b7b2ffc commit 70ff1fe

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Documentation/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ def get_cline_version():
388388
verbatimhintsturnover=false,
389389
''',
390390

391+
#
392+
# Some of our authors are fond of deep nesting; tell latex to
393+
# cope.
394+
#
395+
'maxlistdepth': '10',
396+
391397
# For CJK One-half spacing, need to be in front of hyperref
392398
'extrapackages': r'\usepackage{setspace}',
393399

Documentation/sphinx/translations.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
}
3030

3131
class LanguagesNode(nodes.Element):
32-
def __init__(self, current_language, *args, **kwargs):
33-
super().__init__(*args, **kwargs)
34-
35-
self.current_language = current_language
32+
pass
3633

3734
class TranslationsTransform(Transform):
3835
default_priority = 900
@@ -49,7 +46,8 @@ def apply(self):
4946
# normalize docname to be the untranslated one
5047
docname = os.path.join(*components[2:])
5148

52-
new_nodes = LanguagesNode(all_languages[this_lang_code])
49+
new_nodes = LanguagesNode()
50+
new_nodes['current_language'] = all_languages[this_lang_code]
5351

5452
for lang_code, lang_name in all_languages.items():
5553
if lang_code == this_lang_code:
@@ -84,7 +82,7 @@ def process_languages(app, doctree, docname):
8482

8583
html_content = app.builder.templates.render('translations.html',
8684
context={
87-
'current_language': node.current_language,
85+
'current_language': node['current_language'],
8886
'languages': languages,
8987
})
9088

0 commit comments

Comments
 (0)