pytex-preprocessor 0.4.2__tar.gz → 0.4.3__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 (133) hide show
  1. {pytex_preprocessor-0.4.2/src/pytex_preprocessor.egg-info → pytex_preprocessor-0.4.3}/PKG-INFO +1 -1
  2. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/pyproject.toml +1 -1
  3. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/variants.py +41 -0
  4. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_markdown/convert.py +9 -1
  5. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3/src/pytex_preprocessor.egg-info}/PKG-INFO +1 -1
  6. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/LICENSE +0 -0
  7. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/README.md +0 -0
  8. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/setup.cfg +0 -0
  9. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/__init__.py +0 -0
  10. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/__init__.py +0 -0
  11. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/biblatex.py +0 -0
  12. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/builtin.py +0 -0
  13. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/captions.py +0 -0
  14. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/cleveref.py +0 -0
  15. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/colors.py +0 -0
  16. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/conditionals.py +0 -0
  17. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/counters.py +0 -0
  18. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/definitions.py +0 -0
  19. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/floats.py +0 -0
  20. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/font.py +0 -0
  21. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/fontawesome.py +0 -0
  22. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/fontspec.py +0 -0
  23. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/geometry.py +0 -0
  24. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/glossaries.py +0 -0
  25. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/graphics.py +0 -0
  26. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/hooks.py +0 -0
  27. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/hyperref.py +0 -0
  28. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/lengths.py +0 -0
  29. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/listings.py +0 -0
  30. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/mdframed.py +0 -0
  31. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/picture.py +0 -0
  32. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/setspace.py +0 -0
  33. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/commands/tables.py +0 -0
  34. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/helpers/__init__.py +0 -0
  35. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/helpers/coerce.py +0 -0
  36. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/helpers/parenting.py +0 -0
  37. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/helpers/sanitize.py +0 -0
  38. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/helpers/with_package.py +0 -0
  39. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/interface/__init__.py +0 -0
  40. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/interface/control_sequence.py +0 -0
  41. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/interface/package.py +0 -0
  42. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/interface/tex.py +0 -0
  43. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/__init__.py +0 -0
  44. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/color.py +0 -0
  45. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/comment.py +0 -0
  46. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/concat.py +0 -0
  47. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/control_sequence.py +0 -0
  48. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/document.py +0 -0
  49. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/document_class.py +0 -0
  50. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/empty.py +0 -0
  51. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/environment.py +0 -0
  52. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/image.py +0 -0
  53. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/include.py +0 -0
  54. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/length.py +0 -0
  55. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/math.py +0 -0
  56. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/package.py +0 -0
  57. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/model/raw.py +0 -0
  58. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/packages.py +0 -0
  59. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/registry.py +0 -0
  60. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex/template.py +0 -0
  61. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_analyze/__init__.py +0 -0
  62. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_analyze/analyze.py +0 -0
  63. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_analyze/optimize.py +0 -0
  64. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/__init__.py +0 -0
  65. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/build.py +0 -0
  66. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/console.py +0 -0
  67. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/render.py +0 -0
  68. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/tectonic.py +0 -0
  69. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/tex2py.py +0 -0
  70. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_builder/tree.py +0 -0
  71. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/__init__.py +0 -0
  72. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-Bold.ttf +0 -0
  73. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-BoldItalic.ttf +0 -0
  74. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-Book.ttf +0 -0
  75. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-BookItalic.ttf +0 -0
  76. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-Medium.ttf +0 -0
  77. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-MediumItalic.ttf +0 -0
  78. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-Strong.ttf +0 -0
  79. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-Thin.ttf +0 -0
  80. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Blender/Blender-ThinItalic.ttf +0 -0
  81. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/DIN/DIN-Black.ttf +0 -0
  82. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/DIN/DIN-Bold.ttf +0 -0
  83. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/DIN/DIN-BoldItalic.ttf +0 -0
  84. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/DIN/DIN-Italic.ttf +0 -0
  85. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/DIN/DIN-Medium.ttf +0 -0
  86. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/DIN/DIN-Regular.ttf +0 -0
  87. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/fonts/Times New Roman.ttf +0 -0
  88. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/ASTA.svg +0 -0
  89. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/DUMMY.png +0 -0
  90. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/DUMMY_FOOT.png +0 -0
  91. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/ECHO.svg +0 -0
  92. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/HSRT.pdf +0 -0
  93. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/INF.pdf +0 -0
  94. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/STUPA.pdf +0 -0
  95. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/assets/logos/Skyline.pdf +0 -0
  96. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/boxes.py +0 -0
  97. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/citations.py +0 -0
  98. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/cleveref_names.py +0 -0
  99. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/colors.py +0 -0
  100. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/document.py +0 -0
  101. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/fonts.py +0 -0
  102. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/glossary.py +0 -0
  103. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/hyperref_config.py +0 -0
  104. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/listings.py +0 -0
  105. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/logos.py +0 -0
  106. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/pagebreak.py +0 -0
  107. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/pagesetup.py +0 -0
  108. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/tex/pagesetup.tex +0 -0
  109. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/titlepage.py +0 -0
  110. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/variants.py +0 -0
  111. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/voting.py +0 -0
  112. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/watermark.py +0 -0
  113. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_hsrtreport/wordcount.py +0 -0
  114. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_koma/__init__.py +0 -0
  115. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_koma/commands.py +0 -0
  116. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_koma/document.py +0 -0
  117. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_markdown/__init__.py +0 -0
  118. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_markdown/escape.py +0 -0
  119. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_preprocessor.egg-info/SOURCES.txt +0 -0
  120. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_preprocessor.egg-info/dependency_links.txt +0 -0
  121. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_preprocessor.egg-info/entry_points.txt +0 -0
  122. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_preprocessor.egg-info/requires.txt +0 -0
  123. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_preprocessor.egg-info/top_level.txt +0 -0
  124. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/__init__.py +0 -0
  125. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/convert.py +0 -0
  126. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/document.py +0 -0
  127. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/entries.py +0 -0
  128. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/frontmatter.py +0 -0
  129. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/header.py +0 -0
  130. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/shortcodes.py +0 -0
  131. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_protocol/signatures.py +0 -0
  132. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_tikz/__init__.py +0 -0
  133. {pytex_preprocessor-0.4.2 → pytex_preprocessor-0.4.3}/src/pytex_tikz/tikz.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytex-preprocessor
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Type-safe LaTeX document generation with Python
5
5
  Author-email: Frederik Beimgraben <frederik@beimgraben.net>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pytex-preprocessor"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  authors = [
