texsmith 0.0.2.dev0__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 (487) hide show
  1. texsmith-0.0.2.dev0/.editorconfig +14 -0
  2. texsmith-0.0.2.dev0/.github/workflows/ci.yml +239 -0
  3. texsmith-0.0.2.dev0/.gitignore +59 -0
  4. texsmith-0.0.2.dev0/.vscode/settings.json +26 -0
  5. texsmith-0.0.2.dev0/AGENT.md +36 -0
  6. texsmith-0.0.2.dev0/CHANGELOG.md +82 -0
  7. texsmith-0.0.2.dev0/LICENSE.md +21 -0
  8. texsmith-0.0.2.dev0/Makefile +20 -0
  9. texsmith-0.0.2.dev0/PKG-INFO +187 -0
  10. texsmith-0.0.2.dev0/README.md +148 -0
  11. texsmith-0.0.2.dev0/docs/.nav.yml +8 -0
  12. texsmith-0.0.2.dev0/docs/about/.nav.yml +9 -0
  13. texsmith-0.0.2.dev0/docs/about/author.md +7 -0
  14. texsmith-0.0.2.dev0/docs/about/contribute.md +52 -0
  15. texsmith-0.0.2.dev0/docs/about/devel/config.md +23 -0
  16. texsmith-0.0.2.dev0/docs/about/devel/glossary.md +34 -0
  17. texsmith-0.0.2.dev0/docs/about/devel/index.md +335 -0
  18. texsmith-0.0.2.dev0/docs/about/devel/plugins.md +129 -0
  19. texsmith-0.0.2.dev0/docs/about/devel/tables.md +172 -0
  20. texsmith-0.0.2.dev0/docs/about/index.md +19 -0
  21. texsmith-0.0.2.dev0/docs/about/license.md +36 -0
  22. texsmith-0.0.2.dev0/docs/about/other-resources.md +155 -0
  23. texsmith-0.0.2.dev0/docs/about/release-notes.md +35 -0
  24. texsmith-0.0.2.dev0/docs/about/versioning.md +5 -0
  25. texsmith-0.0.2.dev0/docs/api/bibliography.md +11 -0
  26. texsmith-0.0.2.dev0/docs/api/cli.md +13 -0
  27. texsmith-0.0.2.dev0/docs/api/core.md +36 -0
  28. texsmith-0.0.2.dev0/docs/api/custom-transformers.md +88 -0
  29. texsmith-0.0.2.dev0/docs/api/handlers.md +66 -0
  30. texsmith-0.0.2.dev0/docs/api/high-level.md +117 -0
  31. texsmith-0.0.2.dev0/docs/api/index.md +36 -0
  32. texsmith-0.0.2.dev0/docs/api/latex.md +21 -0
  33. texsmith-0.0.2.dev0/docs/api/markdown.md +7 -0
  34. texsmith-0.0.2.dev0/docs/api/plugins.md +49 -0
  35. texsmith-0.0.2.dev0/docs/api/transformers.md +9 -0
  36. texsmith-0.0.2.dev0/docs/assets/.nav.yml +2 -0
  37. texsmith-0.0.2.dev0/docs/assets/cli-help +137 -0
  38. texsmith-0.0.2.dev0/docs/assets/drawio-viewer.js +6 -0
  39. texsmith-0.0.2.dev0/docs/assets/examples/README.md +7 -0
  40. texsmith-0.0.2.dev0/docs/assets/examples/cheese.bib +32 -0
  41. texsmith-0.0.2.dev0/docs/assets/examples/cheese.md +205 -0
  42. texsmith-0.0.2.dev0/docs/assets/examples/code.py +35 -0
  43. texsmith-0.0.2.dev0/docs/assets/examples/dialects.md +119 -0
  44. texsmith-0.0.2.dev0/docs/assets/examples/mozzarella.svg +300 -0
  45. texsmith-0.0.2.dev0/docs/assets/js/auto-reload.js +3 -0
  46. texsmith-0.0.2.dev0/docs/assets/mermaid.mmd +16 -0
  47. texsmith-0.0.2.dev0/docs/assets/mermaid.svg +2 -0
  48. texsmith-0.0.2.dev0/docs/assets/pipeline.png +0 -0
  49. texsmith-0.0.2.dev0/docs/assets/standards.svg +501 -0
  50. texsmith-0.0.2.dev0/docs/assets/ts-anvil.svg +74 -0
  51. texsmith-0.0.2.dev0/docs/assets/ts-dark.svg +130 -0
  52. texsmith-0.0.2.dev0/docs/assets/ts-light.svg +93 -0
  53. texsmith-0.0.2.dev0/docs/assets/ts-logo.svg +113 -0
  54. texsmith-0.0.2.dev0/docs/assets/workflow.drawio +100 -0
  55. texsmith-0.0.2.dev0/docs/cli/bibliography.md +80 -0
  56. texsmith-0.0.2.dev0/docs/cli/build.md +9 -0
  57. texsmith-0.0.2.dev0/docs/cli/index.md +166 -0
  58. texsmith-0.0.2.dev0/docs/cli/slots.md +38 -0
  59. texsmith-0.0.2.dev0/docs/cli/templates.md +59 -0
  60. texsmith-0.0.2.dev0/docs/css/brand.css +18 -0
  61. texsmith-0.0.2.dev0/docs/css/extra.css +104 -0
  62. texsmith-0.0.2.dev0/docs/examples/book.md +64 -0
  63. texsmith-0.0.2.dev0/docs/examples/colorful.md +45 -0
  64. texsmith-0.0.2.dev0/docs/examples/cooking.md +41 -0
  65. texsmith-0.0.2.dev0/docs/examples/diagrams.md +49 -0
  66. texsmith-0.0.2.dev0/docs/examples/index.md +18 -0
  67. texsmith-0.0.2.dev0/docs/examples/languages.md +39 -0
  68. texsmith-0.0.2.dev0/docs/examples/letters.md +103 -0
  69. texsmith-0.0.2.dev0/docs/examples/paper.md +65 -0
  70. texsmith-0.0.2.dev0/docs/examples/pgcd.drawio +58 -0
  71. texsmith-0.0.2.dev0/docs/examples/snippet-configs/letter.yml +6 -0
  72. texsmith-0.0.2.dev0/docs/examples/snippets.md +71 -0
  73. texsmith-0.0.2.dev0/docs/examples/texsmith.md +13 -0
  74. texsmith-0.0.2.dev0/docs/guide/.nav.yml +13 -0
  75. texsmith-0.0.2.dev0/docs/guide/extensions.md +119 -0
  76. texsmith-0.0.2.dev0/docs/guide/features/.nav.yml +6 -0
  77. texsmith-0.0.2.dev0/docs/guide/features/acronyms.md +27 -0
  78. texsmith-0.0.2.dev0/docs/guide/features/bibliography.md +77 -0
  79. texsmith-0.0.2.dev0/docs/guide/features/headings.md +73 -0
  80. texsmith-0.0.2.dev0/docs/guide/features/listings.md +49 -0
  81. texsmith-0.0.2.dev0/docs/guide/features/tags.md +82 -0
  82. texsmith-0.0.2.dev0/docs/guide/fonts.md +22 -0
  83. texsmith-0.0.2.dev0/docs/guide/fragments/.nav.yml +5 -0
  84. texsmith-0.0.2.dev0/docs/guide/fragments/geometry.md +131 -0
  85. texsmith-0.0.2.dev0/docs/guide/fragments/glossary.md +9 -0
  86. texsmith-0.0.2.dev0/docs/guide/fragments/index.md +155 -0
  87. texsmith-0.0.2.dev0/docs/guide/fragments/typesetting.md +31 -0
  88. texsmith-0.0.2.dev0/docs/guide/front-matter.md +28 -0
  89. texsmith-0.0.2.dev0/docs/guide/getting-started.md +175 -0
  90. texsmith-0.0.2.dev0/docs/guide/limitations.md +23 -0
  91. texsmith-0.0.2.dev0/docs/guide/metadata.md +82 -0
  92. texsmith-0.0.2.dev0/docs/guide/mkdocs.md +54 -0
  93. texsmith-0.0.2.dev0/docs/guide/plumbing/.nav.yml +6 -0
  94. texsmith-0.0.2.dev0/docs/guide/plumbing/engines.md +43 -0
  95. texsmith-0.0.2.dev0/docs/guide/plumbing/index.md +3 -0
  96. texsmith-0.0.2.dev0/docs/guide/plumbing/latex.md +15 -0
  97. texsmith-0.0.2.dev0/docs/guide/plumbing/pipeline.md +39 -0
  98. texsmith-0.0.2.dev0/docs/guide/plumbing/tex.md +30 -0
  99. texsmith-0.0.2.dev0/docs/guide/tectonic.md +28 -0
  100. texsmith-0.0.2.dev0/docs/guide/templates/discovery.md +30 -0
  101. texsmith-0.0.2.dev0/docs/guide/templates/fragments.md +116 -0
  102. texsmith-0.0.2.dev0/docs/guide/templates/index.md +305 -0
  103. texsmith-0.0.2.dev0/docs/guide/templates/mermaid.md +26 -0
  104. texsmith-0.0.2.dev0/docs/guide/templates/partials.md +21 -0
  105. texsmith-0.0.2.dev0/docs/guide/templates/template-cookbook.md +94 -0
  106. texsmith-0.0.2.dev0/docs/guide/troubleshooting.md +62 -0
  107. texsmith-0.0.2.dev0/docs/hooks/mkdocs_hooks.py +47 -0
  108. texsmith-0.0.2.dev0/docs/index.md +65 -0
  109. texsmith-0.0.2.dev0/docs/js/mathjax.js +12 -0
  110. texsmith-0.0.2.dev0/docs/syntax/abbr.md +50 -0
  111. texsmith-0.0.2.dev0/docs/syntax/admonitions.md +112 -0
  112. texsmith-0.0.2.dev0/docs/syntax/captions.md +150 -0
  113. texsmith-0.0.2.dev0/docs/syntax/code.md +110 -0
  114. texsmith-0.0.2.dev0/docs/syntax/deflists.md +39 -0
  115. texsmith-0.0.2.dev0/docs/syntax/extra.md +24 -0
  116. texsmith-0.0.2.dev0/docs/syntax/formatting.md +50 -0
  117. texsmith-0.0.2.dev0/docs/syntax/images.md +14 -0
  118. texsmith-0.0.2.dev0/docs/syntax/index.md +173 -0
  119. texsmith-0.0.2.dev0/docs/syntax/math.md +167 -0
  120. texsmith-0.0.2.dev0/docs/syntax/mermaid.md +78 -0
  121. texsmith-0.0.2.dev0/docs/syntax/notes.md +284 -0
  122. texsmith-0.0.2.dev0/docs/syntax/progressbar.md +59 -0
  123. texsmith-0.0.2.dev0/docs/syntax/references.md +225 -0
  124. texsmith-0.0.2.dev0/docs/syntax/smartypants.md +7 -0
  125. texsmith-0.0.2.dev0/docs/syntax/supported.md +168 -0
  126. texsmith-0.0.2.dev0/docs/syntax/tables.md +52 -0
  127. texsmith-0.0.2.dev0/docs/syntax/wikilinks.md +17 -0
  128. texsmith-0.0.2.dev0/docs/texsmith-logo.pdf +2099 -4
  129. texsmith-0.0.2.dev0/fonts-test.tex +180 -0
  130. texsmith-0.0.2.dev0/mkdocs.yml +134 -0
  131. texsmith-0.0.2.dev0/noxfile.py +38 -0
  132. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/.editorconfig +15 -0
  133. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/.gitignore +121 -0
  134. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/.markdownlint.yaml +4 -0
  135. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/LICENSE.md +21 -0
  136. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/Makefile +19 -0
  137. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/README.md +138 -0
  138. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/docs/about.md +3 -0
  139. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/docs/images/latex-hummingbird.svg +153 -0
  140. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/docs/index.md +18 -0
  141. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/hatch_build.py +12 -0
  142. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/mkdocs.yml +91 -0
  143. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/noxfile.py +20 -0
  144. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/pyproject.toml +96 -0
  145. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/src/mkdocs_plugin_texsmith/__init__.py +6 -0
  146. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/src/mkdocs_plugin_texsmith/plugin.py +1428 -0
  147. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/tests/test_import.py +4 -0
  148. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/tests/test_plugin_config.py +74 -0
  149. texsmith-0.0.2.dev0/packages/mkdocs_texsmith/uv.lock +739 -0
  150. texsmith-0.0.2.dev0/pyproject.toml +225 -0
  151. texsmith-0.0.2.dev0/pyrightconfig.json +16 -0
  152. texsmith-0.0.2.dev0/scripts/ci/python_versions.py +29 -0
  153. texsmith-0.0.2.dev0/scripts/refresh_cli_help.sh +14 -0
  154. texsmith-0.0.2.dev0/src/texsmith/__init__.py +107 -0
  155. texsmith-0.0.2.dev0/src/texsmith/_alias.py +59 -0
  156. texsmith-0.0.2.dev0/src/texsmith/adapters/__init__.py +6 -0
  157. texsmith-0.0.2.dev0/src/texsmith/adapters/docker.py +258 -0
  158. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/__init__.py +3 -0
  159. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/_assets.py +363 -0
  160. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/_helpers.py +62 -0
  161. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/_mermaid.py +122 -0
  162. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/admonitions.py +267 -0
  163. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/basic.py +228 -0
  164. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/blocks.py +851 -0
  165. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/code.py +309 -0
  166. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/inline.py +937 -0
  167. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/links.py +239 -0
  168. texsmith-0.0.2.dev0/src/texsmith/adapters/handlers/media.py +380 -0
  169. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/__init__.py +10 -0
  170. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/engines/__init__.py +726 -0
  171. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/engines/latex/__init__.py +26 -0
  172. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/engines/latex/log.py +720 -0
  173. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/engines/latex/runner.py +28 -0
  174. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/engines/tectonic/__init__.py +38 -0
  175. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/formatter.py +297 -0
  176. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/latexmk.py +148 -0
  177. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/acronym.tex +1 -0
  178. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/add.tex +1 -0
  179. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/addition.tex +1 -0
  180. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/blockquote.tex +3 -0
  181. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/callout.tex +3 -0
  182. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/choices.tex +5 -0
  183. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/citation.tex +1 -0
  184. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/codeblock.tex +7 -0
  185. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/codeblock_listings.tex +5 -0
  186. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/codeblock_pygments.tex +5 -0
  187. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/codeblock_verbatim.tex +12 -0
  188. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/codeinline.tex +1 -0
  189. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/codeinlinett.tex +1 -0
  190. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/comment.tex +1 -0
  191. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/del.tex +1 -0
  192. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/deletion.tex +1 -0
  193. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/description_list.tex +5 -0
  194. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/enquote.tex +1 -0
  195. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/epigraph.tex +1 -0
  196. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/exercises_solutions.tex +7 -0
  197. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/figure.tex +33 -0
  198. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/figure_tcolorbox.tex +15 -0
  199. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/footnote.tex +3 -0
  200. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/glossary.tex +1 -0
  201. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/heading.tex +14 -0
  202. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/highlight.tex +25 -0
  203. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/horizontal_rule.tex +1 -0
  204. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/href.tex +1 -0
  205. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/icon.tex +1 -0
  206. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/include.tex +1 -0
  207. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/index.tex +1 -0
  208. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/italic.tex +1 -0
  209. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/keystroke.tex +46 -0
  210. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/label.tex +1 -0
  211. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/list_acronyms.tex +5 -0
  212. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/list_glossary.tex +8 -0
  213. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/multicolumn.tex +3 -0
  214. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/ordered_list.tex +5 -0
  215. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/pagestyle.tex +1 -0
  216. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/ref.tex +1 -0
  217. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/regex.tex +1 -0
  218. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/smallcaps.tex +1 -0
  219. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/strikethrough.tex +1 -0
  220. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/strong.tex +1 -0
  221. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/subscript.tex +1 -0
  222. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/substitution.tex +1 -0
  223. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/superscript.tex +1 -0
  224. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/tabbed.tex +3 -0
  225. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/table.tex +48 -0
  226. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/underline.tex +1 -0
  227. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/unordered_list.tex +5 -0
  228. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/partials/url.tex +1 -0
  229. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/pygments.py +98 -0
  230. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/pyxindy.py +64 -0
  231. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/renderer.py +220 -0
  232. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/tectonic.py +366 -0
  233. texsmith-0.0.2.dev0/src/texsmith/adapters/latex/utils.py +86 -0
  234. texsmith-0.0.2.dev0/src/texsmith/adapters/markdown/__init__.py +342 -0
  235. texsmith-0.0.2.dev0/src/texsmith/adapters/plugins/__init__.py +8 -0
  236. texsmith-0.0.2.dev0/src/texsmith/adapters/plugins/material.py +174 -0
  237. texsmith-0.0.2.dev0/src/texsmith/adapters/plugins/snippet.py +1734 -0
  238. texsmith-0.0.2.dev0/src/texsmith/adapters/transformers/__init__.py +122 -0
  239. texsmith-0.0.2.dev0/src/texsmith/adapters/transformers/base.py +140 -0
  240. texsmith-0.0.2.dev0/src/texsmith/adapters/transformers/strategies.py +1456 -0
  241. texsmith-0.0.2.dev0/src/texsmith/adapters/transformers/utils.py +59 -0
  242. texsmith-0.0.2.dev0/src/texsmith/api/__init__.py +80 -0
  243. texsmith-0.0.2.dev0/src/texsmith/api/_utils.py +56 -0
  244. texsmith-0.0.2.dev0/src/texsmith/api/document.py +645 -0
  245. texsmith-0.0.2.dev0/src/texsmith/api/pipeline.py +229 -0
  246. texsmith-0.0.2.dev0/src/texsmith/api/service.py +648 -0
  247. texsmith-0.0.2.dev0/src/texsmith/api/templates.py +287 -0
  248. texsmith-0.0.2.dev0/src/texsmith/core/__init__.py +6 -0
  249. texsmith-0.0.2.dev0/src/texsmith/core/bibliography/__init__.py +57 -0
  250. texsmith-0.0.2.dev0/src/texsmith/core/bibliography/collection.py +354 -0
  251. texsmith-0.0.2.dev0/src/texsmith/core/bibliography/doi.py +194 -0
  252. texsmith-0.0.2.dev0/src/texsmith/core/bibliography/issues.py +15 -0
  253. texsmith-0.0.2.dev0/src/texsmith/core/bibliography/parsing.py +45 -0
  254. texsmith-0.0.2.dev0/src/texsmith/core/callouts.py +99 -0
  255. texsmith-0.0.2.dev0/src/texsmith/core/config.py +191 -0
  256. texsmith-0.0.2.dev0/src/texsmith/core/context.py +242 -0
  257. texsmith-0.0.2.dev0/src/texsmith/core/conversion/__init__.py +103 -0
  258. texsmith-0.0.2.dev0/src/texsmith/core/conversion/core.py +780 -0
  259. texsmith-0.0.2.dev0/src/texsmith/core/conversion/debug.py +87 -0
  260. texsmith-0.0.2.dev0/src/texsmith/core/conversion/inputs.py +474 -0
  261. texsmith-0.0.2.dev0/src/texsmith/core/conversion/renderer.py +578 -0
  262. texsmith-0.0.2.dev0/src/texsmith/core/conversion/templates.py +646 -0
  263. texsmith-0.0.2.dev0/src/texsmith/core/conversion_contexts.py +95 -0
  264. texsmith-0.0.2.dev0/src/texsmith/core/diagnostics.py +118 -0
  265. texsmith-0.0.2.dev0/src/texsmith/core/exceptions.py +41 -0
  266. texsmith-0.0.2.dev0/src/texsmith/core/fonts/__init__.py +3 -0
  267. texsmith-0.0.2.dev0/src/texsmith/core/fragments/__init__.py +716 -0
  268. texsmith-0.0.2.dev0/src/texsmith/core/fragments/base.py +117 -0
  269. texsmith-0.0.2.dev0/src/texsmith/core/metadata.py +280 -0
  270. texsmith-0.0.2.dev0/src/texsmith/core/mustache.py +86 -0
  271. texsmith-0.0.2.dev0/src/texsmith/core/partials.py +20 -0
  272. texsmith-0.0.2.dev0/src/texsmith/core/rules.py +394 -0
  273. texsmith-0.0.2.dev0/src/texsmith/core/templates/__init__.py +58 -0
  274. texsmith-0.0.2.dev0/src/texsmith/core/templates/base.py +343 -0
  275. texsmith-0.0.2.dev0/src/texsmith/core/templates/builtins.py +68 -0
  276. texsmith-0.0.2.dev0/src/texsmith/core/templates/context_usage.py +137 -0
  277. texsmith-0.0.2.dev0/src/texsmith/core/templates/loader.py +303 -0
  278. texsmith-0.0.2.dev0/src/texsmith/core/templates/manifest.py +861 -0
  279. texsmith-0.0.2.dev0/src/texsmith/core/templates/runtime.py +347 -0
  280. texsmith-0.0.2.dev0/src/texsmith/core/templates/text.py +14 -0
  281. texsmith-0.0.2.dev0/src/texsmith/core/templates/wrapper.py +340 -0
  282. texsmith-0.0.2.dev0/src/texsmith/core/user_dir.py +179 -0
  283. texsmith-0.0.2.dev0/src/texsmith/devtools.py +28 -0
  284. texsmith-0.0.2.dev0/src/texsmith/extensions/__init__.py +162 -0
  285. texsmith-0.0.2.dev0/src/texsmith/extensions/index/__init__.py +21 -0
  286. texsmith-0.0.2.dev0/src/texsmith/extensions/index/markdown.py +94 -0
  287. texsmith-0.0.2.dev0/src/texsmith/extensions/index/mkdocs_plugin.py +136 -0
  288. texsmith-0.0.2.dev0/src/texsmith/extensions/index/registry.py +57 -0
  289. texsmith-0.0.2.dev0/src/texsmith/extensions/index/renderer.py +183 -0
  290. texsmith-0.0.2.dev0/src/texsmith/extensions/index/templates/index.tex +1 -0
  291. texsmith-0.0.2.dev0/src/texsmith/extensions/latex_raw.py +115 -0
  292. texsmith-0.0.2.dev0/src/texsmith/extensions/latex_text.py +117 -0
  293. texsmith-0.0.2.dev0/src/texsmith/extensions/mermaid.py +267 -0
  294. texsmith-0.0.2.dev0/src/texsmith/extensions/missing_footnotes.py +125 -0
  295. texsmith-0.0.2.dev0/src/texsmith/extensions/multi_citations.py +54 -0
  296. texsmith-0.0.2.dev0/src/texsmith/extensions/progressbar/__init__.py +9 -0
  297. texsmith-0.0.2.dev0/src/texsmith/extensions/progressbar/markdown.py +212 -0
  298. texsmith-0.0.2.dev0/src/texsmith/extensions/progressbar/renderer.py +117 -0
  299. texsmith-0.0.2.dev0/src/texsmith/extensions/smallcaps.py +48 -0
  300. texsmith-0.0.2.dev0/src/texsmith/extensions/texlogos/__init__.py +10 -0
  301. texsmith-0.0.2.dev0/src/texsmith/extensions/texlogos/markdown.py +236 -0
  302. texsmith-0.0.2.dev0/src/texsmith/extensions/texlogos/renderer.py +81 -0
  303. texsmith-0.0.2.dev0/src/texsmith/extensions/texlogos/specs.py +66 -0
  304. texsmith-0.0.2.dev0/src/texsmith/fonts/__init__.py +57 -0
  305. texsmith-0.0.2.dev0/src/texsmith/fonts/cache.py +46 -0
  306. texsmith-0.0.2.dev0/src/texsmith/fonts/constants.py +60 -0
  307. texsmith-0.0.2.dev0/src/texsmith/fonts/coverage.py +275 -0
  308. texsmith-0.0.2.dev0/src/texsmith/fonts/downloader.py +103 -0
  309. texsmith-0.0.2.dev0/src/texsmith/fonts/fallback.py +438 -0
  310. texsmith-0.0.2.dev0/src/texsmith/fonts/html_scripts.py +168 -0
  311. texsmith-0.0.2.dev0/src/texsmith/fonts/logging.py +127 -0
  312. texsmith-0.0.2.dev0/src/texsmith/fonts/pipeline.py +338 -0
  313. texsmith-0.0.2.dev0/src/texsmith/fonts/scripts.py +493 -0
  314. texsmith-0.0.2.dev0/src/texsmith/fonts/ucharclasses.py +164 -0
  315. texsmith-0.0.2.dev0/src/texsmith/fragments/__init__.py +11 -0
  316. texsmith-0.0.2.dev0/src/texsmith/fragments/bibliography/__init__.py +65 -0
  317. texsmith-0.0.2.dev0/src/texsmith/fragments/bibliography/fragment.toml +3 -0
  318. texsmith-0.0.2.dev0/src/texsmith/fragments/bibliography/ts-bibliography-backmatter.jinja.tex +35 -0
  319. texsmith-0.0.2.dev0/src/texsmith/fragments/bibliography/ts-bibliography.jinja.tex +10 -0
  320. texsmith-0.0.2.dev0/src/texsmith/fragments/callouts/__init__.py +88 -0
  321. texsmith-0.0.2.dev0/src/texsmith/fragments/callouts/fragment.toml +3 -0
  322. texsmith-0.0.2.dev0/src/texsmith/fragments/callouts/ts-callouts.jinja.sty +129 -0
  323. texsmith-0.0.2.dev0/src/texsmith/fragments/code/__init__.py +82 -0
  324. texsmith-0.0.2.dev0/src/texsmith/fragments/code/fragment.toml +3 -0
  325. texsmith-0.0.2.dev0/src/texsmith/fragments/code/ts-code.jinja.sty +140 -0
  326. texsmith-0.0.2.dev0/src/texsmith/fragments/extra/__init__.py +180 -0
  327. texsmith-0.0.2.dev0/src/texsmith/fragments/extra/fragment.toml +3 -0
  328. texsmith-0.0.2.dev0/src/texsmith/fragments/extra/ts-extra.jinja.tex +13 -0
  329. texsmith-0.0.2.dev0/src/texsmith/fragments/fonts/__init__.py +880 -0
  330. texsmith-0.0.2.dev0/src/texsmith/fragments/fonts/fragment.toml +3 -0
  331. texsmith-0.0.2.dev0/src/texsmith/fragments/fonts/ts-fonts.jinja.sty +292 -0
  332. texsmith-0.0.2.dev0/src/texsmith/fragments/frame/__init__.py +170 -0
  333. texsmith-0.0.2.dev0/src/texsmith/fragments/frame/fragment.toml +3 -0
  334. texsmith-0.0.2.dev0/src/texsmith/fragments/frame/ts-frame.tex.jinja +49 -0
  335. texsmith-0.0.2.dev0/src/texsmith/fragments/geometry/__init__.py +169 -0
  336. texsmith-0.0.2.dev0/src/texsmith/fragments/geometry/fragment.toml +3 -0
  337. texsmith-0.0.2.dev0/src/texsmith/fragments/geometry/paper.py +526 -0
  338. texsmith-0.0.2.dev0/src/texsmith/fragments/geometry/ts_geometry.tex.jinja +53 -0
  339. texsmith-0.0.2.dev0/src/texsmith/fragments/glossary/__init__.py +67 -0
  340. texsmith-0.0.2.dev0/src/texsmith/fragments/glossary/fragment.toml +3 -0
  341. texsmith-0.0.2.dev0/src/texsmith/fragments/glossary/ts-glossary-backmatter.jinja.tex +5 -0
  342. texsmith-0.0.2.dev0/src/texsmith/fragments/glossary/ts-glossary.jinja.sty +28 -0
  343. texsmith-0.0.2.dev0/src/texsmith/fragments/index/__init__.py +66 -0
  344. texsmith-0.0.2.dev0/src/texsmith/fragments/index/fragment.toml +3 -0
  345. texsmith-0.0.2.dev0/src/texsmith/fragments/index/ts-index-backmatter.jinja.tex +3 -0
  346. texsmith-0.0.2.dev0/src/texsmith/fragments/index/ts-index.jinja.sty +12 -0
  347. texsmith-0.0.2.dev0/src/texsmith/fragments/keystrokes/__init__.py +69 -0
  348. texsmith-0.0.2.dev0/src/texsmith/fragments/keystrokes/fragment.toml +3 -0
  349. texsmith-0.0.2.dev0/src/texsmith/fragments/keystrokes/ts-keystrokes.jinja.sty +20 -0
  350. texsmith-0.0.2.dev0/src/texsmith/fragments/todolist/__init__.py +71 -0
  351. texsmith-0.0.2.dev0/src/texsmith/fragments/todolist/fragment.toml +3 -0
  352. texsmith-0.0.2.dev0/src/texsmith/fragments/todolist/ts-todolist.jinja.sty +21 -0
  353. texsmith-0.0.2.dev0/src/texsmith/fragments/typesetting/__init__.py +214 -0
  354. texsmith-0.0.2.dev0/src/texsmith/fragments/typesetting/fragment.toml +3 -0
  355. texsmith-0.0.2.dev0/src/texsmith/fragments/typesetting/ts-typesetting.tex.jinja +81 -0
  356. texsmith-0.0.2.dev0/src/texsmith/index.py +26 -0
  357. texsmith-0.0.2.dev0/src/texsmith/plugins/__init__.py +14 -0
  358. texsmith-0.0.2.dev0/src/texsmith/progressbar.py +8 -0
  359. texsmith-0.0.2.dev0/src/texsmith/quotes.py +40 -0
  360. texsmith-0.0.2.dev0/src/texsmith/smart_dashes.py +66 -0
  361. texsmith-0.0.2.dev0/src/texsmith/templates/__init__.py +3 -0
  362. texsmith-0.0.2.dev0/src/texsmith/templates/article/README.md +33 -0
  363. texsmith-0.0.2.dev0/src/texsmith/templates/article/__init__.py +281 -0
  364. texsmith-0.0.2.dev0/src/texsmith/templates/article/template/manifest.toml +125 -0
  365. texsmith-0.0.2.dev0/src/texsmith/templates/article/template/mermaid-config.json +18 -0
  366. texsmith-0.0.2.dev0/src/texsmith/templates/article/template/template.tex +74 -0
  367. texsmith-0.0.2.dev0/src/texsmith/templates/book/README.md +26 -0
  368. texsmith-0.0.2.dev0/src/texsmith/templates/book/__init__.py +75 -0
  369. texsmith-0.0.2.dev0/src/texsmith/templates/book/overrides/codeblock.tex +7 -0
  370. texsmith-0.0.2.dev0/src/texsmith/templates/book/overrides/codeinline.tex +1 -0
  371. texsmith-0.0.2.dev0/src/texsmith/templates/book/template/fixtoc.sty +81 -0
  372. texsmith-0.0.2.dev0/src/texsmith/templates/book/template/manifest.toml +198 -0
  373. texsmith-0.0.2.dev0/src/texsmith/templates/book/template/template.tex +314 -0
  374. texsmith-0.0.2.dev0/src/texsmith/templates/common/__init__.py +1 -0
  375. texsmith-0.0.2.dev0/src/texsmith/templates/common/latexmkrc +46 -0
  376. texsmith-0.0.2.dev0/src/texsmith/templates/letter/README.md +59 -0
  377. texsmith-0.0.2.dev0/src/texsmith/templates/letter/__init__.py +495 -0
  378. texsmith-0.0.2.dev0/src/texsmith/templates/letter/demo.md +31 -0
  379. texsmith-0.0.2.dev0/src/texsmith/templates/letter/fonts/modernline bold.otf +0 -0
  380. texsmith-0.0.2.dev0/src/texsmith/templates/letter/fonts/modernline.otf +0 -0
  381. texsmith-0.0.2.dev0/src/texsmith/templates/letter/manifest.toml +197 -0
  382. texsmith-0.0.2.dev0/src/texsmith/templates/letter/template/callouts.jinja.sty +290 -0
  383. texsmith-0.0.2.dev0/src/texsmith/templates/letter/template/template.tex +123 -0
  384. texsmith-0.0.2.dev0/src/texsmith/templates/snippet/README.md +21 -0
  385. texsmith-0.0.2.dev0/src/texsmith/templates/snippet/__init__.py +80 -0
  386. texsmith-0.0.2.dev0/src/texsmith/templates/snippet/template/manifest.toml +66 -0
  387. texsmith-0.0.2.dev0/src/texsmith/templates/snippet/template/template.tex +47 -0
  388. texsmith-0.0.2.dev0/src/texsmith/texlogos.py +15 -0
  389. texsmith-0.0.2.dev0/src/texsmith/ui/__init__.py +6 -0
  390. texsmith-0.0.2.dev0/src/texsmith/ui/cli/__init__.py +22 -0
  391. texsmith-0.0.2.dev0/src/texsmith/ui/cli/_options.py +338 -0
  392. texsmith-0.0.2.dev0/src/texsmith/ui/cli/app.py +65 -0
  393. texsmith-0.0.2.dev0/src/texsmith/ui/cli/bibliography.py +300 -0
  394. texsmith-0.0.2.dev0/src/texsmith/ui/cli/commands/__init__.py +14 -0
  395. texsmith-0.0.2.dev0/src/texsmith/ui/cli/commands/render.py +1128 -0
  396. texsmith-0.0.2.dev0/src/texsmith/ui/cli/commands/templates.py +397 -0
  397. texsmith-0.0.2.dev0/src/texsmith/ui/cli/diagnostics.py +36 -0
  398. texsmith-0.0.2.dev0/src/texsmith/ui/cli/presenter.py +663 -0
  399. texsmith-0.0.2.dev0/src/texsmith/ui/cli/state.py +263 -0
  400. texsmith-0.0.2.dev0/src/texsmith/ui/cli/utils.py +235 -0
  401. texsmith-0.0.2.dev0/test.md +22 -0
  402. texsmith-0.0.2.dev0/tests/fixtures/bib/a.bib +1 -0
  403. texsmith-0.0.2.dev0/tests/fixtures/bib/b.bib +45 -0
  404. texsmith-0.0.2.dev0/tests/fixtures/template-info/article.txt +39 -0
  405. texsmith-0.0.2.dev0/tests/fixtures/template-info/book.txt +51 -0
  406. texsmith-0.0.2.dev0/tests/fixtures/template-info/letter.txt +50 -0
  407. texsmith-0.0.2.dev0/tests/fixtures/template-info/snippet.txt +28 -0
  408. texsmith-0.0.2.dev0/tests/test_admonitions.py +86 -0
  409. texsmith-0.0.2.dev0/tests/test_api_service.py +437 -0
  410. texsmith-0.0.2.dev0/tests/test_article_template.py +77 -0
  411. texsmith-0.0.2.dev0/tests/test_assets.py +53 -0
  412. texsmith-0.0.2.dev0/tests/test_attribute_ownership.py +83 -0
  413. texsmith-0.0.2.dev0/tests/test_baseline_regressions.py +66 -0
  414. texsmith-0.0.2.dev0/tests/test_bibliography.py +324 -0
  415. texsmith-0.0.2.dev0/tests/test_bibliography_fragment.py +43 -0
  416. texsmith-0.0.2.dev0/tests/test_blocks.py +288 -0
  417. texsmith-0.0.2.dev0/tests/test_callouts.py +20 -0
  418. texsmith-0.0.2.dev0/tests/test_citations.py +136 -0
  419. texsmith-0.0.2.dev0/tests/test_cli.py +1448 -0
  420. texsmith-0.0.2.dev0/tests/test_cli_bibliography.py +238 -0
  421. texsmith-0.0.2.dev0/tests/test_cli_convert.py +137 -0
  422. texsmith-0.0.2.dev0/tests/test_cli_templates_commands.py +135 -0
  423. texsmith-0.0.2.dev0/tests/test_code_engines.py +81 -0
  424. texsmith-0.0.2.dev0/tests/test_combining_marks.py +15 -0
  425. texsmith-0.0.2.dev0/tests/test_counter_extension.py +60 -0
  426. texsmith-0.0.2.dev0/tests/test_data_script_rendering.py +51 -0
  427. texsmith-0.0.2.dev0/tests/test_dependency_warnings.py +64 -0
  428. texsmith-0.0.2.dev0/tests/test_diagnostics.py +65 -0
  429. texsmith-0.0.2.dev0/tests/test_diagrams_backend.py +86 -0
  430. texsmith-0.0.2.dev0/tests/test_docker.py +109 -0
  431. texsmith-0.0.2.dev0/tests/test_document_state.py +25 -0
  432. texsmith-0.0.2.dev0/tests/test_engine_helpers.py +205 -0
  433. texsmith-0.0.2.dev0/tests/test_extra_fragment.py +19 -0
  434. texsmith-0.0.2.dev0/tests/test_fallback_cache_refresh.py +77 -0
  435. texsmith-0.0.2.dev0/tests/test_fonts_fallback.py +236 -0
  436. texsmith-0.0.2.dev0/tests/test_formatting.py +179 -0
  437. texsmith-0.0.2.dev0/tests/test_fragment_configs.py +179 -0
  438. texsmith-0.0.2.dev0/tests/test_fragments/geometry.md +14 -0
  439. texsmith-0.0.2.dev0/tests/test_fragments.py +97 -0
  440. texsmith-0.0.2.dev0/tests/test_geometry_fragment.py +80 -0
  441. texsmith-0.0.2.dev0/tests/test_headings.py +169 -0
  442. texsmith-0.0.2.dev0/tests/test_html_script_detection.py +73 -0
  443. texsmith-0.0.2.dev0/tests/test_index_extension.py +74 -0
  444. texsmith-0.0.2.dev0/tests/test_latex_log.py +177 -0
  445. texsmith-0.0.2.dev0/tests/test_letter_template.py +135 -0
  446. texsmith-0.0.2.dev0/tests/test_links.py +91 -0
  447. texsmith-0.0.2.dev0/tests/test_markdown_latex_raw.py +28 -0
  448. texsmith-0.0.2.dev0/tests/test_markdown_latex_text.py +46 -0
  449. texsmith-0.0.2.dev0/tests/test_markdown_mermaid.py +112 -0
  450. texsmith-0.0.2.dev0/tests/test_markdown_module.py +12 -0
  451. texsmith-0.0.2.dev0/tests/test_markdown_quotes.py +34 -0
  452. texsmith-0.0.2.dev0/tests/test_markdown_smart_dashes.py +37 -0
  453. texsmith-0.0.2.dev0/tests/test_media_conversion.py +680 -0
  454. texsmith-0.0.2.dev0/tests/test_mkdocs/docs/code.md +23 -0
  455. texsmith-0.0.2.dev0/tests/test_mkdocs/docs/formatting.md +22 -0
  456. texsmith-0.0.2.dev0/tests/test_mkdocs/docs/headings.md +19 -0
  457. texsmith-0.0.2.dev0/tests/test_mkdocs/docs/index.md +249 -0
  458. texsmith-0.0.2.dev0/tests/test_mkdocs/docs/pgcd.drawio +58 -0
  459. texsmith-0.0.2.dev0/tests/test_mkdocs/mkdocs.yml +54 -0
  460. texsmith-0.0.2.dev0/tests/test_mkdocs_html.py +116 -0
  461. texsmith-0.0.2.dev0/tests/test_mkdocs_integration.py +156 -0
  462. texsmith-0.0.2.dev0/tests/test_mkdocs_plugin.py +67 -0
  463. texsmith-0.0.2.dev0/tests/test_mustache.py +31 -0
  464. texsmith-0.0.2.dev0/tests/test_partials.py +163 -0
  465. texsmith-0.0.2.dev0/tests/test_presenter.py +52 -0
  466. texsmith-0.0.2.dev0/tests/test_press_metadata.py +98 -0
  467. texsmith-0.0.2.dev0/tests/test_progressbar_extension.py +40 -0
  468. texsmith-0.0.2.dev0/tests/test_renderer_entry_points.py +153 -0
  469. texsmith-0.0.2.dev0/tests/test_renderer_parser_fallback.py +9 -0
  470. texsmith-0.0.2.dev0/tests/test_rule_ordering.py +72 -0
  471. texsmith-0.0.2.dev0/tests/test_script_wrapping.py +49 -0
  472. texsmith-0.0.2.dev0/tests/test_snippet_cache.py +108 -0
  473. texsmith-0.0.2.dev0/tests/test_strip_tags.py +62 -0
  474. texsmith-0.0.2.dev0/tests/test_tectonic_downloads.py +61 -0
  475. texsmith-0.0.2.dev0/tests/test_template_attributes.py +198 -0
  476. texsmith-0.0.2.dev0/tests/test_template_emitters.py +40 -0
  477. texsmith-0.0.2.dev0/tests/test_template_loader.py +83 -0
  478. texsmith-0.0.2.dev0/tests/test_template_renderer.py +535 -0
  479. texsmith-0.0.2.dev0/tests/test_template_renderer_slots.py +88 -0
  480. texsmith-0.0.2.dev0/tests/test_template_wrapping.py +425 -0
  481. texsmith-0.0.2.dev0/tests/test_texlogos_extension.py +41 -0
  482. texsmith-0.0.2.dev0/tests/test_title_levels.py +26 -0
  483. texsmith-0.0.2.dev0/tests/test_transformers.py +35 -0
  484. texsmith-0.0.2.dev0/tests/test_typesetting_fragment.py +74 -0
  485. texsmith-0.0.2.dev0/tests/test_user_dir.py +41 -0
  486. texsmith-0.0.2.dev0/tests/test_utils.py +29 -0
  487. texsmith-0.0.2.dev0/uv.lock +2299 -0
