# Typesetting Mathematics According to the ISO Standard

In The Princeton Companion to Applied Mathematics we used the conventions that the constants e (the base of the natural logarithm) and i (the imaginary unit), and the d in derivatives and integrals, are typeset in an upright font. These conventions are part of an ISO standard, ISO 80000-2:2009. The standard is little-known, though there is an excellent article about it in TUGboat by Claudio Beccari, and Kopka and Daly’s A Guide to $\LaTeX$ has a page on the standard (in section 7.4.10 of the fourth edition and section 5.4.10 of the third edition).

The standard goes into great detail about how all kinds of mathematical notation should be typeset. It is unclear how the typesetting choices were made or who was on the technical committees that made them. Nevertheless the recommendations are well thought-out.

The most interesting aspects of the standard concern the use of an upright versus a sloping font, which in practice usually amounts to roman versus italic.

1. Variables and generic functions are written in italic. This, of course, is standard practice.
2. Mathematical constants whose values do not change are written in roman. Thus e, i, and $\pi$ should be in roman font. However, standard $\LaTeX$ fonts do not have upright lower case Greek letters, so an italic $\pi$ is unavoidable.
3. Mathematical functions with a fixed meaning, such as exp and sin, are written in roman. Of course, $\LaTeX$ has such definitions built in for many standard functions, but it is a common error for inexperienced users to write, for example, $sin(x)$ (giving $sin(x)$) instead of $\sin(x)$ (giving $\sin(x)$). The best way to define macros for additional functions is via \DeclareMathOperator, assuming you are using the amsmath package:

\DeclareMathOperator{\diag}{diag}

4. Mathematical operators are written in roman. This includes the d in derivatives and integrals.

Although the second and fourth of these rules are not widely followed, they are appealing in that they distinguish variable quantities from fixed ones.

There are some subtleties and some dubious cases.

• A capital delta may appear in both forms: as an operator, hence roman, as in the forward difference operator $\Delta(f) = f(x+h) - f(x)$; and combined with a letter to denote a variable, hence italic, as in $A + \mathnormal{\Delta}A$ (where in $\LaTeX$ the latter delta is typed as \mathnormal{\Delta}).
• The ISO standard explicitly says that named polynomials, such as the Chebyshev polynomials, should be written in roman: $\mathrm{T}_n(x)$ instead of $T_n(x)$. This certainly follows the rules above, since such polynomials have a fixed meaning, but I have never seen the upright font being used for such polynomials in practice.

I’ve started to use rules 1–4 in my recent papers, most thoroughly in this recent EPrint on matrix functions, and intend to use them in my future writing. In doing so, I am using the following $\LaTeX$ macros, based on those suggested in Beccari’s article.

% The number e'.
\def\eu{\ensuremath{\mathrm{e}}}
% The imaginary unit.
\def\iu{\ensuremath{\mathrm{i}}}
% The differential operator.
\def\du{\ensuremath{\mathrm{d}}}


The \ensuremath is not essential, but it means that you can type \eu, etc., outside math mode—for example, in the phrase “the limit of this sequence is \eu”. You may want to rewrite the \def commands using \newcommand, so that if the \eu command has already been defined an error will be issued:

\newcommand{\eu}{\ensuremath{\mathrm{e}}}


\int_C\frac{\eu^z}{z}\,\du z = 2\pi\iu.


Note that if you are using Beamer with the recommended sans serif fonts then mathrm should be replaced by \mathsf in these definitions.

