aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xInfo/Binaersystem/gen_cards.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/Info/Binaersystem/gen_cards.py b/Info/Binaersystem/gen_cards.py
index e8fd58ed..01091c1c 100755
--- a/Info/Binaersystem/gen_cards.py
+++ b/Info/Binaersystem/gen_cards.py
@@ -10,9 +10,10 @@ def gen_numbers(end_pos=7, end_number=80) -> list[list[int]]:
ns.append(n)
return ns
+
def main():
all = gen_numbers()
- with open(f'cards.tex', 'w', encoding='utf-8') as card:
+ with open('cards.tex', 'w', encoding='utf-8') as card:
print(r'\documentclass[landscape]{article}', file=card)
print(r'\usepackage[margin=2cm]{geometry}', file=card)
print(r'\setlength\parindent{0pt}', file=card)
@@ -23,14 +24,15 @@ def main():
print(r'\begin{document}', file=card)
print(r'\pagestyle{empty}', file=card)
for i, ns in enumerate(all):
- print(r'\begin{tikzpicture}', file=card)
- s = ''
- for n in ns:
- s += f'{n} '
- print(r'\node[card]', file=card)
- print(rf' {{\begin{{varwidth}}{{9cm}}\huge {s}\end{{varwidth}}}};', file=card)
- print(r'\end{tikzpicture}', file=card)
+ print(r'\begin{tikzpicture}', file=card)
+ s = ''
+ for n in ns:
+ s += f'{n} '
+ print(r'\node[card]', file=card)
+ print(rf' {{\begin{{varwidth}}{{9cm}}\huge {s}\end{{varwidth}}}};', file=card)
+ print(r'\end{tikzpicture}', file=card)
print(r'\end{document}', file=card)
+
if __name__ == '__main__':
main()