[[PageOutline(2-5,Contents,pullout)]] = Add citations to wiki pages == Description 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: [[Image(cite.jpg, border=2)]] == Bugs/Feature Requests Existing bugs and feature requests for CiteMacro are [report:9?COMPONENT=CiteMacro here]. If you have any issues, create a [/newticket?component=CiteMacro new ticket]. [[TicketQuery(component=CiteMacro&group=type,format=progress)]] == Download Download the the zipped source from [export:citemacro here]. == Source Check out [/svn/citemacro using Subversion], or [source:citemacro 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 than 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 [http://www.ctan.org/get/macros/latex/contrib/IEEEtran/bibtex/IEEEexample.bib 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 [[ChangeLog(citemacro, 3)]] == Author/Contributors '''Author:''' [wiki:lcordier] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''