wiki:CiteMacro

Version 30 (modified by Ryan J Ollos, 8 years ago) (diff)

Use TracLink.

Add citations to wiki pages

Description

This macro allows you to easily cite literary resources in wiki pages. This gives wiki pages the equivalent to LaTeX's \cite{} and \makeindex commands. Also see #453.

Bugs/Feature Requests

Existing bugs and feature requests for CiteMacro are here.

If you have any issues, create a new ticket.

enhancement

1 / 2

Download

Download the the zipped source from here.

Source

Check out using Subversion, or browse the source with Trac.

Example

To cite a resource use the form:

Cite(label, [description, [keywords]])

For example,

A classic paper on software projects is Fred Brooks' No Silver Bullet [[Cite(brooks1995,author=Fred P. Brooks\, Jr.,
title=The Mythical Man-Month: Essays on Software Engineering, edition=Anniversary Edition,institution=University of
North Carolina,year=1995,publisher=Addison-Wesley,isbn=ISBN 0-201-83595-9,pages=179-203,
url=http://en.wikipedia.org/wiki/The_Mythical_Man-Month)]]. I would also recommend reading Eric Sink's Career Calculus
[[Cite(sink2003,reftype=electronic,author=Eric Sink,title=Career Calculus,url=http://www.ericsink.com/
Career_Calculus.html,year=2003,month=Aug,day=19)]] and Paul Graham's Great Hackers [[Cite(graham2004,
reftype=electronic,author=Paul Graham,title=Great Hackers,url=http://www.paulgraham.com/gh.html,month=Jul,year=2004)]].

If you are more interested in patents, try Nikola Tesla's first "Free Energy" patent [[Cite(tesla1901,reftype=patent,
assignee=Nikola Tesla,address=New York\, NY,number=685957,title=Apparatus for the Utilization of Radiant 
Energy,day=5,month=Nov,year=1901,dayfiled=21,monthfiled=Mar,yearfiled=1901,nationality=United States,
url=http://www.google.com/patents?id=YitoAAAAEBAJ)]].

You can cite the same reference more then once:

Some stuff [[Cite(cite,Citation plugin,url=http://trac-hacks.org/wiki/CiteMacro)]] and then again [[Cite(cite)]] using only
the label.

Finally, at the bottom of the page generate the references:

[[Cite(references)]]

With back links, and a smaller heading:

[[Cite(references,h=2,backref=true)]]

The list of keywords was obtained from IEEEexample.bib:

author, assignee, nationality, editor, title, intype, booktitle, edition, series, journal, volume, number, organization,
institution, publisher, school, language, address, url, howpublished, dayfiled, monthfiled, yearfiled, day, month, year,
chapter, volume, paper, type, revision, pages, note, key

To create a BibTeX bibliography with a 4 space indentation:

[[Cite(bibtex,indent=4,style=background: #eee; border: 1px solid black; padding: 10px;)]]

Then copy and paste the rendered output into your bibliography file.

Here is a screen shot of the example code's rendered output.

Possible Improvements

  • More intelligent reference creation, a patent reference should look different from an article in a journal. Order of keywords spring to mind.
  • Remove the commas in dates.

Recent Changes

4534 by lcordier on 2008-10-20 08:27:47
Improved the formatters, better date output.
4528 by lcordier on 2008-10-17 13:58:04
Cosmetic changes.
4496 by lcordier on 2008-10-15 08:01:27
Cosmetic changes.
(more)

Author/Contributors

Author: lcordier
Maintainer: Louis Cordier
Contributors:

Attachments (1)

Download all attachments as: .zip