Template talk:RunningHeader

Smaller
Sometimes one sees the header have different formatting than the body, often this is smaller text, italics or UC. While the latter two formats generally do not apply to page numbers, SMALLER often applies for the line. Currently one has to format each part of the running header to implement varieties of formatting, and it would be nice if there was a parameter that modified the text format of the whole header in one fell swoop, even if it was just smaller, that would be a big help. -- billinghurst (talk) 13:44, 19 August 2009 (UTC)
 * will do the trick. Hesperian 04:04, 4 February 2014 (UTC)

3 part headers without a center don't clear
I noticed this while looking over Index:Tales of John Oliver Hobbes.djvu which uses a format like this and comes out pretty awful. This isn't intended, is it? Is there anything currently relying on this behavior? Prosody (talk) 23:10, 3 February 2014 (UTC)

I regularly find myself tempted to revert this template to a simple table. It would be so much simpler, easier to maintain, and it would work perfectly... only it wouldn't be principled — no true gentleman uses tables for layout. Hesperian 03:21, 8 February 2014 (UTC)

Center text doesn't center when there's left text
Could someone add a note to this template page to let editors know that this template does not exactly center the centered text? The template is intended to do that, but it seems like there's some technical reason it doesn't do it right now. Outlier59 (talk) 13:23, 1 June 2016 (UTC)
 * I added that note. Outlier59 (talk) 01:05, 2 June 2016 (UTC)


 * Note from the future (well, 2020): CSS flexbox would allow this to work, if you set the child divs to something like "flex-grow: 1; flex-basis:0;". Inductiveload— talk/contribs  14:54, 19 June 2020 (UTC)

5-part headers
How hard would it be to add support for 5-part headers (or "left-" and "right-aligned" versions of the 4-part header)? In certain circumstances (e.g. many of the pages in Index:Public_General_Statutes_1896.djvu, outside of the tables from pp. 14 to 248, inclusive) there is a need to have a "5-part" header. That is, three parts of the header are aligned to the left, center, and right of the body text, and an additional part (i.e. page number) is either on the far left or far right as appropriate. Pipian (talk) 10:42, 9 February 2017 (UTC)

TemplateStyles version in sandbox
I've converted to TemplateStyles in the sandbox. Please take a look and/or merge if appropriate. --Izno (talk) 20:05, 21 October 2020 (UTC)

Merging the various running header CSS pages
There are currently several different CSS pages for the various running header templates:
 * Template:RunningHeader/styles.css
 * Template:RunningHeader-centered/styles.css
 * Template:Rh/1/styles.css
 * Template:Rh/3/styles.css

I think it would be a lot neater to merge them into one CSS page. This would allow RunningHeader and RunningHeader-centered to use the same basic styles, for the special classes in Template:Rh/3/styles.css to be used in other three-part running headers (like, well, RunningHeader), and for the CSS to be updated more easily because everything would be in the same place.

I've created a proposed update to Template:RunningHeader/styles.css at Template:RunningHeader/styles-sandbox.css. Feedback would be greatly appreciated. —CalendulaAsteraceae (talk • contribs) 08:22, 18 February 2023 (UTC)


 * See also WS:AN. —CalendulaAsteraceae (talk • contribs) 03:56, 27 February 2023 (UTC)

