Dwelling in the Dream

May 31, 2008

BibTeX and bibliography styles

Filed under: Word Processor — Tags: , , — wrjih @ 5:30 am

The Elements of Citation

The primary elements of a bibliographic reference are the same for most styles of documentation, although the order in which they are presented may vary. These elements include the name of the authors, the title, the name of publication, the publisher’s name, the date of publication, and a designation of the location, or page number, of a reference. Many styles also include a designation of the publication medium. The Online! A reference guide to using Internet resources and B. Davis Schwartz Memorial Library at Long Island University provides some examples.


Bibliography Format

An example of basice format are:


Authors’ Name.
Title of document.
Name of Publication
Volume (number),
Page number.
Place of publication [if applicable],
Publisher’s name [if applicable],
Year.


An Easy Guide to BibTeX

Using BibTeX can help to handle the references and citations in a consistent way. This program allow us just supply all the relevant information about references in a .bib file without regard to ordering or style. According to the chosen bibliographic style, BibTeX formats all citations and reference entries.

In addition, you don’t have to sweat all the font, punctuation and ordering details. The reference/bibliography section usually appears at the end of an publication. Specify the style and location of the bibliography in your LaTeX document as follows:

bibliographystyle{xxx}
bibliography{yyy}

  • The “xxx” is a style name –plain or abbrv or siam or alpha or any of dozens of other available styles.
  • The “yyy” is the name of the .bib file (yyy.bib) containing the reference database.

A Simple BibTeX Database File

Here is a simple .bib file:

