3

I'm hoping to find an easy solution to this problem.

I want to install the American Economic Association document class and use it in Lyx. I have inserted the class file into the right latex directory and run texhash. Next I created a simple layout file, played it in the layout folder, and reconfigured Lyx. Now, American Economic Association (AEA) appears in my dropdown menu as a document class option in class under the articles heading, but when I try to use the file, it tells me that there is a problem with the layout file.

I suspect that I have no found the correct layout folder. The layout folder I'm using is empty except for the file I added. Is this normal? I can't find, for example, the article.layout file. I should say that Lyx appears to be working normally otherwise. I have no problem compiling normal files.

I'm on a Macbook Pro running OSX Yosemite. The directory I have been using for layout files is /Users/amandaggregg/Library/Application Support/LyX-2.1/layouts, which Lyx preferences indicate should be the right folder.

I know about http://www.troubleshooters.com/linux/lyx/surefire_layout.htm, but it looks complicated and time-consuming. Hoping to find an easier solution.

Looking forward to your responses

  • If you go to File > New From Template, and open AEA.lyx, can you compile it? LyX comes with an AEA layout file. You could search for ".layout" files on your computer: locate ".layout". LyX has two layout directories, one in the installation directory (in lib/layout) and one in your user directory. – scottkosty Apr 1 '15 at 15:15
  • Thank you, this worked. I deleted the layout file I made, reconfigured Lyx, and used File > New From Template. Works like a charm. Thank you! – Amanda G Apr 1 '15 at 16:28
  • For posterity, I located the layout files in /Applications/LyX.app/Contents/Resources/layouts/ using the locate ".layout" command as you suggested. – Amanda G Apr 1 '15 at 16:32
4

Layout Folders

There are generally two folders, where LyX searches for .layout files: A system-wide folder (for all users, usually one needs root privileges to alter this) and a user-specific folder in the users home. It depends on your operating system, where exactly these are located. The directories listed in Preferences->Paths are a good starting point.

Document-Local Layout

However, in most cases it is easier (and preferable) to store the custom .layout file together with the respective LyX-Document (that is, in the same folder as the .lyx file). Then select this by clicking the Local Layout... button under Document Settings->Document Class.

  • Which of the 10 paths in the preferences dialog is searched for system layouts? – DS Justice Dec 19 '18 at 1:07
  • 1
    @DSJustice: Strangely enough, none. In the preferences you can only configure use-specific paths. – Daniel Dec 19 '18 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.