aboutsummaryrefslogtreecommitdiff
path: root/scripts/tex.py
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-09-16 19:07:50 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-09-16 19:07:50 +0200
commit2e49e0e0db184295eb08e930a3ccdf10e80e40fe (patch)
tree4134da649775f40cdf74004b047b7df50a4428d5 /scripts/tex.py
parentb31ebef3db3765eef8e0492897e870a9fa4cd32b (diff)
implement simple requirements dump
Diffstat (limited to 'scripts/tex.py')
-rw-r--r--scripts/tex.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/tex.py b/scripts/tex.py
index 2fd51d8..2509a87 100644
--- a/scripts/tex.py
+++ b/scripts/tex.py
@@ -1,7 +1,13 @@
# utility function for converting latex code
def group(*args):
- return "".join("{" + arg + "}" for arg in args)
+ out = ""
+ for arg in args:
+ if isinstance(arg, list):
+ out += "[" + arg[0] + "]"
+ if isinstance(arg, str):
+ out += "{" + arg + "}"
+ return out
def string(content):
return r"\string" + content