If you wish to download the ISO standard document from the link given at the start of this post you will be charged the princely sum of around $150 for it! If the aim of the ISO is that the standard becomes adopted then this appears counterproductive. However, it is easy to find a freely downloadable version via a Google search. # Manchester 1970s Video Computer Science Lectures At The University of Manchester nowadays, every lecturer is a podcaster. Sound from microphones and projected material is automatically recorded in lecture rooms, enabling registered students to revisit a lecture at any time after it has been given. These recording are not used for subsequent lecture delivery, as far as I know, though the recording quality is good. See here for details of the Manchester system. More than forty years ago the Department of Computer Science in Manchester was pioneering something that is still not widespread here today: videoed lectures that are used to deliver a course. The motivation was the need to teach efficiently the 500 or more students a year from across the university who needed to take computer science as a subsidiary course. Simon Lavington and Jeff Rohl developed three video courses, in this order: • “Logical Design of Computers” (12 lectures, Simon Lavington), • “Programming in Algol” (12 lectures, Jeff Rohl), and • “Programming in Fortran” (10 lectures, Jeff Rohl). I wrote about the latter course in an earlier blog post. All three courses had an accompanying book (Logical Design of Computers, 1969, second edition 1972; Programming in Algol, 1970; Programming in Fortran, 1973). Each lecture was 20 to 30 minutes long and recorded in a TV studio in one continuous take, with no autocue and no possibility of editing the recording. Information was displayed interactively by the lecturer on a magnet board, using magnetic symbols. For each lecture, the lecturer spent around 20 hours in script preparation and production meetings, and a full day in rehearsal and recording. The cost of making a 12-lecture course at 1968 prices was estimated at £4,000, excluding the lecturer’s time, which today equates to about £65,000! All three course were sold to other institutions (12 universities and one company in the case of “Logical Design of Computers”). Much of the information in the previous two paragraphs comes from a 1971 paper Experience with Television Courses for Computer Science Teaching by Simon Lavington and Jeff Rohl. That paper also describes the mode of delivery of the course (a course tutor provided a tutorial following each lecture) and assesses its success. The authors conclude that “under satisfactory playback conditions and with an understanding course-tutor, the students are enthusiastic about television lectures and respond to the intellectual challenge they offer.” The following photo shows the replay equipment designed and installed in the Kilburn Building when it first opened in 1972. Jeff Rohl can be seen on the left monitor at the control desk and a diagram for a parallel adder is displayed on the right-hand monitor. I can’t help thinking that Simon and Jeff were well ahead of their time in developing these courses. If the University’s Teaching Excellence Awards had been around at the time they would have been worthy winners. I am grateful to Simon for providing me with information about these courses, along with the paper and the two photos. # The Most Beautiful Equations in Applied Mathematics The BBC Earth website has just published a selection of short articles on beautiful mathematical equations and is asking readers to vote for their favourite. I wondered if we had included these equations in The Princeton Companion to Applied Mathematics (PCAM), specifically in Part III: Equations, Laws, and Functions of Applied Mathematics. We had indeed included the ones most relevant to applied mathematics. Here are those equations, with links to the BBC articles. • The wave equation (which quotes PCAM author Ian Stewart). PCAM has a short article by Paul Martin of the same title (III.31), and the wave equation appears throughout the book. • Einstein’s field equation. PCAM has a 2-page article Einstein’s Field Equations (note the plural), by Malcolm MacCallum (article III.10). • The Euler-Lagrange equation. PCAM article III.12 by Paul Glendinning is about these equations, and more appears in other articles, especially The Calculus of Variations (IV.6), by Irene Fonseca and Giovanni Leoni. • The Dirac equation. A 3-page PCAM article by Mark Dennis (III.9) describes this equation and its quantum mechanics roots. • The logistic map. PCAM article The logistic equation (III.19), by Paul Glendinning treats this equation, in both differential and difference forms. It occurs in several places in the book. • Bayes’ theorem. This theorem appears in the PCAM article Bayesian Inference in Applied Mathematics (V.11), by Des Higham, and in other articles employing Bayesian methods. A natural equation is: Are there other worthy equations that are the subject of articles in Part III of PCAM that have not been included in the BBC list? Yes! Here are some examples (assuming that only single equations are allowed, which rules out the Cauchy-Riemann equations, for example). • The Black-Scholes equation. • The diffusion (or heat) equation. • Laplace’s equation. • The Riccati equation. • Schrödinger’s equation. # Numerical Linear Algebra Group 2015 The Manchester Numerical Linear Algebra group was very active in 2015. This post summarizes what we got up to. Publications are not included here, but many of them can be found on MIMS EPrints under the category Numerical Analysis. ## Software We continue to make our software available. Increasingly this is done on on GitHub: Deadman, Higham, Relton, Sego, Tisseur, Zhang. We also put MATLAB software on MATLAB Central File Exchange and on our own web sites, e.g., the Rational Krylov Toolbox (RKToolbox). ## PhD Students New PhD student Matthew Gwynne joined the group in January 2015, sponsored partly by Arup. New PhD students Massimiliano Fasi (supported by a Presidential Doctoral Scholarship), Jundong Li (supported by The MathWorks), and Mante Zemaityte, joined the group in September 2015. Mario Berljafa and Weijian Zhang served as Treasurer and Webmaster, respectively, of the Manchester SIAM Student Chapter, 2014-2015. For 2015-2016, Weijian Zhang is President, Mante Zemaityte is Vice President, Matthew Gwynne is Secretary, and Mario Berljafa is treasurer. Massimiliano Fasi is webmaster. ## Postdoctoral Research Associates (PDRAs) Scott Ladenheim joined the group as a PDRA in August 2015. He is working with Milan Mihajlovic in the School of Computer Science. Mary Aprahamian became a PDRA in October 2015 after submitting her PhD thesis. Edvin Deadman moved to a position with NAG (Manchester) in May 2015. Leo Taslaman moved to a position with COMSOL (Stockholm) in August 2015. Jennifer Pestana moved to a Lectureship at the University of Strathclyde in October 2015. Vanni Noferini moved to a Lectureship at the University of Essex in September 2015. Vedran Sego worked with Francoise Tisseur, September–October, 2015. ## Presentations Members of the group gave presentations (talks or posters) at the following conferences and workshops. SIAM UKIE Meeting 2015, January 8, 2015, University of Bath, UK: Berljafa, Mower. LMS Tropical Mathematics and its Applications workshop, Manchester, January 23, 2015: Tisseur. SIAM Student Chapter Delft: Student Krylov Day 2015, February 2, 2015: Berljafa. SIAM Conference on Computational Science & Engineering, Salt Lake City, March 14-18, 2015: Berljafa, Higham, Pestana, Relton, Zhang. 25 Years of Innovative Computing Workshop, UT Knoxville, March 31-April 2, 2015: Hammarling, Tisseur. The Joint British (Applied) Mathematical Colloquium 2015, Cambridge, UK, March 30-April 2, 2015: Guettel. Conference in Honor of Volker Mehrmann “Numerical Algebra, Matrix Theory, Differential-Algebraic Equations, and Control Theory”, TU Berlin, May 6-9 2015: Noferini, Perez, Tisseur. Birmingham Young Mathematician Colloquium, University of Birmingham, 13th May 2015: Berljafa. Postgraduate Summer Research Showcase, The University of Manchester, June 5, 2015: Berljafa, Zhang. Gene Golub SIAM Summer School 2015, RandNLA: Randomization in Numerical Linear Algebra, Delphi, Greece, June 15-26, 2015: Berljafa, Fasi. International Conference on Preconditioning Techniques for Scientific and Industrial Applications, June 17-19 2015, Eindhoven, The Netherlands: Pestana. 26th Biennial Conference on Numerical Analysis, Glasgow, June 23-26, 2015: Higham, Noferini, Perez, Pestana, Relton. GAMM Workshop on Applied and Numerical Linear Algebra, Magdeburg, Germany, July 9-10, 2015: Šego, Strabić. The International Congress on Industrial and Applied Mathematics (ICIAM), August 10-14, 2015, Beijing, China: Guettel, Noferini, Pestana. Applied Harmonic Analysis and Sparse Approximation, Oberwolfach, Germany, August 16–22, 2015: Lotz. New Directions in Numerical Computation, Oxford, August 25-28, 2015: Guettel, Higham, Relton, Strabić. International Workshop on Eigenvalue Problems: Algorithms; Software and Applications, in Petascale Computing September 14-16, 2015, Tsukuba, Japan: Tisseur. Mathematics Research Students’ Conference 2015, University of Manchester, September 30, 2015: Berljafa, Zhang. Workshop on Matrix Equations and Tensor Techniques, Bologna, Italy, September 21-22, 2015: Strabić. SIAM Conference on Applied Linear Algebra, Atlanta, October 2015: Aprahamian, Berljafa, Deadman, Fasi, Higham, Hook, Noferini, Perez, Relton, Tisseur. ## Conference and Workshop Organization Oliver Dorn and Martin Lotz organized the workshop Compressive Sensing and Sparsity: Theory and Applications in Tomography, November 12-13, 2015. Françoise Tisseur served as member of the organizing committee for the SIAM Conference on Applied Linear Algebra, Atlanta, October 2015. Christopher Mower, Mario Berljafa, and Weijian Zhang were on the organizing committee of the Manchester SIAM Student Chapter conference, May 2, 2015. Two minisymposia were organized: ## Visitors Vedran Sego visited the group throughout 2015. Peter Kandolf is visiting the group from September 2015 to March 2016. Tomas Gergelits is visiting the group from October 2015 to March 2016. ## Knowledge Transfer In the Knowledge Transfer Partnership with Sabisu, involving KTP Associate Tim Butters, Stefan Guettel, Nick Higham, and Jon Shapiro (School of Computer Science), an alarm management system has been developed and launched as a product. MSc student Chris Mower did a dissertation project “Shrinking for Restoring Definiteness” sponsored NAG and worked in the Manchester NAG office. Mante Zemaityte carried out a summer project sponsored by Arup, working with the Manchester Arup office. ## Recognition and Service Martin Lotz and his co-authors won the inaugural 2015 best paper prize for the journal Information and Inference. Weijian Zhang won first place in the presentation prize at the 2015 Mathematics Research Students’ Conference, University of Manchester, September 30, 2015. Nick Higham and Natasa Strabić won best poster prize at the SIAM Conference on Applied Linear Algebra, Atlanta, October 2015, for their poster “Anderson Acceleration of the Alternating Projections Method for Computing the Nearest Correlation Matrix”. Françoise Tisseur served as • Vice-President of the UK & Republic of Ireland SIAM Section, 2014-2015, and • Program Director of the SIAM Activity Group on Linear Algebra, 2013-2015. # Distraction-Free Editing with Emacs In recent years there has been a trend towards distraction-free writing, in which text is typed in a plain, full-screen window without distractions such as a web browser, email client, and notifications. The idea is that the writer can focus on the writing without being interrupted or distracted. New editors with these attributes have been produced for both desktop and mobile devices. The review mentioned in the Tweet to the right looked at nine such editors, ranging in cost from free to$44.99. Usually overlooked in such reviews is the possibility of configuring an existing editor to be distraction free. In this regard there is no better option than Emacs, which is free and trumps all the specialized editors for features.

