! LaTeX Error: File `xfrac.sty & \usepackage{fancybox}

1,131 views
Skip to first unread message

Ib

unread,
Dec 17, 2011, 10:53:10 AM12/17/11
to LaTeX Users Group

! LaTeX Error: File `xfrac.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.7 \usepackage
{fancybox}

*** (cannot \read from terminal in nonstop modes)

Ib

unread,
Dec 17, 2011, 10:56:31 AM12/17/11
to LaTeX Users Group
Hi,
On compilation my tex file I got the following error message:

l.7 \usepackage
{fancybox}

What will I do?

Ib

Peter Flynn

unread,
Dec 17, 2011, 3:42:56 PM12/17/11
to latexus...@googlegroups.com

Install the xfrac package. It has nothing to do with fancybox, as far as I know. What do lines 1-6 of your LaTeX document say?

This is unusual: xfrac is part of the full LaTeX distribution, so it is normally included in all installations. You may perhaps have installed a reduced-size or cut-down version instead, or your LaTeX system may be very out of date (in which case you should update it some time).

Hmmm. xfrac is part of Morten Høgholm's bundle of packages and always used to go in a folder called mh. I see from CTAN that it is now part of the l3packages bundle, so I suppose it should go in a subfolder called l3packages. Doesn't really matter: the right folder name is in the zip file.

If you haven't installed extra packages before, DON'T put them into your main LaTeX installation. Create yourself a personal texmf folder and put them in there instead.

Mac: create ~/Library/texmf/tex/latex
Linux: create ~/texmf/tex/latex
Windows (XP): create C:\texmf\tex\latex
Windows (7): create Computer\System\Users\your name\texmf\tex\latex

Download http://mirror.ctan.org/macros/latex/contrib/l3packages.zip and unzip it into the latex folder you just created. It will create the l3packages subfolder for you.

In that subfolder, there are four .dtx files and four matching .ins files. Open the four .ins files in turn in your LaTeX editor and run latex on them. This will extract the .sty files from the .dtx files for you. From the command line, this would be done with:

latex l3keys2e.ins
latex xfrac.ins
latex xparse.ins
latex xtemplate.ins

The zip file also has the PDF documentation.

Now you're done: LaTeX automatically looks first in your personal TeX folder for packages, so it will find updates...

...unless you're running MiKTeX, which doesn't read your personal TeX folder automatically. If you have MiKTeX, do this:

1. Run the MiKTeX Settings program by clicking on
Start | Programs | MiKTeX x.y | Maintenance | Settings

2. Click on the Roots tab

3. Click the Add button

4. Navigate to the texmf folder you created above

5. Click OK

6. Back in the Main tab, click the Refresh FNDB button

If you install other packages later, you only need to repeat step 6.

///Peter


Reply all
Reply to author
Forward
0 new messages