Template talk:cite-book

Indentation
This uses a clever system to stop users doing their own indentation. Clever, yes, but why? Mglovesfun (talk) 10:08, 23 June 2010 (UTC)

Formatting of poems is broken
This template is broken for poetry:

This doesn't indent properly and it isn't recognised by the quotation-hiding JS. Inductiveload 23:56, 22 March 2011 (UTC)
 * First of all, you should use in entries- it's more frequently updated and and more likely to reflect current policy. Second, see Quotations Nadando 00:05, 23 March 2011 (UTC)
 * Thanks for the prompt reply. I've added a "see-also" to the template to make this clear to other bumblers like me who stumble on this template first. As for the formatting, that's what I was doing anyway, so that's OK! Inductiveload 02:40, 23 March 2011 (UTC)

Additional "url2" parameter

 * regarding your edit summary here where you noted that "T:cite-book currently does not support url2, unlike T:quote-book" and tagged me, when would you need to use url2 with ? — SGconlaw (talk) 19:49, 28 October 2018 (UTC)
 * For giving alternative links for the same hosted on different servers. So I thought in that it is non-standard to use a plain-link to the full work around the title which is what is now done as otherwise links to works are displayed as [n]. This case is not so good an example because the Dillmann template now links a) to pages on one server if a page number is passed b) to the full work on archive.org in any case c) to a digitization project via entry, i. e. they are of three kinds and two are conditional only. Imagine better : Currently it goes over woerterbuchnetz.de, it could also link via DWDS. This is not saying which way additional links would be displayed – not too intrusive, not too hidden. Fay Freak (talk) 20:07, 28 October 2018 (UTC)

