本帖最后由 zyzx 于 2014-1-24 09:50 编辑 . n, u0 K! A" T* y5 G7 p
4 B- |& [. d' ]8 Y1 p, G
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
6 e$ T) C: G' K- {“
; y/ |$ R) v# \6 O3 V+ I! LaTeX Error: File `booktabs.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ”
N$ Z6 M, t; u& g& G# B7 \# X" ~$ |2 a: @7 m# N
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
% R" s6 ], x1 B5 t4 X4 z- u, [booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme4 e2 m- i! K. ~/ v: a; f
其中readme里面有文件列表和安装方法:
2 s2 x5 ~+ k! n, B/ c2 s1 E“4 a8 s$ I4 X) Z' ?
FILES IN DISTRIBUTION
( u4 E$ \. a3 D) Y4 ^; ~=====================8 b6 i- s, ^- c; ?8 M
BASE DISTRIBUTION:
$ D8 C! t! a* q# Z/ A README This file.7 ~) t4 ~* W' K) ^
booktabs.ins Package installation file.+ Q& \9 x6 ~& L
booktabs.dtx Package source file.
: L, Q1 A0 {9 Q8 E' m COPYING GPL license file.
1 [- G' w, y- v$ Y& @ booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".; ~; ~2 E4 a0 R2 K+ d. w% A. D8 d3 v" E
DOCUMENTATION:. k" \/ A& p+ W- U6 c
booktabs.pdf User manual for booktabs package. It was produced by executing:
: _, Q! h2 _; R" r7 _$ S) g pdflatex booktabs.dtx
# g, l7 T' U& M' Z( ], { pdflatex booktabs.dtx
: p, v6 B2 }3 I# t; j makeindex -s gglo.ist -o booktabs.gls booktabs.glo
. l8 x3 p1 U0 Q9 Q7 Y* l makeindex -s gind.ist -o booktabs.ind booktabs.idx% X5 O2 q: Z' L) B
pdflatex booktabs.dtx
0 D9 W/ q. [6 o. [$ m% b/ y9 o pdflatex booktabs.dtx( l0 Q, D1 c/ M' j; }. T
BASIC INSTALLATION
3 @/ P! A: i2 X" p/ f6 O8 Z/ L' i====================$ z/ v, ]! S& h& T7 t
The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
( q$ B+ l5 i- ?( j( T For a basic installation on a TDS compliant system, move the following files to the following directories:+ N5 S! K. X+ I
<texmf>/tex/latex/booktabs/
" e/ M$ k& k3 A- O% \0 v' G4 S booktabs.sty7 k6 G! M, b5 B' g) b" x
<texmf>/source/latex/booktabs/
8 Y( T+ X a% r booktabs.ins9 f: W# s2 K2 ?
booktabs.dtx& c4 b- Q b( S. n
COPY( j& o# g/ |' {* O& ]4 v
<texmf>/doc/latex/booktabs/
n( |9 J3 h# | README
! C5 f% L% b: G: u& \1 `% \ booktabs.pdf
. D; w0 ?6 @2 o0 L- |- v$ Y) h”
* W% p/ Q# U# E; ^6 O6 ~# G E- q! n" g/ \+ G. N+ ~) ?
我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |