Chinaunix首页 | 论坛 | 博客
  • 博客访问: 156003
  • 博文数量: 9
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 236
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-10 17:38
文章分类
文章存档

2008年(9)

我的朋友

分类:

2008-06-28 11:27:48

这一段忙着投论文,结果发现好多功能在word当中实现不了,或者能够实现,但是当转化为PDF就没有了。其中这个Bibtex这个包的使用,可是让我大费脑筋。有时候一篇文章引用文献可能几十个,用手工输入的办法,可能要把人累死;其次,即使说文献篇目只有十几个,并且都有引用关键字,在文献中手动引用,也要一一敲入这些关键字,根本不符合自动化的要求。我就求助于bibtex这个工具包,可是怎么也不能出现自动完成。于是到出找资料,现在才发现问题怎么解决。(唉,关键是开始时候不知道如何描述问题,才造成进度缓慢)。
 
首先是这个地方有一些提示:
 
 
 

IMPORTANT:

The most common reason for the active string \cite{} to "stop working" is that WinEdt does not know where to collect bib items. For example the Main File might not have been set of else bibliography file is located in a folder that WinEdt is not aware of.

WinEdt builds the tree based on Input Directives (as specified in the Options -> Advanced -> Tree interface: Tree.ini file). Directives are mode-sensitive (since different rules apply to different document formats).

Bibliography files can be placed in the same folder as the Main File. However, since such data is usually shared between your projects you might do better to create a global bibliography and place it in your BibTeX folder in the local texmf tree. TeX's Manual explains how to do this and describes any other actions that should be taken. Eg., MiKTeX's Users have to use MiKTeX's Options Interface to refresh its FNDB (the filename database). Note that WinEdt is not aware of the folders where your TeX accessories look for input or bib files. If you decide to use the global Bibliography Data base you should specify this folder as a part of a search path for Input Directive \bibliography{?}. This is done by modifying the Input Directive Section in Tree.ini (Options -> Advanced: Tree). For example:

  DIRECTIVE="\bibliography{??}"
    FILENAME="%[!|Exe('%b\Macros\GetBibFiles.edt');|];%$('_ExTreeInput');"
    // allows comma separated list of bib files
    SEPARATOR=","
    // possible extensions (.=default [.bib] as appended by the above macro)
    EXTENSION=".;.bib"
    // add additional locations for your bib files, eg.:
    // "%P;%p;%$('TeX-Local');\bibtex;C:\TeX\bibtex\My Bib Files"
    PATH="%P;%p;C:\localtexmf\bibtex\myBib.bib"

The new extended Input Directives in WinEdt 5.5 make the old "dummy" input directives redundant (as long as Tree.ini is properly configured). However, it is still possible to use a dummy input directive:

        %Included for Gather Purpose only:
        %input "C:\localtexmf\bibtex\myBib.bib"

Since TeX treats this line as a comment, this does not reduce portability of your documents. Once again: if TeX or BibTeX cannot find any of your input files this is not a WinEdt-related problem. Consult the Manual that comes with your TeX System!

还有就是这个FAQ里面的解决办法:
 
3.2.6.

When I typed "\cite{}" or "\ref{}" I used to get a popup list of all bibliography items resp. all labels. This doesn't work anymore.

There are different possibilities:

  • WinEdt doesn't find any items. To check whether WinEdt finds your items, open the Gather page (Project | Gather...) and have a look at the Bib resp. the Label tab. If it's empty, continue with the ;

  • The Active String that triggers the popup list, is disabled. Go to Options | Settings | Active Strings and see whether it includes the item "\cite{}" , with the Action:

     Exe("%B\Macros\Active Strings\Cite.edt");

    the box before On Type checked and in the field thereafter "TeX" . Also, if you use the feature of automatic parentheses completion, make sure that before this "\cite{}" you find the item "\cite{" , defined as Relax; and checked. Verify that there is no other "\cite..." which could override the other definition.

  • To check whether the macro that triggers the popup list is actually called, open it (%B\Macros\Active Strings\Cite.edt resp. Ref.edt) and put something like

     Prompt("Heureka!");
    

    in the first line, then try again.

我是因为winedt没有找到引文库,所以不能有弹出菜单。按照“WinEdt doesn't find any items.”来解决。
 
然后进入下一个解决方法:
 
3.2.9.

The Gather Interface does not show any (or not all) items.

WinEdt usually searches for gather items either in the current file, or, if a Main File is set, in all files of the Project Tree. Therefore the Tree has to be built, if your Project consists of more than one file. To do this, open your main document and select Project | Set Main File. Then you can build the Tree in the Project | Tree page. Now click Reset GDI in the Project | Gather page and then Collect Items.

If WinEdt still doesn't find any items, you are probably trying to get a list of bibliography entries. By default, WinEdt searches for bibliography items in all opened files, if no Main File is set. So if you don't want to use the Tree feature, you can also get items, if you open the bibliography database (but beware, WinEdt does not check whether any opened databases are actually used to create your bibliography!). So the probably better possibility is to include the bibliography database in the Tree, too. Add something like

 %GATHER{yourbibfile.bib}

to your LaTeX document and rebuild the Project Tree.

 
加了一个GATHER命令就解决了。
 
 
 
在此,我仅仅是抛砖引玉。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
阅读(7468) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~