LaTeX forum ⇒ GeneralInclude Package (WinEdt, MiKTech, LaTeX)

LaTeX specific issues not fitting into one of the other forums of this category.
N00bDaan
Posts: 14
Joined: Tue Feb 27, 2007 4:44 pm

Include Package (WinEdt, MiKTech, LaTeX)

Postby N00bDaan » Tue Feb 27, 2007 4:52 pm

Hello,

Here is the deal. I use WinEdt for all my LaTeX related work only I have a minor problem. In LaTeX (or WinEdt for that matter) it is not standard possible to re-format the caption of figures. I would like to have the Figure x.x part in bold and the caption itself in normal text:

Figure x.x This figure caption describes what I want.

Now, I found some packages (ccaption.dtx & caption.dtx, formaly caption2.dtx), include those and I can format my caption. The problem is I can't even extract the .sty file which you should let MiKTeX include. Extracting the .dtx files should be easy, I read everywhere the following: Run latex caption.ins.

Or something of that sort, but how do I run the .ins properly so that it extracts the .dtx?

Hope anyone knows the awnser to this one... :-)

Grtz

User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Postby Kris » Tue Feb 27, 2007 5:20 pm

Hi!

Let MiKTeX do the work by using its automatic package installation!

(You have to switch it on in the MikTeX settings and after that
just add \usepackage{caption} to Your Latex-file and start compiling...)

Regards
Kris

N00bDaan
Posts: 14
Joined: Tue Feb 27, 2007 4:44 pm

Postby N00bDaan » Wed Feb 28, 2007 10:30 am

I wished it was so easy... Maybe it is, but I just can't seem to get it working... I updated MiKTeX, just to be sure so now I am running MiKTeX 2.5 with all the downloadable packages included...

I have three files actually called 'caption.dtx', 'caption.ins' and 'caption.pdf'. I downloaded them somewhere (can't remember where) but the pdf states that with these files you should be able to change the layout of figure captions. That's all fine, untill I start reading the installation manual. It says that I should LaTeX the .ins file. This file should then extract the .sty (package extension) file from the .dtx file.

With the .sty file it is possible to include the package... To do this I think I should put the file in "C:\Program Files\texmf\tex\latex\caption" and after that I should be able to run the LaTeX[pdf] compiler within WinEdt. The problem is that I can not extract the .sty file in any way and when I put the .dtx file somewhere in "C:\Program Files\texmf\tex\latex" it does not include the package.

This is the compiler window:
Image

I also attached the caption .zip, with all the files...

Anyone?
Attachments
caption.zip
The caption files...
(152.23 KiB) Downloaded 570 times

User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Postby Kris » Wed Feb 28, 2007 12:13 pm

Hi!

Sorry, my advice was not clear enough...

...MiKTeX 2.5 has the ability to install most packages on its own by
loading them out of a local or an internet package repository - So
normally You don't need to download and install packages on Your own!

All You have to do, is to install a clean so called "basic" MikTeX 2.5 installation
(no need to install all packages!) and to switch on the automatic package
installation option in the MikTeX settings...

If You compile a LaTeX-document and MikTeX recognize a not installed
package (e.g. \usepackage{caption}) it will download and installed it
"on the fly" (normally without prompting You)!

The best solution for You will be to completely uninstall Your MikTeX 2.5 installation,
download the latest "basic" installer from
http://prdownloads.sourceforge.net/miktex/basic-miktex-2.5.2580.exe?download
and set up a clean "basic" MikTeX system
(I'm always using c:\texmf as installation path for easy searching).

After installation go to Start => Programs => MikTeX => MikTeX settings
and switch on the automatic package installation...that's all!
No need for caption.zip anymore! (Please delete it)

Advantage: You can automatic update Your MikTeX installation, cos' every package has it's own
"position" in the c:\texmf tree monitored by the MikTeX update tool...

Regards
Kris

N00bDaan
Posts: 14
Joined: Tue Feb 27, 2007 4:44 pm

Postby N00bDaan » Wed Feb 28, 2007 4:29 pm

Oke, so here is the deal... It works as you described, at home that is... On the university they use an antique version (2.1) which can not find the package anywhere. Is there a workaround for the same problem in 2.1? I allready asked and tried to install a proper 2.5 MiKTeX installation here at the uni, only that went horrably wrong... So back on 2.1 and hoping for a solution. :-) Thanks for the help so far.

Grtz

User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Postby Kris » Wed Feb 28, 2007 5:43 pm

Okay, You want it the hard way... Wink

As far as I remember version 2.1 creates two main search trees,
that is

c:\texmf <= the actual MiKTeX 2.1 installation path

and

c:\localtexmf <= which is the place to install "own" packages

Now compiling of the caption.zip package downloadable from here:

http://www.ctan.org/tex-archive/help/Catalogue/entries/caption.html

a) unzip the installation files to a temporary folder like c:\temp\caption
b) call the command-console by running: cmd
c) switch to the temporary caption folder and compile package by calling:
latex caption.ins - now the .sty-files will be created!
d) move the complete folder to c:\localtexmf\tex\latex\
e) refresh the filename-database of MiKteX in the MikTeX settings
f) now - it should work Smile

Have fun!
Kris

N00bDaan
Posts: 14
Joined: Tue Feb 27, 2007 4:44 pm

Postby N00bDaan » Thu Mar 01, 2007 10:18 am

It works, thanks!


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests