Jump to content

උදවු:Editing

Wikibooks වෙතින්
(විකිපොත්:EDIT වෙතින් යළි-යොමු කරන ලදි)

Wikibooks is a wiki, which means that anyone can easily edit any unprotected page and save those changes immediately to that page. After your first edit, you are a Wikibooks editor! To request a change to a protected page, you may add your suggestion to the talk page. If you just want to experiment, please do so in the sandbox.

Editing a Wikibooks page is very easy. Simply click on the Edit tab at the top of a Wikibooks page. This will bring you to a new page with a text box containing the editable text of the original page. Once you're done, write a short edit summary in the small field below the edit box. You may use shorthand to describe your changes, and when you have finished, press the Show preview button to see how your changes will look. You can also see the difference between the page with your edits and the previous version of the page by pressing the Show changes button. If you're satisfied with what you see, be bold and press the Save page button. Your changes will immediately be visible to other Wikibooks users.

What you'll see when you go to edit a page and choose the Edit option.

Composition of an edit page

[සංස්කරණය]

The editing page consists of these sections:

The edit toolbar above the editing text box helps you produce wiki markup, instructions used to stylize text on a wiki page. In the edit toolbar above the editing text box seen when editing a page, if you click Help you can see what effects are possible with wiki markup. Another way you can learn how to produce specific effects is to click Edit on a page that contains the effect you wish to copy and see what markup is used.

