User:Mzs/Variant table

From Fallen London Wiki

The singular difference between {{User:Mzs/Variant table}} and {{Variant table}} is that {{User:Mzs/Variant table}} uses HTML <table>s instead of wiki markup. The primary reason is that wiki tables require particular whitespace, creating unfortunate interactions as described and exhibited in excrutiating detail below.

Variant tables as template arguments[edit]

This is most easily seen in the Description summary field of {{QuoteSummary}}, but the problem is more general.

{{Variant table}}s work fantastically in Summary as long as some other non-whitespace text is added before the {{Variant table}}. Without that leading text, the the whitespace gets trimmed and the table refuses to function. The commonly-used workaround is to add some redundant text ahead of the {{Variant table}}. A more esoteric workaround exists, taking advantage of <nowiki/> to preserve the leading whitespace. Neither is necessary when <table> is used instead of wiki markup.

{{User:Mzs/Variant table}} in {{QuoteSummary}}[edit]

{{QuoteSummary
  |Quote = User:Mzs/Variant table
  |Summary = {{User:Mzs/Variant table
    |Condition = Condition |Condition type = Raw
    |Value 1 = This |Effect 1 = Works
  }}
}}
User:Mzs/Variant table

Description summary:

ConditionEffect
ThisWorks

[Find the rest of the story at https://www.fallenlondon.com]

{{Variant table}} in {{QuoteSummary}}[edit]

{{QuoteSummary
  |Quote = Variant table
  |Summary = {{Variant table
    |Condition = Condition |Condition type = Raw
    |Value 1 = This |Effect 1 = Doesn't
  }}
}}
Variant table

Description summary:

ConditionEffect
ThisDoesn't

[Find the rest of the story at https://www.fallenlondon.com]

Workaround for {{Variant table}} in {{Branch Header}}[edit]

{{QuoteSummary
  |Quote = Variant table with workaround
  |Summary = <nowiki/>{{Variant table
    |Condition = Condition |Condition type = Raw
    |Value 1 = This |Effect 1 = Works
  }}
}}
Variant table with workaround

Description summary:

ConditionEffect
ThisWorks

[Find the rest of the story at https://www.fallenlondon.com]

Spacing[edit]

The forced whitespace of {{Variant table}} limits our formatting choices and creates some noticeably awkward line breaks.

On minor and relatively ignorable side, there's the simple issue of creating a difference between one and two carriage returns. Using {{Variant table}} with wiki markup tables, one carriage return gets you tight spacing while a second creates a very noticeable and frequently undesirable amount of whitespace. Using a <table>-based approach, the second carriage return keeps the spacing tight while a third still lets editors get the extra whitespace if desired.

On the more major and actively annoying side, using {{#lsth:}} to transclude {{Variant table}}s gives editors no carriage returns to work with. Adding even a single carriage return forces the extra white space. Even worse, if the page being transcluded uses two carriage returns between the end of a section's contents and the header for the next, that also gets transcluded, so there's extra whitespace even if the editor doesn't add any carriage returns at all.

While not all of these issues are necessarily the fault of {{Variant table}} and, for example, the extra whitespace in sections being transcluded with {{#lsth:}} should be removed, it's also true that a <table>-based {{Variant table}} removes or lessens all mentioned spacing issues.

Spacing between {{User:Mzs/Variant table}}s[edit]

{{User:Mzs/Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = These |Effect 1 = Are
}}
{{User:Mzs/Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = Equally |Effect 1 = Spaced
}}

{{User:Mzs/Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = This |Effect 1 = Too
}}
ConditionEffect
TheseAre
ConditionEffect
EquallySpaced
ConditionEffect
ThisToo

Spacing between {{Variant table}}s[edit]

{{Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = These |Effect 1 = Are
}}
{{Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = Equally |Effect 1 = Spaced
}}

{{Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = This |Effect 1 = Isn't
}}
ConditionEffect
TheseAre
ConditionEffect
EquallySpaced
ConditionEffect
ThisIsn't

Spacing between {{QuoteSummary}} and {{User:Mzs/Variant table}}[edit]

{{QuoteSummary
  |Quote = User:Mzs/Variant table […]
}}
{{User:Mzs/Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = Tight |Effect 1 = Spacing
}}
User:Mzs/Variant table […]

[Find the rest of the story at https://www.fallenlondon.com]

ConditionEffect
TightSpacing
{{QuoteSummary
  |Quote = User:Mzs/Variant table […]
}}

{{User:Mzs/Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = Tight |Effect 1 = Spacing
}}
User:Mzs/Variant table […]

[Find the rest of the story at https://www.fallenlondon.com]


ConditionEffect
TightSpacing

Spacing between {{QuoteSummary}} and {{Variant table}}[edit]

{{QuoteSummary
  |Quote = Variant table […]
}}
{{Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = Tight |Effect 1 = Spacing
}}
Variant table […]

[Find the rest of the story at https://www.fallenlondon.com]

ConditionEffect
TightSpacing
{{QuoteSummary
  |Quote = Variant table […]
}}

{{Variant table
  |Condition = Condition |Condition type = Raw
  |Value 1 = Loose |Effect 1 = Spacing
}}
Variant table […]

[Find the rest of the story at https://www.fallenlondon.com]


ConditionEffect
LooseSpacing

Spacing between {{QuoteSummary}} and transcluded {{User:Mzs/Variant table}}[edit]

{{QuoteSummary
  |Quote = User:Mzs/Variant table […]
}}
{{#lsth:User:Mzs/Variant table/Example subpage|User:Mzs/Variant table}}<!--
-->{{#lsth:User:Mzs/Variant table/Example subpage|Second User:Mzs/Variant table}}
User:Mzs/Variant table […]

[Find the rest of the story at https://www.fallenlondon.com]


ConditionEffect
TightSpacing
ConditionEffect
TightSpacing

Spacing between {{QuoteSummary}} and transcluded {{Variant table}}[edit]

{{QuoteSummary
  |Quote = Variant table […]
}}
{{#lsth:User:Mzs/Variant table/Example subpage|Variant table}}<!--
-->{{#lsth:User:Mzs/Variant table/Example subpage|Second Variant table}}
Variant table […]

[Find the rest of the story at https://www.fallenlondon.com]


ConditionEffect
LooseSpacing
ConditionEffect
LooseSpacing