Here is how to make Emacs distraction free. First, turn off unnecessary screen furniture by putting these lines in your .emacs configuration file:

(scroll-bar-mode 0)    ; Turn off scrollbars.
(tool-bar-mode 0)      ; Turn off toolbars.
(fringe-mode 0)        ; Turn off left and right fringe cols.


Then, if you haven’t already done so, select a suitable color scheme by installing an appropriate Emacs theme; see the Emacs Themes site for lots of examples. Finally, type

M-x toggle-frame-full-screen


to make the Emacs window occupy the whole screen. Type it again to revert to the original window size.

Here is how the top left-hand corner of my screen looks as I write this post after carrying out the above steps (everything to the right of what is shown is black).

It’s possible to go even further in simplifying the Emacs screen: see the excellent article Emacs, naked by Bastien Guerry.

One of the features that reviews of distraction-free editors look for is word counts. The Emacs command

M-x count-words


shows the number of characters, words, and lines, and there is an Emacs mode wc-mode that gives a constantly updated display of these statistics in the mode line.

Another relevant feature is support for Markdown. Emacs has a Markdown mode, as well as a much more powerful markup language called Org mode (used to write the posts on this blog).

“Distraction free” can also mean focusing on the part of the document you are editing, and this brings me to a final feature that is rarely discussed: narrowing. Narrowing means seeing only the logical unit that you are editing, which could be a paragraph, subsection, section, or a logical unit in a markup language. Emacs can intelligently narrow down to the appropriate unit. I recommend Artur Malabarba’s narrow-or-widen-dwim command. The easiest way to narrow to a paragraph is to mark it as a region with M-x mark-paragraph then type M-x call narrow-or-widen-dwim. Of course, all the Emacs commands beginning M-x above can be assigned to a key and invoked with a single keypress.

