On Tue, Nov 5, 2013 at 7:37 AM, Benoît Bergès <[email protected]> wrote: > Hi, > > I am writing a document using the lyx JASA template > (http://wiki.lyx.org/Layouts.JASATeX) and I encountered a problem when > centering a table. I create a float table environment and then insert a > table in it. This all works fine but when I modify the paragraph settings > alignment to center, I get an error message with the following description: > > \par > > \end{centering} > > I suspect you've forgotten a `}', causing me to apply this > > control sequence to too much text. How can we recover? > > My plan is to forget the whole thing and hope for the best. > > > I have been trying to look for solutions but can't figure out how to > overcome this problem. I was wondering if you would have a solution. > > > Thanks in advance > > > Regards > > > Benoit
Hi Benoit,
Next time can you please send a minimal example
(wiki.lyx.org/FAQ/MinimalExample) ? I can reproduce now, but it took
me a long time to do so.
The problem has to do with whether the table is the only paragraph you
have in the float or not.
If the table is the only paragraph in the float,
\centering{} is used.
If there is another paragraph,
\begin{centering} ... \end{centering} is used.
In the first case, the table is still not centered in the output. In
the second case, I get an error.
See the difference in the two attached examples.
My first reaction is that this is a problem with the JASA package, not
with LyX, because with standard article class everything works fine. I
know little about this though so I could be wrong.
Scott
JASA_good_MWE.20.lyx
Description: application/lyx
JASA_bad_MWE.20.lyx
Description: application/lyx
