On 2016-04-01, Richard Heck wrote: > On 03/31/2016 05:35 PM, Scott Kostyshak wrote: >> On Tue, Mar 29, 2016 at 12:53:15PM -0400, Richard Heck wrote:
>> Regarding version detection, do you have an idea for the >> implementation? (if you want, you can make a trac ticket regarding >> versioning and we can move the discussion there) > I do not know how to do the LaTeX part, but I am assuming someone else > will. Once we have that, the idea would be to have a layout tag like: > IfVersion whatever.cls >= 0.9 > .... > EndIfVersion > possibly with some "else" stuff in there, too. On the other hand, Georg > has suggested some reservations about how extensively we'd want to use > this, and those need to be thought through. My idea was different: instead of introducing new "magic" for the layouts, I would like to expand the existing mechanism for detection of available LaTeX packages and classes, similar to waht LaTeX itself does: The <release-info> option of the package-author command \RequirePackage [⟨options-list⟩] {⟨package-name⟩} [⟨release-info⟩] (as well as the author command \usepackage) tells a minimal required version/date. Examples: \RequirePackage{ifthen}[1994/06/01] Using a similar syntax in layout files, we could specify a version requirement. LyX could then announce if this version is provided or not, just like currently done for versions with different file names. Considering, that we may also want to exclude uncompatible newer versions (when keeping an old layout so that old documents can still be opened), we may also have to conceive a more powerful syntax. Günter