ImportReferences: Difference between revisions

From IcingWiki
Jump to navigation Jump to search
Uwasa (talk | contribs)
Added the WikiAuthorYearCitations script
Uwasa (talk | contribs)
Updated the visual editor instructions
Line 1: Line 1:
References can be imported semi-automatically using the following instructions. First collect the references using suitable reference management systems, such as [https://www.zotero.org/ Zotero]. Then export the references from the reference management system in Wikipedia format. From Zotero, they references can be exported using using ''Export Collection'' function. Selecting the export format as "''Wikipedia Citation Templates''", the references are exported in Wikipedia format, and can be copy-pasted in Wiki.
[[File:ZoteroExportWiki.png|thumb|A dialog showing how to export citations from Zotero in MediaWiki form]]References can be imported semi-automatically using the following instructions. First collect the references using suitable reference management systems, such as [https://www.zotero.org/ Zotero]. Then export the references from the reference management system in Wikipedia format. From Zotero, they references can be exported using using ''Export Collection'' function. Selecting the export format as "''Wikipedia Citation Templates''", the references are exported in Wikipedia format, and can be copy-pasted in Wiki.
 
=== Using visual editor ===
[[File:InsertReference.png|alt=A dialog for adding a citation|thumb|A dialog for adding a citation]]
With visual editor, the adding of citation is rather simple. First add  ''References list'' from the ''Insert-''menu in the end of the page. After this, the reference can be easily added by starting to type ''< ref'' in the visual editor or select ''Basic'' from the ''Cite'' menu. Then copy and paste suitable Wikimedia formatted reference data into the dialog box. If the citation is already in the list of references, you can re-use it by selecting ''Re-Use'' from the ''Cite'' menu.
 
=== Using Raw editor, and author year citation format ===
It seems that the methods for using citations with Wikimedia editor are great, and nothing else is usually needed. Here is still some script which can be useful when entering a large number of citations in a page.


[[File:ZoteroExportWiki.png|thumb|A dialog showing how to export citations from Zotero in MediaWiki form]]
To make citing of the references easier, it is good to add a citation key to the references. The citation keys can be added manually, but for a larger list of references, the [https://github.com/UniVaasaDigiEco/Scripts/blob/main/WikiAuthorYearCitations.py WikiAuthorYearCitations.py] -script can be used.  
To make citing of the references easier, it is good to add a citation key to the references. The citation keys can be added manually, but for a larger list of references, the [https://github.com/UniVaasaDigiEco/Scripts/blob/main/WikiAuthorYearCitations.py WikiAuthorYearCitations.py] -script can be used.  


Line 9: Line 15:


<code>< ref name=Author_year / ></code>
<code>< ref name=Author_year / ></code>
=== References ===
<references><ref name="Laird_2010">{{Cite journal| doi = 10.1109/LGRS.2009.2032304| issn = 1558-0571| volume = 7| issue = 2| pages = 246–250| last1 = Laird| first1 = Claude M.| last2 = Blake| first2 = William A.| last3 = Matsuoka| first3 = Kenichi| last4 = Conway| first4 = Howard| last5 = Allen| first5 = Christopher T.| last6 = Leuschen| first6 = Carl J.| last7 = Gogineni| first7 = Sivaprasad| title = Deep ice stratigraphy and basal conditions in central west antarctica revealed by coherent radar| journal = IEEE Geoscience and Remote Sensing Letters| date = 2010-04}}
</ref> <ref name="Figueiredo_2010">{{Cite journal| doi = 10.1109/TMI.2009.2036258| issn = 1558-254X| volume = 29| issue = 4| pages = 998–1011| last1 = Figueiredo| first1 = Isabel N.| last2 = Figueiredo| first2 = Pedro N.| last3 = Stadler| first3 = Georg| last4 = Ghattas| first4 = Omar| last5 = Araujo| first5 = Adérito| title = Variational image segmentation for endoscopic human colonic aberrant crypt foci| journal = IEEE Transactions on Medical Imaging| date = 2010-04}}
</ref> <ref name="Zirizzotti_2010">{{Cite journal| doi = 10.1109/TGRS.2009.2038900| issn = 1558-0644| volume = 48| issue = 5| pages = 2343–2348| last1 = Zirizzotti| first1 = Achille| last2 = Cafarella| first2 = Lili| last3 = Baskaradas| first3 = James Arokasami| last4 = Tabacco| first4 = Ignazio Ezio| last5 = Urbini| first5 = Stefano| last6 = Mangialetti| first6 = Morena| last7 = Bianchi| first7 = Cesidio| title = Dry–Wet bedrock interface detection by radio echo sounding measurements| journal = IEEE Transactions on Geoscience and Remote Sensing| date = 2010-05}}
</ref></references>

Revision as of 13:14, 18 January 2022

A dialog showing how to export citations from Zotero in MediaWiki form

References can be imported semi-automatically using the following instructions. First collect the references using suitable reference management systems, such as Zotero. Then export the references from the reference management system in Wikipedia format. From Zotero, they references can be exported using using Export Collection function. Selecting the export format as "Wikipedia Citation Templates", the references are exported in Wikipedia format, and can be copy-pasted in Wiki.

Using visual editor

A dialog for adding a citation
A dialog for adding a citation

With visual editor, the adding of citation is rather simple. First add References list from the Insert-menu in the end of the page. After this, the reference can be easily added by starting to type < ref in the visual editor or select Basic from the Cite menu. Then copy and paste suitable Wikimedia formatted reference data into the dialog box. If the citation is already in the list of references, you can re-use it by selecting Re-Use from the Cite menu.

Using Raw editor, and author year citation format

It seems that the methods for using citations with Wikimedia editor are great, and nothing else is usually needed. Here is still some script which can be useful when entering a large number of citations in a page.

To make citing of the references easier, it is good to add a citation key to the references. The citation keys can be added manually, but for a larger list of references, the WikiAuthorYearCitations.py -script can be used.

The script takes two input parameters, the name of the input and output files. The input file should be a Wikimedia-formatted list of references, exported from Zotero, for example. The same list of references will be written in the output file in Wikimedia format, supplemented with unique author-year citation keys. The script also removes duplicates from the list of references.

The citations can be copy-pasted in the Wiki-page and cited using the following syntax:

< ref name=Author_year / >

References

Cite error: <ref> tag with name "Laird_2010" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "Figueiredo_2010" defined in <references> is not used in prior text.
Cite error: <ref> tag with name "Zirizzotti_2010" defined in <references> is not used in prior text.