Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying DOI in {{Citation}} on Wikisource #26

Open
Daniel-Mietchen opened this issue Jul 29, 2014 · 6 comments
Open

Displaying DOI in {{Citation}} on Wikisource #26

Daniel-Mietchen opened this issue Jul 29, 2014 · 6 comments

Comments

@Daniel-Mietchen
Copy link
Member

seems to work only if

| url

is set.

Details via https://en.wikisource.org/wiki/Template:Citation .

@Daniel-Mietchen
Copy link
Member Author

Sometimes, URL and DOI fields are garbled up:

| url = [http://digitallibrary.amnh.org/dspace/handle/2246/2848 http://digitallibrary.amnh.org/dspace/handle/2246/2848][http://dx.doi.org/10.1206/0003-0082(2003)419%3C0001:ANSOMF%3E2.0.CO;2 10.1206/0003-0082(2003)419<0001:ANSOMF>2.0.CO;2]

instead of

| url = [http://digitallibrary.amnh.org/dspace/handle/2246/2848 http://digitallibrary.amnh.org/dspace/handle/2246/2848]
| doi = [http://dx.doi.org/10.1206/0003-0082(2003)419%3C0001:ANSOMF%3E2.0.CO;2 10.1206/0003-0082(2003)419<0001:ANSOMF>2.0.CO;2]

(cf. https://en.wikisource.org/wiki/Wikisource:WikiProject_Open_Access/Programmatic_import_from_PubMed_Central/Three_new_species_of_Oreophryne_%28Anura_Microhylidae%29_from_Papua_New_Guinea ).

@Daniel-Mietchen
Copy link
Member Author

This should be fixed before or during the Wikimania Hackathon: wpoa/OA-signalling#101 , taking into account https://en.wikisource.org/wiki/Template_talk:Header#Header_for_journal_articles .

@Klortho
Copy link
Member

Klortho commented Jul 31, 2014

Look at the source wikitext, and search "10.1206/0003-0082(2003)4190001:ANSOMF2.0.CO;2". You'll see the citation template for ref B31 looks like Daniel's first example above.

@wrought
Copy link
Member

wrought commented Jul 31, 2014

Okay, so the issue here seems to be extra, unnecessary formatting around the doi and url values that the {{Citation}} chokes on. Removing all this, and specifying the necessary and accurate key-value pairs solves formatting problems across the article references--except when the DOI contains [ or ] as is the case for 10.1206/0003-0082(2005)495[0001:SOMFGO]2.0.CO;2.

Hilariously, even markdown avoids this issue with bracket characters [ ]... (see the source of the link I just used).

You can see the diff of how I cleaned the citations here:
https://en.wikisource.org/w/index.php?title=Wikisource%3AWikiProject_Open_Access%2FProgrammatic_import_from_PubMed_Central%2FThree_new_species_of_Oreophryne_%28Anura_Microhylidae%29_from_Papua_New_Guinea&diff=4982314&oldid=4970941

One way to handle the special character issue is to use the id field instead of doi and url:

| id = 10.1206/0003-0082(2005)495[0001:SOMFGO]2.0.CO;2

No link is generated, instead displaying in plain text without any rendering issue.

@wrought
Copy link
Member

wrought commented Oct 22, 2014

hrm... added and removed a regression because I thought the empty citations were a standard case, but they are actually fringe. This is an uncommonly un-marked-up citation from 10.1371/journal.pcbi.1003496 which can be seen on-wiki here

<ref id="pcbi.1003496-Kulikowski1"><label>7</label>
<mixed-citation publication-type="other" xlink:type="simple">Kulikowski CA, Shortliffe EH, Currie LM, Elkin PL, Hunter LE, <etal>et al</etal>.. (2012) AMIA Board white paper: definition of biomedical informatics and specification of core competencies for graduate education in the discipline. J Am Med Inform Assoc <volume>19</volume>: : 931–938. Available: <ext-link ext-link-type="uri" xlink:href="http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=3534470&amp;tool=pmcentrez&amp;rendertype=abstract" xlink:type="simple">http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=3534470&amp;tool=pmcentrez&amp;rendertype=abstract</ext-link>. Accessed 23 January 2014. </mixed-citation>
</ref>

@wrought
Copy link
Member

wrought commented Oct 22, 2014

However, this presents the same form to potentially scrap all the citation formatting, but instead just pass the plain text citations along, and let this be a bother for wikidata in the future instead.

@tcatapano tcatapano added the ready label Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants