Forums: Helping Hand > Adding a "chapter" parameter to book citations

Use the following template for a nicely presented post:

{{Forum post|Write your message here!|~~~~}}

Okay, I'm moving the conversation about a chapter parameter to a new thread. The unedited discussion can be found in Forum:Book page layout. Sometimes the discussion got tangled between the indexing of pages and the referencing using chapters. Below are quotes from various people with some emphasis added by me.
Moviesign (talk) 03:01, May 2, 2015 (UTC)

I'm not a fan of references in the indexes for these sources. These are all referenced inherently by virtue of appearing in the index for the source. Though I can see the benefit in being able to locate the page, it's not a major factor to my mind. Novels with multiple editions will make these page numbers meaningless. And the superscripted numbers just make the list look untidy, not as clean.
  — — BadCatMan (talk) 02:48, April 28, 2015 (UTC)
Not wanting to be the ugly duckling, we could use chapters instead of page numbers for referencing novels... easier for different editions of novels and still allows for referencing, such as Faceless One "Homeland" Chapter 1, instead of page 9... just a thought
  — - Darkwynters (talk) 18:39, April 28, 2015 (UTC)
I like that idea, DW, but do our citation templates handle that?
  — ~ Lhynard (talk) 18:59, April 28, 2015 (UTC)
Movie could figure out whether or not... such as the references for Daenerys_Targaryen [1] on the A Wiki of Ice and Fire.
  — - Darkwynters (talk) 22:37, April 28, 2015 (UTC)
Darkwynters I'm not too sure if we would need chapter refs if Moviesign's template is implemented. We don't use chapter-based citations elsewhere and we can simply create Indexes for different editions, if needed. If people are interested in changing from page numbers to chapter references, perhaps we could have a separate chat about that as I think that would have much wider implications for the wiki than this topic.
  — --Eli the Tanner (talk) 12:45, April 30, 2015 (UTC)
I like the idea of using chapters for referencing novels; I thought of it a while ago. It can't be hard to add a new entry to the templates that won't affect existing sub-templates. It'll be damn easier for general wiki work, using one broad chapter instead of a lot of different page ranges.
  — — BadCatMan (talk) 13:34, April 30, 2015 (UTC)
As for using chapters in book citations, I think I can add a parameter that, if set, will replace the page number field. Instead of "p." or "pp.", would you like it to say "ch." or "chapter:" or what? Note that some books do not number their chapters, but instead use titles. (I am not aware of any specific examples because I haven't read the novels, but I've seen it done in other fantasy books.) The point is, anything specified as a chapter will be passed through without modification. Will this meet the need?
  — —Moviesign (talk) 12:55, May 1, 2015 (UTC)
Wonderful work, Movie... I vote "CH" for novel citations... shorter and easier to write :)
  — - Darkwynters (talk) 22:12, May 1, 2015 (UTC)

I think that should cover it, but if you have a quote that you think is relevant, feel free to add it.

Now, does everyone understand that this is about changing {{Cite book}} to allow a chapter reference instead of a page reference? The new indexing feature ({{MakeIndex}}) can be used to make a "chapter index", but this is only meaningful for a single article about a novel. If you want to cite a chapter from a novel anywhere on the wiki, we need to slightly modify {{Cite book}} and {{Cite publication}}.

Here is an example of one possibility:

{{Cite book/Azure Bonds|chapter=4}}
which would look like:

This is relatively easy. Assuming we want to make this type of change, we just need to decide a few things:

  1. What do you want the parameter to be named? I chose chapter for the example, but it can be anything not already used. It could also be position-dependent, but that means both chapter and pages could be specified, leading to the next question:
  2. Do you want the chapter parameter to override the pages parameter, so you cannot specify both?
  3. How do you want to differentiate chapter designators from page numbers? I used ch. above instead of p.. DW suggested CH, and the external link shows "Chapter".
  4. What should the plural version of the chapter designator be? chs.? CHs? chaps? Chapters?
  5. What reads well if the chapter doesn't have a number, just a title?

Please discuss and ask questions if anything isn't clear. The code for the example presented above can be seen at the top and bottom of this page which uses User:Moviesign/Template:Cite publication to add the chapter designator.

Moviesign (talk) 03:08, May 2, 2015 (UTC)

Movie, I love how you shortened the discussion... I liked "ch"... hehe... not in caps... tired... want to see what others thoughts are :)
- Darkwynters (talk) 05:19, May 2, 2015 (UTC)

