Jump to content

Template talk:Cite OEIS

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:OEIS el/doc)

Code overhaul: a true {{cite web}} by now

[edit]

I have overhauled the template code. By now, it is a true {{cite web}} source. It mentions editor Neil Sloane, it has better title punctuation, plus an option to link to OEIS/subpages (e.g., the A's OEIS/history or its internal references).

Also, I will move this page to the more serious name of {{Cite OEIS}} (talk).

Future improvements for thought: allow specifying the |author= of the sequence (we want to be a true and good source).

- DePiep (talk) 19:23, 26 March 2018 (UTC)[reply]

Please fix Template:Cite OEIS/testcases. With it in the broken state that you have left it in, it is difficult to see whether your new code accurately covers a reasonable fraction of current cases. And I'm not entirely happy about the new verbose titles — I think they're overly verbose. The old SloanesRef/sandbox was intended to make this template into a wrapper for the cite engine rather than something that indirects through one of the other cite templates (more efficient and more flexible) — is there any hope of still doing that? For instance, that would make mode=cs2 work automatically, something one can't do now (making this template inconsistent with articles whose reference formatting is Citation Style 2 instead of Citation Style 1). —David Eppstein (talk) 19:55, 26 March 2018 (UTC)[reply]
David Eppstein: Yes I'll take a look. However. It appears to be about /sandbox only, *not* about mainspace. Even better: I thoroughly tested my sandbox changes in the /testcases page (see its history). So: no problem in mainspace, and "fix the tescases page" does not seem logical to me. IOW, to me, 1. nothing wrong, 2. what error you want to have fixed? (most likely cause: the /sandbox was not moved, duh). - DePiep (talk) 20:43, 26 March 2018 (UTC)[reply]
I want (1) working testcases so I can see how standard use cases of this template are formatted, (2) use of sandbox and testcases to validate future changes, (3) usability with Citation Style 2, and (4) in the longer term, direct calls to Lua rather than slower and more fragile indirection through templates. —David Eppstein (talk) 20:56, 26 March 2018 (UTC)[reply]
re (1), (2), (3), (4): irrelevant. What about OEIS in mainspace? - DePiep (talk) 21:49, 26 March 2018 (UTC)[reply]
Your message is unintelligable to me. What about mainspace? And why is a desire to use this for consistently-formatted citations in Citation Style 2 articles irrelevant? —David Eppstein (talk) 22:59, 26 March 2018 (UTC)[reply]
So far, none of your three posts are about mainspace, i.e. the actual intention, usage and result of the template. None. Not even about documentation ("How to use the new code"). A broken /sandbox is hardly a serious matter (especially not in this thread). Really, our only concerns are: does it work and is it useful? Since you have not pointed to a single possible fail or error, I see no point to improve on. So I say: per your replies' content: irrelevant.
On top of this, I find that you are very commanding: I want ...?!. Had you written, like: "Could you take a look at ...", or "Shall we aim at ...", I'd be more interested. If you have suggestions etc. for more improvements, please write them down (new section below?). - DePiep (talk) 23:59, 26 March 2018 (UTC)[reply]
Why should I write them down a second time when I have already expressed them clearly and you have been so dismissive of them for no good reason? —David Eppstein (talk) 02:48, 27 March 2018 (UTC)[reply]
I am not going to remove the enveloping chaff about sandboxes and testpages and commanding notes and offtopicals, just because you don't take care of the difference. - DePiep (talk) 03:57, 27 March 2018 (UTC)[reply]

Further more

[edit]

Looks like the ref and cite part is going well with this new one. Lots of links to OEIS are handcoded (not using any OEIS template). We want to catch them all.

Further developments:

  1. Make a variant that is fit for the External Links section Green tickY See {{OEIS el}}
  2. Make it possible to search with any term
  3. Make possible to link to their wiki
  4. Use {{sfn}} and {{sfnm}}?
-DePiep (talk) 04:03, 27 March 2018 (UTC)[reply]
5. Add a mode= parameter that passes its argument to cite web so that this can be used in other citation styles.
6. Add a ref= parameter that passes its argument to cite web so that this can be used in other citation styles. (This is what is needed to make sfn work.)
7. Or consider re-implementing using template wrapper like this old sandbox version you replaced so that extra parameters like this could be used automatically without having to be coded explicitly. —David Eppstein (talk) 12:44, 27 March 2018 (UTC)[reply]
8. Make a multi-input option (citing multiple sequences together, reduce repetition) - DePiep (talk) 12:55, 27 March 2018 (UTC)[reply]
Re David Eppstein. I see the advantages Module:Template wrapper, later on I'll take a look on how to implement it. That would automatically serve all parameters including |mode= and |ref=, and following the documentation: very good. I understand that already you see a need for it (using {{Cite web}} pre-set for OEIS). OTOH, the other templates must be very much alike (fort the editor, and for the reader). So I'm also thinking about making some central functions (name formatting, link presentation).
However, first I want all references (all oeis.org links) cleaned up. I want to catch all links in templates (citations correct using this {{Cite web}}), make External links section look good (new {{OEIS el}}), and see if the inline templates can be refined. (I'm not happy with that [[OEIS:A100000]] "interwiki" link code btw; several thoughts). Also, we want all oeis.org links in a template (not handcoded [https://oeis.org ...] any more), to improve their presentation and consistency etc. IOW, we must see and know all links. (This requires adding the search option, and the to-their-wiki link option). So this too make take some time.
Some numbers. We have almost 1000 articles using the OEIS templates. Direct [ ] links not counted (yet).
Just a question aside: when citing OEIS in detail, would one quote the author(s) and the year of publication for an individual sequence? Assuming that is not NJA Sloane? I mean to ask: that is OK as a scientific source for claim to 'discovery' of a sequence?
- DePiep (talk) 18:34, 27 March 2018 (UTC)[reply]
Most Wikipedia citations are more for the purpose of saying where the information came to Wikipedia from than for saying who first discovered it (although there are plenty of exceptions). And when we cite OEIS, we're not claiming by doing so (unless we state it explicitly) that that's who first discovered it. So anyway it seems completely reasonable to add author and date information to it just like we do for other kinds of publications. Since OEIS changes on an ongoing basis, it might make sense to be clear that the date parameter is the date it first appeared on OEIS, and to use a separate access-date parameter for the data of the version of that sequence that was examined when citing it. —David Eppstein (talk) 18:51, 27 March 2018 (UTC)[reply]
Yes. - DePiep (talk) 19:20, 27 March 2018 (UTC)[reply]
9. Add option to link to the OEIS as a website (top page). - DePiep (talk) 13:59, 28 March 2018 (UTC)[reply]
10. Rethink the inline tempaltes. - DePiep (talk) 13:59, 28 March 2018 (UTC)[reply]

For the section External links: {{OEIS el}}

[edit]

In the section == External links ==, dedicated template {{OEIS el}} produces a short link description:

* {{OEIS el|sequencenumber=A000045|name=Fibonacci numbers}}

Notes:

  1. I prefer to have OEIS an abbreviation not a link, because the clicking Reader should not be confused or mistake in any way.
  2. In this case, the formal name for A000045 is much longer. To have it stored in the template (for future use), one can use |formalname=Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.

- DePiep (talk) 16:32, 27 March 2018 (UTC) +additions DePiep (talk) 19:24, 27 March 2018 (UTC)[reply]

formalname (parameter)
  • The template has |formalname=, when the IEOS name is impractically long (but stil is usefull having). So:
{{OEIS el |sequencenumber=A000045 |name=Fibonacci numbers |formalname=Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1}} →
OEIS sequence A000045 (Fibonacci numbers)

Generating invalid HTML

[edit]
originally posted at Help talk:Citation Style 1/Archive 73#Cite OEIS generates invalid HTML

While updating Happy number, I tried to add "Cited in (an OEIS citation)", but noticed that every citation generates an id CITEREFSloane by default, which is incorrect HTML with more than one citation. When I tried to specify an explicit |ref= I got a cite error "Unrecognised parameter". I could not immediately see why that was, so I created the link by a bodge. This of course continued to annoy me, so I had another look this evening.

Apart from the constant id, there were two problems which are fixed in this (current) revision (testcases). The link after the final refs testcase jumps to the test citation for the live template and there are now no errors for the ref parameter displayed.

We also need to correct the default ref id. I propose a default id of

CITEREF<editor-last>_"<sequenceno>"

for which the user would add something like

{{sfn|Sloane "A12345"}} or {{harvtxt|Sloane "A12345"}}

to link to this, which seems both reasonably simple and clear. The quotes around the sequence number correspond to the quotes around the full entry title in the citation. You can see this in the (current) sandbox. In the testcases, the link after the next-to-last testcase for dates jumps to the test citation, but the live citation still has the incorrect id. Of course, I will update the documentation accordingly.

Comments welcome, especially "yes, please do it" of course. --Mirokado (talk) 22:54, 20 November 2020 (UTC)[reply]

further updates just here...

A little later I noticed that |formalname= is mentioned in the documentation, so I have restored that. --Mirokado (talk) 00:02, 21 November 2020 (UTC)[reply]

I've now updated the |ref= handling and the documentation. See the last three testcases, all three citation links jump to the live example output. --Mirokado (talk) 01:40, 26 November 2020 (UTC)[reply]