Template:Script/Hebrew/doc

Usage

This template marks a string as Hebrew script. It is transcluded by {{Script}}.

This template applies styles to ensure the correct display of the Hebrew script; it does not tag text as being in the Hebrew language. Therefore, language tagging must be handled separately using {{Lang}} or {{Langx}}, where appropriate.

Under the hood

This defines font-families, font-size and a CSS class:

{{safesubst:<noinclude/>ifsubst|1=|2=<templatestyles src="Script/styles_hebrew.css" />}}<bdi dir="rtl" class="script-hebrew" style="font-size:{{{size|125%}}}; {{{style|}}}" {{{attributes|}}} >{{{1}}}</bdi>

This template has two goals:

  1. The font-family definitions provided by Template:Script/styles_hebrew.css, which will bring an appropriate font to render Hebrew texts for better rendering, especially for texts with nikud.
  2. The CSS class allows Wikipedia users to specify their own style for Hebrew script text by including a custom font declaration for .script-hebrew in their user CSS; see Help:User style.

Examples

Placing a Hebrew sign in {{Script}}:

{{Script/Hebr|א}}

The result will be a <bdi> (a special form of <span> which isolates the input from any surrounding text, such as punctuation) with a class attribute:

<bdi dir="rtl" class="script-hebrew" style="font-size:125%;">א</bdi>

Which appears in your browser as:

א

Without {{Script}}:

א

How to override fonts in user's preferences

Any user can use another font with a different size by writing the following on their custom CSS. (see Help:User style)

An example making the font size 137%, and choosing SBL Hebrew to be the main font with 5 additional fonts:

.script-hebrew {
    font-size: 137% !important;
    font-family: "SBL Hebrew", David, Narkisim,
    "Times New Roman", FrankRuehl, Gisha, sans-serif !important; 
}
  • Font names containing spaces (or any other character than a letter) need to be put between " or '.
  • The list of fonts should always be terminated by the pseudo-font names "sans-serif" and/or "serif", to allow using the fonts defined in user preferences in their browser, or the fonts set by default in browsers.
  • Remember to add the phrase !important at the end of the font-size line and at the end of the font-family line, since they are already specified by the template and you want to override them.
  • You may choose to add the line-height phrase if you wanted to make lines in a paragraph more spaced from each other, or less spaced. line-height: 125%; Remember to put it before the }. The more number percentage, the more space is added. If you wanted to decrease the line height spacing, decrease the percentage. You may use any number (e.g. 85% or 140%) or use the special value normal which will properly use the minimum setting of the line-height recommended by each candidate font.

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Script/Hebrew in articles based on its TemplateData.

TemplateData for Script/Hebrew

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.