One possible objection to Emacs is that it does not run on mobile devices. In fact, there are projects to port Emacs or implement Emacs-like editors, as Googling will reveal. And of course one can always SSH into a remote machine running Emacs.

# Jeff Rohl’s Fortran TV Course

As a first year mathematics undergraduate at the University of Manchester in 1979, I had to choose one course from another department. Like the majority of students, I chose the Fortran Programming course CS151 provided for mathematics students by the Department of Computer Science.

The course tutor was Simon Lavington, who is now perhaps best known for his historical research into early British computers (and can be seen on this video about the Ferranti Atlas computer). It used a videotaped set of lectures by Jeff Rohl. Jeff was an Australian who had come to Manchester in 1960 to do a PhD on compilers with Tony Brooker. He became a Professor at UMIST in the early 1970s and returned to Australia in 1976 to found the Department of Computer Science at the University of Western Australia.

<table> <tr><td> <img class=”alignleft” src=”” alt=”rohl73.jpg” width=”265″ height=”369″ /> </td><td>

</td><tr> </table>

The ten black and white videos, Programming in Fortran (1973), were accompanied by a 124-page book of the same title, written by Jeff and published by the University of Manchester Press.

These were the early days of computing. The book talked about punched cards, which thankfully we students did not have to use, and employed flowcharts (which it called “flow diagrams”) to illustrate the logical flow of programs. The book included the complete Fortran 66 standard in an appendix—something that would be inconceivable with most languages of today!

