]> git.lyx.org Git - features.git/commit
Allow Input of local includes from local layout files
authorEnrico Forestieri <forenr@lyx.org>
Wed, 1 Mar 2017 08:19:18 +0000 (09:19 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 1 Mar 2017 08:19:18 +0000 (09:19 +0100)
commit17ab47b3e6acafae8f11e6363ee64252b26c81e7
tree5b5c5e5ef06f7feb8b9b291dd20e644de3c3189f
parent34d2f3cf06db9e5988d26ef45ac6b02cb23379e3
Allow Input of local includes from local layout files

When including files, LyX always searches the user and the system
directory, in that order. This means that when using local layout
files broken down into multiple includes, the various includes should
be specified with a path relative to the user layouts directory
(typically ~/.lyx/layouts), making this very impractical.
This commit allows including local files by specifying their path
as explicitly relative to the main layout file position, i.e., by
specifying their path with either "./" or "../". If the main layout
is not loaded from a local file, the usual search order is used,
even if the path are explicitly relative. So, for system layouts,
both "Input ./name.inc" and "Input name.inc" are equivalent.
src/LayoutFile.cpp
src/TextClass.cpp
src/TextClass.h