Translation parameter
Exists in but not. – Jberkel 05:19, 14 December 2018 (UTC)
 * Do you mean trans-title (to provide for a translation of the title of a work)? Do you want that added to the templates? — SGconlaw (talk) 06:25, 14 December 2018 (UTC)
 * no, something like trans-passage. See Special:Diff/47264081/51084425. Jberkel 07:08, 14 December 2018 (UTC)
 * Oh, you mean translation. Yes, that feature was not built into the templates, as it is a feature from . Is it likely to be used often? — SGconlaw (talk) 07:29, 14 December 2018 (UTC)
 * For English entries probably not that often, but for non-English entries it would definitely be useful. – Jberkel 11:01, 14 December 2018 (UTC)
 * OK, let me work on it. — SGconlaw (talk) 19:04, 14 December 2018 (UTC)
 * ✅. I've added translation. Let me know if it works properly. — SGconlaw (talk) 04:12, 21 December 2018 (UTC)
 * works fine, thanks. One unrelated thing I noticed is that we don't include HTML5 language attributes to mark up non-English content in citations/quotes. Does this require the language code changes? – Jberkel 09:35, 21 December 2018 (UTC)
 * Probably because I have no idea what those are. Could you please explain? Why is such markup useful? — SGconlaw (talk) 09:37, 21 December 2018 (UTC)
 * Now that quote templates take a language code we can add the language code to the generated HTML, to mark the content as written in another language (if not specified it defaults to the document's language, English). This is useful for accessibility, e.g. screenreaders (MDN documentation). If you want I can take a look at it. – Jberkel 09:56, 21 December 2018 (UTC)

Sure. Would that be for  only, or both   and  ? — SGconlaw (talk) 10:26, 21 December 2018 (UTC)
 * For anything which outputs non-English text. – Jberkel 12:28, 19 January 2019 (UTC)

Url parameter
is no longer used, e.g. the cite in Special:Diff/47018325/51284977 doesn't show as link. Has it been renamed? – Jberkel 12:28, 19 January 2019 (UTC)
 * That's odd. Let me check. — SGconlaw (talk) 12:31, 19 January 2019 (UTC)
 * ✅. There was a coding error which should now be fixed. — SGconlaw (talk) 20:43, 19 January 2019 (UTC)
 * Looks like it's not working again, see R:Carro 1888 (which is run by this template).-TagaSanPedroAko (talk) 19:40, 7 February 2023 (UTC)
 * Seems the current issue is due to a possible coding error introduced into cite-meta in the latest version. TagaSanPedroAko (talk) 19:45, 7 February 2023 (UTC)
 * pinging who recently worked on . — Sgconlaw (talk) 20:27, 7 February 2023 (UTC)

Translator parameter
, the parameter trans/translator/translators simply throws the translator's name directly after the closing parenthesis of the date, without a space or punctuation mark or anything. See R:sga:Thurneysen for an example. Can this be fixed, please? —Mahāgaja · talk 20:20, 24 May 2019 (UTC)
 * OK, let me check. — SGconlaw (talk) 03:01, 25 May 2019 (UTC)
 * Thanks! I think that the translator info should come after the title, maybe like this:
 * Rudolf Thurneysen (1940, reprinted 2003), A Grammar of Old Irish, transl. D. A. Binchy and Osborn Bergin, Dublin Institute for Advanced Studies
 * How does that look to you? —Mahāgaja · talk 11:44, 25 May 2019 (UTC)
 * Mmmm, not really sold on that. All the (offline) citations I've seen have the translator's name before the title. — SGconlaw (talk) 18:35, 26 May 2019 (UTC)
 * What about:
 * Rudolf Thurneysen (1940, reprinted 2003), transl. D. A. Binchy and Osborn Bergin, A Grammar of Old Irish, Dublin Institute for Advanced Studies
 * then? I do feel it makes more sense to have "transl." before the translators' names. For that matter, I wish editor/editors gave an output like "ed. Ed Itor" rather than "Ed Itor, editor". Otherwise there are just too many things separated by commas. —Mahāgaja · talk 12:45, 27 May 2019 (UTC)

First tie putting book as a ref
Hi, I'm trying to put this info as a book reference. https://www.researchgate.net/publication/280191520_Yuri_Dolgopolov_A_Dictionary_of_Confusable_Phrases_More_Than_10000_Idioms_and_Collocations_Jefferson_NC_McFarland_2010_v397_pp_ISBN_978_0_7864_5855_4_4795_55_review I am struggling, can anyone offer help as to how to format this?Halbared (talk) 14:54, 24 June 2020 (UTC)
 * I would format it as follows:


 * You can add other parameters like chapter and page or pages as necessary. —Mahāgaja · talk 15:25, 24 June 2020 (UTC)
 * thank you. Halbared (talk) 22:41, 24 June 2020 (UTC)

Paywall link
I think we should have a parameter like paywall if link URL is paywall access that adds a lock icon. -- 09:06, 11 May 2021 (UTC)
 * Agreed (you probably know this already, but Wikipedia does something along those lines), though I don't have the energy or attention to implement it or see what others think for the time being. That's why I only mentioned it a offhand comment rather than bringing it up in a way that would facilitate discussion. Hazarasp (parlement · werkis) 09:24, 11 May 2021 (UTC)
 * Shouldn't be too difficult to implement. We already have something like it at . However, I think we should wait for the outcome of the discussion about that is taking place at the Beer Parlour. — SGconlaw (talk) 13:45, 11 May 2021 (UTC)

Wrong format
This template produces citations in the wrong format. They should start with the year, for instance. DAVilla 08:48, 26 June 2021 (UTC)
 * no, references don’t generally begin with the year. If you want to add a quotation to an entry, use . — SGconlaw (talk) 09:05, 26 June 2021 (UTC)
 * Oh sorry, wrong purpose then. DAVilla 09:13, 26 June 2021 (UTC)

Missing space
there's a missing space between the year and translator here (1991 cite, references).– Jberkel 11:47, 4 March 2022 (UTC)
 * Also, how does one add the original (here Italian) title? – Jberkel 12:02, 4 March 2022 (UTC)
 * I'll look into the spacing issue. What do you mean by the original title? — SGconlaw (talk) 20:23, 6 March 2022 (UTC)

line value is not displayed

 * Code:
 * Result: —Игорь Тълкачь (talk) 13:13, 2 April 2022 (UTC)
 * . I'm not sure why they were missing. — Sgconlaw (talk) 14:23, 22 March 2023 (UTC)

Title not italicized?
Please pardon me—I am primarily (and secondarily) a Wikipedia editor. I am puzzled—why is the title not italicized, as is standard for longer works? DocWatson42 (talk) 12:33, 22 March 2023 (UTC)


 * yes, it is. Can you give an example of when it is not italicized? — Sgconlaw (talk) 14:17, 22 March 2023 (UTC)


 * Pruett, for the template Template:R:en:DAFN in mobile using Safari 15 under iOS v15.7.3. (The template's output looks fine in desktop under macOS 13.2.1, in both Firefox v111.0.1 and Safari Version 16.3.)  So it's very likely it's the template. — DocWatson42 (talk) 01:49, 23 March 2023 (UTC)
 * it must be something to do with your browser, as the title Dictionary of American Family Names appears italicized when I view the template and the entry. — Sgconlaw (talk) 04:12, 23 March 2023 (UTC)
 * Which browser? —DocWatson42 (talk) 04:14, 23 March 2023 (UTC)
 * the one(s) you’re using to view this website. I’m using Safari on an iPad at the moment (latest version of the app and iOS) and can see the italics. — Sgconlaw (talk) 04:21, 23 March 2023 (UTC)
 * Actually, I meant your browser, but you also answered my question. Have you tried other browsers? —DocWatson42 (talk) 04:45, 23 March 2023 (UTC)
 * yes, I can see the italics on my MacBook with Mozilla Firefox too. — Sgconlaw (talk) 05:53, 23 March 2023 (UTC)
 * Thank you. Have you tried using a phone?  I forgot to specify that have been using an iPhone.  (Though at this point I suppose I should just take it up with the technical folks.  Would that be Wikimedia Phabricator?) —DocWatson42 (talk) 06:04, 23 March 2023 (UTC)
 * it is italicized on my iPhone (Safari on iOS 16.3.1) as well. You might need to try updating your browser and operating system to the latest available, and see if that resolves the issue. If not, yes, I guess the Phabricator would be the best place to report the issue. — Sgconlaw (talk) 13:16, 23 March 2023 (UTC)
 * Thank you again. The browser and OS are already the latest available for the phone, which is an iPhone 6S+.  (Ancient, I know.) —DocWatson42 (talk) 04:52, 24 March 2023 (UTC)

quote-book compatibility
I'm interested in making the cite-* templates use the same numbered and named parameters as their quote-* counterparts, but I notice that while quote-book requires the language code as 1, in cite-book it's an optional named param lang and 1 is used for the year. I can use a bot to rename lang to 1 in all of the existing calls to cite-book (included any R: templates), but before undertaking that I wanted to solicit feedback? Would switching 1 from  to   be too drastic of a change of editors already used to the cite- templates, or would better compatibility with the quote- templates be worth it? JeffDoozan (talk) 19:34, 25 February 2024 (UTC) to be added in front of the value given to chapter and entry, which would tell the template to display the value as-is and not process it. (This feature currently applies to volume.) — Sgconlaw (talk) 12:36, 2 May 2024 (UTC)
 * Maybe the issue has existed for longer, but I noticed it today. —Mahāgaja · talk 12:45, 2 May 2024 (UTC)
 * you know, I wonder why the module is evaluating “MIL” as a chapter number. As far as I know it’s not a valid Roman numeral. — Sgconlaw (talk) 13:04, 2 May 2024 (UTC)
 * No, it's not, but I suppose the module wasn't written to detect the validity of Roman numerals. —Mahāgaja · talk 13:09, 2 May 2024 (UTC)


 * Oh no but I like to give the parameters to the template in the same order as they appear in the output, and lang appears after the title, but I can't provide unnamed parameters after named ones, that is messy. Also I agree with Victar. A shame I missed my chance to oppose, nguè nguè. I'll try not to be borderline barratrous I suppose. Catonif (talk) 16:35, 18 June 2024 (UTC)

What is your definition of "not breaking anything"? The lang parameter in is supposed to indicate the language that the source is written in, which is very often NOT the same as the language of the entry it's used on (e.g. an English entry citing a book in German for its etymology), whereas in  those are supposed to be the same by default due to the nature of how this template is used (e.g. an English quote should come from a book written in English). Since you merged the functionality of passage with that of 's text (or at least I think that's what triggered it), now any entry in language  that cites a book written in language   and uses passage will add that entry to  Category:  terms with quotations  (demonstrations  and ). Some categories, such as Category:Russian terms with quotations and Category:Slovene terms with quotations, almost hilariously, are now entirely filled with entries for other languages. Some more easily visible examples show up here and here; plenty of other Latin-script entries are hiding among the actual respective English and German words throughout the bodies of these lists, making it effectively impossible to navigate them on a language basis. I hope you can appreciate the need to fix this ASAP— and I don't mean by running a bot to add  to every page even nocat doesn't work. :) — 2600:4808:9C31:F400:29E8:5BF2:7E89:3679 03:38, 26 June 2024 (UTC)

Missing comma, and date format
the comma between the author's name and the chapter or entry seems to have disappeared: see. Also, if date is used, the date is displayed in the format "2024 May 1". This is appropriate for quotations, but not so much for references—I think the date should remain in the format "1 May 2024", and if a month and year are specified they should be displayed as "May 2024" rather than "2024 May". — Sgconlaw (talk) 12:45, 2 May 2024 (UTC)


 * @Sgconlaw, it looks like the old format has no comma between author and title and included a comma between author and chapter/entry. Should we match the old style or always have a comma between author and chapter/title?
 * (old)
 * (new)
 * (old)
 * (new)
 * JeffDoozan (talk) 21:15, 2 May 2024 (UTC)
 * oh, I see what happened at . The reference template was edited so that it does not have a default year of publication. Thus, there was no year between the author and the title, and the lack of a comma made the reference look odd. I think it would be best if I make the 1st edition of the work the default, so there will always be some year specified. That should solve the issue for that template at least. As to your question about whether a comma should be added, let me think about that a bit more. — Sgconlaw (talk) 22:48, 2 May 2024 (UTC)

Pseudo-Roman numerals in entry names
I'm not sure you saw this comment when I inserted it into an old thread, so I'm repeating it in a new thread: The merger of the functionalities of cite-book with those of quote-book has the consequence that entry is interpreted as identical to chapter, and that letters that happen to occur in Roman numerals are interpreted as Roman numerals. For example, at mil, R:DIL and R:ga:Ó Dónaill are both displaying "chapter MIL" instead of displaying a dictionary entry called mil. 07:56, 8 May 2024 (UTC) —Mahāgaja · talk 07:56, 8 May 2024 (UTC)
 * Seems that "Module:quote" should (1) check for valid Roman numerals (perhaps using or its underlying module) since "MIL" is not such a numeral; and (2) perhaps allow users to add   in front of a parameter (e.g., !MIL) to tell the template not to process the value but display it as-is, which has been implemented for volume. — Sgconlaw (talk) 09:25, 8 May 2024 (UTC)
 * , I added the suggested   prefix handling for chapters/sections and then configured cite-book to always add a   prefix to entry. A double   will produce   so this fixes mil and dill without clobbering (theoretical, not used in practice) entries on !Kung. I'll also check if there are any existing chapter values that start with   and adjust them as needed. JeffDoozan (talk) 13:42, 8 May 2024 (UTC)
 * thanks! Mmmm, I wonder if  should be turned on by default for entry? Might there be any situations where that parameter should contain a Roman numeral? (Can't think of any offhand …) — Sgconlaw (talk) 13:53, 8 May 2024 (UTC)
 * Theoretically in our own entries for roman numerals, e.g. IV. I doubt that we ever cite other dictionaries in such entries in practice, but in principle we could. But even then, if we've specified IV, we probably do want it to say “IV” in Suchandsuch Dictionary, not Chapter IV. —Mahāgaja · talk 14:10, 8 May 2024 (UTC)
 * I notice that R:OneLook is still producing "chapter DILL" at dill, I guess because that template uses cite-web rather than cite-book. —Mahāgaja · talk 14:03, 8 May 2024 (UTC)
 * I do think it would make sense to implement checking for valid Roman numerals, which would immediately eliminate the templates treating "DILL" and the like as numerals. Then the  prefix could be used specifically for indicating that a valid Roman numeral should not be treated as such. — Sgconlaw (talk) 15:44, 8 May 2024 (UTC)
 * I wonder if the best solution wouldn't be to separate entry and chapter into separate parameters again, considering Jeff just had to undo the fix he applied earlier today on the grounds that it breaks how chapter works. —Mahāgaja · talk 21:35, 8 May 2024 (UTC)
 * I think this is the best solution since it would cleanly separate the two and even allow them to be used together as requested here. I'm short on time this month but I'll implement it when I get a chance. JeffDoozan (talk) 15:39, 9 May 2024 (UTC)
 * We would still need some way to suppress the value of chapter from being treated as an Arabic or Roman numeral (for example, by using the prefix ). I have come across books where the chapter names are years, so they should display as "1984" rather than "chapter 1984". — Sgconlaw (talk) 16:15, 9 May 2024 (UTC)
 * , I've added support to the cite- templates to handle entry separately from chapter. Values in entry are displayed exactly as provided without any special handling for roman numerals. Values in chapter handle roman numerals unless prefixed with  . JeffDoozan (talk) 15:43, 1 July 2024 (UTC)

RFC discussion: March 2022
It produces:
 * "Cappelli, Adriano (1982)David Heimann; Richard Kay, transl., [...]"

--Astova (talk) 09:38, 23 March 2022 (UTC)
 * Yeah, the translators parameter has that problem. I brought this up with 3 years ago at Template talk:cite-book but nothing's changed since then. —Mahāgaja · talk 10:03, 23 March 2022 (UTC)
 * Sorry, the spacing is really hard to work out and I haven't had time to look into it. — SGconlaw (talk) 12:56, 23 March 2022 (UTC)