9
9
  { name="Frederik Beimgraben", email="frederik@beimgraben.net" },
10
10
  ]
@@ -26,6 +26,7 @@ from pytex.model.concat import Concat
26
26
  from pytex.model.document import Document
27
27
  from pytex.model.raw import Raw
28
28
  from pytex_hsrtreport.document import HSRTReport
29
+ from pytex_hsrtreport.titlepage import TitlePageDataLine
29
30
  from pytex_hsrtreport.variants import Variant
30
31
  from pytex_markdown import Markdown, escape_latex
31
32
  from pytex_protocol.document import build_protocol
@@ -108,6 +109,9 @@ def _report(body: str, options: dict[str, object]) -> TeX:
108
109
  show_toc=True,
109
110
  title=escape_latex(title) if title is not None else None,
110
111
  author=_escaped(_str(options, "author", "autor")),
112
+ abstract=_escaped(_str(options, "abstract", "zusammenfassung")),
113
+ keywords=_escaped(_keywords(options)),
114
+ data_lines=_data_lines(options),
111
115
  # Map the shallowest heading in the body to \chapter, so headings nest
112
116
  # under it. Without this, a doc whose top level is `##` (because `#` was
113
117
  # consumed as the title) would render chapterless sections numbered 0.x.
@@ -153,6 +157,43 @@ def _escaped(value: str | None) -> str | None:
153
157
  return escape_latex(value) if value is not None else None
154
158
 
155
159
 
160
+ def _keywords(options: Mapping[str, object]) -> str | None:
161
+ """Title-page keywords from `keywords`/`schlagworte` (string or list)."""
162
+ for key in ("keywords", "schlagworte"):
163
+ value = options.get(key)
164
+ if isinstance(value, list) and value:
165
+ return ", ".join(str(item) for item in value) # pyright: ignore[reportUnknownVariableType, reportUnknownArgumentType]
166
+ if isinstance(value, str) and value:
167
+ return value
168
+ return None
169
+
170
+
171
+ def _data_lines(options: Mapping[str, object]) -> tuple[TitlePageDataLine, ...]:
172
+ """Title-page data table from `datalines`/`data`.
173
+
174
+ Each entry is a ``"Label: value"`` string (frontmatter has no nested maps),
175
+ given as a block list, flow list, or a single scalar. Entries without a
176
+ colon are skipped.
177
+ """
178
+ raw = options.get("datalines", options.get("data"))
179
+ if isinstance(raw, list):
180
+ items = [str(item) for item in raw] # pyright: ignore[reportUnknownVariableType, reportUnknownArgumentType]
181
+ elif isinstance(raw, str) and raw:
182
+ items = [raw]
183
+ else:
184
+ return ()
185
+ lines: list[TitlePageDataLine] = []
186
+ for item in items:
187
+ label, sep, value = item.partition(":")
188
+ if sep and label.strip():
189
+ lines.append(
190
+ TitlePageDataLine(
191
+ escape_latex(label.strip()), escape_latex(value.strip())
192
+ )
193
+ )
194
+ return tuple(lines)
195
+
196
+
156
197
  def _derive_title(body: str) -> tuple[str | None, str]:
157
198
  """Pull the first ATX `#` heading out of `body` to use as the title.
158
199
 
@@ -10,6 +10,7 @@ this module depends on ``pytex_hsrtreport``.
10
10
  from __future__ import annotations
11
11
 
12
12
  import re
13
+ from pathlib import Path
13
14
  from typing import TYPE_CHECKING, Any, Final, cast
14
15
 
15
16
  from pytex.commands.builtin import (
@@ -182,7 +183,14 @@ class MarkdownConverter:
182
183
  # Relative/local/anchor target: keep the text, drop the dead link.
183
184
  return self.inlines(node)
184
185
  if kind == "Image":
185
- return IncludeImage(str(getattr(node, "dest", "")))
186
+ dest = str(getattr(node, "dest", ""))
187
+ if EXTERNAL_URL_RE.match(dest):
188
+ return IncludeImage(dest)
189
+ # The .tex is compiled in the build dir, not next to the Markdown
190
+ # source, so a relative path would not resolve. Make it absolute
191
+ # (relative to the CWD the build runs from) so \includegraphics
192
+ # finds the file without copying or base64-embedding it.
193
+ return IncludeImage(str(Path(dest).resolve()))
186
194
  if kind == "LineBreak":
187
195
  # Hard break -> newline; soft break -> a plain space.
188
196
  soft = bool(getattr(node, "soft", False))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytex-preprocessor
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Type-safe LaTeX document generation with Python
5
5
  Author-email: Frederik Beimgraben <frederik@beimgraben.net>
6
6
  License: GNU GENERAL PUBLIC LICENSE