pytex-preprocessor 0.1.0__py3-none-any.whl

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 (119) hide show
  1. pytex/__init__.py +87 -0
  2. pytex/commands/__init__.py +51 -0
  3. pytex/commands/biblatex.py +98 -0
  4. pytex/commands/builtin.py +598 -0
  5. pytex/commands/captions.py +56 -0
  6. pytex/commands/cleveref.py +43 -0
  7. pytex/commands/colors.py +60 -0
  8. pytex/commands/conditionals.py +62 -0
  9. pytex/commands/counters.py +85 -0
  10. pytex/commands/definitions.py +109 -0
  11. pytex/commands/floats.py +93 -0
  12. pytex/commands/font.py +138 -0
  13. pytex/commands/fontawesome.py +88 -0
  14. pytex/commands/fontspec.py +75 -0
  15. pytex/commands/geometry.py +25 -0
  16. pytex/commands/glossaries.py +126 -0
  17. pytex/commands/graphics.py +68 -0
  18. pytex/commands/hooks.py +58 -0
  19. pytex/commands/hyperref.py +57 -0
  20. pytex/commands/lengths.py +200 -0
  21. pytex/commands/listings.py +63 -0
  22. pytex/commands/mdframed.py +43 -0
  23. pytex/commands/picture.py +32 -0
  24. pytex/commands/setspace.py +38 -0
  25. pytex/commands/tables.py +123 -0
  26. pytex/helpers/__init__.py +3 -0
  27. pytex/helpers/coerce.py +13 -0
  28. pytex/helpers/parenting.py +13 -0
  29. pytex/helpers/sanitize.py +54 -0
  30. pytex/helpers/with_package.py +61 -0
  31. pytex/interface/__init__.py +3 -0
  32. pytex/interface/control_sequence.py +29 -0
  33. pytex/interface/package.py +52 -0
  34. pytex/interface/tex.py +41 -0
  35. pytex/model/__init__.py +25 -0
  36. pytex/model/color.py +203 -0
  37. pytex/model/concat.py +31 -0
  38. pytex/model/control_sequence.py +72 -0
  39. pytex/model/document.py +120 -0
  40. pytex/model/document_class.py +29 -0
  41. pytex/model/empty.py +19 -0
  42. pytex/model/environment.py +30 -0
  43. pytex/model/image.py +137 -0
  44. pytex/model/include.py +21 -0
  45. pytex/model/length.py +54 -0
  46. pytex/model/math.py +401 -0
  47. pytex/model/package.py +132 -0
  48. pytex/model/raw.py +61 -0
  49. pytex/packages.py +221 -0
  50. pytex/registry.py +49 -0
  51. pytex_builder/__init__.py +8 -0
  52. pytex_builder/build.py +175 -0
  53. pytex_builder/console.py +77 -0
  54. pytex_builder/render.py +90 -0
  55. pytex_builder/tectonic.py +370 -0
  56. pytex_hsrtreport/__init__.py +116 -0
  57. pytex_hsrtreport/assets/fonts/Blender/Blender-Bold.ttf +0 -0
  58. pytex_hsrtreport/assets/fonts/Blender/Blender-BoldItalic.ttf +0 -0
  59. pytex_hsrtreport/assets/fonts/Blender/Blender-Book.ttf +0 -0
  60. pytex_hsrtreport/assets/fonts/Blender/Blender-BookItalic.ttf +0 -0
  61. pytex_hsrtreport/assets/fonts/Blender/Blender-Medium.ttf +0 -0
  62. pytex_hsrtreport/assets/fonts/Blender/Blender-MediumItalic.ttf +0 -0
  63. pytex_hsrtreport/assets/fonts/Blender/Blender-Strong.ttf +0 -0
  64. pytex_hsrtreport/assets/fonts/Blender/Blender-Thin.ttf +0 -0
  65. pytex_hsrtreport/assets/fonts/Blender/Blender-ThinItalic.ttf +0 -0
  66. pytex_hsrtreport/assets/fonts/DIN/DIN-Black.ttf +0 -0
  67. pytex_hsrtreport/assets/fonts/DIN/DIN-Bold.ttf +0 -0
  68. pytex_hsrtreport/assets/fonts/DIN/DIN-BoldItalic.ttf +0 -0
  69. pytex_hsrtreport/assets/fonts/DIN/DIN-Italic.ttf +0 -0
  70. pytex_hsrtreport/assets/fonts/DIN/DIN-Medium.ttf +0 -0
  71. pytex_hsrtreport/assets/fonts/DIN/DIN-Regular.ttf +0 -0
  72. pytex_hsrtreport/assets/fonts/Times New Roman.ttf +0 -0
  73. pytex_hsrtreport/assets/logos/ASTA.svg +79 -0
  74. pytex_hsrtreport/assets/logos/DUMMY.png +0 -0
  75. pytex_hsrtreport/assets/logos/DUMMY_FOOT.png +0 -0
  76. pytex_hsrtreport/assets/logos/ECHO.svg +226 -0
  77. pytex_hsrtreport/assets/logos/HSRT.pdf +0 -0
  78. pytex_hsrtreport/assets/logos/INF.pdf +0 -0
  79. pytex_hsrtreport/assets/logos/STUPA.pdf +0 -0
  80. pytex_hsrtreport/assets/logos/Skyline.pdf +0 -0
  81. pytex_hsrtreport/boxes.py +215 -0
  82. pytex_hsrtreport/citations.py +21 -0
  83. pytex_hsrtreport/cleveref_names.py +47 -0
  84. pytex_hsrtreport/colors.py +30 -0
  85. pytex_hsrtreport/document.py +307 -0
  86. pytex_hsrtreport/fonts.py +66 -0
  87. pytex_hsrtreport/glossary.py +61 -0
  88. pytex_hsrtreport/hyperref_config.py +49 -0
  89. pytex_hsrtreport/listings.py +90 -0
  90. pytex_hsrtreport/logos.py +234 -0
  91. pytex_hsrtreport/pagebreak.py +67 -0
  92. pytex_hsrtreport/pagesetup.py +33 -0
  93. pytex_hsrtreport/tex/pagesetup.tex +76 -0
  94. pytex_hsrtreport/titlepage.py +136 -0
  95. pytex_hsrtreport/variants.py +24 -0
  96. pytex_hsrtreport/voting.py +96 -0
  97. pytex_hsrtreport/watermark.py +63 -0
  98. pytex_hsrtreport/wordcount.py +33 -0
  99. pytex_koma/__init__.py +90 -0
  100. pytex_koma/commands.py +296 -0
  101. pytex_koma/document.py +138 -0
  102. pytex_markdown/__init__.py +62 -0
  103. pytex_markdown/convert.py +271 -0
  104. pytex_markdown/escape.py +11 -0
  105. pytex_preprocessor-0.1.0.dist-info/METADATA +82 -0
  106. pytex_preprocessor-0.1.0.dist-info/RECORD +119 -0
  107. pytex_preprocessor-0.1.0.dist-info/WHEEL +5 -0
  108. pytex_preprocessor-0.1.0.dist-info/entry_points.txt +2 -0
  109. pytex_preprocessor-0.1.0.dist-info/top_level.txt +7 -0
  110. pytex_protocol/__init__.py +37 -0
  111. pytex_protocol/convert.py +202 -0
  112. pytex_protocol/document.py +91 -0
  113. pytex_protocol/entries.py +96 -0
  114. pytex_protocol/frontmatter.py +80 -0
  115. pytex_protocol/header.py +139 -0
  116. pytex_protocol/shortcodes.py +130 -0
  117. pytex_protocol/signatures.py +84 -0
  118. pytex_tikz/__init__.py +25 -0
  119. pytex_tikz/tikz.py +272 -0