Many years later I met Jeff while we were both visiting the Computer Science Department at Cornell University. He said that people regularly tell him that they learned Fortran from his book and lectures and that the videos were recorded in one continuous take. In this YouTube era it is easy to forget how innovative these early 1970s video lectures were.

Fortran is of course still around and has a large user community. Indeed it ranks 24th in the January 2016 version of the TIOBE Programming Community Index. For some context on its usage see my article Programming Languages: An Applied Mathematics View in The Princeton Companion to Applied Mathematics.

The most recent standard is Fortran 2008 and another revision is in preparation. An old joke goes “I don’t know what language we’ll be using in 50 years time, but it will be called Fortran.”

<div class=”figure”>

</div>

I was sorry to discover that Jeff passed away in 2003.

Simon Lavington has kindly provided me with more information about the TV lecture courses—three in total—recorded by him and Jeff Rohl in the Department of Computer Science. I will write about these in a subsequent post.

I am grateful to Jeff’s son Andrew Rohl for providing the photo of Jeff above.

# Managing BibTeX Files with Emacs

Here are a couple of tips on exploiting Emacs when working with BibTeX databases. I do not use a BibTeX database manager (though I have tried Jabref). I prefer to edit my bib files entirely within Emacs, and have had no trouble doing so even with my largest database of around 6800 entries.

Back in the 1980s and 1990s BibTeX users had little choice but to create bib entries from scratch. Nowadays most journal websites have an “export citation” option that allows you to download a bib entry for a paper you are looking at. Unfortunately, these bib entries are of widely variable quality and are almost never entirely correct. What’s more, they will not match your own house style as regards ordering of fields and use of abbreviations. A great help in reformatting bib entries is the bibtex-clean-entry command in the BibTeX-mode of Emacs. I use it to

• remove unwanted blank lines and spaces,
• put the fields in the order I prefer,
• change field delimiters from curly brackets to quotes,
• delete delimiters around numerical fields,
• change double dashes to single dashes in page ranges (BibTeX will convert single dashes to double as necessary),
• change the entry type and field names to lower case,
• set the indentation of field to two spaces.

These and other aspects of the formatting are customizable. Here is an example of a bib entry downloaded from JSTOR.

