]> git.lyx.org Git - lyx.git/commitdiff
Fix part of bug #7609 (PDF (pdflatex) no more directly
authorJulien Rioux <jrioux@lyx.org>
Tue, 7 Jun 2011 15:01:00 +0000 (15:01 +0000)
committerJulien Rioux <jrioux@lyx.org>
Tue, 7 Jun 2011 15:01:00 +0000 (15:01 +0000)
listed in file->export menu). Do not remove customized
document formats from the export menu.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38975 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/prefs2prefs_prefs.py

index 2a77d793769d3ca4ce7f78132efe4f0c33e2261a..40b5072f82ebc93a5b7df642f10e4c9ce633ada7 100644 (file)
@@ -77,12 +77,24 @@ def latex_flavor(line):
        return (True, 
                "\\converter \"%s\" \"%s\" \"%s\" \"latex=%s\"" % (conv, fmat, args, flavor))
 
+emre = re.compile(r'^\\[Ff]ormat\s+(.*)\s+"(document[^"]*?)"')
+def export_menu(line):
+       if not line.lower().startswith("\\format"):
+               return no_match
+       m = emre.match(line)
+       if not m:
+               return no_match
+       fmat = m.group(1)
+       opts = m.group(2)
+       return (True,
+               "\\Format %s \"%s,menu=export\"" % (fmat, opts))
 
 ########################
 
 
 conversions = [
        [ # this will be a long list of conversions for format 0
+               export_menu,
                latex_flavor,
                remove_obsolete,
                language_use_babel,