pytex/__init__.py ADDED
@@ -0,0 +1,87 @@
1
+ from . import packages
2
+ from .commands import (
3
+ biblatex,
4
+ builtin,
5
+ captions,
6
+ cleveref,
7
+ colors,
8
+ conditionals,
9
+ counters,
10
+ definitions,
11
+ floats,
12
+ font,
13
+ fontawesome,
14
+ fontspec,
15
+ geometry,
16
+ glossaries,
17
+ graphics,
18
+ hooks,
19
+ hyperref,
20
+ lengths,
21
+ listings,
22
+ mdframed,
23
+ picture,
24
+ setspace,
25
+ tables,
26
+ )
27
+ from .helpers import coerce, sanitize, with_package
28
+ from .model import (
29
+ color,
30
+ concat,
31
+ control_sequence,
32
+ document,
33
+ document_class,
34
+ empty,
35
+ environment,
36
+ image,
37
+ include,
38
+ length,
39
+ math,
40
+ package,
41
+ raw,
42
+ )
43
+ from .registry import Registry
44
+
45
+ __all__ = [
46
+ "Registry",
47
+ "biblatex",
48
+ "builtin",
49
+ "captions",
50
+ "cleveref",
51
+ "coerce",
52
+ "color",
53
+ "colors",
54
+ "concat",
55
+ "conditionals",
56
+ "control_sequence",
57
+ "counters",
58
+ "definitions",
59
+ "document",
60
+ "document_class",
61
+ "empty",
62
+ "environment",
63
+ "floats",
64
+ "font",
65
+ "fontawesome",
66
+ "fontspec",
67
+ "geometry",
68
+ "glossaries",
69
+ "graphics",
70
+ "hooks",
71
+ "hyperref",
72
+ "image",
73
+ "include",
74
+ "length",
75
+ "lengths",
76
+ "listings",
77
+ "math",
78
+ "mdframed",
79
+ "package",
80
+ "packages",
81
+ "picture",
82
+ "raw",
83
+ "sanitize",
84
+ "setspace",
85
+ "tables",
86
+ "with_package",
87
+ ]
@@ -0,0 +1,51 @@
1
+ from . import (
2
+ biblatex,
3
+ builtin,
4
+ captions,
5
+ cleveref,
6
+ colors,
7
+ conditionals,
8
+ counters,
9
+ definitions,
10
+ floats,
11
+ font,
12
+ fontawesome,
13
+ fontspec,
14
+ geometry,
15
+ glossaries,
16
+ graphics,
17
+ hooks,
18
+ hyperref,
19
+ lengths,
20
+ listings,
21
+ mdframed,
22
+ picture,
23
+ setspace,
24
+ tables,
25
+ )
26
+
27
+ __all__ = [
28
+ "biblatex",
29
+ "builtin",
30
+ "captions",
31
+ "cleveref",
32
+ "colors",
33
+ "conditionals",
34
+ "counters",
35
+ "definitions",
36
+ "floats",
37
+ "font",
38
+ "fontawesome",
39
+ "fontspec",
40
+ "geometry",
41
+ "glossaries",
42
+ "graphics",
43
+ "hooks",
44
+ "hyperref",
45
+ "lengths",
46
+ "listings",
47
+ "mdframed",
48
+ "picture",
49
+ "setspace",
50
+ "tables",
51
+ ]
@@ -0,0 +1,98 @@
1
+ from ..helpers.with_package import with_package
2
+ from ..interface.tex import TeX
3
+ from ..model.control_sequence import ControlSequence, Parameter
4
+ from ..packages import BIBLATEX
5
+ from ..registry import Registry
6
+
7
+ __all__ = [
8
+ "Addbibresource",
9
+ "Autocite",
10
+ "Citeauthor",
11
+ "Citetitle",
12
+ "Citeyear",
13
+ "ExecuteBibliographyOptions",
14
+ "Footcite",
15
+ "Nocite",
16
+ "Parencite",
17
+ "Printbibliography",
18
+ "Textcite",
19
+ ]
20
+
21
+
22
+ @Registry.add
23
+ @with_package(BIBLATEX)
24
+ def Addbibresource(path: str) -> TeX:
25
+ return ControlSequence("addbibresource", (Parameter(path),))
26
+
27
+
28
+ @Registry.add
29
+ @with_package(BIBLATEX)
30
+ def Printbibliography(
31
+ heading: str | None = None,
32
+ title: str | None = None,
33
+ ) -> TeX:
34
+ opts = [
35
+ f"{key}={value}"
36
+ for key, value in (("heading", heading), ("title", title))
37
+ if value is not None
38
+ ]
39
+ if not opts:
40
+ return ControlSequence("printbibliography", ())
41
+ return ControlSequence(
42
+ "printbibliography",
43
+ (Parameter(",".join(opts), optional=True),),
44
+ )
45
+
46
+
47
+ @Registry.add
48
+ @with_package(BIBLATEX)
49
+ def Textcite(*keys: str) -> TeX:
50
+ return ControlSequence("textcite", (Parameter(",".join(keys)),))
51
+
52
+
53
+ @Registry.add
54
+ @with_package(BIBLATEX)
55
+ def Parencite(*keys: str) -> TeX:
56
+ return ControlSequence("parencite", (Parameter(",".join(keys)),))
57
+
58
+
59
+ @Registry.add
60
+ @with_package(BIBLATEX)
61
+ def Autocite(*keys: str) -> TeX:
62
+ return ControlSequence("autocite", (Parameter(",".join(keys)),))
63
+
64
+
65
+ @Registry.add
66
+ @with_package(BIBLATEX)
67
+ def Footcite(*keys: str) -> TeX:
68
+ return ControlSequence("footcite", (Parameter(",".join(keys)),))
69
+
70
+
71
+ @Registry.add
72
+ @with_package(BIBLATEX)
73
+ def Citeauthor(key: str) -> TeX:
74
+ return ControlSequence("citeauthor", (Parameter(key),))
75
+
76
+
77
+ @Registry.add
78
+ @with_package(BIBLATEX)
79
+ def Citeyear(key: str) -> TeX:
80
+ return ControlSequence("citeyear", (Parameter(key),))
81
+
82
+
83
+ @Registry.add
84
+ @with_package(BIBLATEX)
85
+ def Citetitle(key: str) -> TeX:
86
+ return ControlSequence("citetitle", (Parameter(key),))
87
+
88
+
89
+ @Registry.add
90
+ @with_package(BIBLATEX)
91
+ def Nocite(*keys: str) -> TeX:
92
+ return ControlSequence("nocite", (Parameter(",".join(keys)),))
93
+
94
+
95
+ @Registry.add
96
+ @with_package(BIBLATEX)
97
+ def ExecuteBibliographyOptions(options: dict[str, str]) -> TeX:
98
+ return ControlSequence("ExecuteBibliographyOptions", (Parameter(options),))