Template:Prime/doc

This template produces a prime symbol with leading space so it does not collide with a preceding italic character (such as produced by {{mvar}}). It is known by two names, {{}} (which is shorter), and {{prime}} (which is easier to find on a keyboard).

Usage

For example:

  • ''{{′|f}}''(''{{′|x}}'') ≥ 0 or {{math|''{{′|f}}''(''{{′|x}}'') ≥ 0}}

generates:

  • f(x) ≥ 0 or f(x) ≥ 0

for comparison, without the leading space, in some browsers you end up with the prime symbol being almost indistinguishable from the ascender of the italic f:

  • f′(x′) ≥ 0 or f′(x′) ≥ 0

The space provided is similar to {{'}} (a.k.a. {{apostrophe}}), used to provide a single quote with extra space, but provides the prime (minutes of arc) symbol instead of an apostrophe, and it can take the preceding letter into account when deciding how much space to add.

({{'}} has a second function which is not needed by {{prime}}: it ensures the apostrophe is not interpreted as wiki markup. For example, it can be written immediately after the wiki markup for italics as ''{{'}}, without being interpreted as wiki markup for bold '''.)

  • The template may be used without any arguments (a bare {{′}}), in which case is simply displays a prime symbol with the maximum space. It may be a bit wide in some cases, but will be intelligible.
  • The first argument (|1=) is preceding text. This is displayed before the prime symbol, and the last letter of this text is used to determine the amount of space to provide.
  • The second argument (|2=) is a single letter which determines the amount of space to provide. This defaults to the last letter of the first argument, but if the preceding text ends with markup rather than a letter to be displayed, that won't work right. Normally if the second argument is supplied, the first one is omitted. That is, people normally find ''[[π]]{{prime||π}}'' more legible than the equivalent ''{{prime|[[π]]|π}}''.
  • An optional |c= argument allows a different symbol, such as a double (″) or triple (‴) prime, to be substituted. For example, 12°{{prime|34}}{{prime|56|c=}} renders as 12°3456.
  • An optional |sp= argument allows you to explicitly specify the space, overriding the internal computation. Values around 0.1em normally work well. If this is supplied, the first argument is of little use, and the second is ignored completely.

Note that, although Greek letters are supported, it currently does not work with the corresponding HTML entities like α.

The extra space is most needed after tall letters which, in italic, extend far to the top right. Here is a table illustrating various combinations, to help decide:

Italic text {{mvar}} Italic text {{mvar}}
{{}} {{}} {{}} {{}}
a′ A′ a A a′ A′ a A n′ N′ n N n′ N′ n N
b′ B′ b B b′ B′ b B o′ O′ o O o′ O′ o O
c′ C′ c C c′ C′ c C p′ P′ p P p′ P′ p P
d′ D′ d D d′ D′ d D q′ Q′ q Q q′ Q′ q Q
e′ E′ e E e′ E′ e E r′ R′ r R r′ R′ r R
f′ F′ f F f′ F′ f F s′ S′ s S s′ S′ s S
g′ G′ g G g′ G′ g G t′ T′ t T t′ T′ t T
h′ H′ h H h′ H′ h H u′ U′ u U u′ U′ u U
i′ I′ i I i′ I′ i I v′ V′ v V v′ V′ v V
j′ J′ j J j′ J′ j J w′ W′ w W w′ W′ w W
k′ K′ k K k′ K′ k K x′ X′ x X x′ X′ x X
l′ L′ l L l′ L′ l L y′ Y′ y Y y′ Y′ y Y
m′ M′ m M m′ M′ m M z′ Z′ z Z z′ Z′ z Z

Lower-case f, l, and upper-case T are the worst cases; they require the full 0.15em of space. Other letters like j and V need some space, but not as much. And letters like o, A and L look worse with any extra space. Unfortunately there's no HTML equivalent of TeX's \/ italic correction, so this uses a crude approximation (from {{Italics correction/calc}}) which does not take the user's font into account.

Accessible symbols

Wikipedia previously provided templates that generated images with alt text for symbols not read by screen readers.[1] As of 2023,[2] the symbols in the table below will be read in the default configuration of all three major screen readers (JAWS, Apple's VoiceOver, and NVDA). Depending on user-configured verbosity settings, a reader may hear additional characters read aloud or fewer typographic or punctuation characters read aloud.[3]

Accessible symbols for tables
Unicode symbol Pronounced as HTML entity Template name Template usage
* "star" or "asterisk" * {{asterisk}} transclusion
"dagger" or "single dagger" † {{dagger}} substitution
"double dagger" ‡ {{double-dagger}} substitution
# "number" or "hash tag" # {{number sign}} transclusion
° "degree" or "degrees" ° {{degree}} substitution
"right arrow" or "rightwards arrow" → {{arrow}} substitution
"down arrow" or "downwards arrow" ↓ {{down-arrow}} substitution
"left arrow" or "leftwards arrow" ← {{left-arrow}} substitution
"up arrow" or "upwards arrow" ↑ {{up-arrow}} substitution
"prime" ′ {{prime}} transclusion

Notes

  1. ^ Bohman, Paul (20 January 2014). "Why Don't Screen Readers Always Read What's on the Screen? Part 1: Punctuation and Typographic Symbols".
  2. ^ Ragas, Sophie (17 March 2023). "How screen readers read special characters: an update".
  3. ^ AudioEye (14 September 2013). "How Screen Readers Make Digital Content Accessible".

See also


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.