I wrote in the other thread: "Since we use "p." or "pp.", maintaining that form and using "ch." or "chap." sounds best. It would keep our already-lengthy references short as possible, and it seems to be a standard format. "Chap." might be a good balance between shortness and clarity. I presume the template would write that itself."

"I think most or all Realms novels use chapter numbers. If there are any that don't, then simply counting the number of chapters would work well enough."

Is it possible to keep/use both page and chapter? This might help with back-compatibility or for those who want to use both for some reason.

As mentioned above, I'd go with "ch." or "chap." for the abbreviation in the reference. For plurals, "chaps.". I'm not sure what citation style we've got here, but Wikipedia only uses chapter titles, not chapter numbers, so that doesn't give us guidance.

If counting chapters doesn't work, then the full title of the chapter would be appropriate, e.g., "The Dragon Wakes". I'd say we wait until it comes up, if it comes up.

BTW, chapter numbers will be very useful in ebooks, where the page number and page count are often dependent on magnification.

Now, the template. Could

{{Cite book/Azure Bonds||4}}

work? That is, an empty entry for the page number, so none is given. That already works. Then the template can just skip to the next entry, the chapter number. Ergo:

{{Cite book/Azure Bonds|}}



{{Cite book/Azure Bonds||4}}

Could be made to produce:


{{Cite book/Azure Bonds|65|4}}

could give us:

That should be a simple matter, using the exact same code as the pages entry. Unless I'm missing something.
— BadCatMan (talk) 10:08, May 2, 2015 (UTC)

I advocate making it either/or instead of both. My reasoning is that we're adding the chapter parameter because in some cases page numbers are meaningless. Therefore, page numbers are sufficient except for those cases, then you need the chapter number instead. Allowing both to appear would allow (maybe even encourage) specifying chapters when they are unnecessary and pages when they are meaningless.

That said, what BadCat posted in his last example is easy to do, if that's the way we want to go.

Moviesign (talk) 11:05, May 2, 2015 (UTC)

Well, if we just remove the page numbers (even though I have always liked them) it will not matter which edition the novels are... for the most part, we know Dinin Do'Urden tells the Faceless One to kill Alton DeVir in chapter 1 of Homeland... so chapters might let use have less different edition citations... just a thought :)
- Darkwynters (talk) 16:18, May 2, 2015 (UTC)

How widespread exactly is this problem? I'm not sure we need to remove numbered citations from articles, I've rarely come across cases where the page numbers are particularly different and they are, after all, more accurate. In cases where we have multiple editions(and they are notably different) or broad topics I can understand it, but other than that we should strive for the most accurate citations we can. Other than that, I think chapters are a useful option in general; for example, I listen to a lot of audiobooks because I rarely have the time to sit and read a book properly (currently working through the Sundering) and being able to cite chapters would let me or others add info more easily.
--Eli the Tanner (talk) 12:52, May 8, 2015 (UTC)

We are not removing anything, just allowing a chapter number to be used instead of a page number when the reference is to an eBook (and perhaps other media formats like mass-market paperbacks and hardcovers).

It sounds like "chap." and "chaps." are the most unambiguous abbreviations to use.

I still need to hear a consensus on allowing both chapter and page numbers to appear in a citation, or if should they be mutually exclusive. I vote mutually exclusive for the reason I stated above.

Moviesign (talk) 19:51, May 29, 2015 (UTC)

Mutually exclusive! - Darkwynters (talk) 23:47, May 29, 2015 (UTC)
- Darkwynters (talk) 23:47, May 29, 2015 (UTC)

I like the possibility of having both. A reference with both a page number and a chapter number remains almost as useful for someone who doesn't have the same edition. More information is better than less, and it seems like it would be technically easier to allow both than it would be to restrict it.
— BadCatMan (talk) 02:13, May 30, 2015 (UTC)

I concur with BadCatMan, if we can manage both then it is only a boon as those without the same edition can still use the chapter info and editors can still have accurate refs. The option seems better than not having it, additionally it helps us to add chapter refs quickly and then for others to come along and add page numbers later, as needed. I've already started indexing Storm of the Dead using chapters so I am in favor of us rolling out chapter use as an option already.
--Eli the Tanner (talk) 14:39, May 31, 2015 (UTC)

Okay, the optional (not mutually exclusive) chapter parameter has been added. Any old templates that were created before this change will have to be edited to add the new parameter as shown in Template:Cite book#Usage if you want to specify a chapter number. Let me know if you find any anomalies in its behavior. Thank you all for your input. Go forth and edit :)
Moviesign (talk) 21:44, May 31, 2015 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.