@@ -0,0 +1,14 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ insert_final_newline = true
6
+ indent_style = space
7
+ indent_size = 4
8
+
9
+ [*.{yml,yaml}]
10
+ indent_size = 2
11
+
12
+ [Makefile]
13
+ indent_style = tab
14
+ indent_size = 4
@@ -0,0 +1,239 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ tags: ["v*"]
7
+ pull_request:
8
+
9
+ permissions:
10
+ contents: read
11
+ id-token: write
12
+
13
+ jobs:
14
+ lint:
15
+ name: Ruff (lint + format check)
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v7
23
+ with:
24
+ enable-cache: true
25
+ cache-python: false
26
+ env:
27
+ UV_CACHE_SAVE: "false"
28
+
29
+ - name: Sync dependencies (dev + docs)
30
+ run: uv sync --all-groups --frozen
31
+
32
+ - name: Ruff lint
33
+ run: uv run ruff check .
34
+
35
+ - name: Ruff format check
36
+ run: uv run ruff format . --check
37
+
38
+ tests:
39
+ name: Pytest matrix
40
+ runs-on: ubuntu-latest
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ python-version: ["3.10", "3.13", "3.14"]
45
+ steps:
46
+ - name: Checkout repository
47
+ uses: actions/checkout@v4
48
+
49
+ - name: Setup Python
50
+ uses: actions/setup-python@v5
51
+ with:
52
+ python-version: ${{ matrix.python-version }}
53
+
54
+ - name: Install uv
55
+ uses: astral-sh/setup-uv@v7
56
+ with:
57
+ enable-cache: true
58
+ cache-python: false
59
+ env:
60
+ UV_CACHE_SAVE: "false"
61
+
62
+ - name: Sync dependencies (dev + docs)
63
+ run: uv sync --all-groups --frozen
64
+
65
+ - name: Run pytest
66
+ run: uv run pytest
67
+
68
+ build-artifacts:
69
+ name: Build dists & docs
70
+ needs: [lint, tests]
71
+ runs-on: ubuntu-latest
72
+ env:
73
+ PLAYWRIGHT_BROWSERS_PATH: /home/runner/.cache/texsmith/playwright/browsers
74
+ permissions:
75
+ contents: read
76
+ id-token: write
77
+
78
+ steps:
79
+ # Checkout repository
80
+ - name: Checkout repository
81
+ uses: actions/checkout@v4
82
+
83
+ # Install system dependencies (Playwright, cairo, etc.)
84
+ - name: Install system dependencies
85
+ run: |
86
+ sudo apt-get install -y libglib2.0-0 libnspr4 libnss3 libatk1.0-0 \
87
+ libatk-bridge2.0-0 libcups2 libxkbcommon0 libatspi2.0-0 libxcomposite1 \
88
+ libxdamage1 libxfixes3 libxrandr2 libgbm1 libcairo2 libpango-1.0-0
89
+
90
+ # Install uv
91
+ - name: Install uv
92
+ uses: astral-sh/setup-uv@v7
93
+ with:
94
+ enable-cache: true
95
+ cache-python: false
96
+
97
+ # Install full dependency set
98
+ - name: Sync dependencies (dev + docs)
99
+ run: uv sync --all-groups --frozen
100
+
101
+ # Install Playwright browser binaries + system deps
102
+ - name: Install Playwright browsers
103
+ run: |
104
+ uv run playwright install-deps
105
+ uv run playwright install chromium
106
+
107
+ # Build all examples (clean + all)
108
+ - name: Build examples
109
+ run: |
110
+ make examples
111
+
112
+ # Package example PDFs into a single archive
113
+ - name: Package example PDFs
114
+ run: |
115
+ mkdir -p examples
116
+ zip -j examples/examples.zip examples/build/*.pdf
117
+
118
+ # Build MkDocs HTML documentation
119
+ - name: Build documentation (HTML + LaTeX)
120
+ run: |
121
+ make docs
122
+
123
+ # Build the main Python package distribution
124
+ - name: Build distributions (texsmith)
125
+ run: uv build
126
+
127
+ # Build the MkDocs plugin distribution
128
+ - name: Build distributions (mkdocs_texsmith)
129
+ working-directory: packages/mkdocs_texsmith
130
+ run: uv build
131
+
132
+ # Upload all artifacts needed for the release job
133
+ - name: Upload release artifacts
134
+ uses: actions/upload-artifact@v4
135
+ with:
136
+ name: texsmith-release-assets
137
+ path: |
138
+ dist/*
139
+ packages/mkdocs_texsmith/dist/*
140
+ press/texsmith-docs/texsmith-docs.pdf
141
+ examples/examples.zip
142
+ if-no-files-found: error
143
+
144
+ release:
145
+ name: Release (Docs + PyPI)
146
+ needs: [build-artifacts]
147
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
148
+ runs-on: ubuntu-latest
149
+
150
+ permissions:
151
+ contents: write # Required for GitHub Pages and GitHub Releases
152
+ id-token: write
153
+ pages: write
154
+ actions: read
155
+
156
+ environment:
157
+ name: pypi
158
+ url: https://pypi.org/project/texsmith/
159
+
160
+ steps:
161
+ # Checkout repository (needed by mike deploy)
162
+ - name: Checkout repository
163
+ uses: actions/checkout@v4
164
+
165
+ # Download all build artifacts generated previously
166
+ - name: Download release artifacts
167
+ uses: actions/download-artifact@v4
168
+ with:
169
+ name: texsmith-release-assets
170
+ path: .
171
+
172
+ # Place artifacts at repository root where publish steps expect them
173
+ - name: Unpack release artifacts
174
+ run: |
175
+ set -euo pipefail
176
+ if [ -d texsmith-release-assets ]; then
177
+ shopt -s dotglob
178
+ mv texsmith-release-assets/* .
179
+ rmdir texsmith-release-assets
180
+ fi
181
+
182
+ # Ensure expected paths exist for publish steps (artifact layout may vary)
183
+ - name: Normalize artifact paths
184
+ run: |
185
+ set -euo pipefail
186
+ mkdir -p packages/mkdocs_texsmith/dist
187
+ shopt -s nullglob
188
+ # If plugin dists landed at repo root or under dist/, move them into the expected folder.
189
+ for f in mkdocs_texsmith-* mkdocs-texsmith-* dist/mkdocs_texsmith-* dist/mkdocs-texsmith-*; do
190
+ [ -e "$f" ] || continue
191
+ dest="packages/mkdocs_texsmith/dist/$(basename "$f")"
192
+ mv "$f" "$dest"
193
+ done
194
+ # Install uv for deploying the docs
195
+ - name: Install uv
196
+ uses: astral-sh/setup-uv@v7
197
+ with:
198
+ enable-cache: true
199
+ cache-python: false
200
+ env:
201
+ UV_CACHE_SAVE: "false"
202
+
203
+ # Publish versioned documentation to GitHub Pages using mike
204
+ - name: Publish documentation to GitHub Pages (mike)
205
+ env:
206
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
207
+ run: |
208
+ set -euo pipefail
209
+ VERSION="${GITHUB_REF_NAME#v}"
210
+ git config user.name "github-actions[bot]"
211
+ git config user.email "github-actions[bot]@users.noreply.github.com"
212
+ git fetch origin gh-pages || true
213
+ uv sync --group docs --frozen
214
+ uv run mike deploy --push --branch gh-pages --remote origin --update-aliases "$VERSION" latest
215
+ uv run mike set-default --push --branch gh-pages --remote origin latest
216
+
217
+ # Publish the package to PyPI from prebuilt dists
218
+ - name: Publish package to PyPI
219
+ uses: pypa/gh-action-pypi-publish@release/v1
220
+ with:
221
+ packages-dir: dist
222
+ password: ${{ secrets.PYPI_API_TOKEN }}
223
+
224
+ # Publish the MkDocs plugin to PyPI from prebuilt dists
225
+ - name: Publish mkdocs-texsmith package to PyPI
226
+ uses: pypa/gh-action-pypi-publish@release/v1
227
+ with:
228
+ packages-dir: packages/mkdocs_texsmith/dist
229
+ password: ${{ secrets.PYPI_API_TOKEN }}
230
+
231
+ # create a GitHub Release and attach artifacts
232
+ - name: Create GitHub Release
233
+ uses: softprops/action-gh-release@v2
234
+ with:
235
+ files: |
236
+ dist/*
237
+ packages/mkdocs_texsmith/dist/*
238
+ press/texsmith-docs/texsmith-docs.pdf
239
+ examples/examples.zip
@@ -0,0 +1,59 @@
1
+ # Python artifacts
2
+ __pycache__/
3
+ .DS_Store
4
+ .ruff_cache/
5
+ .uv-cache/
6
+ .venv
7
+ *.egg-info/
8
+ *.pyc
9
+ *.pyd
10
+ *.pyo
11
+ *.swo
12
+ *.swp
13
+
14
+ # LaTeX artifacts
15
+ *_minted-*/
16
+ *.acn
17
+ *.acr
18
+ *.alg
19
+ *.aux
20
+ *.bcf
21
+ *.fdb_latexmk
22
+ *.fls
23
+ *.glg
24
+ *.glo
25
+ *.gls
26
+ *.glsdefs
27
+ *.idx
28
+ *.ilg
29
+ *.ind
30
+ *.ist
31
+ *.listing
32
+ *.lof
33
+ *.log
34
+ *.lol
35
+ *.lot
36
+ *.maf
37
+ *.mtc*
38
+ *.mypyg
39
+ *.run.xml
40
+ *.synctex.gz
41
+ *.toc
42
+ *.xdv
43
+
44
+ # Local build artifacts
45
+ build*/
46
+ *:Zone.Identifier
47
+ tmp*
48
+ .uv_cache/
49
+ examples/diagrams/*.pdf
50
+ press/
51
+ site/
52
+ docs/assets/examples/*.png
53
+ docs/assets/examples/*.pdf
54
+ .coverage
55
+ *.meta
56
+
57
+ .texsmith/
58
+
59
+ *_build/
@@ -0,0 +1,26 @@
1
+ {
2
+ // Sélection de l'interpréteur
3
+ "python.defaultInterpreterPath": ".venv/bin/python",
4
+
5
+ // Pylance/Pyright
6
+ "python.languageServer": "Pylance",
7
+ "python.analysis.inlayHints.variableTypes": true,
8
+ "python.analysis.inlayHints.functionReturnTypes": true,
9
+
10
+ // Ruff = linter + (optionnel) formateur + organise imports
11
+ "ruff.enable": true,
12
+ "ruff.lint.enable": true,
13
+ "ruff.nativeServer": true,
14
+
15
+ "ruff.organizeImports": true,
16
+
17
+ "[python]": {
18
+ "editor.formatOnSave": true,
19
+ "editor.defaultFormatter": "charliermarsh.ruff"
20
+ },
21
+ "python.testing.pytestArgs": [
22
+ "."
23
+ ],
24
+ "python.testing.unittestEnabled": false,
25
+ "python.testing.pytestEnabled": true
26
+ }
@@ -0,0 +1,36 @@
1
+ # TeXSmith Agent Guide
2
+
3
+ ## Architecture Overview
4
+
5
+ - Flow: `texsmith.ui.cli` (Typer) and library calls both funnel into `api.ConversionService`, which splits inputs/front matter/bibliography, prepares `Document` objects, and drives the render pipeline.
6
+ - Document model: `api.document.Document` stores normalised HTML + front matter + slot directives; `DocumentRenderOptions` controls heading offsets/numbering/title handling; slot selectors merge CLI/front matter values.
7
+ - Render engine: `core.conversion` builds `RenderContext/DocumentContext`, then runs `adapters.handlers` in `RenderPhase` order (PRE/BLOCK/INLINE/POST) to rewrite the BeautifulSoup tree, emit LaTeX fragments, and register assets; asset hashing/manifests live in `_assets`.
8
+ - Templates: `core.templates` + `api.templates` load template runtimes, slots, bindings, and overrides; `TemplateSession`/`TemplateRenderer` assemble slot bundles and LaTeX scaffolding; template language resolution supports builtins and user paths.
9
+ - Fragments: `core.fragments` orchestrates fragment metadata/injection; builtin fragments under `fragments/*` (ts-geometry, ts-typesetting, ts-fonts, ts-extra, ts-keystrokes, ts-callouts, ts-code, ts-glossary, ts-index, ts-bibliography, ts-todolist) populate template slots.
10
+ - Engines: `adapters.latex.engines` resolves Tectonic/latexmk (plus biber makeindex helpers), builds command/env args, and can run via Docker when configured; formatter/pygments handle LaTeX-safe code blocks.
11
+ - Extensions/plugins: `adapters.plugins` (Material/snippet) and `extensions` (progress bar, texlogos, index helpers) extend Markdown parsing or LaTeX output; `adapters.transformers` hosts diagram converters (mermaid/drawio), strategies, and helpers.
12
+ - Assets/fonts: `fonts` caches/embed OpenMoji/Noto; asset registry ensures template and diagram assets are copied or hashed when `copy_assets`/`convert_assets`/`hash_assets` flags are set.
13
+
14
+ ## Design Principles
15
+
16
+ Always adhere to these principles:
17
+
18
+ - Composition over inheritance.
19
+ - Modules can inject, extend, and redefine functionality.
20
+ - Modules remain deterministic through topological ordering.
21
+ - Modules foster reusability and remixing.
22
+ - Modules cooperate through well-defined contracts.
23
+ - limit scope to demonstrated needs; keep public interfaces clear.
24
+ - **NEVER** add shims or temporary fixes; refactor instead.
25
+ - **NEVER** introduce technical debt; address issues immediately.
26
+ - **NEVER** duplicate code; abstract and reuse existing functionality.
27
+ - **NEVER** introduce compatibility layers; maintain a single, clear implementation.
28
+
29
+ ## Working agreements
30
+
31
+ - Always run `uv run pytest` after modifying Python code.
32
+ - Follow coding principles: SOLID, YAGNI, SSOT, KISS and design principles.
33
+ - Always run `uv run ruff format .` and `uv run ruff check .` after changing Python files.
34
+ - Maintain clear and concise documentation for all features added or modified.
35
+ - Use type hints for all functions and methods.
36
+ - Write unit tests for new features and bug fixes.
@@ -0,0 +1,82 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/)
6
+ and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Created an explicit changelog to track the rewritten Git history.
13
+ - Documented the new fragment manifest (attributes + partials + required_partials), partial precedence (template > fragment > core), and conversion pipeline order.
14
+ - Expanded template discovery docs and CLI info output (slots, fragments, attribute columns).
15
+ - Marked the legacy ``texsmith.fragments`` import path as deprecated; fragments should rely on ``fragment.toml`` or entrypoint factories.
16
+ - Dropped unused template knobs (article twocolumn/preamble hooks, letter callout_style stub) to align manifests with the refactored pipeline.
17
+
18
+ ### Changed
19
+
20
+ - Updated every reference to the scientific paper demo so that it matches the
21
+ renamed `examples/paper` directory used by the CLI tests and documentation.
22
+ - Template lookup now prefers built-ins, then `texsmith-template-*` packages/entry points, then cwd/parents, then `~/.texsmith/templates`; explicit paths still bypass discovery.
23
+ - Built-in template docs reflect appendix slot ordering and removal of legacy cover/twocolumn/backmatter/emoji attributes.
24
+
25
+ ## [0.3.0] - 2025-11-17
26
+
27
+ ### Added
28
+
29
+ - Imported the Carauma article template, EPFL thesis scaffolding, and the book
30
+ template migration.
31
+ - Published the MkDocs site content together with lint rules for Markdown and
32
+ prettier formatting of documentation.
33
+ - Introduced the MkDocs plugin workspace, PDF press kit example, and CI coverage
34
+ reporting defaults.
35
+
36
+ ### Changed
37
+
38
+ - Hardened the bibliography pipeline, slot handling, and document renderer to
39
+ better support mermaid diagrams, smart typography, and press metadata.
40
+ - Expanded the builtin templates (article, book, letter) with fonts, abstract
41
+ slots, syntax-highlighted code blocks, and typography refinements.
42
+
43
+ ### Fixed
44
+
45
+ - Addressed numerous CLI issues (slot injection, latexmkrc, todolist/biber
46
+ warnings) and ensured `pyproject.toml` references non-editable workspace
47
+ installs.
48
+ - Resolved regressions in the book template migration and documentation builds.
49
+
50
+ ## [0.2.0] - 2025-10-27
51
+
52
+ ### Added
53
+
54
+ - Completed the six-step core refactor: `texsmith.core` now owns the conversion
55
+ service, template orchestration, diagnostics emitters, and document slots.
56
+ - Added multi-document CLI rendering, pylatexenc integration, MkDocs example
57
+ projects, and a comprehensive regression test suite (CLI, MkDocs, templates,
58
+ extensions).
59
+ - Introduced additional LaTeX extensions (acronyms, index generation, texlogos,
60
+ bibliography improvements) and shipped assets such as the TeXSmith logo,
61
+ docker adapters, and draw.io support.
62
+
63
+ ### Changed
64
+
65
+ - Reworked bibliography handling, latex adapters, utility modules, and template
66
+ manifests to match the new orchestration pipeline.
67
+ - Migrated existing templates to the new structure, moved partials into package
68
+ modules, and refreshed documentation with dark-mode assets.
69
+
70
+ ### Fixed
71
+
72
+ - Numerous formatting, ruff, and CI fixes plus better caching/performance in the
73
+ renderer, docker adapter, and media pipeline.
74
+
75
+ ## [0.1.0] - 2025-10-21
76
+
77
+ ### Added
78
+
79
+ - Initial TeXSmith CLI implementation with LaTeX adapters, slot-aware templates,
80
+ bibliography/config helpers, and end-to-end article rendering examples.
81
+ - Early documentation, MkDocs integration, and helper scripts for generating the
82
+ cheese/scientific paper demonstration.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Isaac Muse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ PRE_CMD := uv run
2
+
3
+ examples:
4
+ cd examples && $(PRE_CMD) make all
5
+
6
+ artifacts:
7
+ ./scripts/refresh_cli_help.sh
8
+
9
+ docs: artifacts
10
+ TEXSMITH_BUILD=1 $(PRE_CMD) mkdocs build
11
+
12
+ lint:
13
+ $(PRE_CMD) ruff format .
14
+ $(PRE_CMD) ruff check .
15
+ $(PRE_CMD) ruff format .
16
+
17
+ clean:
18
+ $(RM) -rf build press site
19
+
20
+ .PHONY: examples artifacts docs clean lint