]> git.lyx.org Git - features.git/blobdiff - lib/scripts/lyxpreview2bitmap.py
Fix a couple of issues with macros and previews
[features.git] / lib / scripts / lyxpreview2bitmap.py
index a7d76236fba969b982b648e2a3859bf81db0ead3..c2b94d4ed50f87c84e0b5e451cd040c7edd76e8e 100755 (executable)
@@ -160,7 +160,7 @@ def extract_metrics_info(dvipng_stdout):
 
 def fix_latex_file(latex_file, pdf_output):
     documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt,?)(.+)")
-    def_re = re.compile(r"(\\newcommandx|\\global\\long\\def)(\\[a-zA-Z])(.+)")
+    def_re = re.compile(r"(\\newcommandx|\\global\\long\\def)(\\[a-zA-Z]+)(.+)")
     usepackage_re = re.compile("\\\\usepackage")
     userpreamble_re = re.compile("User specified LaTeX commands")
     enduserpreamble_re = re.compile("\\\\makeatother")