Template talk:cite-book

Latest comment: 25 days ago by Sgconlaw in topic quote-book compatibility

Indentation edit

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

Formatting of poems is broken edit

This template is broken for poetry:

Lydia Sigourney (1850) The Brother from Poems for the Sea, page 71: “

Even, if our sails like ribbons fly,
And the dead-lights long are in,
Hard up the helm! and keep good heart!
Till skies are bright again.

This doesn't indent properly and it isn't recognised by the quotation-hiding JS. Inductiveload 23:56, 22 March 2011 (UTC)Reply

First of all, you should use {{quote-book}} in entries- it's more frequently updated and and more likely to reflect current policy. Second, see Wiktionary:Quotations#Line_breaks Nadando 00:05, 23 March 2011 (UTC)Reply
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)Reply

Additional "url2" parameter edit

@Fay Freak: 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 {{cite-book}}? — SGconlaw (talk) 19:49, 28 October 2018 (UTC)Reply

@Sgconlaw For giving alternative links for the same hosted on different servers. So I thought in {{R:gez:Dillmann}} 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 {{R:Grimm}}: 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)Reply

Translation parameter edit

@Sgconlaw Exists in {{quote-book}} but not {{cite-book}}. – Jberkel 05:19, 14 December 2018 (UTC)Reply

Do you mean |trans-title= (to provide for a translation of the title of a work)? Do you want that added to the {{cite}} templates? — SGconlaw (talk) 06:25, 14 December 2018 (UTC)Reply
@Sgconlaw: no, something like |trans-passage=. See Special:Diff/47264081/51084425. Jberkel 07:08, 14 December 2018 (UTC)Reply
Oh, you mean |translation=. Yes, that feature was not built into the {{cite}} templates, as it is a feature from {{quote-meta}}. Is it likely to be used often? — SGconlaw (talk) 07:29, 14 December 2018 (UTC)Reply
For English entries probably not that often, but for non-English entries it would definitely be useful. – Jberkel 11:01, 14 December 2018 (UTC)Reply
OK, let me work on it. — SGconlaw (talk) 19:04, 14 December 2018 (UTC)Reply
@Jberkel:   Done. I've added |translation=. Let me know if it works properly. — SGconlaw (talk) 04:12, 21 December 2018 (UTC)Reply
@Sgconlaw: 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)Reply
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)Reply
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)Reply

──────────────────────────────────────────────────────────────────────────────────────────────────── Sure. Would that be for {{quote}} only, or both {{cite}} and {{quote}}? — SGconlaw (talk) 10:26, 21 December 2018 (UTC)Reply

For anything which outputs non-English text. – Jberkel 12:28, 19 January 2019 (UTC)Reply

Url parameter edit

@Sgconlaw 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)Reply

That's odd. Let me check. — SGconlaw (talk) 12:31, 19 January 2019 (UTC)Reply
@Jberkel:   Done. There was a coding error which should now be fixed. — SGconlaw (talk) 20:43, 19 January 2019 (UTC)Reply
@Sgconlaw 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)Reply
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)Reply
@TagaSanPedroAko: pinging @Ioaxxere who recently worked on {{cite-meta}}. — Sgconlaw (talk) 20:27, 7 February 2023 (UTC)Reply

Translator parameter edit

@Sgconlaw, 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)Reply

OK, let me check. — SGconlaw (talk) 03:01, 25 May 2019 (UTC)Reply
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)Reply
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)Reply
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)Reply

First tie putting book as a ref edit

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)Reply

I would format it as follows:
{{cite-book
|author=Yuri Dolgopolov
|title=A Dictionary of Confusable Phrases: More Than 10,000 Idioms and Collocations
|location=Jefferson, North Carolina
|publisher=McFarland 
|year=2010
|isbn=978-0-7864-5855-4
}}
@Halbared: You can add other parameters like |chapter= and |page= or |pages= as necessary. —Mahāgaja · talk 15:25, 24 June 2020 (UTC)Reply
thank you. Halbared (talk) 22:41, 24 June 2020 (UTC)Reply

Paywall link edit

I think we should have a parameter like |paywall= if link URL is paywall access that adds a lock icon. @Hazarasp --{{victar|talk}} 09:06, 11 May 2021 (UTC)Reply

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)Reply
Shouldn't be too difficult to implement. We already have something like it at {{R:OED Online}}. However, I think we should wait for the outcome of the discussion about {{cite-meta}} that is taking place at the Beer Parlour. — SGconlaw (talk) 13:45, 11 May 2021 (UTC)Reply

