summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pygmentex/pygmentex_demo.py
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-12-22 03:02:03 +0000
committerNorbert Preining <norbert@preining.info>2020-12-22 03:02:03 +0000
commit6385395b92eec56d518f264568394f0865bbae58 (patch)
tree3ae5ba405888ccba8b730d93bf288dbbef9ede6e /macros/latex/contrib/pygmentex/pygmentex_demo.py
parent4cc7922324b7a08ba0418e8f245cf1dcfa1891ac (diff)
CTAN sync 202012220302
Diffstat (limited to 'macros/latex/contrib/pygmentex/pygmentex_demo.py')
-rw-r--r--macros/latex/contrib/pygmentex/pygmentex_demo.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/macros/latex/contrib/pygmentex/pygmentex_demo.py b/macros/latex/contrib/pygmentex/pygmentex_demo.py
new file mode 100644
index 0000000000..a5fa60eed4
--- /dev/null
+++ b/macros/latex/contrib/pygmentex/pygmentex_demo.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+def parse_opts(dic, opts):
+ for opt in re.split(r'\s*,\s*', opts):
+ x = re.split(r'\s*=\s*', opt)
+ if len(x) == 2 and x[0] and x[1]:
+ dic[x[0]] = x[1]
+ elif len(x) == 1 and x[0]:
+ dic[x[0]] = True
+ return dic