本帖最后由 zyzx 于 2014-1-24 09:50 编辑
9 X% q8 R; U+ c$ q+ P$ t( J9 q6 s( {; _, n# a C6 k' h1 U9 Z6 L# X
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
8 a( _5 `& [) _! u, L* ]“2 G* a% t W% 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: ”) q, l3 W8 f$ d
, u) j+ N) ^" n
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:* t5 l4 [% O5 }
booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme
. B, t0 @4 T+ i6 `3 D其中readme里面有文件列表和安装方法:
& ?* s8 |) S2 i5 s1 z& y“
6 ^+ s! {* M6 j) w9 O8 z9 kFILES IN DISTRIBUTION# i4 s+ Q0 t, G! ^
=====================
; _- [7 ~ B# {! c0 E BASE DISTRIBUTION:$ E6 @5 E, v$ V) z! ?+ M9 @: d
README This file.
" u: T3 G& Q0 [1 V booktabs.ins Package installation file.7 q4 F5 z, P, a
booktabs.dtx Package source file." ? u. j+ L0 P; h9 {# O7 ~
COPYING GPL license file.
9 w- K, M ^8 e; W# ~3 e booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".
. I2 ]& S- p' |3 P( [4 H DOCUMENTATION:3 p& D; i/ V6 i/ T3 `
booktabs.pdf User manual for booktabs package. It was produced by executing:+ Y- }( m: p) _) X
pdflatex booktabs.dtx5 O, g3 |+ \8 p, g
pdflatex booktabs.dtx' h! B" y5 e9 T* `
makeindex -s gglo.ist -o booktabs.gls booktabs.glo1 b5 y' t9 I* N
makeindex -s gind.ist -o booktabs.ind booktabs.idx
7 F3 w1 Y; g! z' b2 a4 Y pdflatex booktabs.dtx
% \/ s' l/ b5 x4 ]3 ]) g: a pdflatex booktabs.dtx
6 j# ?5 V2 _( M% HBASIC INSTALLATION2 `5 ~# l4 T# R1 v) \9 P p
====================
5 S+ _; ?* Z% V8 o3 ~* ~0 A The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
$ C# O* k* Z7 `8 h+ d5 W% k# _ For a basic installation on a TDS compliant system, move the following files to the following directories:
} Z$ \( K* |7 i <texmf>/tex/latex/booktabs/0 ^7 q2 r1 j4 U u
booktabs.sty: ]0 A# S' F6 J6 A' U
<texmf>/source/latex/booktabs/2 d( K$ {4 e2 |& I
booktabs.ins+ f1 X& q4 o& Z+ o
booktabs.dtx! l% p* s) N K% e0 [; K0 K
COPY5 ]6 l% {* Y4 \% F/ [
<texmf>/doc/latex/booktabs/
% [2 j @# w( n- F6 N README
0 [# {$ c$ v: {0 ^5 g booktabs.pdf
2 g# [# e2 P& n6 V3 ?, p”0 H5 a' t6 W/ ?" f% _
3 U9 \; t( r8 j! F我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |