Help:Linking to Web Resources

From MedPhysWiki

Jump to: navigation, search

Contents


This page contains some basic information about creating links in this system. For more authoritative information about linking in this wiki software, the reader is referred to the mediawiki Help:Links page.

[edit] Linking to other pages in this wiki

Creating links to pages within the wiki is as simple as typing the name of the page inside a double set of square brackets. You can use the toolbar icon that looks like an underlined Ab (third from the left in the standard mediawiki installation). For example, the text on the left is produced by the text on the right.

The home page for this wiki is the Main Page. This page does not exist.

The home page for this wiki
is the [[Main Page]]. This
[[page does not exist]].

Note that the link to Main Page uses an underscore between the words. The underscores are added automatically by the wiki software, and do not need to be included in the link. Therefore, your page titles can have meaningful names, and the wiki software will take care of making sure that there are no spaces in the links.

Depending on your preferences, you may see the broken link as red text, or as a red question mark at the end of the sentence. This indicates that there is a link to a page that does not exist yet. Clicking on the broken link will allow you to create that page. As you are editing a document, you may decide that some details belong on a page of their own. You can create a link to that page, finish editing the current document, then click the broken link to enter the information into the new page.

You can have alternate text for the internal link. To do this, separate the page name from the alternate text using the pipe character (vertical slash). The main reason you would do this would be to make the text more readable. This is shown in the following example.

The home page has a table of contents for this site.

The [[Main Page|home page]] has
a table of contents for this site.

It is also possible to link to a section of an existing page, as shown below.

This link will take you to the section showing how to link to PDF files.

[[Help:Linking to Web Resources#Linking to External Web Pages|This link]]
will take you to the section showing how to
link to PDF files.

[edit] Linking to External Web Pages

Linking to a web page is as simple as typing the link into your text. For example, typing the text shown in the box to the right gives the results shown on the left.

The home page for the IAEA slide sets corresponding to the book chapters for Radiation Oncology Physics: a handbook for teachers and students is located at http://www-naweb.iaea.org/nahu/dmrp/slides.shtm.

The home page for the IAEA slide sets corresponding
to the book chapters for '''Radiation Oncology Physics:
a handbook for teachers and students''' is  located
at http://www-naweb.iaea.org/nahu/dmrp/slides.shtm.

Note the use of three apostrophes to change to bold text. The small icon after the link (looks like a box with an arrow pointing out of it) is the software's way of telling the reader that this is a link to an external web site. The main problem with way of creating the external link is that some links can be unwieldy and make the text less readable. Putting square brackets around the web address gives the following.

The home page for the IAEA slide sets corresponding to the book chapters for Radiation Oncology Physics: a handbook for teachers and students is located at [1].

The home page for the IAEA slide sets corresponding
to the book chapters for '''Radiation Oncology Physics:
a handbook for teachers and students''' is  located
at [http://www-naweb.iaea.org/nahu/dmrp/slides.shtm].

In the author's opinion, this looks too much like a footnote. There are extensions to the wiki software that allow footnotes, so this is not recommended. A better option is to put an alternate name inside the square brackets, which produces the following.

The home page for the IAEA slide sets corresponding to the book chapters for Radiation Oncology Physics: a handbook for teachers and students is located here.

The home page for the IAEA slide sets corresponding
to the book chapters for '''Radiation Oncology Physics:
a handbook for teachers and students''' is  located
at [http://www-naweb.iaea.org/nahu/dmrp/slides.shtm here].

Any text inside the square brackets, but separated from the link by a space, becomes the active link. Note that the external link icon is still present to tell the reader that they will be going to another website. This is the preferred style for external links, and is the one that is created using the edit toolbar icon that looks like a globe with a document (fourth icon from the left in a standard mediawiki installation).

[edit] Linking to PDF files

There are two possible situations where you might want to link to a pdf file. One example is the collection of pdf files for each chapter of Radiation Oncology Physics: a handbook for teachers and students. The slides for chapter 1 are located in the pdf file linked at http://www-naweb.iaea.org/nahu/dmrp/pdf_files/slides/Ch_01_MacForm.pdf. Other chapters are similarly linked, but with different chapter numbers.

An example of creating a link to the first page in the file is shown below. Unlike before, the markup to generate the example is shown just above the result.

The
[http://www-naweb.iaea.org/nahu/dmrp/pdf_files/slides/Ch_01_MacForm.pdf Chapter 1 slides]
cover basic radiation physics topics.

The Chapter 1 slides cover basic radiation physics topics.

[edit] Advanced linking of pdf files

Linking to a pdf file found on the internet is OK. What happens if the information you would like the reader to find is on slide 129 (page 65) of the Chapter 1 slide set. You really don't want to link to the pdf file, which defaults to page 1, and then tell the reader to go to page 65. By adding parameters to the link, you can tell the web browser what page you are interested in by adding #page=nn to the link, where nn is the page number. The markup to generate such a link, and the resulting text is shown below.

Attenuation coefficients are measured using narrow beam geometry, which is shown on
[http://www-naweb.iaea.org/nahu/dmrp/pdf_files/slides/Ch_01_MacForm.pdf#page=65 slide 129]
in the Chapter 1 slide set.

Attenuation coefficients are measured using narrow beam geometry, which is shown on slide 129 in the Chapter 1 slide set.

Without any further parameters, the default view (as set by the pdf creator) is used. Changing the view can be accomplished using other parameters, such as Zoom and View. For example, let's say we want to link to slide 130, which happens to be at the bottom of page 65. The following code accomplishes that task.

Attenuation coefficients are measured using narrow beam geometry, which is shown on
[http://www-naweb.iaea.org/nahu/dmrp/pdf_files/slides/Ch_01_MacForm.pdf#page=65&View=FitH,420 slide 130]
in the Chapter 1 slide set.

Attenuation coefficients are measured using narrow beam geometry, which is shown on slide 130 in the Chapter 1 slide set.

This can also be accomplished by using Viewrect, which essentially tells the browser what the page coordinates are for what you want to look at.

Attenuation coefficients are measured using narrow beam geometry, which is shown on
[http://www-naweb.iaea.org/nahu/dmrp/pdf_files/slides/Ch_01_MacForm.pdf#page=65&Viewrect=125,100,365,280 slide 129]
or
[http://www-naweb.iaea.org/nahu/dmrp/pdf_files/slides/Ch_01_MacForm.pdf#page=65&Viewrect=125,420,365,280 slide 130]
in the Chapter 1 slide set.

Attenuation coefficients are measured using narrow beam geometry, which is shown on slide 129 or slide 130 in the Chapter 1 slide set.

For more information about pdf parameters that can be passed in the web address, see this pdf from the Adobe web site.

[edit] Credits

Credit for some of this content goes to Lance Longstreth (U if Iowa), who wrote a more detailed summary of linking in MedPhysWiki that can be found here.

Personal tools