Template talk:R:ota:Meninski

Linking columns
There are multiple possibilities to link: 1. the copies from the Biblioteca Digital AECID, Example 1, Example 2, Example 3 (all accessible from the links given in the template in an orderly fashion). 2. Archive.org having the works 3. other digital presentations found through Europeana. As seen in I have already found a method whereby one can render the same link for two columns, checking if the column number is odd; and compare for example  how I link to pages of a multiple-volume work which does not have column numbers starting at zero with each volume. At the Meninski template there is also an additional complication of code because the template is for all works of the author – I have this in an even more extreme fashion in the quotation template. The issue, where I fail, is the one of mathematical creativity. How to calculate URLs from column numbers if the URLs refer to pages? For the Schweizerisches Idiotikon template and the Dillmann template the URLs are based on column numbers and now with Meninski it is different. Fay Freak (talk) 00:34, 28 August 2018 (UTC)


 * Wow, this is tricky, and I don't have a solution yet. The column numbers obviously increase more quickly than the URL page numbers, as follows:


 * Thus, the difference between the column number and the URL page number decreases steadily and changes from positive to negative. I'm afraid I haven't been able to work out a formula for determining the difference yet. In the meantime you may just have to require users to manually specify the URL. — SGconlaw (talk) 04:05, 28 August 2018 (UTC)
 * In the meantime you may just have to require users to manually specify the URL. Not really, as one who uses such scans more often downloads the whole thing so he does not know the page URLs then (or, this is what I do, it is true for the frequent users). This is why we infer the URLs by automatic methods. The meantime is generous though as there hasn’t been yet anyone who seriously wants to add Ottoman entries to Wiktionary – for the future though, for the prospective users of this template and possible other templates yet to be created which need the same formula, you understand, this is a riddle to solve. Fay Freak (talk) 07:46, 28 August 2018 (UTC)
 * Well, since the scans are available online, you can provide links to the websites on the template documentation page so that editors can look up the URLs and manually insert them into the template. I have done that in some reference templates when the page numbering of specific works is so erratic that the URL cannot be determined by calculation. I'm not sure whether there is any convenient formula to relate the column numbers to the URL page numbers, but I'll think about it some more. — SGconlaw (talk) 08:07, 28 August 2018 (UTC)
 * For erratic numbers too I have ifexpr for page ranges used, like on: . needed the same because of a few pages with images being unnumbered. Fay Freak (talk) 08:39, 28 August 2018 (UTC)
 * I have been using in some cases too, but I did not know I could use "Module:ugly hacks" in that way (I'm not familiar with Lua) so thanks for pointing that out. I was referring to cases where the page numbering is very unpredicable due to misnumbering, especially when the work is old. Also, some old works do not have any page numbering at all. — SGconlaw (talk) 09:27, 28 August 2018 (UTC)

OK, I figured it out! The formula for example 1 is as follows:

The formula works as follows:


 * 1) Check if the column number is odd or even.
 * 2) If it is even, then divide the column number by two to determine its sequential position, then add 26 to the result.
 * 3) If it is odd, then add 1 to the column number first before dividing it by two, then add 26 to the result.

— SGconlaw (talk) 13:28, 28 August 2018 (UTC)

Now the complement will have its pages automatically linked. There are three irregularities in the numbering which I have no plans to deal with: In total this amounts to 23 from a total of 1014 pages which cannot be automatically linked, that is to say that the template can link automatically to 97.73 % of the Complement. The Thesaurus has columns 4787–4790 twice after 4790, which results in 25 pages from 4056 not being automatically linked, i. e. 99,38 % can be linked, if there aren’t more irregularities in the other three thesaurus volumes. Hola and  or whoever cares about Ottoman Turkish: Use Meninskis’s dictionaries liberally because this template automatically puts pagelinks to them, and steal the code if necessary. Fay Freak (talk) 18:20, 28 August 2018 (UTC)
 * 1) For some reason the book begins being numbered by pages 16 pages, then follow column 17, column 18 and so on.
 * 2) There are column numbers 777*, 777**, 777***, 777**** after column 777 on two pages.
 * 3) The worst: 980–989 are assigned twice each, after column 989 comes column 980 again.
 * If you can’t deal with these using or , you may just have to document the irregularities on the template documentation page and advise users to specify the URL manually (and provide a way to do that). — SGconlaw (talk) 01:39, 29 August 2018 (UTC)
 * My suggestions would be:
 * For the work with pages 1–16, allow users to specify the page numbers using a statement like:.
 * For the column numbers in the form "777*", test for them using a series of  statements.
 * For the duplicated column numbers, advise users to specify "980A", "981A", etc., for the second set, and check for these using  statements.
 * — SGconlaw (talk) 03:16, 29 August 2018 (UTC)