On 2012-06-19, Ignacio García wrote: >> I've suscribed to this list because I've already looked for information >> about creating class of document for Lyx. I know that there are some of >> them such as book, article, broadway and so on. But It's not clear what >> is the proper way to do make a .cls file from scratch without depending >> on any else of default classes.
> The .cls and .sty files are LaTeX files, they are not LyX files. > Making LaTeX files from scratch is a difficult task, I think. Just like making LyX .layout files it requires reading an applying the documentation. For LaTeX classes and styles the starting point is the "clsguide" (on modern systems, the command `texdoc clsguide` should open clsguide.pdf). > The specific LyX files are .layout, .inc or .module. (see you in folder > /usr/share/lyx/layouts). They allow to use in Lyx the .cls/.sty LaTeX > files. Creating LyX suport for custom TeX classes and styles is described in Help>Customizing LyX. >> I'm doing my thesis and It requires some specific parameters for the >> layout, margins, paper size and other features, > Possibly, the easiest way to start is trying to write a module. > All this is explained in detail in the chapter 5 of the Customization > manual. The easiest way is a template document with custom settings and latex preamble. Somewhat more generic is a latex preambel in a separate file which the documents latex preamble includes with \input{myfinepreamble.tex}. This way, addings and changes will be used by all existing documents, too. A custom module extends this to custom Styles and Insets. The advantage of a module is that you can combine it with several documentclasses. If you want your settings and styles to be available also for .tex files outside LyX, the equivalent to the LyX module is a LaTeX package (.sty file). Creation of these is also described in the "clsguide". Günter