X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flyx2lyx%2FLyX.py;h=187a30821322fa0edc13db30ac5aff2ac16c7eb4;hb=b8227ebda0a2a8127731749d2caaa5dae45ef5d7;hp=729425bb3988c2ed01fac55e3f7ddb53ced641f5;hpb=b67c8595516a4e85828a9eb623452e86063ea39b;p=lyx.git diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 729425bb39..187a308213 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -111,6 +111,10 @@ class LyX_Base: self.backend = "latex" self.textclass = "article" + # This is a hack: We use '' since we don't know the default + # layout of the text class. LyX will parse it as default layout. + # FIXME: Read the layout file and use the real default layout + self.default_layout = '' self.header = [] self.preamble = [] self.body = [] @@ -291,6 +295,14 @@ class LyX_Base: self.header[i] = '\\%s %s' % (param, str(value)) + def is_default_layout(self, layout): + " Check whether a layout is the default layout of this class." + # FIXME: Check against the real text class default layout + if layout == 'Standard' or layout == self.default_layout: + return 1 + return 0 + + def convert(self): "Convert from current (self.format) to self.end_format." mode, convertion_chain = self.chain()