User:Alex brollo/Templates and tricks to learn

From Wikisource
Jump to navigation Jump to search

Formatting templates[edit]

  1. {{smaller}} and {{smaller block}}, and all other similar (larger, x-larger, and so on). The idea is: to render with a span inline formatting, and to render with a block, block elements. Line height is adjusted in the second case only. The problem: smaller is too smaller.... a single template, accepting "elastic" dimensions in em for fonts and accepting optionally the feature "block", will suffice.
  2. {{rule}}: calls for a centered hr; lenght can be given as named (width=) or positional parameter.
  3. {{float center}} and similar float right and float left. Extremely interesting; floats a whole block, not single rows. The case of spanning in multiple pages is covered: mostly interesting the suggestion to use noinclude headers and footers to write elements that are not to be transcluded.


Linking templates[edit]