Module talk:TOCstyle
Add topicAlternating models on Pages
[edit]Would it be possible to program/plug in something like
| row1,5,7,9,11,13model = c
or
| row3to6model = H5.P
for TOCs that alternate between different models on any given Page? It would save time and space. Londonjackbooks (talk) 21:35, 9 November 2015 (UTC)
- Good idea. I am looking into it and will get back to you. AuFCL (talk) 21:57, 9 November 2015 (UTC)
- @Londonjackbooks:A few false leads but (I think!) it is all now working again with pretty much what you described above. The usual suspect at User:AuFCL/SandBox#Marlborough_Assembled seems to be working. Beware there is a precedence:
|model=
is always overruled if|rowXtoYmodel=
is requested; and|rowZmodel=
overrules both of them if X<=Z<=Y. Hope this makes sense. AuFCL (talk) 05:24, 10 November 2015 (UTC)- I forgot to add: threw in new option
|compact=yes
as a "built-in" shortcut to centred narrow TOCs. All it does is to alter the default layout to include the|style=display:table;margin:0 auto 0 auto
discussed elsewhere. AuFCL (talk) 05:30, 10 November 2015 (UTC)- Decided to round out the set with
|rowX-Ymodel
as an alias forrowXtoYmodel
. Use of both forms together is not wise (I am not quite sure but as far as I can tell LUA actually randomises parameter order—bizarre!) but unless somebody actually complains I am not going to fix this. Good to have a few actual known bugs? AuFCL (talk) 07:36, 10 November 2015 (UTC)
- Decided to round out the set with
- I forgot to add: threw in new option
- @Londonjackbooks:A few false leads but (I think!) it is all now working again with pretty much what you described above. The usual suspect at User:AuFCL/SandBox#Marlborough_Assembled seems to be working. Beware there is a precedence:
How to ...?
[edit]Suggestions for Page:U.S. Government Printing Office Style Manual 2008.djvu/321 please…
- table 1. A leaderless line 6
- table 2. This is a standard printers' format for long page number lists, apparently
I've also come across a left aligned page number column and wondered how that would be done?
Cheers, — Zoeannl (talk) 10:42, 23 August 2016 (UTC)
- @Zoeannl: I am very much in two minds about this. Firstly you have pointed out some clear oversights (e.g. page number alignment was always planned to be flexible yet somehow has never actually been implemented as anything but hard right aligned. It probably only makes sense to allow control of this when page-width is also specified. Perhaps a new page-align might be introduced?)
- On the other hand without changing any coding choosing a simpler model set and existing other template building blocks the required effect(s) (at least for U.S.G.P.O.S.M.2008/321) can already readily be achieved as demonstrated. AuFCL (talk) 04:50, 26 August 2016 (UTC)
Annoying numbers
[edit]Hi. Thank you for creating such a useful template. We use it in our local wikisource (fa.wikisource.org). It is fully compatible. The only problem is that no matter how we use it, it will add ordinal numbers before each line. Would you please be kind and help us over there. it is a sample page: fa:برگه:Tavalludi Digar - Farogh Farrukhzad.pdf/۱۱ --Yousef (talk) 10:36, 8 June 2017 (UTC)
- It looks like there's a CSS rule from...somewhere, I don't understand how all this stuff works anymore, which says that HTML ordered lists in Farsi pages get Farsi numbers. TOCstyle uses HTML ordered lists and tries to suppress numbering, but I think because of how CSS is applied based on the specificity of the rule the numbering rule defeats the no-numbering rule. Maybe if your TOCstyle template were modified to apply a certain class to the TOCs and a rule were added to your common.css that says that .tocclass ol:lang(fa) li { list-style-type: none; } it would work? I'm not totally sure. Prosody (talk) 23:38, 12 June 2017 (UTC)
Not displaying dots on ToC
[edit]See Page:O'Higgins--The Adventures of Detective Barney.djvu/13. Chapter one has no dots. —Justin (koavf)❤T☮C☺M☯ 15:44, 26 August 2017 (UTC)
- @Koavf: Observe option which is requesting the behaviour you are complaining about. Remove same and re-observe result. QED. 121.216.218.199 22:15, 26 August 2017 (UTC)
|row1model=CDP
lcr with dots inbetween
[edit]See Page:The Atlantic Monthly, Volume 18.djvu/7, the text is in 2 columns with the page numbers in a third. The only model I can see that does something similar is CD.P or lcr but these either lack the dots and spacing beteen the first two columns or lack the dots overall. -Einstein95 (talk) 22:56, 4 September 2017 (UTC)
Extraction of section of TOC
[edit]Is it possible to extract this section of the TOC for separate transclusion? Londonjackbooks (talk) 14:13, 17 October 2017 (UTC)
- Simplistic answer is to add a <section/> begin/end to this page as normal (i.e. enclosing the page body) and then when trancluding lead the <pages> directive with a dummy {{TOCstyle|header=yes|compact=yes}} (i.e. reproduce the current Page:-space construction.) 121.217.127.91 10:24, 18 October 2017 (UTC)
- The rows render as bulleted. [1] Londonjackbooks (talk) 11:18, 18 October 2017 (UTC)
- The unwanted bullets may be suppressed by use of a CSS hack. Something akin to:does the trick but this will only work until next time the mediawiki parser changes characteristics. All in all this may be a lost cause (insertion of the offending <UL> tag SHOULD NOT HAPPEN - but nevertheless it currently does!) 101.161.12.77 04:14, 19 October 2017 (UTC)
.mw-parser-output div > div > div ul {list-style: none; }
- Ok. Thanks for your help. Perhaps I will just re-create that portion of the TOC in the Main manually rather than transclude. Londonjackbooks (talk) 11:13, 19 October 2017 (UTC)
- The unwanted bullets may be suppressed by use of a CSS hack. Something akin to:
Hanging indented matter split between two pages
[edit]How to join two TOC pages where hanging indented text continues on to next page. Thanks, Londonjackbooks (talk) 02:17, 6 February 2018 (UTC)
- @Londonjackbooks: Example here. 114.74.130.95 09:22, 10 February 2018 (UTC)
- Thanks much. It was right in front of me, wasn't it, but I didn't see it. Londonjackbooks (talk) 11:45, 10 February 2018 (UTC)
Why does {{ditto}} refuse to behave in this template, and is there any way to fix it? Example:
- Example 1
1 - Example„ 2
2
Outside the template that would be:
Example 1 ... 1
Example„ 2 ... 2 —Nizolan (talk) 16:22, 31 May 2019 (UTC)
Lack of dotted indented description/page # model
[edit]Hello,
I recently noticed that there is a lack of a dotted indented description-page number model for the TOC. Can we have such a template with the model ID 2H.P?
Thank you.--BlobcatsAreCool (talk) 12:45, 12 August 2019 (UTC)
Indentation after rowRmodel=c
[edit]I've noticed that after creating a centred row in a TOC that's otherwise using a CD.P model, the following two chapters are indented for some reason. See e.g. Page:Baladhuri-Hitti1916.djvu/11 and subsequent pages. Is there a fix for this? —CalendulaAsteraceae (talk) 22:53, 27 May 2021 (UTC)
- …Never mind, I forgot that chapters are right-aligned. —CalendulaAsteraceae (talk) 23:29, 27 May 2021 (UTC)
small caps
[edit]It seems that the template {{small-caps}} is ignored in the TOC for some reason, see e. g. Page:The Game of Life.djvu/5. Can anything be done about it? -- Jan Kameníček (talk) 17:24, 30 October 2022 (UTC)