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

May 28, 2008

Making a runnable .jar with dependent libraries

Filed under: Programming — wrjih @ 9:38 pm

As we know that Java could let the users combine several classes into a .jar file. We can create a runnable .jar file for larger projects, so that can demonstrate the projects more easily. The following shows the step to create such runnable .jar:

  1. Create a manifest file, e.g. Manifest.mf, contains
    • Class-Path: <lib1.jar> <lib2.jar> <path/lib3.jar> …..; use space as the delimiter
    • Main-Class: <classname>
    • place a new line at the end of this file
  2. use jar.exe to create a runnable .jar, type
    • jar cvfm <your_jar_file.jar> <manifest_file> <class_files> <libraries>

After we create the .jar file, we can use

java -jar <your_jar_file.jar>

to execute the program.

May 5, 2008

SWRL+Jess in Protege

Filed under: Semantic Web — Tags: , — wrjih @ 1:42 am

Protege-OWL 3.3.1 provides SWRLJessTab plug-in that supports the execution of SWRL rules using the Jess rule engine. When the SWRLTab is activated, the SWRL Editor will display a list of icons on the top right of the SWRL rules table. The Jess tab is activated by pressing the “J” icon.

The Jess rule engine is not open source, we have to download jess.jar from Jess website separately. This JAR must be copied to the Protege-OWL plugins subdirectory in the Protege installation directory (i.e., the ./plugins/edu.stanford.smi.protegex.owl/ subdirectory of the Protege installation directory). Protege-OWL will automatically load this JAR file on startup if it is present in its plugins directory. Please note that the SWRLJessTab should run under Jess 7.0 release version or later.

Blog at WordPress.com.