Name Markup Displays
Basic
Bold
Make text '''bold'''
Make text bold
Italic
Make text ''italic''
Make text italic
Underline
Make text<u>underlined</u>
Make text underlined
Strikeout
<s>Strike out</s> text
Strike out text
Link
Link to [[Help:Contents|a page]], [[#Sections|a section of a page]] or an [http://www.wikimedia.org external page].
Link to a page, a section of a page or an external page.
Embed file
[[File:Vector toolbar insert image button.png]]
Insert references
Example text<ref>It is a note!</ref>
Example text[1]
Signature
Thanks guys --~~~~
Thanks guys --Example 07:46, 27 November 2005 (UTC)
Advanced
Heading Dropdown list for headings of different levels
== Level 2 (Section heading) ==
=== Level 3 ===
==== Level 4 ====
===== Level 5 =====
සැකිල්ල:Hiddenh2
Level 3
සැකිල්ල:Hiddenh4සැකිල්ල:Hiddenh5
Text Type Dropdown list for text or programming code of different types
<tt>Teletype text</tt>, <code>inline code</code>, <source lang="text">generic source code</source>
Teletype text, inline code,
generic source code
Insert a bulleted list item
* Bulleted list item
  • Bulleted list item
Insert a numbered list item
# Numbered list item
  1. Numbered list item
Text indentation
:Indented line
Indented line
Ignore wiki markup
<nowiki><math>2^3</math></nowiki>
<math>2^3</math>
Insert new line
 example <br /> text
example
text
Big text
<big>Big text</big>
Big text
Small text
<small>Small text</small>
Small text
Superscript text
<sup>Superscript text</sup>
Superscript text
Superscript text
<sub>Subscript text</sub>
Subscript text
Insert picture gallery
<gallery>
File:Example.jpg|Caption1
File:Example.jpg|Caption2
</gallery>
Insert table (opens a configuration window to select the number of rows and columns and some other options)
{| class="wikitable"
|-
! Header text
|-
| Example
|}
Header text
Example
Page redirect
#REDIRECT [[WB:HELP]]
#REDIRECT WB:HELP
Search and replace Opens the search and replace window

An edit summary is a brief explanation of an edit to a Wikibooks page. When you edit a page, there is a small text entry field, which is labeled "Edit summary", located under the main edit box and above the "Save page" button. Edit summaries are displayed in lists of changes (such as page histories and watchlists), and at the top of diff pages.

It is good practice to fill in the "Edit summary" field, or add to it in the case of section editing, as this helps others to understand the intention of your edit. To avoid accidentally leaving edit summaries blank, you can select "Prompt me when entering a blank edit summary" on the Editing tab of your user preferences, if you have created an account.

Always provide an edit summary

[සංස්කරණය]

It is considered good practice to always provide an edit summary, but it is especially important when reverting the actions of other editors, or if you delete any text; otherwise, people may question your motives for the edit.

Accurate summaries help other editors decide whether it is worthwhile for them to check a change, and to understand it if they choose to check it. Summaries are less essential for "minor changes", but a summary like "fixed spelling" is helpful even then.

Qualities of good summaries

[සංස්කරණය]
  • Summarize. Summarize the change, even if only briefly; even a short summary is better than no summary.
  • Explain. Give reasons for the change, if there is a reasonable chance that other editors may be unclear as to why it was made.
  • Abbreviations. Experienced users, especially those with many edits to make, will often use abbreviations in order to save time; for example, "rv" for "revert", or shortcuts for Wikibooks policies and related pages, e.g., "WB:WIW" for Wikibooks:What is Wikibooks (see Wikibooks:Shortcuts). Abbreviations should be used with care, although they save one editor time they may cost readers much more time to figure out what they mean, they can be confusing for inexperienced users, but they are generally fine for small edits such as formatting and grammar changes.
  • Talk pages. When editing talk pages, consider copying your comment to the edit summary, especially if it is brief; this allows users to check Recent changes, Page history and User contributions very efficiently. It also reduces the load on the servers.
  • Harmony between text and edit summary. Make sure that important information is not only included in the edit summary. This applies especially on talk pages. Readers who only see the text may miss that important information, and they may then respond inappropriately through no fault of their own. Try to prevent misunderstandings. If an edit requires more explanation than will fit in the edit summary box, use the Discussion page instead, and put in the edit summary "see talk" or "see discussion".
  • Avoid misleading summaries. Mentioning one change but not another one can be misleading to someone who finds the other one more important; add "and misc." to cover the other changes.
  • Avoid inappropriate summaries. Editors should explain their edits, but not be overly critical or harsh when editing or reverting others' work. This may be perceived as uncivil, and cause tension or bad feelings, which makes collaboration more difficult. Explain what you changed, and cite the relevant policies, guidelines, or principles of good writing, but try not to single out others in a way that may come across as an attack.
  • Limited to 200 characters. The edit summary box can hold one line of 200 characters. If you attempt to type or paste more, only the first 200 characters will be displayed—the rest will be discarded. For example attempting to add 10 new characters (at the end or in between) to a summary already containing 195 characters will result in the first 5 new characters being inserted and the second 5 being disregarded.
  • Can be previewed. The "Show preview" button also provides a preview of the edit summary to facilitate checking links.
  • Can't be changed after saving. After you save the page, you cannot change the edit summary.
  • Doesn't appear in searches. The search function cannot search edit summaries, and they are not indexed by external search engines.
  • Wikilinks always rendered; other wikitext coding ignored. Text in edit summaries renders internal links, including piped links, and interwiki links, even when enclosed within <nowiki> and </nowiki>. Therefore, copying wikitext in the edit summary box may be preferable to copying text from the preview, except when one wants to save space. Other wikitext coding is not interpreted.
  • URLs. When copying an external link from the preview into the edit summary box then, depending on the operating system, the "printable version" is copied, i.e., how it is normally rendered, and in addition, between parentheses, the URL; hence the same information as in the wikitext, but in a different format, as well as a possible sequential number.

Minor edit checkbox

[සංස්කරණය]

A check to the minor edit box signifies that only superficial differences exist between the current version and the previous version. Examples include typographical corrections, formatting and presentational changes, rearrangement of text without modification of content, etc. A minor edit is one that the editor believes requires no review and could never be the subject of a dispute, such as changing "teh" to "the". An edit of this kind is marked in its page's revision history with a lower case, bolded "m" character (m).

By contrast, a major edit is one that should be reviewed for its acceptability to all concerned editors. Therefore, any change that affects the meaning of a page is not minor, even if the edit concerns a single word; for example, the addition or removal of "not", which can change the meaning of a sentence, is a major edit.

Because editors may choose to ignore minor edits when reviewing recent changes, the distinction between major and minor edits is significant. Logged-in users might even set their preferences to not display minor edits. If there is any chance that another editor might dispute a change, it is best not to mark the edit as minor.

Users who are not logged in to Wikibooks are not permitted to mark changes as minor because of the potential for vandalism. The ability to mark changes as minor is one of many reasons to register.

A good rule of thumb is that edits consisting solely of spelling corrections, formatting changes, or rearrangement of text without modification of content should be flagged as minor edits.

When to mark an edit as a minor edit

[සංස්කරණය]
  • Spelling and grammatical corrections.
  • Simple formatting (e.g., capitalization, punctuation, or properly adding italics to non-English words, like folie des grandeurs).
  • Formatting that does not change the meaning of the page (e.g., moving a picture, splitting one paragraph into two—where this is not contentious).
  • Obvious factual errors (e.g., changing "Nixon resigned in 1874" to "Nixon resigned in 1974").
  • Fixing layout errors.
  • Adding or correcting wikilinks, or fixing broken references already present in the page.
  • Removing vandalism and graffiti.

Things to remember

[සංස්කරණය]
  • Any change to the source text, even if it does not affect the presentation of the page in HTML (if it involves adding a space or a line break, for example) will still be treated as a change according to the database.
  • Marking a major change as a minor one is considered poor etiquette, especially if the change involves the deletion of some text.
  • Reverting a page is not likely to be considered minor under most circumstances. When the status of a page is disputed, and particularly if an edit war is brewing, then it is better not to mark any edit as minor. Reverting blatant vandalism is an exception to this rule.
  • If you accidentally mark an edit as minor when it was in fact a major edit, you should make a second edit, or dummy edit, noting in the dummy's edit summary that the previous edit was major. As a trivial edit to be made for this purpose, just opening the edit box and saving (i.e. changing nothing) will not work; neither will adding a blank space at the end of a line or a blank line at the end of the page—in these cases the edit is cancelled and the edit summary discarded. However, one can, for example, add an extra space between two words. This will be preserved in the wikitext and recorded as a change, although it will not change the page's appearance when rendered.
  • It may be worth communicating any disagreement about what is minor via Talk or a message to the contributor, being careful to avoid a flame war ("I thought your change was a bit more than minor—maybe I am being over-sensitive?"). There is a grey area, and many contributors will appreciate feedback on whether they've got it right.
  • Marking your change as minor affects how it displays in some editors' watchlists. If, for example, you mark your talk page comments as "minor", then fewer editors are likely to notice your comment.

Administrators and reviewers can semi-automatically revert the edits of the last editor of a page; all such rollback reversions are marked as minor by the wiki software. The intended use of the rollback feature is for cases of vandalism, where the act of reverting any vandalism should be considered minor (and can be ignored in the recent changes list).

Show preview button

[සංස්කරණය]

Below the edit box is a Show preview button. Pressing this will show you what the page will look like without actually saving it. It is strongly recommended that you use this prior to saving. This allows you to check what the page will look like first and to check that you haven't made any errors. It also prevents the need for multiple saves. Saving the same page numerous times in quick succession makes it harder for people to check what changed, and clogs up the page history.

It is helpful, to save the page before moving, breaking apart, or combining sections of the page, if you have been making small edits to the page. The difference display is not good at showing paragraph moves, and will not display the small edits clearly if sections are then moved around.

Saving only once is also a way of avoiding edit conflicts, as people will not see the page on recent changes, and therefore they are less likely to try editing it at the same time as you.

If you are logged in, you can set your preferences to show the preview before the edit box instead of after it. If you select this option, the preview will be displayed above the edit box when you click the "Show preview" button while editing a page. See Help:Account management#Preferences.

Using show preview also prevents your login timing out, which would mean your edits would not be attributed to your username. Clicking preview regularly will restart the timer, so you remain logged in. Also, if you are no longer logged in, showing a preview will make you aware of this so you can log in and save your work after that. You can check this by seeing if your username appears in the upper-right corner when you press preview. If you are not logged in, open Special:UserLogin in a separate window (right-click "Log in" and hit "Open link in new window" or similar). Log in, then go back to your editing and hit "preview" again to make sure all is well. Note that this will clear the minor edit and watch checkboxes, so make sure they're set appropriately again before you finally save the page.

When utilizing this feature during a major edit, consider copying the content into your clipboard. On extremely rare occasions, the Wikibooks servers have hiccups, and you could lose your work.

When pressing "Show preview", a preview of the edit summary is also obtained; thus (for example) links can be checked.

Composition of a book page

[සංස්කරණය]

Sections are created by creating their headings, as below.

==Section==

===Subsection===

====Sub-subsection====

Please do not use only one equals sign on a side (=Heading=). This would cause a section heading to be as large as the page's name (title).

Heading names of sections (including subsections) should be unique on a page. Using the same heading more than once on a page causes problems:

  • An internal link (wikilink) to a section, in the form [[Pagename#Section heading]], will only link to the first section on the page with that name, which may not be the intended target of the link. See section linking on linking to a section.
  • When a section with a duplicate name is edited, the edit history and summary will be ambiguous as to which section was edited.
  • When saving the page after a section edit, the editor's browser may navigate to the wrong section.

Table of contents (TOC)

[සංස්කරණය]

For each page with more than three section headings, a table of contents (TOC) is automatically generated from the section headings, unless:

  • (for a user) preferences are set to turn it off
  • (for a page) the magic word __NOTOC__ (with two underscores on either side of the word) is added to the page

Positioning the TOC

When either __FORCETOC__ or __TOC__ (with two underscores on either side of the word) is placed in the wikitext, a TOC is added even if the page has fewer than four headings.

With __FORCETOC__, the TOC is placed before the first section heading. With __TOC__, it is placed at the same position where this code is placed. There may be some introductory text before the TOC, known as the "lead". Although usually a heading after the TOC is preferable, __TOC__ can be used to avoid being forced to insert a meaningless heading just to position the TOC correctly, i.e., not too low.

Floating the TOC

The TOC can, in some instances, be floated either right or left using {{TOC right}} or {{TOC left}} when it is beneficial to the layout of the page, or when the default TOC gets in the way of other elements. Before changing the default TOC to a floated TOC, consider the following guidelines:

  1. If a page will be adversely affected by the change, don't float the TOC.
  2. When floating a TOC, check whether the page layout will be harmed if the TOC is hidden by the user.
  3. Long lists may create very long TOCs. The TOC should not be longer than necessary, whether it is floated or not. Limiting the depth of the TOC can be used to reduce the length of the TOC by hiding nested subsections, rather than using a floating TOC (see below).
  4. The default TOC is placed before the first headline, but after any introductory text (unless changed by the page's editors). If the introductory summary is long enough that a typical user has to scroll down to see the top of the TOC, you may float the TOC so it appears closer to the top of the page.
  5. Floating a wide TOC will produce a narrow column of text for users with low resolutions. If the TOC's width exceeds 30% of the user's visible screen (about twice the size of the Wikibooks navigation bar to the left), then it is not suitable for floating. (Percentages assume a typical user setup.)
  6. If the TOC is placed in the general vicinity of other floated images or boxes, it can be floated as long as the flowing text column does not become narrower than 30% of the average user's visible screen width.
  7. A left-floated TOC may affect bulleted or numbered lists.

Limiting the depth of the TOC

When a page has a very large number of subsections (such as this page), it may be appropriate to hide lower-level subsections from the TOC. You can specify a limit for the lowest-level section that should be displayed using {{TOC|limit=n}}, where n is the number of = signs that are used on each side of the lowest-level section header that should be displayed (e.g. 3 to show ===sections=== but hide ====sections====). The limit=n parameter can also be given to {{TOC left}} or {{TOC right}} the same way.

Linking to the TOC

You can make a link to the TOC using the following:

Sections vs. separate pages

[සංස්කරණය]

Advantages of separate pages:

  1. what links here feature
  2. separate edit histories
  3. some template limits apply per page
  4. automatic redirect on renaming
  5. loading one small page is faster than loading one large page—but are readers more likely to want to use just one section or to browse many of the sections of the topic?—see advantages of combined pages
  6. one small page is easier to navigate than one large page—but see above
  7. can separately be put in categories

Advantages of one combined page with sections:

  1. loading one combined page is faster and more convenient than loading several divided ones
  2. searching within one large page or its wikitext with a local search function is faster and has advantages over searching several pages using the site search engine or a web search engine
  3. the automatic table of contents provides for convenient navigation.
  4. more likelihood of editorial cohesion of a concept compared to having several pages likely to be independently edited
  5. duplication of items relevant to each section is avoided

සැකිල්ල:Meta Links give readers one-click access to other Wikibooks pages, other Wikimedia projects, and external websites.

A wikilink or internal link links a page to another page within English Wikibooks.

  • [[Main Page]] gives Main Page (link to Main Page, labeled Main Page).
  • [[Main Page|Home]] gives Home (link to Main Page, labeled Home).
  • [[Main Page]]s gives Main Pages, just like [[Main Page|Main Pages]] does: Main Pages.
  • [[Main Page|Home]]s gives Homes, just like [[Main Page|Homes]] does: Homes.
  • [[Main Page]]'s gives Main Page's (punctuation is not appended to the link).
  • [[Main Page]]<nowiki>s</nowiki> gives Main Pages.
  • [[Main Page]]''s'' gives Main Pages.
  • ''[[Main Page]]s'' gives Main Pages.
  • [[Cookbook|Cook]]book<nowiki>s</nowiki> gives Cookbooks.

Links with a specified label are said to be "piped" because of the pipe symbol used ( | ). For certain types of link, the label will be generated automatically if a pipe is typed with no label after it (thus saving you typing). See piped links below.

The link target is case-sensitive except for the first character (so calculus links to Calculus, but CAlculus does not).

If the target of a wikilink does not exist, it is displayed red, and is called a red link. If a red link is clicked, the user is taken to a page where it is possible to create a page under the red-linked title. Red links to a particular (non-existent) title can be detected using the What links here feature.

If the target of a link is the same as the page on which it appears (a self-link), it is displayed in bold, as in Help:Editing.

Attempting to link normally to a file page, category page or interlanguage link will produce a different effect: it will place the image on the page, add the page to the category or create an interlanguage link at the edge of the page. To override this behavior, add an initial colon, as in [[:File:Mediawiki.png]], [[:Category:Help]], [[:fr:Help:Contents]].

A piped link is an internal link or interwiki link where the link target and link label are both specified. This is needed in the case that they are not equal, while also the link label is not equal to the link target with the last word extended. This allows linking a word or phrase within the text of a page rather than using "see also", even if the wording does not exactly correspond with the name of the target page. With a suitable browser and depending on the preferences set, one can still see the link target: when you point at the link, the name shows up in a hover box and is also shown in the status bar.

For instance: [[Help:Contents|Help]] will show as Help.

If in a piped link the part after the "|" is left empty, it is converted to an abbreviated form of the page name on the left, as follows:

  1. any word before the first colon (:), as well as the colon itself, is removed. This word may or may not be a namespace prefix (such as "Help:") or an interwiki prefix (such as "commons:").
  2. if there is text in parentheses at the end it will be removed
  3. if there are no parentheses but there is a comma, the comma and everything after it is removed
  4. the link will be in whatever case is used.

Just like for the four tildes when adding a signature, in a preview, the result already shows up in the preview itself, but the conversion in the edit box is not yet shown. Press "Show changes" to see the change in the wikitext.

Colon

  • [[Help:Templates|]] is converted to [[Help:Templates|Templates]], which is rendered as Templates
  • [[Programming:C++|]] is converted to [[Programming:C++|C++]], which is rendered as C++ - even though "Programming:" is not a namespace the shortcut works anyway
  • [[w:Key Largo (film)|]] is converted to [[w:Key Largo (film)|Key Largo]], which is rendered as Key Largo

Case

  • [[w:pipeline (Unix)|]] is converted to [[w:pipeline (Unix)|pipeline]] which is rendered as pipeline.
  • [[w:Pipeline (Unix)|]] is converted to [[w:Pipeline (Unix)|]] which is rendered as Pipeline.

Comma

  • [[commons:Boston, Massachusetts|]] is converted to [[commons:Boston, Massachusetts|Boston]], which is rendered as Boston.

Subpages can be linked to with relative links, without giving the full page name. The following example shows how we link to various pages from the hypothetical Snappy Title/Logical section. Note that that the full page name in the link title can be suppressed by appending another slash. For more flexibility, use a piped link as normal.

Full page name of the link target Relative link Displays as
Snappy Title [[../]] Snappy Title
Snappy Title/Sister page [[../Sister page]] Snappy Title/Sister page
Snappy Title/Sister page [[../Sister page/]] Sister page
Snappy Title/Logical section/interesting topic [[/interesting topic]] Snappy Title/Logical section/interesting topic
Snappy Title/Logical section/interesting topic [[/interesting topic/]] interesting topic

Note that the first character of sub-pages is case-sensitive.

[සංස්කරණය]

External links use absolute URLs to link directly to any webpage. External links are in the form [http://www.example.org link name] (resulting in link name), with the link name separated from the URL by a space. Links without link names appear numbered: [http://www.example.org] becomes [1]. Links with no square brackets display in their entirety: http://www.example.org .

Special:LinkSearch finds all pages linking to a given site.

The external link syntax can also be used to link to particular page versions within Wikibooks that are not accessible by wikilinks, such as page history, edit view, an old version of a page, the diff between two versions, etc.

To display a link without the arrow icon, place the external link syntax between <span class="plainlinks">...</span> tags.

[සංස්කරණය]

To link to a section in the same page you can use: [[#Section name|displayed text]], and to link to a section in another page: [[Page Name#Section name|displayed text]].

The section title in fact points to an "anchor" on the target page. It is possible to define anchors other than explicit section titles, using the template {{anchor|anchor name}}. However [[#top]] and [[#toc]] are reserved names that link to the top of a page and the table of contents, respectively.

Section links still work if the wikilink is a redirect (for example, if Help:About redirects to Wikibooks:Welcome, then Help:About#General Information will link to the "General Information" section of Wikibooks:Welcome). It is also possible to put section links inside redirects. For example, WB:LINK redirects to Help:Editing#Links. Note that an explicit section link overrides any section link in a redirect, so WB:LINK#Interwiki links will go to the "Interwiki links" section of this page. Anchor links can also be added to external links and to interwiki links, again using the # syntax.

[සංස්කරණය]

Interlanguage links are links from any page at here at the English language Wikibooks to nearly equivalent or exactly equivalent pages in another language Wikibooks.

The interlanguage links take the following form:

[[language code:Title]]

where the language code is the two-letter code as per ISO 639-1. (See Complete list of language Wikibooks available. English is "en", Japanese is "ja", etc.) So for example in the English language book on Calculus, which is available on many other wikis, the interlanguage links might look like this:

[[ja:解析学基礎]]
[[nl:Analyse]]
[[zh:微积分学]]

Note: These links are treated specially, and don't show up in the body of the text, but rather in a special sidebar section "in other languages" listed by language name. Technically they can go anywhere in the page; placement does not alter the visual appearance of the links on the rendered page except for the order. However, the convention is to put them at the bottom of the wikitext.

[සංස්කරණය]
Project Long form Shortcut
Wikipedia [[wikipedia:]] [[w:]]
Wiktionary [[wiktionary:]] [[wikt:]]
Wikinews [[wikinews:]] [[n:]]
Wikiquote [[wikiquote:]] [[q:]]
Wikisource [[wikisource:]] [[s:]]
Wikispecies [[wikispecies:]] [[species:]]
Wikiversity [[wikiversity:]] [[v:]]
Wikivoyage [[wikivoyage:]] [[voy:]]

An interwiki link links to a page on another Wikimedia project website, such as Wikipedia or another language Wikibooks. Other sites are listed in the interwiki map. These links have the same [[...]] syntax as wikilinks (see above), but take a prefix which specifies the target site. For example, [[w:Help:Contents]] links to the "Help:Contents" page on Wikipedia. Links can be piped as with wikilinks. Remember that an interlanguage link should be preceded by a colon if it is to be displayed where it appears in the text; otherwise it will be listed at the side of the page (which is appropriate only if it is the most closely corresponding page in the other language Wikibooks).

Interwiki links (like external links) are displayed in a slightly paler blue than ordinary wikilinks. MediaWiki does not detect whether these target pages exist, so they are never displayed red. The interwiki links for the major Wikimedia projects are shown at right.

Some people prefer to use templates that wrap the above interwiki link syntax with some nice formatting -- {{Wikipedia}}, {{Wikipediapar}}, {{Wikipedia-inline}}, {{Wikiversity}}, {{Wikisource}}, {{Wikiquote}}, {{Wikivoyage}}, etc.

References present citations to reliable sources that support assertions. Footnotes add explanatory material and are useful if the added information would be distracting if written out in the main text.

Inserting references

[සංස්කරණය]

Single citation of a reference or footnote

At the point of citation in the page, enter the footnote or reference like this:

<ref>Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.</ref>

You can include formatting and links in the footnote or reference in the usual way. The reference becomes visible in the <references/> list at the bottom, if there is one.

Creating the list of references or footnotes

At the point where you want the text of the footnotes or references to appear (usually at the end of the page in a Notes or References section), insert the tag:

<references/>

The template {{reflist}} is an alternative, mostly used if there are many footnotes.

Multiple citations of the same reference or footnote

To cite the same reference or footnote several times, identify it using the name parameter of the <ref> tag.

At one of the citation points (it makes sense to choose the first), enter the reference like this:

<ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref>

Then at all the other citation points, just enter:

<ref name="Perry"/>

You are free to pick any footnote name, subject to a few rules. The footnote name is internal and will not be displayed anywhere when the page is viewed. Footnote names are case sensitive and may not be a numeric integer. Names and groups should be kept simple and restricted to the standard English alphabet and numerals.

Using templates to insert reference text

A number of templates, such as a generic {{citation}}, or more specific {{cite book}}, {{cite web}}, etc., are available to format the text between <ref> and </ref> tags in a more structured way. These are listed at Category:Citation templates. Their use is optional: they do aid with consistent formatting, but on the other hand they can make editing more cumbersome.

Appearance of references

[සංස්කරණය]

The <ref> tags in the main text are converted to auto-numbered superscripts, like this:

The only reference to Excel For Dummies.[1] The first reference to Perry's Handbook.[2] The second reference to Perry's Handbook and to another, related book.[2][3] A statement that requires a reference. The only reference to Linux in a Nutshell.[4] And third reference to Perry's Handbook.[2]

Clicking on a numbered superscript takes you straight to the text of the corresponding footnote or reference.

The <references/> tag is expanded to show the text of the footnotes or references against their corresponding numbers, like this:

  1. Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.
  2. 2.0 2.1 2.2 Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.
  3. Nuclear Chemical Engineering (2nd Edition), McGraw-Hill Co., 1981.
  4. Linux in a Nutshell, O'Reily Co., 2003.

For single citations, clicking on the arrow () takes you to the point of citation in the main text. For multiple citations, the links back to the main text are distinguished by letter superscripts (a, b, c etc.). Clicking on a letter superscript takes you to the corresponding citation in the main text.

Separate lists of references and footnotes

[සංස්කරණය]

Sometimes it is convenient to separate explanatory footnotes from references. This can be accomplished with the "group" parameter:

This part of the text requires clarification,<ref group="note">Listed separately from the citation</ref> whereas the entire text is cited.<ref>Citation.</ref>

;Notes
<references group="note"/>

;References
{{reflist|close=1}}

This part of the text requires clarification,[note 1] whereas the entire text is cited.[1]

Notes
  1. Listed separately from the citation
References
  1. Citation.

Note that, at present, such footnotes cannot themselves contain reference links.

Footnotes may also be listed at the ends of each section of text by closing the {{reflist}} template with the "close" parameter, as shown in the box just above.

List-defined references

[සංස්කරණය]

The software also allows named references to be defined within the reference list rather than in the main text. This can make editing pages much easier, particularly on heavily cited sections. For example:

The quick brown fox jumps over the lazy dog.<ref name="LazyDog"/>

<references>
<ref name="LazyDog">This is the lazy dog reference.</ref>
</references>

The quick brown fox jumps over the lazy dog.[1]

  1. This is the lazy dog reference.

This can also be done using the {{reflist}} template with a |refs= parameter. If desired, the |group= parameter can be used to group references for the template:

How razorback-jumping frogs<ref name="Batteries" group="note"/> can level six piqued gymnasts.<ref name="JumpingFrogs"/>

;Notes
{{reflist|group="note"|
refs=
<ref name="Batteries" group="note">Batteries not included.</ref>
}}
;References
{{reflist|
refs=
<ref name="JumpingFrogs">This is the jumping frogs reference.</ref>
}}

How razorback-jumping frogs[note 1] can level six piqued gymnasts.[1]

Notes
  1. Batteries not included.
References
  1. This is the jumping frogs reference.

There are three types of lists: unordered lists, ordered lists, and definition lists.

wikitext rendering
* Unordered lists are easy to do:
** start every line
* with a star
** more stars mean
*** deeper levels
  • Unordered lists are easy to do:
    • start every line
  • with a star
    • more stars mean
      • deeper levels
* A newline
* in a list  
marks the end of the list.
Of course
* you can
* start again.
  • A newline
  • in a list

marks the end of the list. Of course

  • you can
  • start again.
# Numbered (ordered) lists are good
## very organized
## easy to follow
  1. Numbered (ordered) lists are good
    1. very organized
    2. easy to follow
* You can also
** break lines
** like this
  • You can also
    • break lines
    • like this
; Definition lists
; item : definition
; semicolon plus term
: colon plus definition
Definition lists
item
definition
semicolon plus term
colon plus definition
* Or create mixed lists
*# and nest them
*#* like this
*#*; definitions
*#*: work:
*#*; apple
*#*; banana
*#*: fruits
  • Or create mixed lists
    1. and nest them
      • like this
        definitions
        work:
        apple
        banana
        fruits

For simplicity, list items in wiki markup cannot be longer than a paragraph. A following blank line will end the list and reset the counter on ordered lists. Separating unordered list items with blank lines may look approximately normal on your screen, but it creates many separate one-item lists, which is a problem for people using screen readers, causing accessibility problems for people with disabilities.

On Wikibooks, reverting means undoing the effects of one or more edits, which normally results in the page being restored to a version that existed sometime previously. More broadly, reverting may also refer to any action that in whole or in part reverses the actions of other editors.

This page contains technical information about making reverts. It should be borne in mind, however, that reverting good-faith actions of other editors (as opposed to vandalism) is considered disruptive when done to excess, and can even lead to the reverter being blocked from editing.

Manual reverting

[සංස්කරණය]

In some cases (for example, if a vandal added or removed text, and unrelated constructive edits have been made since), the easiest way to undo past edits may simply be to edit the current page, deleting wrongly added text or restoring wrongly deleted text (this can be copied and pasted from a past version of the page). However, it may be more convenient to restore a particular old version of the page from prior to the changes you wish to revert. To do this:

  • Click the "history" tab at the top of the page to display the page history.
  • Click the time and date of the earlier version to which you wish to revert. You will see a phrase similar to: "This is an old revision of this page, as edited by ***.***.***.*** (talk) at 15:47, January 24, 2024. It may differ significantly from the current revision."
    • Important: in the case of vandalism, take the time to make sure that you are reverting to the last version without the vandalism; there may be multiple consecutive vandal edits or they may be interspersed between constructive edits.
  • Click the Edit tab as you normally would to edit a page. (Above the edit box, you will see a warning similar to: "You are editing an old revision of this page. If you save it, any changes made since then will be removed.") If editing requires a registered account, log in first, or leave a note on the discussion page.
  • Complete the edit summary field (the abbreviation "rv" can be used to stand for "revert"; the edit summary "rvv" means "reverting vandalism").
  • Save the page.
  • If constructive edits had been made after those that you wished to revert, return to the page history to find those edits, and redo them by hand if reasonably possible.

If reverting vandalism, check the contribution history of the user who vandalized the page. If this user is vandalizing many pages, report them.

The MediaWiki software sometimes enables editors to easily revert (or "undo") a single edit from the history of a page, without simultaneously undoing all constructive changes that have been made since. To do this, view the page history or the diff for the edit, then click on "undo" next to the edit in question. The software will attempt to create an edit page with a version of the page in which the undesirable edit has been removed, but all later edits are retained. There is a default edit summary, but this can be modified before saving.

It is also possible to undo several consecutive edits, even if they conflict among themselves: view the diff to be removed (by selecting the two extremal revisions in the history and clicking "compare selected revisions"), and click the "undo" link.

This feature removes the need to manually redo useful changes that were made after the edit which is being reverted. However, it will fail if undoing the edit would conflict with later edits. For example, if one edit adds a paragraph and a later edit modifies that paragraph, it will be impossible to automatically undo the earlier edit. In this case, you must determine how to resolve the problem manually.

Administrators and reviewers who have been granted access to the rollback feature have additional links which:

  • appear only next to the top edit
  • revert all top consequent edits made by last editor
  • work immediately, without the intermediate confirmation diff page
  • add automatic edit summary "m Reverted edits by Example (talk) to last version by Example2", marking edit as minor

Rollback links appear on the user contributions pages, user watchlists, history pages and diff pages. Note that in the last case, rollback links can be misleading, since reversion is not necessarily to the old version shown (the diff page may show the combined result of edits, including some by other editors or only part of the edits the rollback button would revert). To see the changes the rollback button will revert, view the specific diff that compares the last version from the last editor with the last version from the previous editor.

Rollback works much quicker than undo, since it:

  • allows reverting without even looking at the list of revisions or diff
  • does not require loading an edit page and sending the wikitext back to the server
  • does not require a click of the save button

On the other hand, it is not as versatile as undo, since it does not allow specification of which edits have to be undone. One may want to revert more or less edits than the rollback does or edits which do not include the last edit. It also does not allow adding an explanation to the automatic edit summary and it should only be used to revert obvious vandalism.

Rolling back a good-faith edit, without explanation, may be misinterpreted as "I think your edit was no better than vandalism and reverting it doesn't need an explanation". Some editors are sensitive to such perceived slights; if you use the rollback feature other than for vandalism (for example, because undo is impractical due to the large page size), it is courteous to leave an explanation on the book's discussion page or on the talk page of the user, whose edit(s) you have reverted.

If someone else edited or rolled back the page before you clicked the "rollback" link, or if there was no previous editor, you will get an error message.

Redirecting a page causes navigation to a given title to take the reader directly to a different page. The page the reader visits first is called the redirect page.

Syntax of redirects

[සංස්කරණය]

A page will be treated as a redirect page if its wikitext begins with #REDIRECT followed by a valid wikilink or interwiki link. A space is usually left before the link. (Note that some alternative capitalizations of "REDIRECT" are possible.) The button in the edit toolbar can be used to produce this syntax.

Note that a redirect will only work as intended (i.e. take the reader directly to the target page) if the link is to an existing normal page (not a special page) on the same project (English Wikibooks). In other cases soft redirects are often used – see below.

Examples:

  • #REDIRECT [[Help:Tracking changes]] (redirects to the Help:Tracking changes page)
  • #REDIRECT [[Help:Tracking changes#Preferences]] (redirects to the "Preferences" section of the Help:Tracking changes page)
  • #REDIRECT [[fr:Help:Tracking changes]] (appears as a redirect to the Help:Tracking changes page on French Wikibooks, but will not work as a true redirect; this is called a "soft redirect")

Any text appearing after the redirect link will be ignored in the display, but may be used to add categories, comments, etc.

Note that the redirect link must be explicit – it cannot contain variables, templates, etc.

When redirecting to a category page, prefix the target pagename with a colon to prevent the redirect from showing up in the category. (Redirects from one category page to another should use soft redirects—see below.) Redirects to file pages also require the colon.

Appearance of redirects

[සංස්කරණය]

If the redirect target is an existing page on English Wikibooks, then if a reader navigates to the redirect page—by means of a wikilink or a URL—they will be taken directly to the target page. However, the browser still shows the URL of the redirect page, and the target page shows a small notice below the top title to indicate that you arrived by means of a redirect. For example, if you click WB:RR, you will be redirected to the Wikibooks:Reading room page, and the top of the page will look like:

Wikibooks:Reading room
(Redirected from Wikibooks:RR)

To get the canonical URL of the target page in your browser's address bar, click the page's tab. To go to the redirect page itself (to edit it, view its history, etc.), click the link in the "(Redirected from...)" notice.

If the redirect target is a non-existing page (redlink), or a special page, or a page in another project, then the redirect is not followed, and the reader sees the display of the redirect page (as illustrated below). If the target is a non-existent section of an existing page, then the redirect will take the reader to the top of the target page.

Note that chains of redirects are not followed. If title A redirects to B, and B is itself a redirect page, then a reader navigating to A will see the display of the redirect page B (as illustrated above). This situation is called a double redirect. (Bots fix such chains so that each redirect points directly to the final target page.)

Creation of redirects

[සංස්කරණය]

A redirect page can be created like any other page. Simply type in the wikitext #REDIRECT [[xxx]], replacing "xxx" with the title of the target page (optionally followed by a "#" sign and the section title). The button in the edit toolbar above the edit window can be used to save typing (either click it and then insert the desired target, or else type the target, select it with the mouse, then click the button). Make sure that there is no text before the #REDIRECT keyword, or the redirect will not work. There is not usually any reason to place any text after the link either, although sometimes categories (or categorizing templates) are added.

Similarly, any existing page can be edited to turn it into a redirect. If a new redirect page is created or an existing page turned into a redirect page, an edit summary will be automatically generated stating that the page has been redirected to the given target. (This is overridden if the editor supplies an edit summary.)

When a page is moved (renamed), a redirect is automatically created from the old to the new name, and also one for the corresponding talk page (if that was moved as well). Administrators can choose to suppress creation of the redirect.

If the new page name is occupied by a redirect that has only one edit in its history and targeted to the old page name, it is replaced by the page being moved. If the redirect has more than one history entry, or has a different target page, then the move must be made by an administrator.

To edit a page which is already a redirect (or to view its history, talk page, etc.), follow the redirect to the target page, then click on the link in the "(Redirected from ...)" notice at the top of the page. This will take you to the redirect page itself. Another way to get to a redirect page is to go to the target page, and click "What links here" (in the toolbox on the left of the page). This will show you all the back-links from that page, including redirects. Clicking on a redirect in this list will take you to the redirect page, not the target.

Soft redirects

[සංස්කරණය]

As an alternative to the normal "hard" redirects (which take the reader directly to the target page), it is possible to create "soft" redirects, which leave the reader on the redirect page, giving them the option of clicking the link to the target page. This is usually done in the following situations:

  • When the target is on another project (Wikipedia, other language Wikibooks, etc.) or is a special page. (In these situations a hard redirect would behave as a soft one in any case.)
  • For redirects between categories. (Hard redirects will work for category pages, but soft ones are preferred because of the software's inability to recategorize pages from redirected categories.)

Soft redirects are created using the templates {{soft redirect}} and {{category redirect}}.

Potential problems

[සංස්කරණය]

Page protection

[සංස්කරණය]

Administrators are able to protect a page to restrict editing or moving of that page, and remove such protection. Protection can be indefinite, or expire after a specified time.

  • Full protection prevents editing by everyone except administrators.
  • Semi-protection prevents editing by unregistered contributors and contributors with accounts which are not autoconfirmed.
  • Creation protection prevents a page (normally a previously deleted one) from being recreated.
  • Move protection protects the page solely from moves.

Any type of protection or unprotection may be requested at Wikibooks:Reading room/Administrative Assistance. Changes to a fully protected page should be proposed on the corresponding talk page. See Wikibooks:Protected page for additional information.

Edit conflicts

[සංස්කරණය]

If someone else makes an edit while you are making yours, the result is an edit conflict. Many conflicts can be automatically resolved by the Wiki. If it can't be resolved, however, you will need to resolve it yourself.

To understand what an edit conflict is, consider the following situation:

  • Alice clicks Edit on a page.
  • Bob clicks Edit on the same page, while Alice is editing.
  • Alice finishes her edits and clicks "Save page". The page is saved with Alice's version while Bob is still editing.
  • Bob finishes his edits and clicks "Save page". Bob gets an "edit conflict" page, because the software can't automatically reconcile the differences between Bob's and Alice's versions of the page. The edit conflict page gives Bob a chance to reconcile the differences manually.

At the top of the edit conflict page is an editing box containing Alice's version of the whole page, even if Bob is doing section editing.

At the bottom of the edit conflict page is a second editing box containing the text Bob was going to submit. This will be Bob's version of the page or section he was editing.

Between the two editing boxes is a diff that shows the difference between Alice's and Bob's version of the page. For the section Bob is editing it shows Bob's changes and Alice's possible changes, except for sections where Bob and Alice have both made the same change. For the other sections it shows the full new text as if all that text was added.

Bob can edit in the upper editing box and press Save.

If Bob only made small changes, and Alice made large changes, he may choose to work from Alice's version, and re-merge his changes in. Bob might choose to add some text like "via edit conflict" to the edit summary to warn Alice and others that he had to do this—Alice can then review his merging for accuracy.

If Bob made large changes, and Alice made small changes, he may choose to work from his version. One option is for Bob to copy the bottom text into the top text (or just copy over the one section of the top text, if Bob was section editing), with an appropriate edit summary (e.g., "via edit conflict, will remerge"). Then Bob can view the page history, determine Alice's changes, and re-apply them to his version, in a separate edit.

If both Alice and Bob made large changes, matters become complicated, and Alice and Bob just have to do the best they can. For example, if both Alice and Bob simultaneously add a large section of text on the same subject, then it may be best for Bob to submit his changes, and then for Alice and Bob to both have a look at the two versions and decide between themselves which version is better.

Bob should not just post his changes over the top of Alice's. We assume good faith—mistakes are occasionally made, and newcomers may not understand the edit conflict window. However, Bob must not routinely ignore edit conflicts. It is absolutely not acceptable for Bob to overwrite Alice out of laziness. We encourage contributors to double-check their merges by using the diff feature.

Because edit conflicts are irritating and time-consuming, you may choose to alter your editing habits so they happen less often.

One of the easiest ways is to edit the smallest portion of the page necessary. If you are only going to be editing a single section in the page , then click the "Edit" link for that section, rather than the "Edit" link for the entire page. Two people can be working on different sections at the same time, and there will be no edit conflict.

To reduce the chance of edit conflicts, Wikibooks also has an "In Use" notice in its Template namespace that people may use when editing a page over a long period of time. Simply put {{in use}} on a page before proceeding with a major edit, and remove the template when the editing is complete.

සැකිල්ල:Meta

This page was moved from . Its edit history can be viewed at උදවු:Editing/edithistory

"https://si.wikibooks.org/w/index.php?title=උදවු:Editing&oldid=16200" වෙතින් සම්ප්‍රවේශනය කෙරිණි