Install .sty, .cls, .bst files in Lyx

For Linux users, refer to this page. http://flukylogs.blogspot.co.uk/2009/09/install-style-files-in-lyx.html 

If you have installed WinEdt before you install Lyx, you may not find MiKTeX folder in C:\Users\Username\AppData\Roaming. So my suggestion is to put files in the installation location of your MiKTeX. For example, your MikTeX is installed in D:\CTEX\MiKTeX.

Install LaTeX class (.cls)

  1. create new directory with name <your-class-name> under D:\CTEX\MiKTeX\tex\latex
  2. copy <your-class-name>.cls file (& other files, if present) in the new directory
  3. win+R, input "cmd", then run "texhash --admin -u".
  4. create  a file <your-class-name>.layout in D:\Program Files (x86)\LyX 2.0\Resources\layouts
  5. edit the layout file according to the instructions given in Chapter 5 of "Customizing LyX: Features for the Advanced User" (Help->Customization in LyX). 
  6. open LyX and click 'tools -> Reconfigure' and restart LyX when done. The new Document Class should be available now.
For Example, to install IEEEconf class file, download the zip files from  here . Create .cls file by executing 'latex IEEEconf.ins'. Copy the folder IEEEconf to  :\CTEX\MiKTeX\tex\latex\ Run  sudo texhash.  Find IEEEtran.layout file & copy it to a new file named IEEEconf.layout inD:\Program Files (x86)\LyX 2.0\Resources\layouts (IEEEconf and IEEEtran are very similar, so IEEEtran-layout file can be used as layout file for IEEEconf). Edit the the second line in IEEEconf.layout from
# \DeclareLaTeXClass{article (IEEEtran)}
to 
# \DeclareLaTeXClass{article (IEEEconf)}
and it should turn up when you reconfigure LyX.

Install LaTeX style (.sty)

Style file (.sty) is an addition to class files (.cls) files and they provides special formatting rules which overrides the similar rules in class  files, if present. So each style file must be associated with a class file. Installation process is similar to that of class files (see previous section of this post). Layout files (step 5 above) have different format. Instructions are given in Chapter 5 of "Customizing LyX: Features for the Advanced User" (Help->Customization in LyX).

For Example, to install ACRA style file, download the files from  here . Copy the file acra.sty to  D:\CTEX\MiKTeX\tex\latex\lyx.  Run  "texhash --admin -u".  Find article.layout  file & copy it to a new file named  acra.layout  inD:\Program Files (x86)\LyX 2.0\Resources\layouts (acra.sty uses  "article " class). Edit the the second line in acra.layout from
#  \DeclareLaTeXClass{article}
to 
#  \DeclareLaTeXClass[article, acra.sty]{article (ACRA)}
Then add in next line

Preamble
    \usepackage{acra}
EndPreamble


and it should turn up when you reconfigure LyX.

Install BibTeX Style (.bst)
  1. create new directory with name <your-bib-style-name> under D:\CTEX\MiKTeX\bibtex\bst\
  2. copy <your-bib-style-name>.bst file (& other files, if present) in the new directory
  3. run "texhash --admin -u"
  4. open LyX and click 'tools -> Reconfigure' and restart LyX when done.
  5. open LyX and click 'tools -> TeX Information' and choose BibTex Styles. Click 'Rescan' The new BibTeX should be available now.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值