Module talk:bibliography
Add topicSpace between journal issue and number
[edit]Hi @AshFox! I'm really glad you are showing interest in the project.
Just a small note about diff, the lack of space between volume and issue was not a mistake but an APA guideline. That said, we are not bound to APA, we can decide on a style that works best for us. In this case I lean on the side of not having a space, though I don't feel strongly either way and will leave it up to the community.
Anyways, the module is still in its early stages, so if you find a missing feature or a bug do not hesitate to tell me about it, your feedback is valuable! :) Catonif (talk) 19:45, 3 May 2025 (UTC)
- @Catonif Sorry, I thought it was a mistake. Because it seemed to me that the combination of italic and regular text so close «69(4)» is not quite beautiful, like «69 (4)». As for me, the version with a space is better.
- I am very interested in your project and in the future I want to transfer to it all the references of the languages that I edit ‒ Old Novgorodian (
zle-ono) and Old Ruthenian (zle-ort). But now I'm at a dead end... because I can't create Module:Quotations/zle-ono/data properly. Once the module for Quotations for zle-ono was created, I could continue and finish work on Old Novgorodian Bibliography.
AshFox (talk) 13:36, 6 May 2025 (UTC)
Suggestion
[edit]@Catonif Hello, it's me again.
- I saw that you combined everything in one module after the recent update. But I noticed that links stopped displaying, for example, to the Internet Archive, Google Books, URL, DOI, etc. in Mycenaean Greek, Old Novgorodian, Russian. Is this a bug?
- I also suggest changing the location of the bibliography list (it looks like this is the
bib_page =parameter) from the... entry guidelinespage to... entry guidelines/Bibliography. So that when you click on DND2, for example, it will take you not to the list in WT:Old Novgorodian entry guidelines, but to WT:Old Novgorodian entry guidelines/Bibliography. And in the root... entry guidelinesyou can add only the following paragraph:
==Bibliography==
{{also|WT:Old Novgorodian entry guidelines/Bibliography}} AshFox (talk) 16:32, 9 May 2025 (UTC)
- @AshFox Hello. (1) Yes! It was a bug, thank you for noticing. I fixed it. (2) You can customise the bibliography page for each language from inside the module with that parameter. Probably one day all languages will have their bibliography under the same page, like
Wiktionary:LANG entry guidelines/Bibliographyor perhapsAppendix:Bibliography/LANG, I do not know. I set it to what you suggest for Old Novgorodian and Russian. The reason why I preferred linking to WT:AGMY with Mycenaean is that I think it is not easy to understand the difficult conventions of Aegean studies without knowing the information that is on that page, so making{{R}}link to it every time increases the chances that readers will read it and understand our Mycenaean entries more (normally, no casual editor would stumble on an guideline page). Though yes, I agree that for any other language having the bibliography on a separate page is more preferrable, that is why I left it up to the data module for now. Catonif (talk) 13:34, 10 May 2025 (UTC)- @Catonif Thank you for the great help you've given with
{{R}}and{{Q}}. - I was wondering if it would be possible to add template in
{{}}support to Module:bibliography? For example{{comment|abbr.|abbreviation}}= abbr.. And most importantly, I would need this to use the{{lang|zle-ono|...}}template to change the text font to Old Cyrillic. For example, in Zholobov (2005) instead of this:- Zholobov, O. F. (2005). “тридєвѧто анєєло тридєвѧ ароханєло (функция и формы числительных в берестяной грамоте № 715).” , pp. 32‒43.
- It is highly desirable that this be the case:
- Zholobov, O. F. (2005). “тридєвѧто анєєло тридєвѧ ароханєло (функция и формы числительных в берестяной грамоте № 715).” , pp. 32‒43.
- Or is the module unfortunately not compatible with templates in
{{}}? AshFox (talk) 20:02, 19 May 2025 (UTC)- @AshFox Added the code to allow that, let me know if any bugs occur. Note that whenever the language tagging is on the whole title you can just do
zle-ono:тридєвѧто анєєло тридєвѧ ароханєлоand it will format correctly (in that example it would not work because the tagging is partial). Catonif (talk) 19:32, 20 May 2025 (UTC)- @Catonif You are a magician, thank you. The ability to use templates in
{{}}in a module is very helpful.- Suggestion: How about adding support for the Academia.edu site to the
linkparameter? (as it is done with IA or GB) A lot of articles are posted there by the authors themselves, in open access. I'm not insisting, I'm just suggesting. I just often use the URL to this site in the template that I am currently filling (...data/zle-ono). - Question: If some author was published 2 or more times in one year, is it necessary to put the letters
a,bnear the year in the parameteryear = "2004a",year = "2004b"in data? For example Gippius (2004a) and Gippius (2004b). Because I saw something similar in"GORILA"in Module:bibliography/data/gmy. Is this desirable or not necessary?
- Suggestion: How about adding support for the Academia.edu site to the
- AshFox (talk) 06:34, 21 May 2025 (UTC)
- @AshFox Thank you for the helpful feedback! (1) I added
academia = "5882067"syntax. (2) As far as I understand, including the distinguishing letter is a common practice in bibliographies. I would recommend keeping it to clearly differentiate the works, both in short citations and in the full references. Catonif (talk) 13:39, 21 May 2025 (UTC)
- @AshFox Thank you for the helpful feedback! (1) I added
- @Catonif You are a magician, thank you. The ability to use templates in
- @AshFox Added the code to allow that, let me know if any bugs occur. Note that whenever the language tagging is on the whole title you can just do
- @Catonif Thank you for the great help you've given with
Help with entry_url
[edit]@Catonif hello. Please help with entry_url... I am creating Carpathian Rusyn Bibliography (data/rue) and I have encountered a problem... There are online dictionaries where the query and search for a word in the URL occurs in Latin letters, without taking into account the fact that the language itself uses, for example, Cyrillic. Dictionary Kercha (2007) has a website https://jazyk.rueportal.eu/slovnyk. Word Carpathian Rusyn реселю́в (reseljúv) can be found at the link https://jazyk.rueportal.eu/slovnyk/reseljuv. How can I make it so that, for example, {{R|rue|Kercha:2007|реселю́в|id=reseljuv|p=266|vol=2}} creates a template that displays "реселю́в", but the link leads to ".../reseljuv"?
And I need it not only here, for example a dictionary for Old Ruthenian... for example the word хво́ꙗ (xvója) in the dictionary HSBM he has a site where the link to the word looks like this: https://verbum.by/hsbm/khvoya. AshFox (talk) 16:14, 30 May 2025 (UTC)
- @AshFox Hello! Sorry, your implementation was actually flawless, it was me who had removed the
|id=argument. You can now do|id=reseljuvand it will work as you intended. If you want, by using|set_args=, we can actually make it so that these IDs are automatically generated (manual overriding allowed), we just need to have a list of all the differences the site's transliteration has from ours. I can set up an example if you're interested. Catonif (talk) 11:32, 1 June 2025 (UTC)- @Catonif oh, let's try to make automatic generation for Kercha (2007) (data/rue). Please help me with this. Of the differences from what we have (Carpathian Rusyn transliteration), for example, indicate 3 letters:
х = ch(for example{{R|rue|Kercha:2007|хата|id=chata}}= Kercha (2007), “хата”),ы = y,ӱ = u, I will add the rest myself. At the same time, if necessary, it will be possible to use|id=to force the indication of the "transliterated word"? As I understand it - yes. If so, then it will be just great. AshFox (talk) 18:31, 1 June 2025 (UTC)- @AshFox Alright, I set automatic translit for the ID in the module. If it looks complex, all it is doing is actually just stripping diacritics (with
lang_rue:makeEntryName), dealing with the differences in transliteration (withmw.ustring.gsub) and fully transliterating the rest of the characters (withlang_rue:translit). You can still override the ID to any value or even to-to get rid of the link altogether. Another thing that might interest you is that you can set updefault_pagename = true(e.g. Cunia 2010 in data/rup) in a source to default the entry name to the page name in case no entries are specified. (It's hard to keep the documentation up to date). :p Catonif (talk) 19:55, 1 June 2025 (UTC)- @Catonif Thank you very much. Now Carpathian Rusyn Bibliography looks complete. With the parameter
default_pagename = truethe template Kercha (2007) works perfectly ‒ in any scenarios. Both automatically (of page name), and whenentryis specified, and whenidis forcibly specified. Everything as it should be. AshFox (talk) 19:12, 2 June 2025 (UTC)- However, now I tried to transfer all this to HSBM for Old Ruthenian Bibliography (data/zle-ort) and ran into a problem. I conduct all tests using this entry хвоꙗ (xvoja) and as you can see, the link to the dictionary page completely refuses to work in all scenarios if the
idparameter is not specified. Could you look at the code (data/zle-ort)... and maybe see the error... because I don't understand why it is like that. The only explanation I can think of is that there is a-symbol in the Old Ruthenian language codezle-ort. AshFox (talk) 19:34, 2 June 2025 (UTC)- Your implementation was correct, the problem was MOD:zle-ort-translit refusing to transliterate text with too many non-Cyrillic characters in it, as it didn't recognise the script, so I hardcoded it into the function. Catonif (talk) 22:39, 2 June 2025 (UTC)
- However, now I tried to transfer all this to HSBM for Old Ruthenian Bibliography (data/zle-ort) and ran into a problem. I conduct all tests using this entry хвоꙗ (xvoja) and as you can see, the link to the dictionary page completely refuses to work in all scenarios if the
- @Catonif Thank you very much. Now Carpathian Rusyn Bibliography looks complete. With the parameter
- @AshFox Alright, I set automatic translit for the ID in the module. If it looks complex, all it is doing is actually just stripping diacritics (with
- @Catonif oh, let's try to make automatic generation for Kercha (2007) (data/rue). Please help me with this. Of the differences from what we have (Carpathian Rusyn transliteration), for example, indicate 3 letters:
@Catonif I ask for help with another problem, in addition to the above. While transferring template {{R:zle-mbe:HSBM}} to data/zle-ort, a problem arose with the link to the book on the Internet Archive. The thing is that sometimes there are books, their scanned versions, where the pages are not cut in half. Example [1]. The way out of this situation was that in |pageurl= it was possible to set the parameter of pages ‒ division into halves /2, as in these volumes of the dictionary, and I did so: |1|2|5|6|7|8|11|13|14|15|16|17=/2 (that is, if, for example, we need page 100, then with the parameter /2 this number was divided in half and page 50 was opened, where the required "double page not cut in half" was found). The existing code does not allow adding the /2 parameter. Only 1 (+1 page) and -1 (-1 page). --AshFox (talk) 20:04, 2 June 2025 (UTC)
- @AshFox The
set_pageparameter is often just a number, but having considered this (and even less common much more complex cases) it can also be a function, e.g.set_page = function(x) return x/2 endwould do what you are asking. Tomorrow I might consider adding support for strings as syntactic sugar, so you could do something likeset_page = "/2"to achieve the same thing (trying to specify it without the quoation marks, as you must have noticed, throws an error as it goes against Lua's syntax). But goodnight for now. Catonif (talk) 22:47, 2 June 2025 (UTC) - @AshFox I had fun setting up the string operations, which can chain multiple arithmetic operations together, precede the string with the page number prefix and deal with missing or repeated pages in the scan. Take as a complex example DMic. vol. 1 in data/gmy,
set_page = "n /2-3 >169+1 >229+1"which means that,nis the prefix to be added to all pages (I will probably get rid ofn = trueas I don't like having special cases in module syntax),/2-3is the operation applied to all pages and>169+1means all inputs greater than 169 will increase by one in the link (in this case due to the page being repeated). Spaces are purely aesthetic and are ignored by the module, they can be put wherever they look nicest. Catonif (talk) 23:40, 3 June 2025 (UTC)- @Catonif Oh, that sounds familiar. For example, in the old template
{{R:zle-ono:NGB}}if you look at the code and the|pageurl=parameter you will see that there are MANY such page skips after a certain page. The thing is that in the volumes of this edition, in addition to the pages, there are inserts with illustrations that do not have page numbers... that's how it turned out. So far I'm afraid to transfer this madness to NGB I, NGB II, NGB III ... NGB VII, but when I do, I hope to take an example from "DMic.", I've seen it. AshFox (talk) 05:23, 4 June 2025 (UTC) - @Catonif hi, i see you updated Module:bibliography/data/rue#L-88. I don't fully understand what
\u{301}means. Could you please help update Module:bibliography/data/zle-ort#L-209? In the future I will try to follow this example and not disturb you. AshFox (talk) 17:36, 5 June 2025 (UTC)- @Catonif I already understood that
\u{301}is an accent. But a problem arose that was not there initially. Now the accent mark is not "killed"... it is still put in any outcomes. Examples from data/rue & data/be:{{R|rue|Kercha:2007|реселю́в}}= Kercha (2007), “реселю́в” → gives a link to .../slovnyk/reseljúv, although it was originally .../slovnyk/reseljuv.{{R|be|ESBM|суцэ́льны}}= ESBM, “суцэ́льны” → gives a broken link to .../esbm/sucélny, although it should .../esbm/sucelny.{{R|be|ESBM|супо́льны}}= ESBM, “супо́льны” → gives a broken link to .../esbm/supólny, although it should .../esbm/supolny.
- AshFox (talk) 07:11, 6 June 2025 (UTC)
- @Catonif I already understood that
- @Catonif Oh, that sounds familiar. For example, in the old template
Suggestions from Juwan
[edit]- in the generated appendices, add an "edit data" button to redirect people to the data modules
- identifier links: add OL, LibraryThing, LCCN and Wikisource
- locations and publishers: in data/pt for the entry
Viana:1914, the book was published in several cities by different companies. not entirely sure how to format this, possibly so: "Paris: Aillaud; Lisbon: Bertrand; Belo Horizonte, Rio de Janeiro, São Paulo: Francisco Alves".- on this note, the location-publisher formatting should use colons, not semicolons
editions(to mirrorvolumes). the entryCunha:DELPrequires it (cf. Cunha, Antônio Geraldo da (1982), “bibliography”, in Dicionário etimológico Nova Fronteira da língua portuguesa [Nova Fronteira etymological dictionary of the Portuguese language] (in Portuguese), 1st edition, Rio de Janeiro: Nova Fronteira)- code quality: rewrite to use the HTML libraries included in Scribunto
- update the identifier links to be
<small>
- update the identifier links to be
Juwan 🕊️🌈 02:45, 2 February 2026 (UTC)
- @Juwan Thanks for the suggestions! :) Number one is already there, you have to click the "show editors utilities" in the left part of the screen (or somewhere else if you're on a different skin), and it will appear. For number three I'm thinking something like
- Works with just one of each will follow the previous syntax. What do you think? For point four alright, I'd also have to make a parallel
publishers = { { location = "Paris", publisher = "Aillaud" }, -- ... },
|ed=parameter. Regarding the HTML module, it may be more correct to use it, but I think it both slows things down and makes it harder to read and understand the code, since the tags are for formatting rather than infrastructural. Catonif (talk) 22:47, 6 February 2026 (UTC)- looks all good to me! Juwan 🕊️🌈 13:39, 7 February 2026 (UTC)
- @Juwan I added the identifiers from
{{quote-book}}, see full list. I didn't add Wikisource yet, I'd like to think it through first. Distinct publisher-location combinations are now allowed withpublisherssyntax described above, and I'm using a colon. I'm sure I had a reason to use a semicolon, but I've seen forgotten it, so it must have not been an important one. I addededitionsand parameter|ed=, do tell me if you appen to stumble upon any bugs with it. You can now also specify editions as pure numbers and the ordinal suffix will get added automatically. You can see the various testcases at AP:BIB:test. There's also now the option to call templates inside ofnote, which I saw you noted. If more people ask for smaller ID links I will make them so. Catonif (talk) 13:25, 11 February 2026 (UTC)
- @Juwan I added the identifiers from
- looks all good to me! Juwan 🕊️🌈 13:39, 7 February 2026 (UTC)
Possible bug: not replacing variables using $...$
[edit]@Catonif Greetings! It seems that variables like $ENTRY$ do not get replaced with its value when the link is generated via function(data), such as: Module:bibliography/data/eo#L-1438 & Module:bibliography/data/jbo#L-52
- Good result:
{{R|jbo|L:2025|entry=ku'i}}→ L (2025), “ku'i” - Bad result:
{{R|jbo|Mublin:2008|entry=balvi|section=Chinese}}→ Mublin (2008), §Chinese: “balvi”
I attest that this feature was working when I added it to: Special:Diff/89199478. TranqyPoo [💬 | ✏️] 04:51, 16 March 2026 (UTC)
- Hi @TranqyPoo! I see you're still going strong. :) The approach I had in mind in functions is
"string"..data.entry.."string"(or any other alternative way of string concatenation) in place of"string$ENTRY$string", where the strings were merely a shorthand to not write a function. In other words, conceptually, the way I thought of it at least, the string syntax is a less versatile alternative to functions. We can easily make the string replacements run on the functions' output as well, however if it used to work and then I removed it (I'd have to check better in what diff I did so, as I have no memory of doing this) that line of thinking maybe was causing bugs. Apologies for evidently not having tested my change sufficiently. - The ultimate point is that I think I tend to give inputs from the computer's point of view. :) For example, I use
set_page = 3instead ofset_page = "+3"because while they work exactly the same and the latter looks more consistent, it has to run through a dozen of regular expressions to be properly parsed while the former is a simple addition in a line of code. Similarly, we can run the replacements on a function's output, but since we were already in a function we're only a couple of key presses away from substituting them by ourselves, so might as well. I'd be happy to be convinced of the contrary, and the change to make you code work is ultimately very easy, so don't hesitate to argument an opposite viewpoint. :) Catonif (talk) 09:56, 16 March 2026 (UTC)- Thank you for clarifying! I have limited experience with Lua and so, I defer to your expertise on whichever approach is best for this module. To be frank, I have been deriving my knowledge from reviewing other bib/lang modules. Given that it is likely that the average Wiktionarian does not have extensive Lua knowledge, I intend to add a Common configurations header to the documentation. You may alter it that best fits your approach. TranqyPoo [💬 | ✏️] 14:10, 16 March 2026 (UTC)
Page linking by edition
[edit]@Catonif: Greetings again! I am trying to automatically attach a page URL when a specific edition is called. You can see my attempt here. I'm using the same logic as one of the Esperanto entries, except it seems that data.edition is not supported (as also identified in the module's documentation). You can create the issue by specifying:
{{R|en|AHD|edition=2nd college|page=460}}.
Would you kindly add support for such a feature (if that is indeed the issue)? This is not urgent. TranqyPoo [💬 | ✏️] 20:26, 2 June 2026 (UTC)
- @TranqyPoo Hi! You should be able to specify
page_urland similar within the edition node, much like volumes. I have an example at mod:bibliography/data/dlm, "Bartoli", though that's actually within volumes (but it would work if it were mono-volume), although going with this approach would lose you the alias (I have not set up volume/edition aliases, maybe they could be useful?). The reason why your code doesn't work isdata.edition == ("2nd college" or "2nd College"). The "or" operator takes two Boolean values and returns a Boolean value. Any string that isn't the empty string is always truthy, so writing"string" or "other string"is equivalent to writingtrue or true, which is of course equivalent totrue, so the meaning of what you wrote, although it makes sense in English, to a machine readsdata.edition == true, which is false. The correct syntax is(data.edition == "2nd college") or (data.edition == "2nd College")(not sure if the parentheses are needed). My personal suggestion would be simply not to support the other alias and put the page_url in the edition node. If you want to support the alias while putting the page_url in the edition node, until I add built-in support for edition/volume aliases, would be to useset_args, which is a general-purpose function that the module will call before doing anything else to sort out arguments before they are processed, this wayset_args = function (data) if data.edition == "2nd College" then data.edition = "2nd college" end end, with proper spacing of course. Although set_args is powerful, it would be a better design if we didn't have to rely on it. If I don't implement this is a couple of weeks or so feel free to ping me again and I'll try to implement volume/edition aliases. Catonif (talk) 00:13, 3 June 2026 (UTC)- Thank you so much!!! I appreciate you explaining this to me, when I feel that I should have verified that oopsie myself; I am so rusty 😬. Given what you recommend, I do not feel that I would use edition/volume aliases, but it does sound like a neat idea in the future...perhaps when more editors adopt this template/module. Again, thank you; you are my knight in shining armor! TranqyPoo [💬 | ✏️] 01:03, 3 June 2026 (UTC)