Documentation/conf.py | 81 ++++++++++++++++++---- Documentation/translations/conf.py | 12 ---- Documentation/translations/ja_JP/index.rst | 4 +- Documentation/translations/ko_KR/index.rst | 5 +- Documentation/translations/zh_CN/index.rst | 4 +- Documentation/translations/zh_TW/index.rst | 4 +- 6 files changed, 75 insertions(+), 35 deletions(-) delete mode 100644 Documentation/translations/conf.py
Hi,
This is a follow-up series to the CJK font setting patch series [1]
upstreamed in v5.15.
[1]: https://lore.kernel.org/r/39d0fb0f-b248-bca4-2dac-df69e8d697b1@gmail.com
There is still a lot of room for improvement in the layout of PDF docs.
This series resolves issues listed below:
1. Some of chapter and section counts in Table of Contents (TOC) in
large PDF docs collide with chapter/section titles, e.g., Chapters 10,
11, 12, and 13 and Section 10.10 in userspace-api.pdf.
2. In docs of more than 99 pages, page counts in TOC are not aligned
properly when maxdepth >= 2 is specified in toctree, e.g., Chapters 10,
12, and 13 in userspace-api.pdf
3. In TOC of Latin-script docs, quotation and apostrophe symbols look too
wide, e.g., Section 2.2 in userspace-api.pdf.
4. In TOC of translations, Korean chapter titles lose inter-phrase spaces.
5. On systems without "Noto Sans CJK" fonts, CJK chapters in translations
results in full of "TOFU" boxes, with a long build time and a large
log file containing lots of missing-font warnings.
6. In translations.pdf built by "make pdfdocs", ascii-art diagrams in CJK
are not aligned properly.
Patch 1/5 resolves issues #1 and #2 by tweaking width parameters for TOC.
Patch 2/5 resolves issue #3 by switching CJK default font to the KR variant,
whose quotation and apostrophe symbols are half width.
Patch 3/5 resolves issue #4 by enabling CJKspace in TOC by default.
Patch 4/5 resolves issue #5 by conditionally skipping CJK contents in
PDF docs.
Patch 5/5 resolves issue #6 by moving font settings under
translations/conf.py to CJK-specific macros in main conf.py
This series is tested against Sphinx versions 1.7.9, 2.4.4, and 4.4.0.
It does not affect HTML docs.
Thanks, Akira
--
Akira Yokosawa (5):
docs: pdfdocs: Tweak width params of TOC
docs: pdfdocs: Switch default CJK font to KR variants
docs: pdfdocs: Enable CJKspace in TOC for Korean titles
docs/translations: Skip CJK contents if suitable fonts not found
docs: pdfdocs: Move CJK monospace font setting to main conf.py
Documentation/conf.py | 81 ++++++++++++++++++----
Documentation/translations/conf.py | 12 ----
Documentation/translations/ja_JP/index.rst | 4 +-
Documentation/translations/ko_KR/index.rst | 5 +-
Documentation/translations/zh_CN/index.rst | 4 +-
Documentation/translations/zh_TW/index.rst | 4 +-
6 files changed, 75 insertions(+), 35 deletions(-)
delete mode 100644 Documentation/translations/conf.py
base-commit: 854d0982eef0e424e8108d09d9275aaf445b1597
--
2.17.1
Akira Yokosawa <akiyks@gmail.com> writes: > Hi, > > This is a follow-up series to the CJK font setting patch series [1] > upstreamed in v5.15. > > [1]: https://lore.kernel.org/r/39d0fb0f-b248-bca4-2dac-df69e8d697b1@gmail.com > > There is still a lot of room for improvement in the layout of PDF docs. > > This series resolves issues listed below: > > 1. Some of chapter and section counts in Table of Contents (TOC) in > large PDF docs collide with chapter/section titles, e.g., Chapters 10, > 11, 12, and 13 and Section 10.10 in userspace-api.pdf. > 2. In docs of more than 99 pages, page counts in TOC are not aligned > properly when maxdepth >= 2 is specified in toctree, e.g., Chapters 10, > 12, and 13 in userspace-api.pdf > 3. In TOC of Latin-script docs, quotation and apostrophe symbols look too > wide, e.g., Section 2.2 in userspace-api.pdf. > 4. In TOC of translations, Korean chapter titles lose inter-phrase spaces. > 5. On systems without "Noto Sans CJK" fonts, CJK chapters in translations > results in full of "TOFU" boxes, with a long build time and a large > log file containing lots of missing-font warnings. > 6. In translations.pdf built by "make pdfdocs", ascii-art diagrams in CJK > are not aligned properly. I've applied the set, thanks. I do notice that Documentation/conf.py is getting large and unapproachable. At some future point, it might be nice to pull all of the latex stuff out into a separate file where it won't scare people who stumble into it by accident. Thanks, jon
On Tue, 15 Feb 2022 16:46:32 -0700,
Jonathan Corbet wrote:
> I've applied the set, thanks.
>
> I do notice that Documentation/conf.py is getting large and
> unapproachable.
Yes, I was having the same impression.
> At some future point, it might be nice to pull all of
> the latex stuff out into a separate file where it won't scare people who
> stumble into it by accident.
I have an idea to accomplish this.
Will prepare a follow-up patch once you push the docs-next branch with this
set applied.
Thanks, Akira
>
> Thanks,
>
> jon
On Wed, 16 Feb 2022 22:00:04 +0900,
Akira Yokosawa wrote:
> On Tue, 15 Feb 2022 16:46:32 -0700,
> Jonathan Corbet wrote:
>
>> I've applied the set, thanks.
>>
>> I do notice that Documentation/conf.py is getting large and
>> unapproachable.
>
> Yes, I was having the same impression.
>
>> At some future point, it might be nice to pull all of
>> the latex stuff out into a separate file where it won't scare people who
>> stumble into it by accident.
>
> I have an idea to accomplish this.
>
> Will prepare a follow-up patch once you push the docs-next branch with this
> set applied.
Jon,
The head of docs-next I see is commit 4fbe7b19a948 ("docs: Fix wording in
optional zram feature docs").
I think you have applied my patch set on top of it.
I'd like you to push up-to-date docs-next so that I can start preparing
a follow-up patch.
Thanks, Akira
Akira Yokosawa <akiyks@gmail.com> writes:
> The head of docs-next I see is commit 4fbe7b19a948 ("docs: Fix wording in
> optional zram feature docs").
> I think you have applied my patch set on top of it.
> I'd like you to push up-to-date docs-next so that I can start preparing
> a follow-up patch.
Apologies, I thought I'd done that - done now.
Thanks,
jon
© 2016 - 2026 Red Hat, Inc.