User:Dick Bos/Templates

From Wikisource
Jump to navigation Jump to search

A list of templates I often use, and some other editing helps.

Editing in the Page namespace

[edit]

Editing templates

[edit]
Drop initial
  • Bar: short line in text. {{bar}} makes ——————; {{bar|2}} makes ——; {{bar|1}} makes (=mdash);
there's nothing between {{bar|1}} and {{bar|2}}; so {{bar|1.5}} = {{bar|2}}
  • Rule: inserts a horizontal rule: {{rule|10em}} makes:

(with optional parameters)
also {{custom rule|sp|40|co|6|sp|40}} gives:
  • Frame: a frame around text.
  • block center: text in the middle, left aligned.
  • c: center
  • clear: adds html clear:both
  • dhr: double height row: two textrows between paragraphs (or more with parms)
  • ditto: for aligning text in tables etc. with quotation marks. See e.g. this page
  • DJVU page link
  • frac: making fractions with 1,2 or 3 parameters! {{frac|a|b|c}} makes a+bc; * and sfrac: a (vertical) fraction, like 5/6.
  • gap: to create some space
  • hi -> Hanging indent
  • hidden text -> for aligning e.g. this (contents) page
  • hws: hyphenated word start - syntax: {{hws|differ|differences}} For hws and hwe combined with italics, see: doc on Template (below)
  • hwe: hyphenated word end - syntax: {{hwe|ences|differences}}
  • left: for aligning left (with a <div>!), like:

{{left|Dit staat links {{lorem ipsum}}}} gives:

Dit staat links Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

en {{left|Dit staat links {{lorem ipsum}}|offset=10em}} gives:

Dit staat links Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • Loop: for repeating a string
  • nop: end of paragraph
  • nowrap: to avoid wrapping
  • rh: RunningHeader - syntax: {{RH|left|center|right}} See also: Template:rvh for easy use on recto-verso pages
  • separator - syntax: {{separator|7}} - means: 7 dots
  • SIC - mind the capitals! example: {{SIC|taping mistake|typing mistake}} gives: taping mistake. Another example: The Voyage Out (my predecessor used "sic" and the word disappeared completely!)
  • Help about sidenotes, with links to different templates


Rem:

  • poem is not a template, but a tag: <poem>....</poem>!

Font size

[edit]

see also:

and:

Special characters

[edit]

and see also:

For differences between block and inline templates: Help:Block and inline elements

Tables

[edit]

Dotted tables (table with leader dots)

[edit]

Tables with braces

[edit]
  • Template:Brace or Template:Brace2 - {{Brace2}} makes: , {{Brace2|2}} makes: , {{Brace2|3|l}} makes: etc.

Footnotes, endnotes and sidenotes

[edit]

Footnotes that spread over more than one page

[edit]

Images

[edit]

About removing line breaks

[edit]

Colours

[edit]
  • background: span style to create a background color;
    syntax: <span style="background-color:yellow;">span style to create a background color</span>
  • list of colors in Dutch, in English

Index namespace

[edit]

Main namespace

[edit]

Author namespace

[edit]

linking to wikidata

[edit]

Some special templates

[edit]

Some help pages

[edit]

Sections: when chapters start halfway the page

[edit]

When a chapter starts halfway the page, like on Page:Sir William Petty - A Study in English Economic Literature - 1894.djvu/39, use section headers; and link to these headers in the main namespace: Bevan - Sir William Petty (1894)/II and Bevan - Sir William Petty (1894)/III. See: Help:Transclusion#How_to_transclude_a_portion_of_a_page.

Cleanup OCR tool

[edit]

See: Wikisource:TemplateScript