• Home
  • Random
  • Log in
  • Settings
Donate Now If this site has been useful to you, please give today.
  • About Wikisource
  • Disclaimers
Wikisource

Template:Gap

  • Template
  • Discussion
  • Language
  • Watch
  • View source

Template documentation[view] [edit] [history] [purge]
Shortcut:
{{g}}
WarningThis template is used on approximately 180,000 pages.
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.

This template uses a <span> element for formatting.
Block-based templates and paragraph breaks cannot be nested inside it.

See H:DIVSPAN for details.

This template applies the class(es) .wst-gap, which can be targeted with a work's index styles.css using page styles.

Contents

  • 1 Usage
  • 2 Deprecated or incorrect usage
    • 2.1 Indentation
    • 2.2 Offsetting right-aligned text
  • 3 See also

Usage

Use this template to insert a fixed width gap in inline text. The default is 2em.

For example,

Hello{{gap|3em}}world!

yields "Helloworld!"


If no argument is given, the default is 2em:

Hello{{gap}}world!

yields "Helloworld!"

For a real example of it in use, see Page:An introduction to physiological and systematical botany (1st edition).djvu/542.

Deprecated or incorrect usage

Please note: This template is not intended to produce indented paragraphs, double spacing after full stops (periods), or offsets from the right.

Indentation

The house style of Wikisource is to separate paragraphs with a double line break, rather than to indent them, except in cases such as poetry where the formatting might be considered part of the text.

Offsetting right-aligned text

Please do not use

{{right|This is incorrect{{gap|4em}} }}

{{Right}} has a parameter offset for this:

{{right|This is correct|offset=4em}}

The reason for this is that if the line wraps, the {{gap}} will go to the next line, where it will be invisible, and the text will end up right up against the right margin:

The {{gap}} here is in a blue box:

Compare to setting an offset of 4em:

The text retains its offset even when it wraps.

See also

  • {{right}}
  • {{indent}} for a simple indented paragraph
  • {{wide space}} for a wider gap between adjacent words (this will also copy-paste as a space; {{gap}} will not.
  • {{hanging indent inherit}} for paragraphs spanning Page: namespace pages
  • To insert a vertical gap (i.e. extra line spacing), simply add multiple blank lines. To force a gap in situations where the Mediawiki software consumes multiple carriage returns, such as at the end of a page, use {{nop}}. See also {{dhr}}.
  • {{0}}
  • {{ditto}}
  • {{phantom}}

No description.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Width of gap to insert.

Stringsuggested
The above documentation is transcluded from Template:Gap/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikisource.org/w/index.php?title=Template:Gap&oldid=14147462"
Last edited on 29 April 2024, at 11:06

Languages

    • Беларуская
    • বাংলা
    • Bosanski
    • Català
    • Čeština
    • Cymraeg
    • Dansk
    • Ελληνικά
    • Esperanto
    • Español
    • Euskara
    • فارسی
    • Français
    • Hrvatski
    • Հայերեն
    • Bahasa Indonesia
    • Italiano
    • 日本語
    • Jawa
    • 한국어
    • മലയാളം
    • Bahasa Melayu
    • မြန်မာဘာသာ
    • Nederlands
    • Norsk
    • ଓଡ଼ିଆ
    • ਪੰਜਾਬੀ
    • Piemontèis
    • Português
    • Română
    • Русский
    • Slovenčina
    • Српски / srpski
    • தமிழ்
    • ไทย
    • Türkçe
    • Українська
    • Vèneto
    • Tiếng Việt
    • 中文
    Wikisource
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 29 April 2024, at 11:06.
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikisource
    • Disclaimers
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop