Editing Wikitext/Emphasis and Links

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search
 

Contents

Normal Text
Italic text
Boldface text
Boldface and Italic
Underlined text
T

ext in italics does not stand out much; instead, it signifies a context difference only while the text is being read. A single word in boldface attracts the eye and is useful for keywords that the reader might be looking for. (Source Unknown)

 

Emphasis and Links

Wikitext is simple and easy to learn. Beginners can produce quite useful pages in a very short time. It is true to say, that compared with some other languages, wikitext lacks power in design and layout, but for sheer ease of use it is hard to beat. Advanced users are able to mix Wikitext, HTML and inline styles to create beautiful and expressive pages, and to some extent have overcome its shortcomings.

By far the most frequent formatting task that the writer performs is the application of text emphasis. That is to say, the adding of typographic emphasis, as opposed to stylistic emphasis in the construction of sentences. In addition, a knowledge of how to make hyperlinks is today commonplace, and both emphasis and linking are explained below. Readers who need more advanced material should follow the links within the page.


Text Emphasis

Like in HTML, you can make your text bold and italic. However, in Wiki the syntax is quite different.

Making Italics

To make text italic, you place two single quotes on each side of the text. For example, if you write this;

''Wikibooks are great !''


you will get this:

Wikibooks are great !


Making Bold Text

To make bold text that will stand out from your text, you put three single quotes around the text. Again, if you write this;

'''Wikibooks are great !'''


you will get this:

Wikibooks are great !


If you want to make your text bold and italic at the same time, put five (3 + 2) single quotes on each side of the text. If you write this;

'''''Bold and italic stands out even more !'''''


you get this:

Bold and italic stands out even more !

Underlining Text

Underlining text is not strictly an emphasis matter, but it is a related method.

To make any part of your text underlined, the best way is to add a pair of HTML tags to the text. The tags can be used in combination with the other emphasis methods by nesting them. If you write this:

The <u>underlined</u> part stands out too.


You get this:

The underlined part stands out too.


And for the mixed emphasis- if you write this:

The ''Emphasis of '''text <u>is</u> important.''' ''


You get this:

The Emphasis of text is important.


Sub and Superscripts

At times it is useful to place a smaller letter above the other text or below it. The former is called a superscript and the latter a subscript. Both find use in marking work with reference numbers; numbers that relate to lists at the end of a page where fuller details can be found. Any text could be added in this way.

The code to produce these out-of-line effects is made with the HTML tags <sup> and <sub> respectively. The following code shows what to type and gives the result of doing so.
If you type either of these:

Sample text<sup>321</sup>

Sample text<sub>123</sub>

The results look like this:

Sample text321

Sample text123

Superscript and subscript tags are often added to the text intended to be displayed as hyperlinks, so that the displayed reference number can be selected to go directly to another page.


Drop Capitals

D

rop capitals add emphasis to text, in that they draw the eye to the start of a section. They often find application where there is no formal heading style in use. In the past they have been found mainly in art works though the rules for their use are by no means clear. There is no general wikitext code to insert a drop capital, but there is a template.

The first character of the preceeding paragraph has an example of a drop capital, and the box below shows what to type in the editing window to make it work:

{{drop|D}}rop capitals add emphasis to text...

Notice that the whole template code is enclosed in double curly brackets, and the idea is to make a drop capital from the first letter of the paragraph, the letter 'D'. The name of this template is Drop, and this name comes first in the brackets; then there is a pipe symbol separator; then the letter to enlarge comes next. Notice that the follow-on text is written hard against the closing brackets; do not leave a space. If the next character is a space, just ignore it and close-up to the first non-space character; this avoids layout problems.

Finding the pipe symbol can be difficult on some keyboards, and it is often found on a different key than the one indicated. In case of difficulty, it is included in a selection of symbols to be found at the foot of every editing page.

Emphasis Summary

There are other results to be had by adding quotes, (apostrophes), though they merely serve to place the results already mentioned into parenthesis. It is perhaps interesting to note that getting bold or italic text into double quotes on a page is not among these examples. Refer to the table below for a summary of the useful emphasis options.

