Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am new to LyX so I'm sorry if this question is really naive.

I'm using LyX on a MacBook and I'm hoping to use the AEA document class on it. Since it is not available automatically, seems that I need to somehow install it on my own. All the help pages I can find talks about layouts and stuff that I, as total layman, have no idea what they are. Can somebody please show me how I can do it with simple language?

share|improve this question
For the LaTeX install part, you might find How do I add a .sty file to my MacTeX/TeXShop installation? helpful. I think once that's done you still have to let Lyx know about the new material: not sure quite how that's done! – Joseph Wright Nov 30 '12 at 8:18
Were you able to make it work? Not really sure how LyX works concerning new document classes, perhaps a reconfiguration has to be done: Tools --> Reconfigure. – Torbjørn T. Jan 5 '13 at 23:24

2 Answers 2

up vote 14 down vote accepted

I was struggling with this myself, until I came across this article. I had to make a few adaptations for my setup as follows (for the purposes of this post, the unavailable document class I wanted to install was called clv2, for which I had a clv2.cls file):

Step 0:

This was not mentioned in the article, nor do I know if it's absolutely necessary, but I quit LyX before I started this process.

Step 1:

Copy the clv2.cls file in your latex directory. To find where it is go to LyX > Tools > TeX Information > LaTeX Classes > Show path. For me it was /Users/sylvie/Library/texmf/tex/latex/lyx/.

When I did LyX > Tools > TeX Information > LaTeX Classes > Show path, I saw /usr/local/texlive/2011/texmf-dist/tex/latex
There was no lyx directory there, so I had to create one for myself. Then I copied clv2.cls into /usr/local/texlive/2011/texmf-dist/tex/latex

Step 2:

Make a .layout file with the same name (clv2.layout)

This was very straightforward. I wanted an article (not a manuscript) though, so my layout file looked like this:

#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[clv2]{article (clv2)}
# Input general definitions

Step 3:

Copy the clv2.layout file into your package content. For me it was Applications > LyX > Contents > Resources > layouts > clv2.layout

My package content was located at /Users/ashwin/Library/Application Support/LyX-2.0/layouts, so that's where I copied clv.layout to

Step 4:

Open a terminal and on the command prompt write sudo texhash (LaTeX will be reconfigured)

This was very straightforward. I was asked for my password, which is normal.

Step 5:

Open LyX, and then go to LyX > Reconfigure, and Restart Lyx

Again, this was very straightforward. No hitches here.

Step 6:

Go to Document > Settings > Document Class > manuscript (clv2)

Since I wanted an article and therefore changed clv2.layout, I found an article (clv2) in my list of document classes.

Hope this helps

share|improve this answer

I found the 6 step answer above to be very helpful. I did have a few hiccups related to the way Mac likes to try to be smarter than the user, so I thought I'd share in case others are having similar troubles. I tend to be pretty computer dense, so maybe this will be helpful for others who struggle.

  1. Most of the folders needed for these operations are hidden by Apple, so you won't find them just by clicking around. I found the LaTeX path as described in step 1 and then actually FOUND that folder on my mac by using Go > Go to Folder in the Finder and searching for the first folder, which for me was /usr. To find the LyX layout folder (step 3), searching for the whole path was the ticket.

  2. The other tricky part was making the layout files in the right format. I used mac's default simple text editor TextEdit, but again, it tried to outsmart me. It automatically saves as a .rtf file, even if you name it classname.layout. Because Mac hides extensions, you might not even notice. This is why I made my mac show all extensions. Also, you can't just change the .rtf extension to .layout because .rtf has formatting information in there that will mess things up. So in TextEdit go to Format > Save as Plain Text and it will save it as a .txt file. Then you can change the extension to .layout. If you haven't made mac show extensions, you'll have to do this by right clicking on the file and selecting "Get Info" and changing the name and extension within that.

I know this is all pretty basic, but some of us (me!) need that level of instruction. Hope it helps.

share|improve this answer
Wouldn't it be easier to use a proper text editor in the first place? TextEdit is not really a proper text editor but more a watered-down minimal word processor. (This is not a criticism: it is not meant to be a text editor.) – cfr Oct 27 at 1:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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