@article{10.2307/2323313,
ISSN = {00029890, 19300972},
URL = {http://www.jstor.org/stable/2323313},
author = {Dan Scott, Donald R. Peeples},
journal = {The American Mathematical Monthly},
number = {7},
pages = {651-653},
publisher = {Mathematical Association of America},
title = {A Constructive Proof of the Partial Fraction Decomposition},
volume = {95},
year = {1988}
}


After I hit C-c C-c in Emacs the entry is transformed to

@article{10.2307/2323313,
author = "Dan Scott, Donald R. Peeples",
title = "A Constructive Proof of the Partial Fraction Decomposition",
journal = "The American Mathematical Monthly",
volume = 95,
number = 7,
pages = "651-653",
year = 1988,
issn = "00029890, 19300972",
url = "http://www.jstor.org/stable/2323313",
publisher = "Mathematical Association of America"
}


Further work is needed (such as replacing the comma by “and” in the author field), but the entry is now much closer to the format I require.

BibTeX-mode is not perfect. While bibtex-clean-entry can even generate a new key for the entry, I have not been able to get it to match my key-generating algorithm. And I have not found a way to make bibtex-clean-entry delete fields (such as issn, or publisher for the article type) that I do not use.

If you would like to see how I customized BibTeX-mode, take a look at the .emacs and .emacs-custom_windows files in my dot-emacs setup.

## 2. Bib Search and PDF Display with Helm-BibTeX

The Emacs RefTeX package provides some useful features for handling citations within a $\LaTeX$ document, providing an intelligent link between the $\LaTeX$ document and the relevant BibTeX databases. One thing it does not do is enable easy access to PDF files corresponding to bib entries. The Helm-BibTeX package can do this and much more.

To explain how I use Helm-BibTeX, suppose I have the following lines in my dot emacs.

(setq helm-bibtex-bibliography '("~/texmf/bibtex/bib/la.bib"
"~/texmf/bibtex/bib/njhigham.bib"
))

(setq helm-bibtex-library-path '("~/pdf_papers" "~/pdf_books"))


These tell Helm-BibTeX to look in the first path for bib files and in the second path for PDF files whose names match a specified bib key.

If I type M-x helm-bibtex and type dongarra in the minibuffer then all bib entries in la.bib and njhigham.bib containing dongarra in the author or title fields are displayed, one per line. I can narrow the list down by typing a space and then another search term. Hitting tab displays several options, which include options to insert a \cite` command for the item under the cursor, to insert a formatted reference for the item under the cursor, and to go to that entry in the bib file. The fourth column shows a looped square symbol (⌘) that indicates the presence of a matching PDF file. Hitting enter (or f1, or Ctrl-j) opens the PDF file in the default PDF application.

Here is Helm-BibTeX in action.

Helm-BibTeX relies on the Helm package, which provides a powerful framework for incremental completion and selection narrowing.

# Conference Photo Highlights of 2015

Here are my five favourite photos taken at conferences that I attended in 2015.

## Salt Lake City

The SIAM Conference on Computational Science and Engineering, held in Salt Lake City in March, was the largest SIAM conference ever, with almost 1600 attendees. This photo shows co-chair Chris Johnson being interviewed for a SIAM video. Sonja Stark (PilotGirl Productions) is on the camera, Adam Bauser (Bauser Media Group) is conducting the interview, and SIAM Public Awareness Officer Karthika Swamy Cohen is standing far right. This team has produced many excellent videos, which can be found on SIAM’s YouTube channel. See, in particular, CSE15 Poster Sizzle and I Use Math For….

## Atlanta

The SIAM Conference on Applied Linear Algebra was held in Atlanta in October at the Hyatt Regency hotel. The hotel has a very impressive design with a large atrium overlooked by walkways off which the rooms are situated. This photo was taken looking down into the atrium from one corner, showing the pink light that illuminated this structure during the hours of darkness. I rarely take wildlife photographs, not least due to lack of time, but occasionally an opportunity presents itself. The next image was captured just two blocks from the conference hotel, thanks to an unusually tame buzzard who was happy to pose for my camera.

## Glasgow

I gave the after-dinner talk at the 26th Biennial Conference on Numerical Analysis in Glasgow last June (see this post for more details, and this Storify of the conference). The conference dinner was held in the Òran Mór, a converted church in the west end of Glasgow. The next photo shows the impressive venue as it was being set up.

## Oxford

In August, many of us gathered in Oxford to celebrate Nick Trefethen’s 60th birthday, at the New Directions in Numerical Computation conference. I very much like this photo, which shows Andy Wathen contemplating one of life’s deeper questions: the linear system of equations $Ax=b$. A Storify of the conference is available.