User:Jcreer/Misc: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
Line 240: Line 240:


{{Template:Pp-reset}}
{{Template:Pp-reset}}
{{Template:Pp-semi-protected}}


==Categories==
==Categories==

Revision as of 15:56, 9 February 2015


This page is for pages, templates, and categories I want to keep track of but don't have a place for them at the moment.

Pages

Tempates





{{ombox | type = style | image = Edit-clear.png | text = This template is used on many pages, and changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.


This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please Help:Reverting#Undo|undo]] it quickly, as this template may appear on a large number of pages.
Remember that you can conduct experiments, and should test all improvements, in either the local /sandbox or your user space before changing anything here.


Padlock.png

This high-risk templates has been protected from editing to prevent Vandalism. (protection log).
Please discuss changes on the talk page or request unprotection. You may use {{editprotected}} on the talk page to ask for an administrator to make an edit for you.



[[Category:{{{1}}}]]

%7B%7B%7B1%7D%7D%7D

Template:GSDALI

Template:GSDALIP

Template:GSDA Heading1

Missing text


Template:Case preserving encode


{{ombox | type = content | text = This template is used in system messages.
Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's [[User:Jcreer/Misc/sandbox|/sandbox or [[User:Jcreer/Misc/testcases|/testcases subpage, or in your own Wikipedia:Subpages#How to create user subpages|user space. The tested changes can then be added in one single edit to this template. Please discuss any changes at {{#if:|[[{{{2}}}]]|the [[User talk:Jcreer/Misc|talk page}} before implementing them. }}

This is the {{case preserving encode}}

meta-template.

This template is used inside the templates tl|sec link, tl|sec link auto, and tl|sec link image. (And it might be used in other templates too.)

This template is used to URL-encode wiki page names for external links to other MediaWiki wikis. Since MediaWiki's own URL-encode functions don't work when making links to other MediaWiki wikis.

This template preserves the case of the first character, and it correctly preserves the namespace name.

Usage

Technical details

For a detailed explanation of the methods used in this template see the Template talk:Sec link#About ((sec link)), ((sec link auto)) and ((sec link image))|talkpage of {{sec link}}.



<noinlcude> </noinclude>

Missing text

Template:Case preserving encode/doc


Missing text

Template:Case preserving encode/doc


Missing text

Template:Case preserving encode


Missing text

Template:Case preserving encode



This template is a "subroutine" of {{Citation/core}}

used for conditionally making links for the chapter= and title= fields in a citation. 

It is invoked as:

{{Citation/make link
| 1 = <value of IncludedWorkURL= or URL= or PMC= parameters>
| 2 = <value of IncludedWorkTitle= or Title= parameters>
}}

It uses the following algorithm:

  1. If the first parameter is empty, it returns the second parameter as plain text.
  2. If the first parameter is a URL, it returns the second parameter wrapped inside an external link to the first.

This "subroutine" is designed for {{Citation/core}}

and makes assumptions that may not be valid elsewhere.

Examples:

  • "{{Citation/make link||BBC News front page}}" produces "BBC News front page".
  • "{{Citation/make link|http://news.bbc.co.uk/|BBC News front page}}" produces "BBC News front page".



When to use

This template should be used only on articles that have sources.

It may be used with {{Refimprove}}

or other check references templates. This template should not be used with XMS Wiki:Stub|stubs.

The most common correct use of this template is to identify an article that uses more than one major citation style (e.g., half the citations use Wikipedia:Manual of Style/Layout#Standard appendices and footers|ref tags]], and half are Wikipedia:Parenthetical referencing|parenthetical citations]]).

Do not place on articles containing all parenthetical citations! They're not as easy to spot with a quick glance as superscripted blue numbers, but they are an acceptable form of Wikipedia:Inline citation|inline citation]]. Wikipedia:Citing sources|Wikipedia's guidelines]] generally prohibit editors from changing from one acceptable form of inline citations to another, especially for reasons of personal preference or to make one article match the style in another article.

This template may be removed by anyone who fixes the problems with confusing citation styles.

How to use

To use this template, place {{Citation style|date=March 2024}} on the article page or talk page in a location that may aid in conveying the message of the template. This template may be used within tl|Multiple issues and placement of this template on the article page is guided by Wikipedia:Template messages/Cleanup|Template messages/Cleanup]]. The following parameters may be specified for this template:

  • |date= should preferably be used to categorize the article in a subcategory of :Category:Wikipedia references cleanup. This helps with addressing aged cleanup messages. (e.g., {{Citation style|date=March 2024}}.)
  • |details= may be used to provide more details on some of the aspects that should be addressed for the given article. (e.g., {{Citation style|date=March 2024|details=In particular, citation titles should be specified}})
  • | A first unnamed parameter may be used to specify whether the template applies to the entire article or a section of the article (e.g., {{Citation style|section|date=March 2024}}. If not specified, the first unnamed parameter defaults to "article."

Operation

This template will categorise tagged articles into :Category:Wikipedia references cleanup and :Category:Articles covered by WikiProject Wikify.

This template is a Wikipedia:Manual of Style/Self-references to avoid|self-reference]].

