MAS116/MAS117 PRESENTATION LAB 2

If at any point you need to look back at last week’s sheet, you can find it on the MAS116/117 website.

1. A new document

Open TeXworks. Start a new document with the following.

    \documentclass[11pt, a4paper]{amsart}

Add the commands \begin{document} and \end{document}. Insert appropriate commands, as last week, to ensure that it has a suitable title and author. Save your document in a folder on your U: drive as lab_2.tex.

If the default text size in TeXworks is too small then you can make it bigger. Go to Format, Font and change the 8pt font size to something bigger.

Go to the School of Mathematical and Physical Sciences website, click on the Research menu item. Find the page of the probability research group. Into your document, copy and paste the text from the webpage as far as the end of the section on the Applied Probability Trust. Create your PDF document and check that everything is working so far.

Problems? Check the last few lines of the log file which appears at the bottom of TeXworks to see if there are clues as to what’s gone wrong.

Think about the following.

(1)
Edit the first line to \documentclass[12pt, a4paper]{amsart} and compile the LaTeX. What changed?
(2)
The amsart document class will only allow a restricted range of font-sizes in the output PDF. Change the 12pt command in the document class to 10pt and process the document again. Can you find any other values that will work?

Here you’ve used the unit of measurement pt which stands for point size. The usual size to work with is 11pt, so revert to that in your document.

Now we will alter the look of the output in a different way. On a new line between the document class and \begin{document} add the command \usepackage{parskip}. When you process the LaTeX file, click OK when asked to approve the installation of packages and wait for your PDF to appear. This may take a little while the first time, and it is important not to interrupt it.

Packages add extra functionality into LaTeX documents, and we’ll see them more in future weeks.

(3)
What difference has this made to the document? Do you prefer it?

The standard ways to represent a new paragraph in a printed document are either to put in some blank space, or else to indent the first line. You can choose one or the other by using the command \usepackage{parskip} or not.

2. Adding more content

Do the following.

(4)
At the beginning of your document create the section title ‘Probability at the University of Sheffield’.
(5)
Find the two journals published by the Applied Probability Trust and use the \emph{...} command to make them emphasised.
(6)
Put the name ‘The Applied Probability Trust’ in single quotation marks, like ‘this’.
(7)
Look very carefully at your output. Do the quotation marks both go the right way? If not, use the backtick symbol ` found at the top-left of the keyboard.
(8)
Use backticks to get double quotation-marks to work, as in “this”?

Some versions of TeXworks are clever enough to automatically correct quotation marks so that they go the right way, but you can still get caught out, so beware!

Find the line that starts ‘Our members engage in a wide range of research topics, including’. Break the line at this point, and type \begin{itemize}. At the end of the list of research topics type \end{itemize} Before each research topic put \item and break the line afterwards so that it looks like

    Our members engage in a wide range of research topics,
    including
    \begin{itemize}
        \item branching processes;
        \item random walk;
        \item ...
        ...
    \end{itemize}

If you get an error, see if you can solve the problem by looking at the text in the log file.

Here, you’ve created an itemize environment. Environments always start with a \begin command and end with an \end command. We’ll see more of them in future weeks. Change the itemize environment to enumerate instead, and look at the difference.

Go back to the webpage, and find where the members of the probability research group are listed. Copy these into your document, and make a subsection above the list of names called ‘Members’. After this subsection, enter the sentence “The probability group consists of the following academic staff.” Next create an itemized list of the names of the academic staff working in probability: you should read the biographies but don’t include them in your document!

Change the \subsection{...} command to \subsection*{...}, and notice the difference.

Add \usepackage{hyperref} before \begin{document}. Create a reference to the webpage by inserting the following with the correct web address.
    The material here comes from the
    website \url{https://bbc.com}.

3. Typesetting practice

Now for something more fun. Try to typeset the following in a section called ‘Typesetting practice’ at the end of your document. To find some symbols you’ll need to use search the web (e.g. search for ‘latex summation symbol’). Put your answers in an enumerate environment.

Make sure your output looks exactly as it does here.

(1)
x2 + y2; xi; xi2 yi2; xim; xim; x2p.
[Hint: the line begins $x^2+y^2$; $x_i$; and LaTeX uses curly brackets {} to bracket terms together.]
(2)
1 y; x2 x+y;
1 x + 1 y 1 x+y .

[Hint: the first one is $\frac{1}{y}$.]

(3)
x + y + 7; 73; 1 + 1 + xn.
[Hint: use \sqrt{} and \sqrt[3]{}.]
(4)
0ex2 dx = π 2 ; i=1ni = 1 2n(n + 1).
(5)
sin 2x + cos 2x = 1;
Γ(x) lim x0 v=0n1n!nx1 x + v .
(6)
(2222 1)2; {α + (β + γ2) 2}.
[Hint: for the correct sized brackets use \left(\right), and for a curly bracket use \{.]
(7)
i=1ni2 = 1 6n(n + 1)(2n + 1) for n = 1,2,3,
[Hint: try using \ldots.]

If you get stuck with any of these, you can look at my attempt at the lab sheet. This will go on the course webpage after the end of the lab.

If you finish all of the above, have a look at the excellent Short Introduction to LaTeX found at

http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf

(or search the web). Another very useful resource is the LaTeX Wikibook, which lives at

http://en.wikibooks.org/wiki/LaTeX

Homework

Create a document with the title ‘MAS116/117: Homework 2’ and your name as author, using the amsart document class, 11pt font and A4 paper options. Use the parskip package. Remember that the homework must be your own work. If you require help then do make use of the Discussion Forum and Office Hours.

1. Understanding our research areas. Go to the website for research groups in mathematics and statistics and use the information to create an itemized list of the research areas of the school. Call this section ‘Mathematics and Statistics at the University of Sheffield’, and write an introductory paragraph before for the list (e.g. ‘There is strong research profile of mathematics and statistics at the University of Sheffield...’).

Look for your personal tutor at the School website, or find their homepage. Find out which areas of research they are interested in. Find at least two sources of information on the web which explain their research area, and use them to write a brief summary in your own words of what it is you think they do in a new subsection called something like “Aisha Smith’s Research Interests”.

You only need to write a paragraph or two. Don’t copy and paste text from their website or Wikipedia, but use multiple sources to write a summary in your words as best you can. Reference the sources you used to write your summary. We will cover referencing more fully in a future lab.

2. Another bad solution. In response to a question, a student wrote the following in an exam.

m = gradient = 31 28 = 2 6 = 1 3
L in form y = mx + c
use coordinates from A thus

L is y = mx + c

L is 1 = 1 38 + c

yx m = c
c = 18 13c = 21
thus the equation of L is y = x 3 + 21

Your job is to try and work out what question was asked, then write a much better solution using LaTeX, correcting errors and improving the solution above as much as possible. Create a new section called ‘Solution Rewrite’, with two subsections, ‘Question’ and ‘Solution’. Your solution will probably be short, but should include more words than the badly written one above. Take into account points discussed in the lectures, including the following.

Print out your PDF and LaTeX files and hand them in at the start of next week’s computer lab.

This homework counts towards the homework component of your module score, as do all the weekly presentation homeworks.