Template:Custom substitution/doc

From Wikisource
Jump to: navigation, search

Usage[edit]

This template allows a custom substitution to be made based on user preferences set in the monobook.css. For example, the "long s" (ſ) can be chosen to render as "ſ" or as "s" using this template.

The template syntax is:

{{custom substitution
 | original character (eg ſ)
 | potential replacement character (eg s)
 | substitution category (eg archaic-typography)
}}

This template uses the CSS display command to blank one option or the other, according to the users wishes. The first parameter is the literal character that may not be wanted (eg. "ſ"), and the second is the possible replacement (eg. "s").

The third parameter is a "category" parameter, to allow different classes of substitutions to be switched independently (eg. "archaic-typography"). The substitution is active in all namespaces so you can preview it from the Page: namespace edit window.

In other namespaces the default behaviour is to blank the first parameter and show the second. This is the behaviour you will see if you do not have a monobook.css entry. The additions to the monobook.css required to show the first parameter and blank the second one is:

.selective-replace-category-1{ display: inline !important; }
.selective-replace-category-2{ display: none   !important; }

Replace the category with the desired category name.

Available substitutions[edit]

The list below gives the default (i.e. substituting) behaviours for the templates using this one. Please add new templates here.

archaic-typography[edit]

  • {{Long s}}/{{ls}} replaces "ſ" with "s"