Am 19.12.2013 um 01:25 schrieb Jerry <lancebo...@qwest.net>:

> 
>> 
>> I'm using Ubuntu and don't know anything about the modern Macs so I don't 
>> understand the problem with locating the templates.  I just went to File  > 
>> Open from templates > and found the appropriate template.
> 
> On OS X, the equivalent is apparently File -> New from Template... . When 
> this is done, one is taken by file browser to 
> /Users/someuser/Library/Application Support/LyX-2.1/templates/ where the only 
> file is defaults.lyx.
> 
> On OS X, an application package (aka bundle) is a special directory with a 
> specified structure of subdirectories. See
> https://developer.apple.com/library/mac/documentation/porting/conceptual/portingunix/distributing/distibuting.html
> For example, from the directory's root, the executable is always in the same 
> (relative) location. To the user, the special directory looks like an 
> application (icon) and when s/he double clicks on it, instead of opening the 
> folder to reveal its contents, the OS instead launches the application inside 
> it. This approach allows for easy distribution of most software; LyX is 
> installed by dragging a single icon from the distribution image anywhere onto 
> a disk.
> 
> Any other code or resources may be stored in this directory structure, and 
> LyX stores examples and templates in this structure. So doing File -> New 
> From Template ... should open the file browser to the appropriate directory 
> in this application package, not to the Application Support folder for LyX.

This is an old and not so easy to solve problem. There are tickets for it in 
the trac system, e.g. here: 
http://www.lyx.org/trac/ticket/7896

We have two places to look for templates: user templates and system templates.
IMHO, the Linux "Open file dialog" has an additional button to navigate to the 
system templates location. This button is not provided with the native OSX
open file dialog and the home-brewed LyX open file dialog is not usable on OSX.

The location of the system templates isn't well known either. You may have more 
than one LyX on your system. It has to be passed to the open file dialog at 
runtime.
These LyX packages may have different versions and therefor different templates.

The best solution would be a dynamically created entry in the left side bar of 
the
native open file dialog. But I didn't find any API for it documented nor any 
working
example. It looks like the Finder only is able to create such entries.

The next idea is to add an button to the standard open file dialog, but I don't 
have
the skills to do this until now.

Stephan

Reply via email to