Help:Converting between references formats

This page describes procedures to convert the references from Footnotes defined in the body of the article to List-defined references where the references are defined in the reference list.

Such a conversion may be necessary in order to move text with many references from an article that uses the list-defined format to another article, or may be used to format all references in an article so that they all conform to the same format. It requires installation of the References segregator tool.

Converting from the inline to the list-defined format

  • The References segregator tool can automatically convert all references to the list-defined format.
  • Use a regular expression search-and-replace operation to replace uses of <ref> tags with the {{r}} template. To do that, search for: <ref name="(.*?)"/>, and replace it with {{r\|"$1"}}, while checking the "Treat search string as a regular expression" checkbox.

Converting from the list-defined to the inline format

  1. Use a regular expression search and replace operation to replace uses of the {{r}} template with <ref> tags. To do that, search for: \{\{r\|([^}]+)\}\}, and replace it with <ref name="$1" />, while checking the "Treat search string as a regular expression" checkbox.
  2. Copy and remove (cut) the entire {{reflist}} template with the list of references.
  3. Install the References segregator tool and click the "Segregate refs for editing" button.
  4. Remove all the empty <ref> tags from the lower text box.
  5. Paste the list of references into the lower text box (after its existing contents).
  6. Save the page, which merges the citation templates from the lower text box into the upper text box and removes the unused footnotes in the process.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.