User talk:Pdebee/Sandbox for before & after

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Wikitable[edit]

Dear helpful fellow editors,
Thank you in advance for advising me on how to ensure the contents of a column do not alter the defined width of that column.
In the present sandbox, you will see two sections ('Before' and 'After'), each with a wikitable extracted from the Hanseatic League article:

  • in the Before section, the table is identical to the original one in the article. As you can see, the penultimate column (Notes) is quite narrow and makes the contents difficult to read, and the last column (Refs) is much wider and contains only ref numbers; in turn, this makes the table quite a bit longer (or deeper) than it could be if the columns were readjusted;
  • in the After section, the table is still identical to the original one in the article, except that the penultimate column (Notes) is now wider than it was. The last column (Refs) is much narrower and its ref numbers are now displayed vertically, because all the <ref> tags are now separated by breaks (<br>).

Question: Is there a way of achieving the same result without having to use a (<br>) tag after each <ref> tag?
I am hoping there is some command I could use to force the <ref> tags to fit within the predefined width of the column, without pushing it wider as they are resolved into their short form digits, arranged horizontally.
I hope I have explained it clearly enough; if not, then please ask me to clarify, and I'll try better.
Many thanks for any solution anyone could suggest.
With kind regards; Patrick. ツ Pdebee.(talk)(become old-fashioned!) 11:04, 11 February 2020 (UTC)[reply]

One possibility is to surround the list with {{plainlist| ... }} - I tried this, along with removing the <br> elements, in one cell of your second table and it seemed to work. There may be a better way, though, so I'll leave this open for others to answer. — jmcgnh(talk) (contribs) 16:41, 11 February 2020 (UTC)[reply]
Thank you so much for your advice and even taking action with a test of your own, Jim!
I had thought about using the plainlist function but had not tested that idea, mainly because it inserts small dots as a separator between list items. I was hoping there would be some sort of 'wrap' command, that would force the content of a cell to wrap itself within the fixed width of a column, even at the cost of deepening the cell.
Thank you for leaving the help request open, in case another colleague confirms whether there is such a command, or not. Nonetheless, your prompt intervention is much appreciated; thank you once again, Jim.
With kind regards; Patrick. ツ Pdebee.(talk)(become old-fashioned!) 17:16, 11 February 2020 (UTC)[reply]
Interesting. When I preview the plainlist, I see no small dots. Because Wikipedia pages are viewed on a wide variety of devices and in browser windows of varying widths, trying to exercise too much concrete control over aspects of the display can end up being counterproductive. — jmcgnh(talk) (contribs) 00:58, 12 February 2020 (UTC)[reply]
Thank you for your comment, Jim!
My goal is to improve the cell occupancy of the last two columns: narrowing the Refs column that contains only a few digits, thus widening the Notes column for the benefit of the reader. I am also trying to find a coding method that saves editors a lot of effort, in having to insert either a lot of <br> tags, or the 'plainlist' clauses (including a '*' bullet for each item) that you kindly suggested. Therefore, I'd like to find an economical way of achieving that goal, and it seems that nowrap would be the answer, if it could be made to work satisfactorily. Thank you once again for your help so far, and for keeping this open for a solution to the test shown below.
With kind regards; Patrick. ツ Pdebee.(talk)(become old-fashioned!) 11:16, 12 February 2020 (UTC)[reply]

Dear helpful fellow editors,
I have now added a third table, where I have used nowrap; it didn't make any difference...
Thank you very much for keeping this help request open.
With kind regards; Patrick. ツ Pdebee.(talk)(become old-fashioned!) 18:15, 11 February 2020 (UTC)[reply]

... and here is another attempt with 'nowrap' defined only for the Notes column, plus the first row only. I am hopeful someone will be able to explain why the content of the Refs column is not wrapping when defined with a width of only 5% and without 'nowrap' (which implies 'wrap', to me) :

Quarter City Territory Now From Until Notes Refs
Wendish
Lübeck
Free City of Lübeck
 Germany Capital of the Hanseatic League, capital of the Wendish and Pomeranian Circle [1][2][3]: 47, 120 [4][5]: 74, 82 [6]

References

  1. ^ Cite error: The named reference Falke was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference Natkiel was invoked but never defined (see the help page).
  3. ^ Cite error: The named reference Keating was invoked but never defined (see the help page).
  4. ^ Jotischky, Andrew; Caroline Hull (2005). The Penguin Historical Atlas of the Medieval World. Penguin Books. pp. 122–23. ISBN 978-0-14-101449-4.
  5. ^ Holborn, Hajo (1982). A History of Modern Germany: The Reformation. Princeton University Press. pp. [https://books.google.com/books?id=350Qosar–UcC&pg=PA32 32, 74, 80–82. ISBN 0-691-00795-0.
  6. ^ Dollinger, Philippe (2000). The German Hansa. Stanford University Press. pp. ix–x. ISBN 0-8047-0742-1. Retrieved 15 May 2011.

@Pdebee: Instructions like nowrap are handled by the browser, so MediaWiki won't throw errors about incorrect parameters since it's not interpreting them. A wrap parameter wouldn't do anything because wrapping is the default state. It looks like your problem might be that the {{rp}} template prevents wrapping immediately after it. You can force a wrap point there using {{zwsp}}. You could also consider WP:BUNDLING your citations and showing only one footnote in the table. --AntiCompositeNumber (talk) 15:10, 13 February 2020 (UTC)[reply]

Dear AntiCompositeNumber,
Thank you so much for taking the time to help me; I am very grateful to you, as I didn't know about any of the features you outlined above. I have now looked into these, and will experiment with merging the citations first, which might be an easier approach for future editors to recognise. I will also experiment with the {{plainlist| ... }} solution proposed earlier by Jim, as it has great merit. When I eventually implement the chosen solution into the article, I will leave a comment at the top of all its tables, briefly to explain the purpose of the method I will have adopted.
In any case, I am very happy that this help query has been closed, and I thank you both once again for taking the time to offer your helpful assistance.
With kind regards; Patrick. ツ Pdebee.(talk)(become old-fashioned!) 18:03, 13 February 2020 (UTC)[reply]