This template should not be substituted.

Template data

TemplateDataHeader

This template generates a tag to indicate that the article needs additional inline citations.

Template parameters

ParameterDescriptionTypeStatus
Datedate

The month and year that the need for citations is identified, such as 'June 2013'; may use '{{subst:DATE}}' template instead

Stringoptional
Section1

Specifies the region of the page to which this template applies, such as 'section' or 'table'. Omit if the template applies to the whole article.

Stringoptional
Smallsmall

Any value (such as 'y') will result in the addition of 'See talk page for details.' to the tag

Stringoptional
Detailsdetails

A sentence explaining more about the problem.

Stringoptional

Redirects





See also

The following templates are useful in cases where there are some sources, but these are inadequate or insufficient

— Use only when a section contains zero inline citations.
— The article needs either more or better sources.
  • tl|Primary sources}} — See WP:Party and person]] for the differences between a primary and secondary source.
  • tl|Third-party}} — The article needs WP:Independent sources]].
  • {{No footnotes}}
— The article contains only Wikipedia:Citing sources#General references|General references]] rather than Wikipedia:Inline citation|Inline citations]]
— The inline citations are badly formatted.


  • Wikipedia:Template messages/Sources of articles]]
  • Wikipedia:Template messages/Cleanup/Verifiability and sources]]




"Error: no |title= specified when using {{Cite web}}". 

C

http://en.wikipedia.org/wiki/Template:Cleanup-refs

Template:Citation style/doc

Script error: No such module "Error".

[[:Category:{{{1}}}]]

Template:Cob

<noprint> </noprint>

There is currently missing text for this page.

Template:Cob

<noprint> </noprint>

Template:Cob

<noprint> </noprint>

|||||||||||||

<noprint> </noprint>

