Add citations to wiki pages


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

Here is a screenshot of the example code's rendered output:

Redered output of the examples.

Bugs/Feature Requests

Existing bugs and feature requests for CiteMacro are here.

If you have any issues, create a new ticket.


1 / 2


Download the the zipped source from here.


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


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=]]. I would also recommend reading Eric Sink's Career Calculus
[[Cite(sink2003,reftype=electronic,author=Eric Sink,title=Career Calculus,url=
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=,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,

You can cite the same reference more than once:

Some stuff [[Cite(cite,Citation plugin,url=]] and then again [[Cite(cite)]] using only
the label.

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


With back links, and a smaller heading:


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.

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 10:27:47
Improved the formatters, better date output.
4528 by lcordier on 2008-10-17 15:58:04
Cosmetic changes.
4496 by lcordier on 2008-10-15 10:01:27
Cosmetic changes.


Author: lcordier
Maintainer: Louis Cordier

Last modified 8 weeks ago Last modified on Aug 31, 2016, 9:33:12 PM

Attachments (1)

Download all attachments as: .zip