On Mon, 7 Jan 2002, Tuukka Toivonen wrote:

> I'm writing a paper to ICIP'2002. There's a LaTeX
> .sty file. Is there any *quick* and easy way to get it
> to work with LyX?

Yes. This is a package that you should use.

In LaTeX you would put:

\usepackage{spconf}

or, if you need to give it some extra options (consult its documentation.
You probably don't need by default, but maybe there are some extra
features that will become available) you write:

\usepackage[option1,option2,etc]{icip}

So with LyX it would generally suffice to put this in the the
latex preamble.

I'm looking at this style file right now. Seems well documented. Things
like \title{} , \begin{abstract}..\end{abstract} and \address{} can be
accessed directly from LyX's interface (simply use a "Title", "Abstract"
or "Address" environment). Other things, like \name}, you have to put
directly in the latex preamble.

Alternatively you can create a special LyX class for editing all of those
from LyX's interface. But it seems to me quite an overkill for a single
document.

Also, see below

> I took the sty-file and appended, at the
> end, lines
>
> \begin{document}
> \end{document}
>
> and in the beginning
>
> \documentclass[english]{article}

The package file states:

% File:     spconf.sty          (LaTeX Document style option "spconf")
%
% Usage:    \documentclass{article}
%           \usepackage{spconf}

the command \usepackage{spconf} in the preamble will include the file
spconf.sty and treat it as a special style file, that can use special
commands.

You then only need to have spconf in the current directory. No need to
actually use its content.

(Alternatively it can be in another directory directories, but then you
have to setup your environment a bit for that)

>
> However, it still isn't a valid LaTeX file that I could simply
> "import" to LyX (it complains about missing \begin{document} if I
> try to latex it.) How could I import the style file into LyX?
>
> What's the difference between allowed commands in .sty file and
> .tex file preamble?

You can use \makeatletter (make '@' a valid part of a macro name, so you
can use and redefine macros like \@an@ugly@name@you@dont@want@to@touch ).
This should be followed later by \makeatother which reverses that effect,
and guarantees that you don't accidentally modify internal definitions of
packages.

-- 
Tzafrir Cohen                        /"\
mailto:[EMAIL PROTECTED]        \ /  ASCII Ribbon Campaign
Taub 229, 972-4-829-3942,             X   Against  HTML  Mail
http://www.technion.ac.il/~tzafrir   / \

Reply via email to