Quoting rgheck <rgh...@bobjweil.com>:
On 11/17/2009 05:54 PM, Daniel Hofmann wrote:
Hi
I am trying to get Information Mapping running on my Lyx 1.6.3.,
the LaTex class and style has been produced by Gerd Neugebauer as
limap.cls and limap.sty, both are part of the TeX Live 2007
distribution.
There is no accompanying .layout file for LyX, so I presume that I
need to write one. However, after reading chapter 5 of the
Customization Manual I am somewhat baffled as to what to do.
Do I:
1) need to create a whole new document class, since limap.cls is
not part of the standard classes, or
2) can I write a short layout file that points lyx in the right direction?
If the former is the case then I'm unsure what it would help me to
have a Latex .cls or .sty file in the first place, since I need to
write the entire layout file anyway. Surely I'm missing something
vital here?
You don't need to write a document class, but to use that class with
LyX, you do need to write a layout file for this class. The thing to
understand is that, in a certain sense, LyX doesn't know anything
about document classes. All information about them is contained in
the layout files, even for standard classes, like article.cls. You
can think of the layout file for a given document class as a
translation manual between LyX constructs---paragraphs with their
corresponding styles, many insets, etc---and the corresponding LaTeX
constructs. Look, for example, at stdsections.inc, to see how
sections and the like are defined. These map paragraphs in LyX that
are marked with the Section, etc, layouts to corresponding LaTeX
commands. The article.layout file basically just includes a ton of
these std*.inc files.
To get limap.cls working with LyX, then, as I said, you need an
limap.layout file. But let's talk about that later.
Since limap also comes as a package---indeed, from what I can tell,
even limap.cls is really a kind of package in disguise that includes
some other class, which you select via class options---you could
start with the package. In this case, you can just write a "module",
which is (very roughly) what corresponds in LyX to a LaTeX package.
Modules define certain sorts of LyX constructs---paragraph styles or
custom insets---and tell LyX how to translate those constructs into
LaTeX for output. In your module, you would define LyX constructs
for the various commands and environments that limap.sty
provides---whatever those are. The best way to get started is to
study some of the existing modules---simple ones, like
endnotes.module, for example. Then try to think of standard LaTeX
commands that are in some way similar to the ones you want to
define---even if they're just both commands---find out how it's done
in the existing layout files, and then try to mimic it. Start
simple. Don't worry about how the thing looks in LyX. Just try to
get it working, so far as the LaTeX output goes. You can polish it
later, putting all the section headings in a teeny tiny font with
bright green italics. ;-)
And feel free to ask lots of questions. The learning curve can be
steep, but layout really isn't that hard in the end.
Richard
Hi all
Thanks for the quick replies Richard and Rob. You were both helpful.
Richard, if I understand you right then I need to know some LaTeX to
create a module file? Is that correct? If it is then I'm stuck on the
module idea due to a complete lack of knowledge about LaTeX.
Rob, I'll try out your way, although I'm hopping in the deep end here,
since there is no layout file which I can amend. Well, at least none
that I know of.
I'll take Richard's advice regarding the on-screen and print versions
and I'll jut worry about how the printed file looks and polish the
on-screen stuff later. If that's possible.
Cheers,
Daniel