Skip to content
Snippets Groups Projects
  1. Jan 11, 2023
  2. Jan 06, 2023
    • Jonathan Corbet's avatar
      docs: Deprecate use of Sphinx < 2.4.x · 31abfdda
      Jonathan Corbet authored
      
      The Sphinx 2.4 release is three years old, and it is becoming increasingly
      difficult to even find a system with an sufficiently archaic Python
      installation that can run versions older than that.  I can no longer test
      changes against anything prior to 2.4.x.
      
      Move toward raising our minimum Sphinx requirement to 2.4.x so we can
      delete some older support code and claim to support a range of versions
      that we can actually test.
      
      In the absence of screams, the actual removal of support can happen later
      in 2023.
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      31abfdda
  3. Nov 09, 2022
    • Daniel Vetter's avatar
      docs/sphinx: More depth in the rtd sidebar toc · e17f2260
      Daniel Vetter authored
      
      We love to nest our documenation for good structure, but that means
      the table of contents needs to keep up or you can't navigate them.
      
      Realized this trying to find the drm property documentation, which
      with some shuffling around disappeared. Why I didn't realize we can do
      this earlier, no idea.
      
      Since the relevant parts of the toc are only loaded if you're in the
      right .html file there's no harm in going all the way to unlimited.
      
      Note that this has no impact on the alabaster theme (which has a much
      simpler sidebar toc which doesn't show the entire hierarchy, only
      what's in the local rendered file) nor on the various :toctree:
      rendered inline in the output.
      
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: linux-doc@vger.kernel.org
      Link: https://lore.kernel.org/r/20221108115707.1232621-1-daniel.vetter@ffwll.ch
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      e17f2260
  4. Nov 01, 2022
    • Jonathan Corbet's avatar
      docs: Don't wire font sizes for HTML output · bd5d1cc8
      Jonathan Corbet authored
      
      The alabaster theme likes to provide explicit sizes for fonts, which
      overrides the users's own browser settings and is guaranteed to displease
      folks.  Set the font size to "inherit" so that the users browser settings
      control the font size they get.  We can use the font_size configuration
      option for the main body font (changing the size I'd already put there),
      but the sidebar size can only be set via custom CSS.
      
      Reported-by: default avatarBagas Sanjaya <bagasdotme@gmail.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      bd5d1cc8
  5. Oct 18, 2022
  6. Oct 13, 2022
  7. Sep 29, 2022
  8. Sep 27, 2022
  9. Aug 26, 2022
  10. Jun 01, 2022
  11. Feb 24, 2022
    • Akira Yokosawa's avatar
      docs: pdfdocs: Pull LaTeX preamble part out of conf.py · 398f7abd
      Akira Yokosawa authored
      Quote from Jon's remark [1]:
      
          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.
      
      Pull LaTeX preamble settings added since commit 3b4c9632 ("docs:
      conf.py: adjust the LaTeX document output") out into
      sphinx/kerneldoc-preamble.sty.
      
      It will be copied to the build directory by the added
      "latex_additional_files" setting in conf.py.
      
      As a bonus, LaTeX/TeX code can be maintained without escaping backslashes.
      
      To compensate the loss of change history in sphinx/kerneldoc-preamble.sty,
      here is a list of changes made in conf.py:
      
        - f7ebe6b7 ("docs: Activate exCJK only in CJK chapters")
        - 0afd4df0 ("docs: pdfdocs: Prevent column squeezing by tabulary")
        - 659653c9 ("docs: pdfdocs: Refactor config for CJK document")
        - e291ff6f ("docs: pdfdocs: Add CJK-language-specific font settings")
        - 7eb368cc ("docs: pdfdocs: Choose Serif font as CJK mainfont if possible")
        - 35382965 ("docs: pdfdocs: Preserve inter-phrase space in Korean translations")
        - 77abc2c2 ("docs: pdfdocs: One-half spacing for CJK translations")
        - 788d28a2 ("docs: pdfdocs: Permit AutoFakeSlant for CJK fonts")
        - 29ac9822 ("docs: pdfdocs: Teach xeCJK about character classes of quotation marks")
        - 7c5c18bd ("docs: pdfdocs: Fix typo in CJK-language specific font settings")
        - aa872e06 ("docs: pdfdocs: Adjust \headheight for fancyhdr")
        - 8716ef41 ("docs: pdfdocs: Tweak width params of TOC")
        - 66939df5 ("docs: pdfdocs: Switch default CJK font to KR variants")
        - 7b686a2e ("docs: pdfdocs: Enable CJKspace in TOC for Korean titles")
        - 5d9158e3 ("docs/translations: Skip CJK contents if suitable fonts not found")
        - b774cc46 ("docs: pdfdocs: Move CJK monospace font setting to main conf.py")
      
      [1]: https://lore.kernel.org/all/87zgmr66cn.fsf@meer.lwn.net/
      
      
      
      Suggested-by: default avatarJonathan Corbet <corbet@lwn.net>
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Link: https://lore.kernel.org/r/aaa9dca1-27c0-c414-77f3-c5587db0cc5b@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      398f7abd
  12. Feb 15, 2022
    • Akira Yokosawa's avatar
      docs: pdfdocs: Move CJK monospace font setting to main conf.py · b774cc46
      Akira Yokosawa authored
      
      As LaTeX macros for CJK font settings can have Latin-script font
      settings as well, settings under Documentation/translations/ can
      be moved to the main conf.py.
      
      By this change, translations.pdf built by top-level "make pdfdocs"
      can have properly aligned ascii-art diagrams except for Korean
      ones.
      
      For the reason of remaining misalignment in Korean diagrams, see
      changelog of commit a90dad8f ("docs: pdfdocs: Add conf.py
      local to translations for ascii-art alignment").
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/eb87790a-03f4-9f29-c8a3-ef2c3e78ca18@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      b774cc46
    • Akira Yokosawa's avatar
      docs/translations: Skip CJK contents if suitable fonts not found · 5d9158e3
      Akira Yokosawa authored
      
      On systems without "Noto Sans CJK" fonts, CJK chapters in
      translations.pdf are full of "TOFU" boxes, with a long build time and
      a large log file containing lots of missing-font warnings.
      
      Avoid such waste of time and resources by skipping CJK chapters when
      CJK fonts are not available.
      
      To skip whole chapters, change the definition of
      \kerneldocBegin{SC|TC|KR|JP} commands so that they can have an argument
      to be ignored.
      This works as far as the argument (#1) is not used in the command.
      In place of skipped contents, put a note on skipped contents at the
      beginning of the PDF.
      
      Change the call sites in index.rst of CJK translations accordingly.
      
      When CJK fonts are available, existing command definitions with
      no argument just work.  LaTeX engine will see additional pairs of
      "{" and "}", which add a level of grouping without having any effect
      on typesetting.
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/3359ca41-b81d-b2c7-e437-7618efbe241d@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      5d9158e3
    • Akira Yokosawa's avatar
      docs: pdfdocs: Enable CJKspace in TOC for Korean titles · 7b686a2e
      Akira Yokosawa authored
      
      Korean (Hangul) titles in Table of Contents of translations.pdf
      don't have inter-phrase spaces.
      
      This is because the CJKspace option of xeCJK is disabled by
      default.
      
      Restore the spaces by enabling the option at the beginning of every
      document and disable it in the \kerneldocBegin{SC|TC|JP} commands.
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/19141b3e-01d9-1f6d-5020-42fbda784831@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      7b686a2e
    • Akira Yokosawa's avatar
      docs: pdfdocs: Switch default CJK font to KR variants · 66939df5
      Akira Yokosawa authored
      
      xeCJK is enabled in Table of Contents (TOC) so that translations.pdf
      built by top-level "make pdfdocs" can have its TOC typeset properly.
      
      This causes quotation marks and apostrophe symbols appear too wide in
      Latin-script docs.
      This is because (1) Sphinx converts ASCII symbols into multi-byte
      UTF-8 ones in LaTeX and (2) in the SC variant of "Noto CJK" font
      families, those UTF-8 symbols have full-width glyph.
      
      The KR variant of the font families has half-width glyph for those
      symbols and TOC pages should look nicer when it is used instead.
      
      Switch the default CJK font families to the KR variant and teach
      xeCJK of those symbols' widths.
      To compensate the switch, teach xeCJK of the width in the SC and
      TC variants.
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/0c8ea878-0a6f-ea01-ab45-4e66c5facee9@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      66939df5
    • Akira Yokosawa's avatar
      docs: pdfdocs: Tweak width params of TOC · 8716ef41
      Akira Yokosawa authored
      Sphinx has its own set of width parameters of Table of Contents (TOC)
      for LaTeX defined in its class definition of sphinxmanual.cls.
      It also inherits parameters for chapter entries from report.cls of
      original LaTeX base.
      
      However, they are optimized assuming small documents with tens of
      pages and chapters/sections of less than 10.
      
      To cope with some of kernel-doc documents with more than 1000
      pages and several tens of chapters/sections, definitions of those
      parameters need to be adjusted.
      
      Unfortunately, those parameters are hard coded in the class
      definitions and need low-level LaTeX coding tricks to redefine.
      
      As Sphinx 1.7.9 does not have \sphinxtableofcontentshook,
      which defines those parameters in later Sphinx versions,
      for compatibility with both pre-1.8 and later Sphinx versions,
      empty the hook altogether and redefine \@pnumwidth, \l@chapter,
      \l@section, and \@subsection commands originally defined in
      report.cls.
      
      Summary of parameter changes:
      
        Width of page number (\@pnumwidth): 1.55em  -> 2.7em
        Width of chapter number:  1.5em -> 1.8em
        Indent of section number: 1.5em -> 1.8em
        Width of section number:  2.6em -> 3.2em
        Indent of subsection number: 4.1em -> 5em
        Width of subsection number:  3.5em -> 4.3em
      
      Notes:
      1. Parameters for subsection become relevant only when
         ":maxdepth: 3" is specified under "toctree::" (e.g., RCU/index.rst).
         They can hold subsection numbers up to 5 digits such as "18.7.13"
         (in RCU.pdf).
      
      2. Number of chapters in driver-api.pdf is getting closer to 100.
         When it reaches 100, another set of tweaks will be necessary.
      
      3. The low-level LaTeX trick is mentioned in "Unofficial LaTeX2e
         reference manual" at:
              http://latexref.xyz/Table-of-contents-etc_002e.html
      
      
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/e52b4718-7909-25be-fbc1-76800aa62ae3@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      8716ef41
  13. Dec 10, 2021
  14. Nov 29, 2021
  15. Oct 12, 2021
  16. Sep 06, 2021
  17. Aug 12, 2021
  18. Jun 17, 2021
  19. Jun 01, 2021
  20. May 27, 2021
  21. Mar 09, 2021
  22. Feb 22, 2021
  23. Feb 01, 2021
  24. Dec 11, 2020
  25. Dec 03, 2020
Loading