mkdocs-texsmith 0.3.0__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/PKG-INFO +2 -5
  2. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/README.md +0 -3
  3. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/src/mkdocs_plugin_texsmith/plugin.py +7 -12
  4. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/.editorconfig +0 -0
  5. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/.gitignore +0 -0
  6. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/.markdownlint.yaml +0 -0
  7. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/LICENSE.md +0 -0
  8. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/Makefile +0 -0
  9. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/docs/about.md +0 -0
  10. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/docs/images/latex-hummingbird.svg +0 -0
  11. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/docs/index.md +0 -0
  12. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/hatch_build.py +0 -0
  13. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/mkdocs.yml +0 -0
  14. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/noxfile.py +0 -0
  15. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/press/index.pdf +0 -0
  16. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/press/index.tex +0 -0
  17. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/pyproject.toml +0 -0
  18. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/src/mkdocs_plugin_texsmith/__init__.py +0 -0
  19. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/tests/test_import.py +0 -0
  20. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/tests/test_plugin_config.py +0 -0
  21. {mkdocs_texsmith-0.3.0 → mkdocs_texsmith-0.4.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocs-texsmith
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Convert MkDocs documentation to LaTeX PDF.
5
5
  Project-URL: Homepage, https://github.com/yves-chevallier/mkdocs-texsmith
6
6
  Author-email: Yves Chevallier <yves.chevalier@heig-vd.ch>
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: texsmith==0.3.0
17
+ Requires-Dist: texsmith==0.4.0
18
18
  Description-Content-Type: text/markdown
19
19
 
20
20
  # MkDocs TeXSmith Plugin
@@ -78,7 +78,6 @@ All plugin options are declared under the `texsmith` plugin entry.
78
78
  - `bibliography` (list[str]): global `.bib` files applied to every book.
79
79
  - `books` (list[dict]): per-book configuration (see below).
80
80
  - `template_overrides` (dict[str, str]): map of template block names to override files.
81
- - `register_material` (bool): register Material for MkDocs specific renderers (enabled by default).
82
81
 
83
82
  ### Multiple books
84
83
 
@@ -126,8 +125,6 @@ plugins:
126
125
  cover: overrides/custom_cover.tex.j2
127
126
  ```
128
127
 
129
- The plugin automatically registers TeXSmith's Material integration when `register_material` is `true`, aligning colors and fonts with the Material theme if you use it.
130
-
131
128
  ### Assets and HTML snapshots
132
129
 
133
130
  - `copy_assets: true` copies images and other referenced files into `<build_dir>/<book>/assets/`.
@@ -59,7 +59,6 @@ All plugin options are declared under the `texsmith` plugin entry.
59
59
  - `bibliography` (list[str]): global `.bib` files applied to every book.
60
60
  - `books` (list[dict]): per-book configuration (see below).
61
61
  - `template_overrides` (dict[str, str]): map of template block names to override files.
62
- - `register_material` (bool): register Material for MkDocs specific renderers (enabled by default).
63
62
 
64
63
  ### Multiple books
65
64
 
@@ -107,8 +106,6 @@ plugins:
107
106
  cover: overrides/custom_cover.tex.j2
108
107
  ```
109
108
 
110
- The plugin automatically registers TeXSmith's Material integration when `register_material` is `true`, aligning colors and fonts with the Material theme if you use it.
111
-
112
109
  ### Assets and HTML snapshots
113
110
 
114
111
  - `copy_assets: true` copies images and other referenced files into `<build_dir>/<book>/assets/`.
@@ -44,7 +44,7 @@ from texsmith.adapters.latex.tectonic import (
44
44
  select_makeglossaries,
45
45
  select_tectonic_binary,
46
46
  )
47
- from texsmith.adapters.plugins import material, snippet
47
+ from texsmith.adapters.plugins import snippet
48
48
  from texsmith.core.bibliography import (
49
49
  BibliographyCollection,
50
50
  DoiBibliographyFetcher,
@@ -55,10 +55,7 @@ from texsmith.core.bibliography import (
55
55
  from texsmith.core.config import BookConfig, LaTeXConfig
56
56
  from texsmith.core.context import DocumentState
57
57
  from texsmith.core.conversion import extract_front_matter_bibliography
58
- from texsmith.core.conversion.core import (
59
- ensure_fallback_converters,
60
- render_with_fallback,
61
- )
58
+ from texsmith.core.conversion.core import render_with_fallback
62
59
  from texsmith.core.conversion.debug import format_rendering_error
63
60
  from texsmith.core.conversion.inputs import (
64
61
  InlineBibliographyEntry,
@@ -147,7 +144,6 @@ class LatexPlugin(BasePlugin):
147
144
  ("bibliography", config_options.Type(list, default=[])),
148
145
  ("books", config_options.Type(list, default=[])),
149
146
  ("template_overrides", config_options.Type(dict, default={})),
150
- ("register_material", config_options.Type(bool, default=True)),
151
147
  )
152
148
 
153
149
  def __init__(self) -> None:
@@ -235,7 +231,6 @@ class LatexPlugin(BasePlugin):
235
231
  logger_obj=log,
236
232
  debug_enabled=self._is_serve,
237
233
  )
238
- ensure_fallback_converters()
239
234
  return config
240
235
 
241
236
  def on_nav(
@@ -478,9 +473,6 @@ class LatexPlugin(BasePlugin):
478
473
  parser=parser_backend,
479
474
  copy_assets=copy_assets,
480
475
  )
481
- if self.config.get("register_material", True):
482
- material.register(renderer)
483
- snippet.register(renderer)
484
476
  return renderer
485
477
 
486
478
  inline_bibliography_specs: list[
@@ -620,8 +612,11 @@ class LatexPlugin(BasePlugin):
620
612
 
621
613
  if not entry.is_page:
622
614
  if entry.title and effective_level >= slot_base:
623
- fragment = heading_formatter.heading(
624
- entry.title, level=effective_level, numbered=entry.numbered
615
+ fragment = heading_formatter.render_template(
616
+ "heading",
617
+ entry.title,
618
+ level=effective_level,
619
+ numbered=entry.numbered,
625
620
  )
626
621
  target_buffer_embed.append(fragment)
627
622
  target_buffer_link.append(fragment)
File without changes