Fix part of bug #7609 (PDF (pdflatex) no more directly

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
This commit is contained in:
Julien Rioux 2011-06-07 15:01:00 +00:00
parent 253ac28a0c
commit 54b626b8e0

View File

@ -77,12 +77,24 @@ def latex_flavor(line):
return (True, return (True,
"\\converter \"%s\" \"%s\" \"%s\" \"latex=%s\"" % (conv, fmat, args, flavor)) "\\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 = [ conversions = [
[ # this will be a long list of conversions for format 0 [ # this will be a long list of conversions for format 0
export_menu,
latex_flavor, latex_flavor,
remove_obsolete, remove_obsolete,
language_use_babel, language_use_babel,