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
@@ -0,0 +1,226 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="1680.7511"
4
+ zoomAndPan="magnify"
5
+ viewBox="0 0 1260.5634 374.99999"
6
+ height="500"
7
+ preserveAspectRatio="xMidYMid"
8
+ version="1.0"
9
+ id="svg39"
10
+ sodipodi:docname="ECHO-Logo-Breit.svg"
11
+ inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
12
+ inkscape:export-filename="Logo.png"
13
+ inkscape:export-xdpi="96"
14
+ inkscape:export-ydpi="96"
15
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ xmlns:svg="http://www.w3.org/2000/svg">
19
+ <sodipodi:namedview
20
+ id="namedview39"
21
+ pagecolor="#ffffff"
22
+ bordercolor="#ffffff"
23
+ borderopacity="1"
24
+ inkscape:showpageshadow="0"
25
+ inkscape:pageopacity="0"
26
+ inkscape:pagecheckerboard="1"
27
+ inkscape:deskcolor="#505050"
28
+ inkscape:zoom="0.60245498"
29
+ inkscape:cx="847.36622"
30
+ inkscape:cy="293.79789"
31
+ inkscape:window-width="1920"
32
+ inkscape:window-height="1008"
33
+ inkscape:window-x="0"
34
+ inkscape:window-y="0"
35
+ inkscape:window-maximized="1"
36
+ inkscape:current-layer="svg39" />
37
+ <defs
38
+ id="defs14">
39
+ <filter
40
+ x="0"
41
+ y="0"
42
+ width="1"
43
+ height="1"
44
+ id="a14cb9844c">
45
+ <feColorMatrix
46
+ values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
47
+ color-interpolation-filters="sRGB"
48
+ id="feColorMatrix1" />
49
+ </filter>
50
+ <clipPath
51
+ id="e9eb413b15">
52
+ <path
53
+ d="M 0,162.33203 H 303 V 375 H 0 Z m 0,0"
54
+ clip-rule="nonzero"
55
+ id="path1" />
56
+ </clipPath>
57
+ <clipPath
58
+ id="ff211086a6">
59
+ <path
60
+ d="M 0,0.332031 H 302.94141 V 213 H 0 Z m 0,0"
61
+ clip-rule="nonzero"
62
+ id="path2" />
63
+ </clipPath>
64
+ <clipPath
65
+ id="01f0c89ca1">
66
+ <rect
67
+ x="0"
68
+ width="303"
69
+ y="0"
70
+ height="213"
71
+ id="rect2" />
72
+ </clipPath>
73
+ <clipPath
74
+ id="3f18cb8b6e">
75
+ <path
76
+ d="m 187.5,6.023438 c -100.226562,0 -181.476562,81.25 -181.476562,181.476562 0,100.22656 81.25,181.47656 181.476562,181.47656 100.22656,0 181.47656,-81.25 181.47656,-181.47656 0,-100.226562 -81.25,-181.476562 -181.47656,-181.476562 z m 0,0"
77
+ clip-rule="nonzero"
78
+ id="path4" />
79
+ </clipPath>
80
+ <clipPath
81
+ id="f7d9383a75">
82
+ <path
83
+ d="M 0.0234375,0.0234375 H 362.97656 V 362.97656 H 0.0234375 Z m 0,0"
84
+ clip-rule="nonzero"
85
+ id="path5" />
86
+ </clipPath>
87
+ <clipPath
88
+ id="d6bff982a2">
89
+ <path
90
+ d="M 181.5,0.0234375 C 81.273438,0.0234375 0.0234375,81.273438 0.0234375,181.5 c 0,100.22656 81.2500005,181.47656 181.4765625,181.47656 100.22656,0 181.47656,-81.25 181.47656,-181.47656 0,-100.226562 -81.25,-181.4765625 -181.47656,-181.4765625 z m 0,0"
91
+ clip-rule="nonzero"
92
+ id="path6" />
93
+ </clipPath>
94
+ <clipPath
95
+ id="3bec011c11">
96
+ <rect
97
+ x="0"
98
+ width="363"
99
+ y="0"
100
+ height="363"
101
+ id="rect6" />
102
+ </clipPath>
103
+ <clipPath
104
+ id="1a315f63cf">
105
+ <path
106
+ d="M 31,71 H 344 V 328 H 31 Z m 0,0"
107
+ clip-rule="nonzero"
108
+ id="path7" />
109
+ </clipPath>
110
+ <clipPath
111
+ id="2c76be1bc0">
112
+ <path
113
+ d="M 45.957031,71.046875 343.18359,88.691406 329.00391,327.52344 31.777344,309.87891 Z m 0,0"
114
+ clip-rule="nonzero"
115
+ id="path8" />
116
+ </clipPath>
117
+ <clipPath
118
+ id="88f84e7658">
119
+ <path
120
+ d="M 5,9 H 310 V 244 H 5 Z m 0,0"
121
+ clip-rule="nonzero"
122
+ id="path9" />
123
+ </clipPath>
124
+ <clipPath
125
+ id="3d1939e266">
126
+ <path
127
+ d="M 14.957031,0.046875 312.18359,17.691406 298.00391,256.52344 0.777344,238.87891 Z m 0,0"
128
+ clip-rule="nonzero"
129
+ id="path10" />
130
+ </clipPath>
131
+ <clipPath
132
+ id="7d193d7998">
133
+ <path
134
+ d="M 312.21875,17.695312 14.992188,0.0507812 0.8125,238.87891 298.03906,256.52344 Z m 0,0"
135
+ clip-rule="nonzero"
136
+ id="path11" />
137
+ </clipPath>
138
+ <clipPath
139
+ id="ae69a87292">
140
+ <rect
141
+ x="0"
142
+ width="313"
143
+ y="0"
144
+ height="257"
145
+ id="rect11" />
146
+ </clipPath>
147
+ <mask
148
+ id="858c442a0c">
149
+ <g
150
+ filter="url(#a14cb9844c)"
151
+ id="g12">
152
+ <rect
153
+ x="-37.5"
154
+ width="450"
155
+ fill="#000000"
156
+ y="-37.5"
157
+ height="450"
158
+ fill-opacity="0.65"
159
+ id="rect12" />
160
+ </g>
161
+ </mask>
162
+ <clipPath
163
+ id="53b6404be3">
164
+ <path
165
+ d="M 1.605469,0.660156 H 299.35547 V 239.91016 H 1.605469 Z m 0,0"
166
+ clip-rule="nonzero"
167
+ id="path12" />
168
+ </clipPath>
169
+ <clipPath
170
+ id="5a2d465416">
171
+ <path
172
+ d="M 0.640625,0.660156 H 298.35547 V 239.91016 H 0.640625 Z m 0,0"
173
+ clip-rule="nonzero"
174
+ id="path13" />
175
+ </clipPath>
176
+ <clipPath
177
+ id="814dab782c">
178
+ <rect
179
+ x="0"
180
+ width="299"
181
+ y="0"
182
+ height="240"
183
+ id="rect13" />
184
+ </clipPath>
185
+ <clipPath
186
+ id="b7a9847ee5">
187
+ <rect
188
+ x="0"
189
+ width="301"
190
+ y="0"
191
+ height="241"
192
+ id="rect14" />
193
+ </clipPath>
194
+ <clipPath
195
+ clipPathUnits="userSpaceOnUse"
196
+ id="clipPath39">
197
+ <path
198
+ d="M 0.02343798,0.02343798 H 362.97656 V 362.97656 H 0.02343798 Z m 0,0"
199
+ clip-rule="nonzero"
200
+ id="path40"
201
+ style="stroke-width:0.999998" />
202
+ </clipPath>
203
+ </defs>
204
+ <path
205
+ style="font-size:250px;line-height:0.8;font-family:'Bungee Shade';-inkscape-font-specification:'Bungee Shade';text-align:center;letter-spacing:0px;text-anchor:middle;fill:#00bf63;fill-opacity:0.666667;stroke-width:13.929;stroke-linecap:round;stroke-linejoin:round;paint-order:markers stroke fill"
206
+ d="m 566.5281,298.125 h -116 q -11.5,0 -11.5,-11.5 v -162 q 0,-6.25 3.5,-9.25 l 32.25,-27.25 q 2.75,-2.25 8,-2.25 h 116 q 11.5,0 11.5,11.5 v 29.25 q 0,6.25 -3.5,9.25 l -21.5,17.75 q 4.75,2.5 4.75,10.25 v 26.75 q 0,6.25 -3.5,9.25 l -22.25,18.75 h 34.5 q 11.5,0 11.5,11.5 v 29.25 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 z m 32.25,-29.75 q 9,0 9,-9 v -29.25 q 0,-9 -9,-9 h -69 v -21.5 h 48.75 q 9,0 9,-9 v -26.75 q 0,-9 -9,-9 h -48.75 v -19.25 h 69 q 9,0 9,-9 v -29.25 q 0,-9 -9,-9 h -116 q -9,0 -9,9 v 162 q 0,9 9,9 z m -13.5,-25 v 2.5 h -84.25 v -135 h 84.25 v 2.5 h -81.75 v 62.75 h 61.5 v 2.5 h -61.5 v 64.75 z m 163.25013,54.75 h -61 q -22,0 -36.25,-7.75 -14,-7.75 -21,-21.5 -6.75,-13.75 -6.75,-31.75 v -70.25 q 0,-27.25 15.75,-40.75 l 32.5,-27.25 q 15.25,-13 48,-13 h 61 q 11.5,0 11.5,11.5 v 30.25 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 h -30.75 v 42.25 q 0,5.25 3.25,7.5 3.25,2 9.5,2 h 50.25 q 11.5,0 11.5,11.5 v 29.75 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 z m 32.25,-29.75 q 9,0 9,-9 v -29.75 q 0,-9 -9,-9 h -50.25 q -15.25,0 -15.25,-12 v -59.5 q 0,-12.5 15.25,-12.5 h 50.25 q 9,0 9,-9 v -30.25 q 0,-9 -9,-9 h -61 q -31.5,0 -46.5,12.5 -15,12.5 -15,38.75 v 77.75 q 0,26 15,38.5 15,12.5 46.5,12.5 z m -13.75,-22.5 h -41.75 q -16.25,0 -25,-3.25 -8.5,-3.25 -11.75,-10.25 -3.25,-7.25 -3.25,-18.75 v -70 q 0,-12 3.25,-19 3.5,-7.25 12,-10.5 8.75,-3.25 24.75,-3.25 h 41.75 v 2.5 h -41.75 q -14.75,0 -23,3 -8,2.75 -11.25,9.5 -3.25,6.5 -3.25,17.75 v 70 q 0,10.75 3,17.5 3.25,6.5 11.25,9.5 8.25,2.75 23.25,2.75 h 41.75 z m 131.75017,22.75 -32.5,27 q -2.5,2.5 -7.75,2.5 h -38.75 q -11.5,0 -11.5,-11.5 v -162 q 0,-6.25 3.5,-9.25 l 32.25,-27.25 q 2.75,-2.25 8,-2.25 h 38.75 q 11.5,0 11.5,11.5 v 51.75 h 4.5 v -24.5 q 0,-6.25 3.5,-9.25 l 32.25,-27.25 q 2.75,-2.25 8,-2.25 h 38.75 q 11.5,0 11.5,11.5 v 162 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 h -38.75 q -11.5,0 -11.5,-11.5 v -53 h -4.5 v 25.75 q 0,6.25 -3.5,9.25 z m -8,-0.25 q 9,0 9,-9 v -55.5 h 41.75 v 55.5 q 0,9 9,9 h 38.75 q 9,0 9,-9 v -162 q 0,-9 -9,-9 h -38.75 q -9,0 -9,9 v 54.25 h -41.75 v -54.25 q 0,-9 -9,-9 h -38.75 q -9,0 -9,9 v 162 q 0,9 9,9 z m 80.25,-157.5 v 135 h -2.5 v -66.25 h -96 v 66.25 h -2.5 v -135 h 2.5 v 66.25 h 96 v -66.25 z m 194.4998,175.25 q -8.75,7.5 -24.5,11.5 -15.5,4.25 -40.5,4.25 -24.5,0 -40.25,-5 -15.75,-5 -24.5,-13.75 -8.75,-8.5 -12.25,-19.5 -3.25,-11 -3.25,-22.75 v -77.75 q 0,-11.75 3.25,-21.5 3.25,-9.75 11.75,-16.75 l 32.5,-27 q 8.75,-7.5 24.25,-11.5 15.75,-4.25 40.75,-4.25 24.5,0 40.25,4 15.75,3.75 24.25,11 8.75,7.25 12,17.25 3.5,9.75 3.5,21.5 v 85.25 q 0,11.5 -3.25,21.25 -3.25,9.5 -11.75,16.75 z m 44.75,-65 v -85.25 q 0,-11.5 -3.5,-20.75 -3.25,-9.5 -11.75,-16.25 -8.5,-6.75 -23.75,-10.5 -15,-3.75 -38.5,-3.75 -23.5,0 -38.75,3.75 -15,3.75 -23.5,10.5 -8.5,6.75 -12,16.25 -3.5,9.25 -3.5,20.75 v 85.25 q 0,11.5 3.5,21 3.5,9.25 12,16 8.5,6.75 23.5,10.25 15.25,3.75 38.75,3.75 23.5,0 38.5,-3.75 15.25,-3.5 23.75,-10.25 8.5,-6.75 11.75,-16 3.5,-9.5 3.5,-21 z m -78,28 q -19.5,0 -30.5,-4.25 -11,-4.25 -15.5,-11.75 -4.25,-7.75 -4.25,-17.75 v -73.75 q 0,-10.25 4.25,-17.75 4.5,-7.5 15.5,-11.75 11,-4.25 30.5,-4.25 19.75,0 30.75,4.25 11,4.25 15.5,11.75 4.5,7.5 4.5,17.75 v 73.75 q 0,10 -4.5,17.75 -4.5,7.5 -15.5,11.75 -11,4.25 -30.75,4.25 z m 0,-2.5 q 18.75,0 29.25,-3.75 10.5,-4 14.75,-11 4.25,-7.25 4.25,-16.5 v -73.75 q 0,-9.5 -4.25,-16.5 -4.25,-7 -14.75,-10.75 -10.5,-4 -29.25,-4 -18.5,0 -29,4 -10.5,3.75 -14.75,10.75 -4,7 -4,16.5 v 73.75 q 0,9.25 4,16.5 4.25,7 14.75,11 10.5,3.75 29,3.75 z m -20.5,-34.5 v -67.25 q 0,-5 3.75,-8.25 3.75,-3.25 17.25,-3.25 13.75,0 17.25,3.25 3.75,3.25 3.75,8.25 v 67.25 q 0,5 -3.75,8.5 -3.5,3.25 -17.25,3.25 -13.5,0 -17.25,-3.25 -3.75,-3.5 -3.75,-8.5 z m 2.5,0 q 0,2.5 1,4.5 1,1.75 3.75,3 v -47.5 q 0,-2.5 -1,-4.25 -1,-2 -3.75,-3 z"
207
+ id="text39-7"
208
+ aria-label="ECHO" />
209
+ <path
210
+ id="path41"
211
+ style="fill:#b057ff;stroke-width:13.929;stroke-linecap:round;stroke-linejoin:round;paint-order:markers stroke fill"
212
+ d="M 187.5 6.0234376 A 181.47656 181.47656 0 0 0 6.0234376 187.5 A 181.47656 181.47656 0 0 0 187.5 368.97657 A 181.47656 181.47656 0 0 0 368.97657 187.5 A 181.47656 181.47656 0 0 0 187.5 6.0234376 z M 207.73096 80.847658 L 253.71094 91.542482 L 236.83594 279.33252 L 236.03907 288.16846 L 197.07422 285.85108 L 197.93409 269.35987 L 120.9917 250.98047 L 138.18311 314.15186 L 72.918458 312.28858 L 70.957032 247.6919 L 36.640137 227.54737 L 44.718751 117.73828 L 207.06592 93.843752 L 207.73096 80.847658 z M 224.74219 103.51172 L 216.15967 268.72706 L 219.52735 268.92627 L 234.19483 105.70313 L 224.74219 103.51172 z M 340.52784 110.33643 L 340.87501 128.55908 L 272.27344 129.96094 L 271.92627 111.73828 L 340.52784 110.33643 z M 206.08594 112.37842 L 61.753419 133.61719 L 55.577638 217.54248 L 88.800294 237.03516 L 90.550783 294.61377 L 114.21094 295.28907 L 95.397951 226.13233 L 198.89795 250.85596 L 206.08594 112.37842 z M 280.53077 158.29248 L 335.18409 172.5044 L 330.63721 190.14844 L 275.98389 175.94092 L 280.53077 158.29248 z M 269.35547 209.41407 L 316.17188 240.28565 L 306.12891 255.46143 L 259.3125 224.58985 L 269.35547 209.41407 z M 263.84327 250.14112 L 285.4336 278.82422 L 270.87159 289.73438 L 249.27686 261.05127 L 263.84327 250.14112 z " />
213
+ <path
214
+ fill="#00bf63"
215
+ d="m 163.93359,171.08984 -104.781246,-18.54687 22.875,67.92187 -23.660156,0.72266 -5.15625,-57.36719 -34.320313,-17.49219 1.1875,-84.144526 L 162.90234,32.429688 Z M 162.78125,13.867188 2.136719,47.34375 0.582031,157.4375 l 35.445313,18.07422 5.785156,64.37109 65.26172,-2.01172 -20.902345,-62.03906 77.894535,13.78516 0.11718,16.51562 h 39.03516 l 0.27344,-8.86328 5.71484,-188.464842 -46.53125,-7.949219 z m 67.23437,32.191406 68.39844,-5.464844 -1.42578,-18.167969 -68.39844,5.464844 z m 6.42969,45.679687 55.39453,10.941409 3.4961,-17.882815 -55.39844,-10.945313 z m -13.76172,49.550779 48.56641,28.04297 9.125,-15.74609 -48.56641,-28.04297 z m -7.85547,36.99219 23.25391,27.35156 13.89063,-11.75 -23.25391,-27.35547 z M 190.5625,24.101562 185.59766,187.90625 h -3.375 L 181,22.472656 Z m 0,0"
216
+ fill-opacity="1"
217
+ fill-rule="nonzero"
218
+ id="path32"
219
+ transform="translate(38,78.999999)"
220
+ style="fill:#00bf63;fill-opacity:0.66712868" />
221
+ <path
222
+ style="font-size:250px;line-height:0.8;font-family:'Bungee Shade';-inkscape-font-specification:'Bungee Shade';text-align:center;letter-spacing:0px;text-anchor:middle;fill:#b057ff;stroke-width:13.929;stroke-linecap:round;stroke-linejoin:round;paint-order:markers stroke fill"
223
+ d="m 562.5475,293.625 h -116 q -11.5,0 -11.5,-11.5 v -162 q 0,-6.25 3.5,-9.25 l 32.25,-27.25 q 2.75,-2.25 8,-2.25 h 116 q 11.5,0 11.5,11.5 v 29.25 q 0,6.25 -3.5,9.25 l -21.5,17.75 q 4.75,2.5 4.75,10.25 v 26.75 q 0,6.25 -3.5,9.25 l -22.25,18.75 h 34.5 q 11.5,0 11.5,11.5 v 29.25 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 z m 32.25,-29.75 q 9,0 9,-9 v -29.25 q 0,-9 -9,-9 h -69 v -21.5 h 48.75 q 9,0 9,-9 v -26.75 q 0,-9 -9,-9 h -48.75 v -19.25 h 69 q 9,0 9,-9 v -29.25 q 0,-9 -9,-9 h -116 q -9,0 -9,9 v 162 q 0,9 9,9 z m -13.5,-25 v 2.5 h -84.25 v -135 h 84.25 v 2.5 h -81.75 v 62.75 h 61.5 v 2.5 h -61.5 v 64.75 z m 163.25014,54.75 h -61 q -22,0 -36.25,-7.75 -14,-7.75 -21,-21.5 -6.75,-13.75 -6.75,-31.75 v -70.25 q 0,-27.25 15.75,-40.75 l 32.5,-27.25 q 15.25,-13 48,-13 h 61 q 11.5,0 11.5,11.5 v 30.25 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 h -30.75 v 42.25 q 0,5.25 3.25,7.5 3.25,2 9.5,2 h 50.25 q 11.5,0 11.5,11.5 v 29.75 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 z m 32.25,-29.75 q 9,0 9,-9 v -29.75 q 0,-9 -9,-9 h -50.25 q -15.25,0 -15.25,-12 v -59.5 q 0,-12.5 15.25,-12.5 h 50.25 q 9,0 9,-9 v -30.25 q 0,-9 -9,-9 h -61 q -31.5,0 -46.5,12.5 -15,12.5 -15,38.75 v 77.75 q 0,26 15,38.5 15,12.5 46.5,12.5 z m -13.75,-22.5 h -41.75 q -16.25,0 -25,-3.25 -8.5,-3.25 -11.75,-10.25 -3.25,-7.25 -3.25,-18.75 v -70 q 0,-12 3.25,-19 3.5,-7.25 12,-10.5 8.75,-3.25 24.75,-3.25 h 41.75 v 2.5 h -41.75 q -14.75,0 -23,3 -8,2.75 -11.25,9.5 -3.25,6.5 -3.25,17.75 v 70 q 0,10.75 3,17.5 3.25,6.5 11.25,9.5 8.25,2.75 23.25,2.75 h 41.75 z m 131.75017,22.75 -32.5,27 q -2.5,2.5 -7.75,2.5 h -38.75 q -11.5,0 -11.5,-11.5 v -162 q 0,-6.25 3.5,-9.25 l 32.25,-27.25 q 2.75,-2.25 8,-2.25 h 38.75 q 11.5,0 11.5,11.5 v 51.75 h 4.5 v -24.5 q 0,-6.25 3.5,-9.25 l 32.25,-27.25 q 2.75,-2.25 8,-2.25 h 38.75 q 11.5,0 11.5,11.5 v 162 q 0,6.25 -3.5,9.25 l -32.5,27 q -2.5,2.5 -7.75,2.5 h -38.75 q -11.5,0 -11.5,-11.5 v -53 h -4.5 v 25.75 q 0,6.25 -3.5,9.25 z m -8,-0.25 q 9,0 9,-9 v -55.5 h 41.75 v 55.5 q 0,9 9,9 h 38.75 q 9,0 9,-9 v -162 q 0,-9 -9,-9 h -38.75 q -9,0 -9,9 v 54.25 h -41.75 v -54.25 q 0,-9 -9,-9 h -38.75 q -9,0 -9,9 v 162 q 0,9 9,9 z m 80.25,-157.5 v 135 h -2.5 v -66.25 h -96 v 66.25 h -2.5 v -135 h 2.5 v 66.25 h 96 v -66.25 z m 194.49979,175.25 q -8.75,7.5 -24.5,11.5 -15.5,4.25 -40.5,4.25 -24.5,0 -40.25,-5 -15.75,-5 -24.5,-13.75 -8.75,-8.5 -12.25,-19.5 -3.25,-11 -3.25,-22.75 v -77.75 q 0,-11.75 3.25,-21.5 3.25,-9.75 11.75,-16.75 l 32.5,-27 q 8.75,-7.5 24.25,-11.5 15.75,-4.25 40.75,-4.25 24.5,0 40.25,4 15.75,3.75 24.25,11 8.75,7.25 12,17.25 3.5,9.75 3.5,21.5 v 85.25 q 0,11.5 -3.25,21.25 -3.25,9.5 -11.75,16.75 z m 44.75,-65 v -85.25 q 0,-11.5 -3.5,-20.75 -3.25,-9.5 -11.75,-16.25 -8.5,-6.75 -23.75,-10.5 -15,-3.75 -38.5,-3.75 -23.5,0 -38.75,3.75 -15,3.75 -23.5,10.5 -8.5,6.75 -12,16.25 -3.5,9.25 -3.5,20.75 v 85.25 q 0,11.5 3.5,21 3.5,9.25 12,16 8.5,6.75 23.5,10.25 15.25,3.75 38.75,3.75 23.5,0 38.5,-3.75 15.25,-3.5 23.75,-10.25 8.5,-6.75 11.75,-16 3.5,-9.5 3.5,-21 z m -78,28 q -19.5,0 -30.5,-4.25 -11,-4.25 -15.5,-11.75 -4.25,-7.75 -4.25,-17.75 v -73.75 q 0,-10.25 4.25,-17.75 4.5,-7.5 15.5,-11.75 11,-4.25 30.5,-4.25 19.75,0 30.75,4.25 11,4.25 15.5,11.75 4.5,7.5 4.5,17.75 v 73.75 q 0,10 -4.5,17.75 -4.5,7.5 -15.5,11.75 -11,4.25 -30.75,4.25 z m 0,-2.5 q 18.75,0 29.25,-3.75 10.5,-4 14.75,-11 4.25,-7.25 4.25,-16.5 v -73.75 q 0,-9.5 -4.25,-16.5 -4.25,-7 -14.75,-10.75 -10.5,-4 -29.25,-4 -18.5,0 -29,4 -10.5,3.75 -14.75,10.75 -4,7 -4,16.5 v 73.75 q 0,9.25 4,16.5 4.25,7 14.75,11 10.5,3.75 29,3.75 z m -20.5,-34.5 v -67.25 q 0,-5 3.75,-8.25 3.75,-3.25 17.25,-3.25 13.75,0 17.25,3.25 3.75,3.25 3.75,8.25 v 67.25 q 0,5 -3.75,8.5 -3.5,3.25 -17.25,3.25 -13.5,0 -17.25,-3.25 -3.75,-3.5 -3.75,-8.5 z m 2.5,0 q 0,2.5 1,4.5 1,1.75 3.75,3 v -47.5 q 0,-2.5 -1,-4.25 -1,-2 -3.75,-3 z"
224
+ id="text39"
225
+ aria-label="ECHO" />
226
+ </svg>
Binary file
Binary file
Binary file
@@ -0,0 +1,215 @@
1
+ from dataclasses import dataclass, field
2
+ from typing import Final, override
3
+
4
+ from pytex.commands.builtin import Hspace, Noindent, Vspace
5
+ from pytex.commands.colors import SelectColor
6
+ from pytex.commands.floats import Minipage
7
+ from pytex.commands.font import Fontsize, Selectfont
8
+ from pytex.commands.fontawesome import FaIcon
9
+ from pytex.commands.mdframed import Mdframed
10
+ from pytex.commands.picture import Picture, Put
11
+ from pytex.helpers.parenting import attach
12
+ from pytex.interface.package import PackageProtocol
13
+ from pytex.interface.tex import TeX
14
+ from pytex.model.concat import Concat
15
+ from pytex.model.raw import Raw
16
+ from pytex.packages import CALC, FONTAWESOME, MDFRAMED, TIKZ, XCOLOR
17
+ from pytex.registry import Registry
18
+
19
+ __all__ = [
20
+ "ColoredBox",
21
+ "CustomBox",
22
+ "DiscussionBox",
23
+ "ImportantBox",
24
+ "InfoBox",
25
+ "SuccessBox",
26
+ "WarningBox",
27
+ ]
28
+
29
+ BASE_OPACITY: Final[float] = 0.05
30
+ PER_LEVEL: Final[float] = 0.075
31
+ ICON_BOOST: Final[int] = 20
32
+
33
+ # Render-time nesting depth, mirroring LaTeX's `coloredBoxLevel` counter.
34
+ _render_depth: int = 0
35
+
36
+
37
+ @Registry.add
38
+ @dataclass(frozen=True)
39
+ class ColoredBox(TeX):
40
+ """Nested-aware colored info box. Background opacity grows with nesting depth.
41
+
42
+ Mirrors the LaTeX `ColoredBox` env from HSRTReport, but the depth counter
43
+ (`coloredBoxLevel`) is resolved at render time by walking the parent chain
44
+ instead of relying on a global LaTeX counter.
45
+ """
46
+
47
+ body: Final[TeX | str]
48
+ icon: Final[TeX | str] = field(default_factory=lambda: FaIcon("info-circle"))
49
+ icon_color: Final[str] = "blue"
50
+ icon_size: Final[str] = "28pt"
51
+ icon_offset_x: Final[str] = "0pt"
52
+ icon_offset_y: Final[str] = "0pt"
53
+ background_color: Final[str] = "blue"
54
+ _parent: "TeX | None" = field(default=None, init=False, compare=False, repr=False)
55
+
56
+ def __post_init__(self) -> None:
57
+ attach(self, self.body, self.icon)
58
+
59
+ @property
60
+ def nesting_level(self) -> int:
61
+ """1-indexed depth: 1 for outermost, 2 for once-nested, etc."""
62
+ return 1 + sum(1 for p in self.parents if isinstance(p, ColoredBox))
63
+
64
+ @property
65
+ def background_opacity(self) -> int:
66
+ return round((BASE_OPACITY + PER_LEVEL * self.nesting_level) * 100)
67
+
68
+ @property
69
+ def icon_opacity(self) -> int:
70
+ return self.background_opacity + ICON_BOOST
71
+
72
+ @property
73
+ @override
74
+ def children(self) -> tuple[TeX, ...]:
75
+ return tuple(v for v in (self.body, self.icon) if isinstance(v, TeX))
76
+
77
+ @property
78
+ @override
79
+ def requires(self) -> frozenset[PackageProtocol]:
80
+ # `calc` is required: the original env uses infix length arithmetic
81
+ # (`\linewidth-0.5cm`, `\put(x-size,...)`) which is only valid with it.
82
+ # `tikz` is mdframed's framemethod that actually rounds the filled
83
+ # background when the frame lines are hidden.
84
+ return frozenset({MDFRAMED, XCOLOR, FONTAWESOME, CALC, TIKZ})
85
+
86
+ @property
87
+ @override
88
+ def rendered(self) -> str:
89
+ # Faithful port of the HSRTReport `ColoredBox` env: a zero-height
90
+ # picture overlays the icon at the top-left, and the body sits in a
91
+ # narrower minipage beside it. Requires `calc` for the infix length
92
+ # arithmetic (see `requires`).
93
+ #
94
+ # Nesting depth is tracked with a render-time counter (mirroring the
95
+ # LaTeX `coloredBoxLevel`) rather than the parent chain: building the
96
+ # wrapper nodes below re-`attach`es the body and would sever that chain
97
+ # before the inner box renders.
98
+ global _render_depth
99
+ _render_depth += 1
100
+ try:
101
+ # Prefer the render counter (correct for top-down rendering, where
102
+ # building wrappers severs the parent chain); fall back to the
103
+ # parent chain so an inner box rendered in isolation is still right.
104
+ level = max(_render_depth, self.nesting_level)
105
+ bg = round((BASE_OPACITY + PER_LEVEL * level) * 100)
106
+ icon_op = bg + ICON_BOOST
107
+ return Concat(
108
+ Vspace(r"0.5\baselineskip", star=True),
109
+ Raw("~\\\\"),
110
+ Noindent(),
111
+ Minipage(
112
+ r"\linewidth",
113
+ Mdframed(
114
+ Concat(
115
+ # Zero-size overlay: the icon is drawn at its \put
116
+ # coordinates without reserving width, so the body
117
+ # minipage flows normally instead of overflowing.
118
+ Picture(
119
+ "0",
120
+ "0",
121
+ Put(
122
+ f"{self.icon_offset_x}+0.2cm-{self.icon_size}",
123
+ self.icon_offset_y,
124
+ # `\vcenter` centres each glyph's actual
125
+ # bounding box on the math axis, so circles,
126
+ # triangles and ticks all line up with the
127
+ # first text line regardless of metrics.
128
+ Concat(
129
+ Raw(r"$\vcenter{\hbox{"),
130
+ Fontsize(self.icon_size, self.icon_size),
131
+ Selectfont(),
132
+ SelectColor(f"{self.icon_color}!{icon_op}"),
133
+ self.icon,
134
+ Raw(r"}}$"),
135
+ ),
136
+ ),
137
+ ),
138
+ Hspace("0.25cm+2pt", star=True),
139
+ Minipage(
140
+ r"\linewidth-0.5cm-2pt",
141
+ self.body,
142
+ align="t",
143
+ ),
144
+ ),
145
+ options={
146
+ "backgroundcolor": f"{self.background_color}!{bg}",
147
+ "hidealllines": "true",
148
+ "skipabove": r"0.7\baselineskip",
149
+ "skipbelow": r"0.7\baselineskip",
150
+ "innertopmargin": "0.45cm",
151
+ "innerbottommargin": "0.45cm",
152
+ "splitbottomskip": "2pt",
153
+ "splittopskip": "4pt",
154
+ "roundcorner": "5pt",
155
+ },
156
+ ),
157
+ ),
158
+ ).rendered
159
+ finally:
160
+ _render_depth -= 1
161
+
162
+
163
+ def _preset(
164
+ body: TeX | str,
165
+ icon_name: str | None,
166
+ color: str,
167
+ icon_size: str = "24pt",
168
+ icon_offset_x: str = "1.5pt",
169
+ icon_offset_y: str = "0pt",
170
+ ) -> ColoredBox:
171
+ return ColoredBox(
172
+ body=body,
173
+ icon=FaIcon(icon_name),
174
+ icon_color=color,
175
+ icon_size=icon_size,
176
+ icon_offset_x=icon_offset_x,
177
+ icon_offset_y=icon_offset_y,
178
+ background_color=color,
179
+ )
180
+
181
+
182
+ @Registry.add
183
+ def InfoBox(body: TeX | str) -> ColoredBox:
184
+ return _preset(body, "info-circle", "blue", icon_offset_y="2pt")
185
+
186
+
187
+ @Registry.add
188
+ def WarningBox(body: TeX | str) -> ColoredBox:
189
+ return _preset(
190
+ body, "exclamation-triangle", "red", icon_offset_y="1pt", icon_offset_x="0.5pt"
191
+ )
192
+
193
+
194
+ @Registry.add
195
+ def SuccessBox(body: TeX | str) -> ColoredBox:
196
+ return _preset(body, "check-circle", "green")
197
+
198
+
199
+ @Registry.add
200
+ def ImportantBox(body: TeX | str) -> ColoredBox:
201
+ return _preset(
202
+ body,
203
+ "exclamation-circle",
204
+ "orange",
205
+ )
206
+
207
+
208
+ @Registry.add
209
+ def CustomBox(body: TeX | str, icon: str | None, color: str) -> ColoredBox:
210
+ return _preset(body, icon, color)
211
+
212
+
213
+ @Registry.add
214
+ def DiscussionBox(body: TeX | str) -> ColoredBox:
215
+ return _preset(body, "comments", "hanblue")
@@ -0,0 +1,21 @@
1
+ from pytex.commands.biblatex import Citeauthor, Citeyear
2
+ from pytex.commands.hyperref import Hyperlink
3
+ from pytex.interface.tex import TeX
4
+ from pytex.model.concat import Concat
5
+ from pytex.registry import Registry
6
+
7
+ __all__ = ["Fcite"]
8
+
9
+
10
+ @Registry.add
11
+ def Fcite(key: str) -> TeX:
12
+ """Full clickable citation: `\\hyperlink{cite.0@KEY}{Author, Year}`.
13
+
14
+ Mirrors HSRTReport's `\\fcite` macro — author + year in one clickable link.
15
+ biblatex names the citation anchor ``cite.0@KEY`` (the ``0@`` is refsection
16
+ 0); targeting ``cite.KEY`` would dangle.
17
+ """
18
+ return Hyperlink(
19
+ f"cite.0@{key}",
20
+ Concat(Citeauthor(key), ", ", Citeyear(key)),
21
+ )
@@ -0,0 +1,47 @@
1
+ from typing import Final
2
+
3
+ from pytex.commands.cleveref import Crefname, CrefnameUpper
4
+ from pytex.interface.tex import TeX
5
+ from pytex.model.concat import Concat
6
+ from pytex.registry import Registry
7
+
8
+ __all__ = ["GermanCrefNames"]
9
+
10
+ GERMAN_NAMES: Final[dict[str, tuple[str, str]]] = {
11
+ "figure": ("Abbildung", "Abbildungen"),
12
+ "table": ("Tabelle", "Tabellen"),
13
+ "equation": ("Gleichung", "Gleichungen"),
14
+ "chapter": ("Kapitel", "Kapitel"),
15
+ "section": ("Abschnitt", "Abschnitte"),
16
+ "subsection": ("Unterabschnitt", "Unterabschnitte"),
17
+ "subsubsection": ("Unterunterabschnitt", "Unterunterabschnitte"),
18
+ "listing": ("Listing", "Codeblock"),
19
+ "appendix": ("Anhang", "Anhänge"),
20
+ "algorithm": ("Algorithmus", "Algorithmen"),
21
+ "theorem": ("Theorem", "Theoreme"),
22
+ "lemma": ("Lemma", "Lemmata"),
23
+ "corollary": ("Korollar", "Korollare"),
24
+ "proposition": ("Proposition", "Propositionen"),
25
+ "definition": ("Definition", "Definitionen"),
26
+ "example": ("Beispiel", "Beispiele"),
27
+ "remark": ("Bemerkung", "Bemerkungen"),
28
+ "footnote": ("Fußnote", "Fußnoten"),
29
+ "enumi": ("Punkt", "Punkte"),
30
+ "enumii": ("Punkt", "Punkte"),
31
+ "enumiii": ("Punkt", "Punkte"),
32
+ "enumiv": ("Punkt", "Punkte"),
33
+ "page": ("Seite", "Seiten"),
34
+ "line": ("Zeile", "Zeilen"),
35
+ }
36
+
37
+
38
+ @Registry.add
39
+ def GermanCrefNames() -> TeX:
40
+ """All Cref/crefname pairs for German typesetting. Emit once in preamble."""
41
+ return Concat(
42
+ *(
43
+ make_name(typ, sg, pl)
44
+ for typ, (sg, pl) in GERMAN_NAMES.items()
45
+ for make_name in (Crefname, CrefnameUpper)
46
+ )
47
+ )
@@ -0,0 +1,30 @@
1
+ from typing import Final
2
+
3
+ from pytex.commands.colors import Definecolor
4
+ from pytex.interface.tex import TeX
5
+ from pytex.model.concat import Concat
6
+ from pytex.registry import Registry
7
+
8
+ __all__ = ["HSRTColors"]
9
+
10
+ HSRT_PALETTE: Final[dict[str, tuple[float, float, float]]] = {
11
+ "britishracinggreen": (0.0, 0.26, 0.15),
12
+ "eggplant": (0.38, 0.25, 0.32),
13
+ "hanblue": (0.27, 0.42, 0.81),
14
+ "navyblue": (0.0, 0.0, 0.5),
15
+ "pansypurple": (0.47, 0.09, 0.29),
16
+ "shockingpink": (0.99, 0.06, 0.75),
17
+ "lightgray": (0.80, 0.80, 0.80),
18
+ }
19
+
20
+
21
+ def _spec(rgb: tuple[float, float, float]) -> str:
22
+ return f"{rgb[0]},{rgb[1]},{rgb[2]}"
23
+
24
+
25
+ @Registry.add
26
+ def HSRTColors() -> TeX:
27
+ """Definecolor commands for all HSRT palette colors. Emit once in preamble."""
28
+ return Concat(
29
+ *(Definecolor(name, "rgb", _spec(rgb)) for name, rgb in HSRT_PALETTE.items())
30
+ )