Wrong format edit

This template produces citations in the wrong format. They should start with the year, for instance. DAVilla 08:48, 26 June 2021 (UTC)Reply

@DAVilla: no, references don’t generally begin with the year. If you want to add a quotation to an entry, use {{quote-book}}. — SGconlaw (talk) 09:05, 26 June 2021 (UTC)Reply
Oh sorry, wrong purpose then. DAVilla 09:13, 26 June 2021 (UTC)Reply

Missing space edit

@Sgconlaw there's a missing space between the year and translator here grammelot (1991 cite, references).– Jberkel 11:47, 4 March 2022 (UTC)Reply

Also, how does one add the original (here Italian) title? – Jberkel 12:02, 4 March 2022 (UTC)Reply
@Jberkel: I'll look into the spacing issue. What do you mean by the original title? — SGconlaw (talk) 20:23, 6 March 2022 (UTC)Reply

line value is not displayed edit

  • Code: {{cite-book|line=Line|page=Page|title=Title|year=Year}}
Result: Title, Year, line Line, page Page —Игорь Тълкачь (talk) 13:13, 2 April 2022 (UTC)Reply
@Useigor:   Fixed. I'm not sure why they were missing. — Sgconlaw (talk) 14:23, 22 March 2023 (UTC)Reply

Title not italicized? edit

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)Reply

@DocWatson42: yes, it is. Can you give an example of when it is not italicized? — Sgconlaw (talk) 14:17, 22 March 2023 (UTC)Reply
@Sgconlaw: Pruett#Further reading, 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)Reply
@DocWatson42: 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 Pruett entry. — Sgconlaw (talk) 04:12, 23 March 2023 (UTC)Reply
@Sgconlaw: Which browser? —DocWatson42 (talk) 04:14, 23 March 2023 (UTC)Reply
@DocWatson42: 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)Reply
@Sgconlaw: Actually, I meant your browser, but you also answered my question. Have you tried other browsers? —DocWatson42 (talk) 04:45, 23 March 2023 (UTC)Reply
@DocWatson42: yes, I can see the italics on my MacBook with Mozilla Firefox too. — Sgconlaw (talk) 05:53, 23 March 2023 (UTC)Reply
@Sgconlaw: 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)Reply
@DocWatson42: 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)Reply
@Sgconlaw: Thank you again. The browser and OS are already the latest available for the phone, which is an <ahem> iPhone 6S+. (Ancient, I know.) —DocWatson42 (talk) 04:52, 24 March 2023 (UTC)Reply

quote-book compatibility edit

@Sgconlaw 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), [1] but before undertaking that I wanted to solicit feedback? Would switching |1= from year to lang 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)Reply

  1. ^ Of the existing 42,000 uses of cite-book, only 4,200 include |lang= and 7,000 mistakenly include the lang id in |1=. The remaining 30,000 cite-book uses without a language code reference only 5400 unique titles. 1700 of these are cited only in English sections so it might be safe to assume they're in English an assign them a code automatically. The remaining 3400 titles could be assigned a language code "?" and the template could ignore it or display a gentle "(please add missing language id)" prompt like {{quote-book}} does with a missing date. I could also generate a list of the titles and the sections they appear in that might facilitate bulk cleanup of the cites with a missing code.
@JeffDoozan: you aren't proposing to make the language parameter mandatory, are you? If not, I don't really have any objection if you want to assign it to |1=, though I'm guessing this may involve a lot of updates to uses of the reference templates. (I'm not sure the language parameter needs to be compulsory for reference templates. Unlike quotation templates, we don't place entries into language categories by the use of reference templates in them. Also, as many reference templates are multiple-language dictionaries, it would be artificial to claim that such a work is of a single language.) — This unsigned comment was added by Sgconlaw (talkcontribs) at 22:55, 1 March 2024 (UTC).Reply
@Sgconlaw: I'm not proposing that it be mandatory, just checking that there are no objections to moving it from lang= to 1= as a step towards making it possible to switch between quote-* templates and cite-* by simply changing "cite-" to "quote-" and vice versa. I understand this will involve careful editing of many existing reference templates, and will make any changes in a way that doesn't break anything during the transition. JeffDoozan (talk) 17:01, 2 March 2024 (UTC)Reply
@JeffDoozan: OK, thanks! — Sgconlaw (talk) 17:16, 2 March 2024 (UTC)Reply
Return to "cite-book" page.