Migrating this template to Lua
This proposal is independent of the previous one. I've implemented this template in Lua using Module:RunningHeader, because Lua is better-suited to handling the logic necessary for RunningHeader/core. Based on Template:RunningHeader/testcases, it looks like everything's working, but considering this template is so widely used, I'd appreciate some additional eyes on my code. —CalendulaAsteraceae (talk • contribs) 01:28, 19 February 2023 (UTC)
 * See also WS:AN. —CalendulaAsteraceae (talk • contribs) 03:56, 27 February 2023 (UTC)
 * Nice work. It'll take me some time to grok this, but… Immediate thoughts:Let's take the opportunity to move this to a standardised name. Module:Running header.What's the reasoning for splitting the logic between Module:RunningHeader and Module:RunningHeader/core?Have you updated the emitted markup to something sensible / modern? At first blush the CSS looks kinda grotty, so I'm guessing not, but I could be wrong.We're using a custom / local Module:Roman here. Have you checked for upstream modules we could import instead of rolling our own? The name is also unfortunate as just "Roman" is amiguous. We should move this to Module:Roman numerals if we stick with a local module.Have you looked into "API design" for the client templates? rvh was a quick test designed to be simple for simple cases; but experience has revealed some design flaws and limitations that necessitated rvh2 etc. Can we find some way to generalise these so we can have fewer custom templates?Incidental to this, but… I've toyed with the idea of a Gadget that can cooperate with the RH templates to automate populating the header in a lot more cases. Making the templates and emitted markup suitable for that might be worthwhile to keep in mind. Premature to make a primary design goal, but just sorta keeping it in mind so we make that easier in future. Xover (talk) 09:29, 3 June 2023 (UTC)
 * PS. Given how widely used it is we'll have to communicate with the community before finally pulling the trigger, warning about upcoming changes, guiding them to were to get help and provide feedback, etc. Xover (talk) 09:30, 3 June 2023 (UTC)
 * As I have already expressed before at some other occasions, I am quite unhappy about the rising number of templates which are getting dependent on a very small number of people understanding Lua. So I would like to ask, whether we have experienced any specific problems with this template which could not be solved in the common wiki code and which force us to migrate it to Lua. --Jan Kameníček (talk) 12:16, 3 June 2023 (UTC)
 * That is a very valid concern. My motivation is that the underlying code for RunningHeader is already trying to do complex logic which wikicode isn't really suited to. —CalendulaAsteraceae (talk • contribs) 19:21, 3 June 2023 (UTC)
 * Looking at this again with fresh eyes, I actually think it would be better to just have Module:Running header doing the running header logic, then separately have Module:Recto-verso providing the recto-verso logic, and use combinations of these two modules/templates for all the fancy recto-verso header stuff.I have not updated the emitted markup and don't really know what 'better' would look like here. Would appreciate info on modern best practices!I haven't checked for upstream Roman numeral modules. What do you think of commons:Module:Roman and w:Module:Roman?Re "API design", I haven't looked into that very much, but I'll think about it!—CalendulaAsteraceae (talk • contribs) 19:18, 3 June 2023 (UTC)
 * OK, I've updated so that recto-verso is now using Module:Recto-verso and RunningHeader/sandbox is using Module:Running header and Template:RunningHeader/styles/sandbox.css. The following templates are now using RunningHeader and recto-verso:
 * Recto-verso header
 * Recto-verso header2
 * Recto-verso header3
 * Rvh-chap
 * Rvh-chap/2
 * Rvh/header
 * The following templates will be redundant to the updated RunningHeader:
 * Rh/1
 * Rh/2
 * Rh/3
 * Rh/5
 * Rh/7
 * Rh/9
 * Rh/1rv is using Rh/1 and recto-verso. Rh/lr is using Rh/2 and recto-verso. (Both will be able to be updated to use RunningHeader and recto-verso.)RunningHeader-centered is doing some more complicated stuff so it's using a module, Module:Running header centered, although I do wonder how necessary it is to support setting column width with a parameter as opposed to index CSS.Probably some of these templates can be merged. —CalendulaAsteraceae (talk • contribs) 21:15, 3 June 2023 (UTC)
 * Belatedly, @Xover, and also I've realised that this proposal is not separate from the stylesheet update proposed in the previous section. —CalendulaAsteraceae (talk • contribs) 21:42, 3 June 2023 (UTC)

Confusing usage line
The last line of the usage paragraph says "By default, all heading "cells" are center-aligned, except for the first cell, which is left-aligned, and the last cell, which is right-aligned." However, to me, that seems to imply that left should have left to the left and right to the right, since right is in the last cell. Looking at your first example though, right is centered. This seems contradictory or in need of updating the usage sentence to clarify. Shootmanng (talk) 17:47, 23 February 2024 (UTC)


 * A two-cell rh is really a three-cell rh with a blank third cell. There is an update process in progress at present to remove the current version of two-cell running headers. But this is a gradual process given the huge number of usages. I'll tweak the "by default" sentence. Beeswaxcandle (talk) 17:56, 23 February 2024 (UTC)

Adding a suppressed field option..
Please review the modified code in the module sandbox and testcases I added to allow the use of an underscore  character to add in a blank   field. I tested using the modified sandbox version and found that a complete suppression using a null string  in Lua did not yield the desired layout. ShakespeareFan00 (talk) 12:13, 5 May 2024 (UTC)
 * Existing usages of  are not impacted by this change. ShakespeareFan00 (talk) 12:13, 5 May 2024 (UTC)
 * The reason for using  is for layout reasons, when I used a blank or null cell, the layout was NOT the same current template. ShakespeareFan00 (talk) 22:12, 5 May 2024 (UTC)
 * I will also add a sandbox test for '<<' and '>>' as alias for '_' or blank.. ShakespeareFan00 (talk) 22:13, 5 May 2024 (UTC)
 * Edit request declined. It is not obvious to me that this change is desirable, so that issue needs to be figured out before that edit is made. --Xover (talk) 22:48, 5 May 2024 (UTC)
 * @ShakespeareFan00: I had a quick look at the sandbox and the test cases, and it told me nothing. I suggest you first come up with a test case that demonstrates the need for this new special case, and preferably also a cogent explanation of it. I am extremely sceptical of adding new special cases and magic syntax to this template, but without understanding the problem it is trying to solve it is impossible to assess whether it is justified in this case or alternate solutions that may be applicable. Xover (talk) 10:08, 6 May 2024 (UTC)
 * The concern was to how to 'filter' a large category Category:Running headers with only one content entry in a more nuanced way, as it's finding far more instances than I thought existed. By making the 'blank' fields actually defined(albiet with a space or puesdo-blank rather than a null), those entries which have been checked can be eliminated from the category.  Another contributor put the content entry count into the main template, I'd have favoured a longer discussion first. The category is useful though.ShakespeareFan00 (talk) 11:16, 6 May 2024 (UTC)