Jacque wrote:
Hey everyone,

I am struggling (for 6 hours now) on installing new packages on lyx.  I am
new to Lyx and MikTek.  I love it because of the formatting, but now I'm
having trouble with exactly the same thing.
I am trying to install new packages for report.  I didn't like Koma.script
or the default report. I read Customization - Chapter 5. Lost at pt 2, ie cant find texmf.cnf
"2. Read the file texmf.cnf (this usually lives in the directory
$TEXMF/web2c, though you can run kpsewhich texmf.cnf to locate it). It
describes how to add a local texmf directory; follow the instructions. You
need to insert the name of your local texmf directory in texmf.cnf. Under
Linux, /usr/local is a logical place to install software that did not come
with your distribution, so you might use /usr/local/texmf. Usually, you will
have to modify only two things:"

This description is pretty accurate for most (Linux-based) LaTeX distributions, but less so for MiKTeX, which automates some of the stuff you would otherwise do manually.

I cant seem to find texmf.cnf anywhere in my directory.  did a global file
search in Windows, no result.  Did a local search on both Miktek and Lyx15
directory, no luck. Did a run (from start menu), black box appear and
disappear. Is this file on CTAN?

I don't think MiKTeX has this file. FYI, if you're looking for the location of a MiKTeX file, the easiest way is to open a DOS shell and run 'kpsewhich file.ext' (substituting the name and extension of the file you seek).

 But I selected and downloaded packages
from Miktek Pkg Mng. (is Miktek Pkg Mng the same as CTAN?)

No, but they're related. CTAN is a repository for all sorts of individual LaTeX packages. MiKTeX's maintainer converts most if not all of those LaTeX packages into Windows .cab file, including installation instructions, so that the MiKTeX package manager can install them for you. If you download a package from CTAN, you have to do the installation "housekeeping". If you use the MiKTeX package manager (which presumes it's available as a MiKTeX package), the package manager does all that for you. Occasionally you may need a LaTeX package put out by a publisher, journal or conference that's not on CTAN and not available through the package manager, in which case you download and install manually. But that's a tale for another day...

 Do I need to
create it?  If I do, it is stated I need to follow the root of texmf (which
is not available at the first place).  Where do I start?

Don't need it.  Don't worry about it.

I did a FNBD (Miktek setting) refresh.

If you install a package through the package manager, the package manager automatically refreshes the database for you. An extra refresh won't hurt, though; it's just unnecessary.

On lyx, I reconfigure and restart.

That's correct.

I can see them in Tool>tex information. But in Document>settings> doc class,
some packages didn't appear, some still "unavailable".

If you install a document class for which LyX does not have a corresponding layout file, the class will not show up at all in the list. If the document class is listed there but still says unavailable after you've reconfigured and restarted LyX, then it means LyX did not find the corresponding MiKTeX package. Let's say you are trying to use "article (A&A)" and it is listed as unavailable. Look in the ...\Resources\layouts folder for the corresponding layout file. You may have to guess the name. In this case, it's aa.layout. You can confirm your guess by looking in the layout file using a text editor (such as Notepad). The second line should contain the label used in the Document > Settings list. In this case, it reads "\DeclareLaTeXClass[aa]{article (A&A)}".

Now that you know the name of the layout file, you need to know if MiKTeX contains a class file with the same name (and extension .cls). Use kpsewhich for this. In my example, I open a DOS shell and run 'kpsewhich aa.cls'. Nothing is returned, telling me I lack the MiKTeX package (or else it is installed but for some reason the filename database has not been refreshed). In contrast, LyX says that "article (AMS)" is available. The corresponding layout file is amsart.layout, and 'kpsewhich amsart.cls' returns the path to the class file.

 Then found from one
of the discussion thread, I tried to create a layout folder in
/usr/application data/lyx15/layouts,  which files to put in this newly
created folder???

This looks like a Linux path, not a Windows path. In any case, you do not need to create the directory. In LyX, click 'Help > About LyX' and note the User directory entry. It gives you the path to your LyX local settings. Expand '~' to your home directory. For most Windows users, this is C:\Documents and Settings\<your id>\Application Data\lyx15. Under that directory, there is a 'layouts' folder where you can store locally generated layout files. You would do this when you had to create your own layout for a document class unknown to LyX. This is relatively advanced stuff; I would not get into it now. I suggest you stay with classes for which LyX has a layout file already installed (i.e., they are on the Document > Settings list).

 I found that all the packages downloaded are scattered
all over Miktek directory.

Normal for a LaTeX installation.

I hope this helps. If you have installed the MiKTeX package corresponding to a document class in the LyX list (and reconfigured/restarted LyX), and LyX still lists the class as unavailable, come back here with the name of the package(s) you installed and the exact steps you used.

Good luck,
Paul



Reply via email to