{{ombox | image = | text = This is the template test case page for the sandbox of User:Jcreer. Purge this page to update the examples.
If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page.

You can also use Special:Expanded Templates to examine the results of template uses.

You can test how this page looks in the different skins with these links:

{{select skin

}}Category:Template test cases

Documentation

----
{{documentation}}
----
{{documentation|Template:Documentation/testcases/test1}}
----
{{documentation|Template:Documentation/testcases/test2}}
----
{{documentation|content=This is in line documentation.}}
----
{{documentation|Template:Documentation/testcases/nodoc|content=Documentation.}}
----
{{documentation|Template:Documentation/testcases/test1|content=Documentation.}}
----

<noprint> </noprint>




Documentation


This is in line documentation.


{{documentation|Template:Documentation/testcases/nodoc|content=Documentation.


Documentation


Documentation.


Documentation/sandbox

----
{{documentation/sandbox}}
----
{{documentation/sandbox|Template:Documentation/testcases/test1}}
----
{{documentation/sandbox|Template:Documentation/testcases/test2}}
----
{{documentation/sandbox|content=This is in line documentation.}}
----
{{documentation/sandbox|Template:Documentation/testcases/nodoc|content=Documentation.}}
----
{{documentation/sandbox|Template:Documentation/testcases/test1|content=Documentation.}}
----

<noprint> </noprint>







Documentation


This is in line documentation.



Documentation


Documentation.



Documentation


Documentation.




Usage

Test doc page.




unknown

Template:Documentation/testcases


Template:Equation


Template:Equation


Template:Equation


Sandbox


Template:Hide in print


Template:Color



Template:Color


Template:Color


Template:Cot


Template:Cot


      



http://en.wikipedia.org/wiki/Template:Format_footnotes

Usage

This template simply returns the passed parameter. It can be used to exclude parts of a page (or template) in print versions. This works since it is a member of Category:Exclude in print.

Please note that the books functionality is still experimental. Hiding text in "PDF/book print" currently works different from hiding text for "normal printing". To hide something both in book and in normal printing, please use class="noprint" or {{noprint}}

.

Please also note that this template has an unresolved bug such that it hides edit links from any included sections, see Template talk:Hide in print#Hides edit link bug. This means that using this template may inconvenience wikipedia editors. However, without the Hide in print wrapper, any printed book or PDF will include possibly unwanted parts. Therefore, please avoid using this template to hide sections.

Examples

{{hide in print|text to be hidden}}


{{hide in print|1=text to be hidden that uses an = sign}}


Edit section link bug

{{hide in print|1=====hides edit link bug1====
If you can edit the section "hides edit link bug1" then one hide link bug has been resolved. Otherwise, the bug is still present.}}

The above boxed example produces the below unboxed result ====hides edit link bug1==== If you can edit the section "hides edit link bug1" then one hide link bug has been resolved. Otherwise, the bug is still present.


{{hide in print|1=text to be hidden that includes a section header

====hides edit link bug2====
If you can edit the section "hides edit link bug2" then a second possible hide link bug has been resolved. Otherwise, the bug is still present.}}

The above boxed example produces the below unboxed result

text to be hidden that includes a section header

hides edit link bug2

If you can edit the section "hides edit link bug2" then a second possible hide link bug has been resolved. Otherwise, the bug is still present.



This template is obsolete.

<noprint> </noprint>


This is the {{high-risk}}

message box.

It is meant to be put at the top of the documentation for the most high-use (high-risk) templates. That is for templates used on 100,000 pages or more.

For templates used on 2000 - 100,000 pages we instead recommend using {{high-use}}

which has a softer wording.

Note! It is normal that some of the links in the message box are red.

Usage

The template can be used as is. But it can also take some parameters:

  • First parameter is the number of pages. See Wikipedia:Database reports/Templates with the most transclusions to find out how many pages use a given template.
  • Second parameter is the name of some other talk page if you want discussion to be made there instead. But a better option might be to redirect the talkpage of your template to that other talkpage.

Here are some examples:

{{high-risk| 300,000+ | Wikipedia talk:High-risk templates }}


{{high-risk| 300,000+ }}


{{high-risk| | Wikipedia talk:High-risk templates }}


The full code for a /doc page top can look like this:

{{documentation subpage}}
{{high-risk| 300,000+ }}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->

Technical details

The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.

See also

– For templates used in the Wikipedia user interface.
– For the most high-use (high-risk) templates.
– For the slightly less high-risk templates.


– The protection template that usually is put on high-risk templates.




high-risk sandbox

<noprint> </noprint>

Template:High-risk

<noprint> </noprint>

See http://en.wikipedia.org/wiki/Template:High-use/sandbox

<noprint> </noprint>

See http://en.wikipedia.org/wiki/Template:High-use/testcases

<noprint> </noprint>


Please discuss changes on the talk page or request unprotection. You may use {{editprotected}} on the talk page to ask for an administrator to make an edit for you.



This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page. It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not.

Usage

Normal /doc

<noinclude>{{Documentation}}</noinclude>

Any /doc page

<noinclude>{{Documentation|Template:any page/doc}}</noinclude>

In-line content

<noinclude>{{Documentation|content=This is documentation.}}</noinclude>

In-line content with [view][edit] links

<noinclude>{{Documentation
|1 = Template:any page/doc
|content ={{Template:any page/doc|parameters}}
}}</noinclude>

Best practice

This code should be added at the bottom of the template code, with no extra space before "<noinclude>" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page.

Add categories and interwiki links to the documentation page inside <includeonly> </includeonly> tags.

If the documentation page contains includeonly or noinclude tags as part of the documentation, replace the "<" with "&lt;".

Customizing display

Overrides exist to customize the output in special cases:

  • {{documentation| heading = ...}} − change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.

Functions

If the documentation page doesn't exist, the "edit" link includes a preload parameter so that clicking it will pre-fill the edit form with the basic documentation page format.

Rationale

Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation, categories, and interwiki links.

See also

{{ Documentation }} family

Documentation/testcases/test2

Documentation, template/testcases

Documentation subpage/testcases

Meta Wiki {{ Documentation }} ancestor

  • tim|Documentation


Other similar templates

  • tl|Usage of template for a similar documentation template, but redesigned and appears yellow instead of blue.



Clowan:IWG_links



Template:Ifequal

<noprint> </noprint>


Note page has hidden operative code when viewed directly.
This template is used to extend the parser function '#ifeq:' to multiple tests.
  • The returned string is defined TRUE if any test pair of input parameters satisfies as if presented in any single #ifeq: test.
  • The returned value is essentially TRUE OR FALSE— garbage characters OR a null (computer) string, respectively. Thus it is suitable for testing by a simple #if:-then-else conditional on the calling page.
  • Applications are generally to display selective text for a set of pages, as in for example, a common usage page for templates, selected by specific page name cases.
  • This template takes upto eight pairs of arguments (i.e 16 m:Help:Template|numbered parameters]]), tests the odd verus the even, and returns true if any pair matches using the parser function '#ifeq:'.


This can be used to test for criteria which may be satisfied by some combination of mulitple magic words, such as {{SITENAME}} or {{PAGENAME}}.
  1. ifexist:Category:Miscellaneous templates|Category:Miscellaneous templates|Jcreer/Misc
  2. ifexist:Category:if-then-else templates|Category:if-then-else templates|Jcreer/Misc



<noprint> </noprint>

Template:Ifequal

<noprint> </noprint>

Template:Ifequal

<noprint> </noprint>

http://en.wikipedia.org/wiki/Template:Inconsistent_citations

Template:Used in system


[[Template:|v]]

Script error: No such module "Unsubst".


Jcreer/Misc

Template:Infobox Software

Jcreer/Misc
—  {{{type}}}  —
{{{official_name}}}
Coordinates:

{{{type}}}

Template:Intricate template


Actually, this template's syntax is relatively simple, but templates that link to the above message should be intricate, i.e., complex, using less obvious techniques, [[wikt:esoteric|esoteric syntax, combining different techniques, used as parameter for other templates, build to function for a variety of calling instances, etc. The above template adds templates to [[:Category:Intricate templates.



Template:Intricate template




This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please Help:Reverting#Undo|undo]] it quickly, as this template may appear on a large number of pages.
Remember that you can conduct experiments, and should test all improvements, in either the local /sandbox or your user space before changing anything here.

Usage

This template is intended as a meta-template, that is, a template that's used when constructing other templates. It's not meant for use directly in an article. See Help:Infobox for information on how to craft infoboxes in general.

Usage is similar to {{navbox}}

, but with an additional distinction. Each row on the table can either be a "header", or it can have a label/data pair, or it can just be a data cell. These are mutually exclusive states so if you define a row to be both a header and a label/data pair, the label/data pair is overridden.

Note that if you want to insert an image elsewhere other than the top of the infobox, or insert other "freeform" data, using a row with just a "data" field allows for that sort of thing.

Parameters

Mandatory:

name
The template page name that the "view/discuss/edit" links should point to. You can use {{subst:PAGENAME}}.
title
A title to put in the titlebar at the top.

Optional content:

image
An image to display at the top of the template. Use full image syntax, for example [[Image:example.png|200px]]. Image is centered by default.
caption
Text to put underneath the image.
header(n)
Text to use as a header in row n.
label(n)
Text to use as a label in row n.
data(n)
Text to display as data in row n.
below
Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information.


Optional CSS styling:

bodystyle
Applies to the infobox table as a whole
titlestyle
Applies only to the title cell
imagestyle
Applies to the cell the image is in (including the caption)
captionstyle
Applies to the text of the caption
headerstyle
Applies to all header cells
labelstyle
Applies to all label cells
datastyle
Applies to all data cells
belowstyle
Applies only to the below cell

Making fields optional

A row with a label but no data is not displayed. This allows for optional infobox contents. To make a field optional, use a parameter that defaults to an empty string, like so:

| data5        = {{{population|}}}

For more complex fields with pre-formated contents that would still be present if a parameter was unset, you can wrap it all in a simple "if" statement to make the whole thing vanish when not used. Example:

| data5        = {{#if: {{{mass|}}} | {{{mass}}} kg}}

You can make headers optional in a similar way. If you want a header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:

{{Infobox
| name         = {{subst:PAGENAME}}
| title        = Example of an optional header
| header1      = {{#if: {{{item_one|}}}{{{item_two|}}}{{{item_three|}}} | Optional header }}
| label2       = Item One
| data2        = {{{item_one|}}}
| label3       = Item Two
| data3        = {{{item_two|}}}
| label4       = Item Three
| data4        = {{{item_three|}}}
}}

The trick to this is that the "if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item_one, item_two and item_three are undefined will the if statement fail.

Examples

Test Infobox
Image:example.png
Caption for example.png
Header defined alone
Data defined alone
All three defined (header)
Label and data defined (label) Label and data defined (data)

Below text

{{Infobox
| name         = Infobox/doc

| title        = Test Infobox

| image        = [[Image:example.png|200px]]
| caption      = Caption for example.png

| header1      = Header defined alone
| label1       =
| data1        =

| header2      =
| label2       = Label defined alone
| data2        =

| header3      =
| label3       =
| data3        = Data defined alone

| header4      = All three defined (header)
| label4       = All three defined (label)
| data4        = All three defined (data)

| header5      =
| label5       = Label and data defined (label)
| data5        = Label and data defined (data)

| below        = Below text
}}


For this example bodystyle = width:20em; and labelstyle = width:33%;

Test Infobox
Label 1 Data 1
Label 2 Data 2
Label 3 Data 3
Header 4
Label 5 Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Below text


Full blank declaration

(Note: the template currently handles up to 40 rows, only 20 are included here since infoboxes larger than that will be relatively rare. Just extend the numbering as needed.)

{{Infobox
| name         = {{subst:PAGENAME}}
| bodystyle    =
| titlestyle   =
| imagestyle   =
| captionstyle =
| headerstyle  =
| labelstyle   =
| datastyle    =
| belowstyle   =

| title        =

| image        =
| caption      =

| header1      =
| label1       =
| data1        =

| header2      =
| label2       =
| data2        =

| header3      =
| label3       =
| data3        =

| header4      =
| label4       =
| data4        =

| header5      =
| label5       =
| data5        =

| header6      =
| label6       =
| data6        =

| header7      =
| label7       =
| data7        =

| header8      =
| label8       =
| data8        =

| header9      =
| label9       =
| data9        =

| header10     =
| label10      =
| data10       =

| header11     =
| label11      =
| data11       =

| header12     =
| label12      =
| data12       =

| header13     =
| label13      =
| data13       =

| header14     =
| label14      =
| data14       =

| header15     =
| label15      =
| data15       =

| header16     =
| label16      =
| data16       =

| header17     =
| label17      =
| data17       =

| header18     =
| label18      =
| data18       =

| header19     =
| label19      =
| data19       =

| header20     =
| label20      =
| data20       =

| below        =
}}

See also



Template:Link

Lps

[[Template:{{{1}}}]] ([{{fullurl:Template:{{{1}}}|action=edit}} edit]|[[Template talk:{{{1}}}|talk]]|[{{fullurl:Template:{{{1}}}|action=history}} history]|[{{fullurl:Special:Whatlinkshere/Template:{{{1}}}|limit=999}} links]|[{{fullurl:Template:{{{1}}}|action=watch}} watch]|logs)


Template:Jcreer/Misc (edit lnks hist)

Template:Lts


Template:Main other

User:Jcreer/Misc]]

Template:Mergefrom

Template:Ml-multi

<div class="thumb tright" style="width:Expression error: Unrecognized punctuation character "{".px;">

<div style="float:left;margin:1px;width:Expression error: Unrecognized punctuation character "{".px;">
[[Image:{{{image1}}}|{{{width1}}}px|alt=|]]

<div style="float:left;margin:1px;width:Expression error: Unrecognized punctuation character "{".px;">

[[Image:{{{image2}}}|{{{width2}}}px|alt=|]]

N


Usage

General

When one of the following examples is placed inside a given Help:templates, it adds navbar navigational functionality:

{{navbar|{{subst:PAGENAME}}|mini=1}}
{{navbar|{{subst:PAGENAME}}|plain=1}}
{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}

The {{subst:PAGENAME}} will be substituted with the template's name when parsed by the servers. For example, {{navbar|navbar/doc}} gives:

Font-size

Font-size is 88% when used in a navbar, and 100% when nested in a navbox. In the navbar, the weight is "normal"; when nested in navbox, it takes on the outer setting. The middot is bold.

Examples

Required parameters

  • {{navbar|Template Name}} – the template name is required.

Optional parameters

Options Parameters Produces...
Basic {{navbar|Template Name}}
Different text {{navbar|Template Name|text=This template:}}
Without "This box:" text {{navbar|Template Name|plain=1}}
Short version {{navbar|Template Name|mini=1}}
With a color option {{navbar|Template Name|fontstyle=color:green}}
With brackets {{navbar|Template Name|brackets=1}}

Deprecated parameters

The miniv=1, viewplain=1, nodiv=1 and fontcolor= parameters have been deprecated. To implement the view-only version, use the {{v}} or {{view}} templates instead.

Notes

Navbar is contained within a <div>...</div>

in order to accommodate a horizontal unnumbered list. This means it cannot be placed inside a <span>...</span>
or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements.

Prepackaged

{{Tnavbar-header}}
Positions v  •  d  •  e on the right edge of the line, often used in non-collapsible navbox heading.
{{Tnavbar-navframe}}
For use in conjunction with Navframe divs, positions v  •  d  •  e opposite of the [hide]/[show] feature.
{{Tnavbar-collapsible}}
For use in conjunction with Collapsible tables, floats v  •  d  •  e opposite of the [hide]/[show] feature.



Template:Navbar


Template:Navbar


Navigation templates comparison
Collapsible Header color Image Groups Style (body)
parameter/s
Examples
{{Navbox}}


collapsible navbox Left/right of body Yes Yes


  • tl|Governance of Greater London
{{Navbox with collapsible groups}}


collapsible navbox Left/right of body and/or in each list Yes Yes
  • tl|Scouting
  • tl|University of Michigan
tl|Navbox with columns collapsible navbox Left/right of columns No Yes
  • tl|Current U.S. Senators
  • tl|Historical regions of the Czech Republic
{{Navbox years}}


collapsible navbox No No No
  • tl|Wimbledon tournaments
Collapsible attributes
Type CSS classes Javascript Collapses when Custom
initial state
Nesting
Help:Collapsing|Collapsible tables collapsible Defined in Common.js 2 or more autocollapse on page Yes Yes

Template:Noprint



Usage

This template excludes text from an article when it is rendered into a digital document such as a PDF or DjVu file, or printed, either through the "Printable version" or the "Create a book" links on the side bar. It is used to hide elements that make no sense in print such as "Click the name of a town on the map for more details".

Where possible you can also use class="noprint" or span class="noprint" to any block element in order to hide that content from printing. This template is actually a shorthand for the latter option.

  • DO NOT use this on templates. Templates that need to be hidden from printing should be added to Category:Exclude in print instead.
  • DO NOT use this on large sections that include headings (==This is a heading==). This will cause the edit link next to the heading to disappear.

Keep in mind that one of the stated goals of the project is to allow for pages to be printed and used by travelers while they are traveling. This template should only be used in cases, such as the example above, where leaving content in would cause confusion.

Examples

{{noprint|text to be hidden}}


{{noprint|1=text to be hidden}}


If the content that is being hidden contains an equals (=) sign, you will have to use noprint|1= instead of noprint|. Otherwise there is no difference between using and not using the 1= after the vertical line.

See also



Template:Noprint


Template:Noprint


Script error: No such module "Message box".

Template:Ns


The Template:Ns inserts any count of non-breaking spaces (&#160;) as the number in parameter 1 (default: 3 spaces). The count is limited to 0-83 spaces, where 0 produces nothing. The intent is to provide a short markup template to insert extra spacing, rapidly, where text-wrapping is not wanted.

Usage:  3{{ns}}spaces{{ns}}here → 3   

spaces    here

The effect of the count, such as in "{{ns|30}}" is identical to putting 30 copies of "&#160;" into the text.

In translation of text to uppercase letters, the spacing is retained. Compare:

  • {{uc: Begin{{ns|4}}end }} → BEGIN    

END

  • {{uc: Begin{{spaces|4}}end }} → BEGIN&NBSP;&NBSP;&NBSP;&NBSP;

END For gaps wider than 83 spaces, then multiple instances can be used, such as "{{ns|80}}{{ns|10}}" to insert 90 non-breaking spaces.

Performance considerations

The Template:Ns has been designed to rapidly insert a few, or numerous, non-breaking spaces where wrapping is not wanted, such as to pad table headings or align some entries in columns. It has been clocked to run faster than 1,530x times per second (in December 2012). The number of spaces, from 0 to 83, does not affect the speed of formatting. It invokes [[wp:parser function {padleft:} to repeat "&#160;" several, or dozens, of times. Also, the expansion depth has been kept limited, as only 5 levels deep, to allow use anywhere, to generate spaces in any complex templates or tables.

Beyond the maximum count of 83 spaces, the template truncates at 500-characters long (limited by padleft), with "&#" at the end. The default count, as 3 spaces, was chosen because a 1-or-2-space gap is often coded as simply " &nbsp;" and hence, 3 spaces is the first gap needing longer markup. The short template name, "ns" avoids interleaving letters as "nsbp" for dyslexic users.

For gaps wider than 83 spaces, then multiple instances of    

can be used, such as "{{ns|80}}{{ns|10}}" to insert 90 non-breaking spaces.

See also

  • Template:In5 - to insert a mix of &nbsp and regular spaces which can wrap
  • Template:Gaps - to insert precisely-sized gaps between digits/words
  • Template:Spaces - to insert large, no-wrap span-tags to separate text 1-n spaces
  • Template:j - to join text or wikilinks as non-wrapped





Template:Ns


Template:Ns


Template:Only in print



Usage

This template can be used to include parts of a page (or template) only in print versions.

Example

{{only in print|text to be shown}}

{{only in print|1=text to be shown that uses an = sign}}


|||||||||||||||||


Test Cases


Script error: No such module "Error".



Script error: No such module "Message box".






Script error: No such module "Message box".



Script error: No such module "Message box".


Categories




Template:SMS Tools Template:PTM