@STRING{IEEE_PerCom = {{IEEE} Pervasive Computing}}
@STRING{CHI03 = {{CHI ‘03}: {CHI ‘03} extended abstracts on Human factors in computing systems}}
@ARTICLE{Yu:06,
author = {Zhiwen Yu and Xingshe Zhou and Daqing Zhang},
title = {Supporting Context-Aware Media Recommendations for Smart Phones},
journal = IEEE_PerCom,
year = {2006},
volume = {5},
pages = {68 — 75},
number = {3},
month = {July — September},
address = {Los Alamitos, CA, USA},
doi = {http://doi.ieeecomputersociety.org/10.1109/MPRV.2006.61},
issn = {1536-1268},
publisher = {IEEE Computer Society}
}
@INPROCEEDINGS{Sohn:03,
author = {Timothy Sohn and Anind Dey},
title = {{iCAP}: an informal tool for interactive prototyping of context-aware
applications},
booktitle = CHI03,
year = {2003},
pages = {974–975},
address = {Fort Lauderdale, Florida, USA},
month = {05–10 April},
publisher = {{ACM} Press},
isbn = {1-58113-637-4}
}

Compiling the Document and Bibliography

If the reference change, (i.e. it’s not necessary to repeat the following commands very time) use the following commands:

Step Command Description
1 latex YourDocument creates .aux file which includes keywords of any citations
2 bibtex YourDocument uses the .aux file to extract cited publications from the database in the .bib file, formats them according to the indicated style, and puts the results into in a .bbl file
3 latex YourDocument inserts appropriate reference indicators at each point of citation, according to the indicated bibliography style
4 latex YourDocument refines citation references and other cross-references, page formatting and page numbers

An Easy BibTeX Guide

  1. Use “and” to separate multiple authors, e.g., author = "J. Smith and E. B. Johnson and W. Strunk Jr.". An online help on BibTeX names contains detailed description.
  2. To handle the ccented characters, you must place the entire accented character in braces. For example, either `G{\”o}del’ or `G{\”{o}}del’, but neither `{G{\”{o}}del}’ nor `{G\”{o}del}’.
  3. STANDARD ENTRY TYPES:
    @article
    An article from a journal or magazine. Required fields: author, title, journal, year. Optional fields: volume, number, pages, month, note.
    @book
    A book with an explicit publisher. Required fields: author or editor, title, publisher, year. Optional fields: volume or number, series, address, edition, month, note.
    @booklet
    A work that is printed and bound, but without a named publisher or sponsoring institution. Required field: title. Optional fields: author, howpublished, address, month, year, note.
    @conference
    The same as inproceedings
    @inbook
    A part of a book, which may be a chapter (or section or whatever) and/or a range of pages. Required fields: author or editor, title, chapter and/or pages, publisher, year. Optional fields: volume or number, series, type, address, edition, month, note.
    @incollection
    A part of a book having its own title. Required fields: author, title, booktitle, publisher, year. Optional fields: editor, volume or number, series, type, chapter, pages, address, edition, month, note.
    @inproceedings
    An article in a conference proceedings. Required fields: author, title, booktitle, year. Optional fields: editor, volume or number, series, pages, address, month, organization, publisher, note.
    @manual
    Technical documentation. Required field: title. Optional fields: author, organization, address, edition, month, year, note.
    @mastersthesis
    A Master’s thesis. Required fields: author, title, school, year. Optional fields: type, address, month, note.
    @misc
    Use this type when nothing else fits. Required fields: none. Optional fields: author, title, howpublished, month, year, note.
    @phdthesis
    A PhD thesis. Required fields: author, title, school, year. Optional fields: type, address, month, note.
    @proceedings
    The proceedings of a conference. Required fields: title, year. Optional fields: editor, volume or number, series, address, month, organization, publisher, note.
    @techreport
    A report published by a school or other institution, usually numbered within a series. Required fields: author, title, institution, year. Optional fields: type, number, address, month, note.
    @unpublished
    A document having an author and title, but not formally published. Required fields: author, title, note. Optional fields: month, year.
  4. STANDARD FIELDS
  5. address
    Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.
    annote
    An annotation. It is not used by the standard bibliography styles, but may be used by others that produce an annotated bibliography.
    author
    The name(s) of the author(s), in the format described in the LaTeX book.
    booktitle
    Title of a book, part of which is being cited. See the LaTeX book for how to type titles. For book entries, use the title field instead.
    chapter
    A chapter (or section or whatever) number.
    crossref
    The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.
    edition
    The edition of a book—for example, “Second”. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.
    editor
    Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.
    howpublished
    How something strange has been published. The first word should be capitalized.
    institution
    The sponsoring institution of a technical report.
    journal
    A journal name. Abbreviations are provided for many journals.
    key
    Used for alphabetizing, cross referencing, and creating a label when the “author” information is missing. This field should not be confused with the key that appears in the cite command and at the beginning of the database entry.
    month
    The month in which the work was published or, for an unpublished work, in which it was written. You should use the standard three-letter abbreviation, as described in Appendix B.1.3 of the LaTeX book.
    note
    Any additional information that can help the reader. The first word should be capitalized.
    number
    The number of a journal, magazine, technical report, or of a work in a series. An issue of a journal or magazine is usually identified by its volume and number; the organization that issues a technical report usually gives it a number; and sometimes books are given numbers in a named series.
    organization
    The organization that sponsors a conference or that publishes a manual.
    pages
    One or more page numbers or range of numbers, such as 42--111 or 7,41,73--97 or 43+ (the `+‘ in this last example indicates pages following that don’t form a simple range). To make it easier to maintain Scribe-compatible databases, the standard styles convert a single dash (as in 7-33) to the double dash used in TeX to denote number ranges (as in 7--33).
    publisher
    The publisher’s name.
    school
    The name of the school where a thesis was written.
    series
    The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.
    title
    The work’s title, typed as explained in the LaTeX book.
    type
    The type of a technical report—for example, “Research Note”.
    volume
    The volume of a journal or multi-volume book.
    year
    The year of publication or, for an unpublished work, the year it was written. Generally it should consist of four numerals, such as 1984

BibTeX References

  1. Designing BibTeX Styles by Oren Patashnik
  2. BibTeX online help

June 26, 2007

Chinese Fonts for LaTeX (WinEdt 5.4 + MiKTeX 2.6)

Filed under: Word Processor — wrjih @ 5:43 pm

安裝中文楷書字型

reference site:
http://www.cmlab.csie.ntu.edu.tw/~r92045/Collection_of_LaTeX_Solutions.htm

Chinese Fonts download site:
ftp://cle.linux.org.tw/pub2/fonts/Arphic/Type1/bkai-t1.tar.gz

使用環境:WinEdt 5.4 + MiKTeX 2.6 (or MikTeX 2.4, 2.5)
STEP:

  1. unzip 字型檔後會有以下幾個檔案及目錄:

    <dir> akai-afm
    <dir> akai-enc
    <dir> akai-pfb
    <dir> akai-tfm
    akai-enc.map
    akai.map
    arphicpl.txt
    c00akai.fd
    cid-x.map

  2. 將以各「資料夾」移至相對應的目錄 (ex: “\Program Files\MikTeX”), 並將資料夾名稱更改成字型名稱:
    • akai-afm 移至 fonts\afm\後, 將資料夾改名為akai
    • akai-tfm 移至 fonts\tfm\後, 將資料夾改名為akai
    • akai-pfb 移至 fonts\type1\後, 將資料夾改名為akai
    • c00akai.fd 移至 tex\latex\CJK\Bg5\ (若找不到CJK目錄, 請先由MikTeX的Package Manager 安裝 CJK 相關套件)
    • 建立目錄dvips\akai\後, 將akai*.map (2個檔案) 移至 dvips\akai\
    • 建立目錄dvipdfm\akai\後, 將 cid-x.map 移至 dvipdfm\akai\, 並將檔名改為akai.map
    • 更新 web2c\updmap.cfg,在任一行後面加入 Map akai.map 即可。若沒有此檔案請自行建立 。
  3. 更新 file name database:在命令提示字元執行 initexmf -u
  4. 建立 font map 檔案:在命令提示字元執行 initexmf ⁻⁻mkmaps
  5. 測試碼:

    \documentclass[a4paper]{article}
    \usepackage{CJK}
    \begin{document}

    Test!

    \begin{CJK}{Bg5}{akai} % 文鼎楷書

    Test!

    \begin{Bg5text}

    這是測試檔!
    假設測試檔名是test.tex, 在執行bg5latex之前, 請先執行 bg5conv < test.tex > test.cjk

    /end(Bg5text) %→ 注意括號及’/’
    \end{CJK}
    \end{document}

***注意事項***

  1. 安裝好CJK及字型後, 請記得以bg5latex取代原有的latex, 否則會遇到”許功蓋”問題. 可以在WinEdt加入一個新的bg5latex, 這樣會比較方便。
  2. updmap.cfg在執行MikTeX更新時, 有可能會被更新, 此時原來加入Map akai.map的部份就會被overwrite. 判斷是否發生這個狀況可由:
    1. YAP出現“Not all fonts can be loaded”的error. 以及
    2. dvipdfm時會出現“Can’t locate a Type 1, TTF, PK, or virtual font file”的error

    若兩種情況都發生, 就要去查一下updmap.cfg是否被overwrite了。

August 24, 2006

LaTeX Tutorials

Filed under: Computer, Word Processor — wrjih @ 12:12 am

July 5, 2006

Create a new icon for WinEdt button

Filed under: Computer, Word Processor — wrjih @ 4:03 pm

Test Environment WinEdt 5.4

  1. create a 16 x 16 x 24b bitmap image file, ex: bg5latex.bmp bg5latex
  2. put bg5latex.bmp to $WinEdtHome\Bitmaps\Buttons and $WinEdtHome\Bitmaps\Images, where $WinEdtHome can be equal to C:\Program Files\WinEdt Team\WinEdt, it depends on the installation directory of WinEdt in your computer
  3. Add a new line
    202 %B\Bitmaps\Buttons\bg5latex.bmp
    to $WinEdtHome\WinEdt.btn
  4. Add a new line
    228 %B\Bitmaps\Images\bg5latex.bmp
    to $WinEdtHome\WinEdt.img
  5. Restart WinEdt, you will get a new icon for Adding a New Button to WinEdt.

June 4, 2006

WinEdt 5.4 ToolBar新增按鈕, 以bg5latex為例(MikTeX 2.4)

Filed under: Computer, Word Processor — wrjih @ 10:30 am

安裝好字型後, 對於「許功蓋」問題總是無法解決, 後來才發現, 原來是我又耍寶了, 我忘了要做bg5conv及bg5latex, 取代原來的latex了. (其實也是我以為現在的MikTeX已經很強了, …. 我太天真了)

現 在MikTeX 2.4的bg5latex已經包含有早期bg5conv的功能了, 所以只要一個bg5latex指令就可以把CJK中文字型處理好了. 有些中文字, 用dvi viewer (ex: yap)看, 會變成亂碼, 此時, 再轉成pdf檔後, 應該就沒有問題了.

由於WinEdt不會自動加入bg5latex的按鈕, 所以我們必需要手動加入一個新的button.加入的方法如下:  
step 1. 在工具列旁空白處按滑鼠右鍵,出現下列選單,選擇Menu Setup
  WinEdt Menu Setup
step 2. Main menu選單上的Items, 選擇&accessories, 連續按2下滑鼠
step 3. 對任一Menu Items按滑鼠右鍵, 會出現如下圖, 選Insert –> Utility
  WinEdt Menu Setup
step 4. 在menu Items加入&bg5latex
  WinEdt Utility
 
  • Utility路徑為C:\texmf\miktex\bin\bg5latex.exe %N%T (C:\texmf\miktex\bin\big5latex.exe為big5latex.exe的所在路徑)
  • Start in填入 %P
  • Caption 填入 bg5latex
  • 選擇button對應的icon
step 5. 在工具列旁空白處按滑鼠右鍵,出現下列選單,選擇Enter Tool Bar Setup. 將bg5latex的按鈕安裝到ToolBar上.
step 6. 將新加入的bg5latex圖示拉到ToolBar上後, 按滑鼠右鍵選apply
  WinEdt tool Bar
做完上列的步驟後, 回到WinEdt的編輯畫面, 就會多出一個新的icon, 若是有用中文, 就要改用這個新的button做bg5latex.

January 3, 2005

bibtex tools

Filed under: Computer, Word Processor — wrjih @ 1:13 pm

JabRef

About

JabRef is a graphical frontend to manage BibTeX databases, the standard LaTeX bibliography reference format. JabRef is build to be platform independant (requires Java >= 1.4.2). It merges and extends the functionalities of BibKeeper (Morten O. Alver) and JBibtexManager (Nizar Batada).

Features

  • Advanced BibTeX editor Detailed edition of bibtex entries.
  • Search functions Search a pattern in the whole bibliography.
  • Classification of entries You can group entries by keywords or any other fields.
  • Support importation of various formats BibTex, Endnote (text), ISI Web of Science, Medline/Pubmed (xml), Scifinder format, OVID, INSPEC, Biblioscape, JStor and RIS.
  • Support different export formats HTML, Docbook, BibTeXML.
  • Customization of BibTeX fields You can add your own fields to any BibTeX entry type.
  • Customization of the JabRef interface Fonts, displayed fields, etc
  • Integrates to your environment Launch external applications: PDF/PS viewers, web browser, insert citations into LyX, Kile and WinEdt
  • Automatic Key generationSearch
  • Medline and Citeseer

Windows Installation

Method 1: Mouse click way

Now we have the .msi install file. If java is not installed it issues a complaint. This simply installs Jabref and a shortcut in the start menu.

Method 2: Batch file way

First try to simply double-click the JabRef.jar file – this works on some systems. If JabRef does not start immediately (i.e. Windows does not know what to do with a .jar file), proceed like this:

In the directory where you placed JabRef.jar, create a batchfile "jabref-start.bat":

start javaw -jar JabRef.jar

Double-click on the batchfile to start JabRef.

BibORB

BibORB is a tool to manage bibliographies recorded in BibTeX format using a simple Web browser.

 

It allows to display and navigate through a bibliography and give instant access to electronic releases of papers if available. It is a front-end to BibTeX and it provides an interface for edition or modification purpose. BibORB also provides some classification method using additional BibTeX fields ("groups","website","longnotes"…), and search engines (over authors, keywords, titles …).

It has been designed to be used both on a local machine or through a local network. Then, people may access bibliographies and recorded papers through their web browser and update stored information. Authentication is supported to restrict access.

To run BibORB you need:

  • any web server (tested with Apache),
  • PHP >= 4.0.3 with XSLT modules loaded,
  • PHP Pear module.

yabib – Yet Another BibTeX Tool

yabib is a tool to organize your collection of publications with BibTeX.

If you do scientific work, normally you have a huge number of publications to handle.

To cite them in your work you need BibTeX entries for them, but if you have publications as files on your computer you can do much more with these meta informations.

Most of your files have more or less "intelligent names" like 0123456789.pdf (especially if you downloaded them from IEEEXplore), so what to do?

  • Rename them? (So you will loose the link to the original filename and probably download the same file once again.)
  • Copy all of them into your specific project directory?
    (So the files are lost in your directory tree.)
  • Put all in the same directory? (So you'll end up with a mess of several hundred files.)

yabib is a program to help you to clean up your paper collection. It uses the .bib file format as an input format and creates a clearly arranged html file where all meta informations are visible and your collected publications are linked.

Therefor the BibTeX format was completed with the fields filename and location.

filename is the (unique) filename of your file (e.g. filename = {0123456789.pdf}) without any path. yabib will use this informations to locate your file in directory trees you specify.

location is a field that should be used for the location of publications that are only available in printed form (e.g. filename = {my bookshelf at home} or filename = {library in xyz building}).

Blog at WordPress.com.