On Thu, Oct 28, 2010 at 11:56 AM, M DR <[email protected]> wrote:

> Hi again,
>
> I am having now a problem when visualizing the document. It says that the
> "name-of-my-folder.sty" (LyXDocs.sty) is not found and it cannot create the
> final file.
>

I think it might have been my post that caused this confusion. I'm sorry
about that. The command \usepackage{something.sty} is employed to include a
package that gives you access to a set of commands that you would not
otherwise have. For example, in my case, the commands for the particular
margin formatting, as well as some of the function calls to fill in the
front-matter pages for my thesis were included in a "style file" named
"myUthesis.sty" There are options from hundreds of packages you might
include, depending on what special things you want to be able to do in your
document. These packages do extremely useful things like modify your table
of contents (tocloft), add specially formatted theorem environments, add new
fonts, or do other things like put coffee stains on some of your pages for
you to save you the trouble.

As an example there is the simpsons package you can download from ctan. Once
that package is properly placed either within the latex distribution, or
inside the local directory, it can be included with
\usepackage{simpsons.sty} in the document's LaTeX preamble. This package
adds a number of new fonts. So, when I want to add an image of bart simpson,
I write the latex command \bart (using ERT) in my document. Since this
function is defined in th file "simpsons.sty" that file has to be included
so that latex knows what to do when it encounters the command.

If you are using a regular document class such as report or article, and do
not have the need to include other packages, your latex preamble (in
document>settings>latex preamble)  will be empty.

>
> I have tried to run the command "$ texhash", as they say in this blog:
> http://danielbaggio.blogspot.com/2007/10/latex-error-sty-not-found.html,
> but still gives me the same error. If I delete the relative path
> (\usepackage{LyXDocs}) from the Latex Preamble, works again. Any clue?
>
>
\usepackage{someCoolPackage.sty} is not a relative path, but a LaTeX
command. LaTeX commands typically start with "\". See explanation of
packages above.

The commmand "texhash" is a command that you would run in your linux
terminal, not in the LyX mini-buffer. That command tells your LaTeX
distribution to update the paths after adding *.sty files somewhere in the
LaTeX directory structure. The equivalent on windows with miktex is to click
on "refresh fndb" inside the miktex settings manager.


> Thanks!
>
> P.S. maybe I am too silly, but to run a command in the mini-buffer enter
> key is enough, isnt it?
>
> MaDro
>
> In LyX, you can use modules, which can add some cool features, and are a
bit more friendly to users.  Some info can be found here:
http://wiki.lyx.org/Layouts/Modules

There is a page on the wiki explaining the concepts of layouts, styles, and
modules here:
http://wiki.lyx.org/LyX/Concepts

I just want to mention one more time that it seems you may not have intended
to do anything with latex packages or styles. If that is the case, you can
leave your LaTeX preamble empty, and you'll be good to go. The only time you
need to put stuff in there is if you want to include packages or give LaTeX
commands before the main part of your document. As a new user, you likely
not have seen the need to do this yet. I don't mean to add confusion.

Hope that clears things up.

Jacob

Reply via email to