Wikitext Apostrophe Code for the Emphasis of Text
Wikitext Result HTML Equivalents Description
'Text' 'Text' 'Test' parenthesis uses one set of quotes
''Text'' Text <i>Text</i> italics use two sets of quotes
'''Text''' Text <b>Text</b> bold uses three sets
''''Text'''' 'Text' <b>'Text'</b> bold-in-quotes uses four sets
'''''Text''''' Text <b><i>Text</i></b> bold-italics use five sets
''''''Text'''''' 'Text' <b><i>'Text'</i></b> bold-italics in quotes uses six
'''''''Text''''''' ''Text'' <b><i><nowiki>''Text''</nowiki></i></b> bold-italics in double quotes uses seven


Making Hyperlinks

Pages have blue links in them, sometimes called hyperlinks. They allow users to click them with the mouse to go to the linked pages, and knowing how to set these links in a page can add useful content to the work.

The blue text can say anything; it does not need to have the same wording as the link address. There are two variations of links; one is an external link, and the other is an internal link.

  • External means on an outside website, for example, Google, Wikipedia, etc.
  • Internal means under the same Wiki project. Here it means belonging to WikiBooks.

This section describes the most common methods, and more complex examples can be found in the drop-down box at this section's end.

External links always use the full URL address, including the directory path. Internal links need only the internal parts of the file path. Most variations in linking methods apply to internal links.

External Links

To make an external link to another website, just enclose the full URL address of the site in single square brackets. You can use the browser address for the destination site. For example, to make a link to Google in this page, use the following Wikitext:

[http://www.google.co.uk/]

This gives a link that looks like this:

Notice that there is a link and that there is a symbol with a number. You can check that the link works by clicking it. The number is there because the program was not told of any better text to display on the page. You can have any text in place of the number by adding it after the URL; separate the two with a space. In addition, it is as well to note that this added text can be formatted with Wikitext or HTML in the usual ways. For example, to make the text for the link say 'Google Search Engine', and to set it in italics at the same time, write the following:

[http://www.google.co.uk/ ''Google Search Engine'']

Now the link looks like this:

It will have occurred to some that an external link could be made even for internal pages, since internal pages also have a complete web address, this is a valid point. If possible, try to avoid doing so, since an internal link uses far fewer resources.

Finally, it is possible to link not only to a page, but to go directly to a named section within it. This is done by adding the text of the section heading at the end of the address, separated by a hash sign. For example, to go directly to the Links and URLs section heading of Wikipedia's How to Edit a Page, use the following Wikitext:

[http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page#Links_and_URLs ''Links and URLs'']

Now the link becomes this:


The above examples summarise the methods for making external links, and in the next section can be found the methods for internal links.



Internal Links

By far the most common task for an internal link is to link to another WikiBooks main page. For example, an internal link can be made to the Bicycle main page because both this page and the Bicycle page are in the same project, namely WikiBooks. To make a link to any other main page within WikiBooks just write the name of the destination page in double square brackets. The text to appear on the page is added after the name, separated with a pipe symbol. A link to Bicycles made in any WikiBooks page looks like this:

[[Bicycles|''Bikes'']]

And this is the result:

To continue with the Bicycles pages but where the required link is to a page deeper in the Bicycles file tree, consider a link to the Adjusting Brakes page: The required text for the link is just:

[[Bicycles/Maintenance_and_Repair/Brakes/Adjusting_brakes|''Adjusting Brakes'']]

And this is the link that is produced:

It is possible to link directly to a page section, by adding the text of the section heading separated by a hash symbol. For example, this example makes a link directly to the Block Clearance section.

[[Bicycles/Maintenance_and_Repair/Brakes/Adjusting_brakes#Block_Clearance|''Bicycle Brakes' Block Clearance'']]

And this is the link that is produced:


Within the Page

A common task is to link to another point within the same page. Experiment will show that an internal section link of the kind shown above is the best way to make it. For example, the code for a link to show somewhere on this page, that will go directly to the section Making Italics is written as:

[[Editing_Wikitext/Emphasis_and_Links#Making_Italics|''Making Italics'']]

And it makes this link:


More on Links



Other Pages