Begging for any kind of help. I am working on a paper in Lyx by using AEA template after I loaded unavailable class with following link (https://wiki.lyx.org/Examples/AEA)

All others are fine, but only problem occurs when I try to hold image by using an option "Here definitely". Error messages are following:

enter image description here

And here is my preamble


I have no idea what's going on my Lyx. If I turn off the here definitely option, it works fine but all images and tables would be messy. FYI, I use windows 10 and lyx 2.2.3, very recent version. I appreciate any advice!


The problem is with the definition of the figure and table environments in AEA.cls I think. I can't explain exactly why the problem occurs, but I can suggest a fix:

Open AEA.cls in your favourite text editor, and go to lines 1203-04. Modify these lines from




I.e. change \begin{center} to \centering and remove \end{center}. Do the same modification for lines 1206-07, 1210-11, 1220-21, 1223-24 and 1227-28.

  • @floater No worries. You might consider accepting the answer by clicking the checkmark on the left. – Torbjørn T. Dec 15 '17 at 17:18
  • My apology. It's my first time to post here. Anyway thanks!!! – floater Dec 16 '17 at 0:44
  • @floater thanks for accepting the answer. Note that you can also "upvote" (click on the up arrow) if you found the answer useful. – scottkosty Dec 17 '17 at 16:25
  • @TorbjørnT. I'm planning to propose that we put a LyX note in the template file by the table float that we include, along the lines of "If you select <<Here definitely>>, you may need a workaround suggested at <<link to this answer>>". Let me know if you suggest any other details to add. – scottkosty Dec 17 '17 at 16:34
  • @scottkosty (You need 15 rep points to upvote.) Don't have any other suggestions at the moment. – Torbjørn T. Dec 17 '17 at 16:41

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.