# Re: Sty to Layout problem


On 24.07.2009, at 02:25, Luis F. Amorim França wrote:


Thanks Daniel!

I tried to create a document with a ERT like

\title(Paper Title)
\author{Luis}


but when I compile it, the document is empty. Trying to use the Lyx Title
and Author, I get this message:

\author{Luis}\maketitle


The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), type I' and the correct spelling (e.g., I\hbox'). Otherwise just continue, and I'll forget
about whatever was undefined



Depending on the peculiarities of the latex class, more or less stuff has to be given in ERT - maybe even the abstract. The example I have attached, for instance, uses the "IOS-Book" class, which requires the abstract to be defined within a special frontmatter environment. Because I did not want to bother with getting the peculiarities of this class right into a LyX layout, I ended up with a big ERT box in the beginning and only the real content is written in LyX.


The process: I usually use the latex example file that comes with the paper class as template, activate source preview in Lyx ("View->View Source", then check "Complete Source") to see what LyX would generate and then copy parts or larger chunks of the LaTeX example into ERT until the result looks compilable.

Daniel


is-book-example.lyx
Description: Binary data




Hi Luis,

This may not be exactly the answer you are looking for :-)


IMHO the front matter (the stuff that is rendered by \maketitle) is the most difficult part to get right into a LyX layout, especially with paper
styles. Every paper style uses different concepts on how authors,
institutions, multiple authors per institution, authors with multiple

institutions, "thanks"-titlenotes, and so on have to be specified. So even with the well-designed paper layout files that ship with LyX (LNCS, IEEE, ...) I usually end up using ERT in the front matter to get what I need.


So if you are not going to write dozens of articles using that style, I would just not bother in getting everything right into the layout and use
ERT in the paper to specify the front matter.

Daniel

On 23.07.2009, ad 01:43, Luis Amorim wrote:

Hi,



I'm trying to write an article at Lyx, but I had some problems when I
tried
to use a .layout I created from the .sty file provided by the

conference. I've followed the Customization Instructions (5.2.3) but it


doesn't work at Lyx, especially when I try to add a Title (it says is a \maketitle problem). Searching the mailing list I found someone who had
almost the same problem, and added

Style TitleERT
InTitle 1

End


in the .layout to solve it. I tried to do that, but I still can't compile
my
files.


I attached the .sty and .layout files, and a .tex which is an example of
use.

Thanks!

Luis Amorim

<sbc-template.lyx><sbc-template.sty><sbc-template.tex>






`