| 7418ec5b | 15-Dec-2023 |
Vegard Nossum <[email protected]> |
docs: translations: add translations links when they exist
Add a new Sphinx extension that knows about the translations of kernel documentation and can insert links to the translations at the top of
docs: translations: add translations links when they exist
Add a new Sphinx extension that knows about the translations of kernel documentation and can insert links to the translations at the top of the document.
It basically works like this:
1. Register a new node type, LanguagesNode.
2. Register a new transform, TranslationsTransform, that inserts a new LanguageNode at the top of every document. The LanguageNode contains "pending references" to translations of the document. The key here is that these are pending (i.e. unresolved) references that may or may not actually exist.
3. Register a 'doctree-resolved' event that iterates over all the LanguageNode nodes. Any unresolved references are filtered out; the list of resolved references is passed to the 'translations.html' template and rendered as an HTML node (if HTML output is selected).
Testing: make htmldocs, make latexdocs with Sphinx v4.3.2 and Firefox.
v2: - changed bar into a drop-down menu - fixed language labels - fixed hysteresis reported by Akira Yokosawa
Cc: Federico Vaga <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Akira Yokosawa <[email protected]> Cc: Yanteng Si <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| eaf710ce | 30-Sep-2022 |
Jonathan Corbet <[email protected]> |
docs: improve the HTML formatting of kerneldoc comments
Make a few changes to cause functions documented by kerneldoc to stand out better in the rendered documentation. Specifically, change kernel-
docs: improve the HTML formatting of kerneldoc comments
Make a few changes to cause functions documented by kerneldoc to stand out better in the rendered documentation. Specifically, change kernel-doc to put the description section into a ".. container::" section, then add a bit of CSS to indent that section relative to the function prototype (or struct or enum definition). Tweak a few other CSS parameters while in the neighborhood to improve the formatting.
Acked-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
show more ...
|
| 4c047789 | 17-Jun-2017 |
Markus Heiser <[email protected]> |
docs RTD theme: code-block with line nos - lines and line numbers don't line up.
In a code-block with line numbers (option :lineno:) there is a misalignment of the rendered source code lines on the
docs RTD theme: code-block with line nos - lines and line numbers don't line up.
In a code-block with line numbers (option :lineno:) there is a misalignment of the rendered source code lines on the right side and the line numbers on the left side.
https://github.com/rtfd/sphinx_rtd_theme/issues/419
Since this issue is reported to the RTD theme project, it might be fixed in the future (take this as a interim solution).
Signed-off-by: Markus Heiser <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
show more ...
|
| 4eb40f14 | 03-Jul-2016 |
Markus Heiser <[email protected]> |
doc-rst: customize RTD theme, captions & inline literal
The layout of (table) captions in the RTD theme is a bit ugly and the bordered, red colored of inline literals is a bit to gaudy. The requirem
doc-rst: customize RTD theme, captions & inline literal
The layout of (table) captions in the RTD theme is a bit ugly and the bordered, red colored of inline literals is a bit to gaudy. The requirements has been discussed in the ML [1].
captions:
- captions should have 100% (not 85%) font size - hide the permalink symbol as long as link is not hovered
inline literal:
- drop the borderbox and red color
[1] http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/101099
Signed-off-by: Markus Heiser <[email protected]>
show more ...
|
| 9abaf979 | 03-Jul-2016 |
Markus Heiser <[email protected]> |
doc-rst: customize RTD theme, table & full width
The default table layout of the RTD theme does not fit for vast tables, like the ones we have in the linux_tv project. This has been discussed on the
doc-rst: customize RTD theme, table & full width
The default table layout of the RTD theme does not fit for vast tables, like the ones we have in the linux_tv project. This has been discussed on the ML [1].
The RTD theme is a two column layout, with a navigation column on the left and a content column on the right:
content column
RTD theme's default is 800px as max width for the content, but we have tables with tons of columns, which need the full width of the view-port (BTW: *full width* is what DocBook's HTML is).
table
- sequences of whitespace should collapse into a single whitespace. - make the overflow auto (scrollbar if needed) - align caption "left" ("center" is unsuitable on vast tables)
[1] http://article.gmane.org/gmane.linux.kernel/2216509
Signed-off-by: Markus Heiser <[email protected]>
show more ...
|