On 02/28/2017 04:11 PM, Enrico Forestieri wrote: > On Tue, Feb 28, 2017 at 09:26:31AM -0500, Richard Heck wrote: >> On 02/28/2017 04:36 AM, Ulrich Thomas Gabor wrote: >>> Hi >>> >>> Since nobody replied on the normal users lists, maybe someone here can tell >>> me if it is possible to reference an include from a layout file relatively? >> Probably not. These "local layout" files were always a hack, and really >> a bad idea. If you file a bug report, we can perhaps make import work. > The attached patch works for me. When the path for Input is explicitly > relative (i.e., it starts with ./ or ../), the path is considered to > be relative to the document directory, but only when the layout is loaded > from a local file. So, > > Input name.inc > > always searches first in the user directory and then in the system one, > even when used in a local layout file. But > > Input ./name.inc > > will try to load the file name.inc in the document directory. If the layout > is a system one, the above two commands are equivalent and name.inc is > always searched as usual.
Very nice, thank you! If you want to commit to master, I will cherry pick it for 2.2.3. Richard