%
% ================================================================================
%
% Header for typesetting M500.
%
% ================================================================================
%
\documentclass[a5paper,10pt,twoside]{article}
% Simplified Feb 2016.
% Remove constructs for generating side-by-side A5 pages.
% Remove dependency on C:/TEXPKG/PACKAGES.
% General tidying up of macros.
\usepackage{amsmath,amssymb,amsfonts} % AMS LateX is standard nowadays.
\usepackage{ifthen} % For \ifthenelse{cond}{true}{false}.
\usepackage{graphics} % For picture environment.
\usepackage{graphicx} % For picture environment.
\usepackage{rotating} % For words at an angle.
\usepackage{colortbl} % Colouring table rows and columns. Dig. Typ. p. 295.
\usepackage{fancyhdr} % For underlined headings. Replaces \usepackage{C:/TEXPKG/PACKAGES/fancyh}.
\usepackage{sprite} % Useful for creating small objects. Replaces \usepackage{C:/TEXPKG/PACKAGES/sprite}.
\usepackage{picinpar} % For pictures in paragraphs. Use with care. Replaces \usepackage{C:/TEXPKG/PACKAGES/picinpar}.
% Symbols, fonts, etc.
\usepackage{textcomp} % Includes the euro symbol \texteuro.
\usepackage{wasysym} % Symbols: Digital Typography, section 3.2.2.
\usepackage{latexsym} % Symbols.
%\usepackage{cyrillic} % Cyrillic. See C:\ADF\cyrillic.pdf.
\usepackage{arabtex} % Arabic, Hebrew, etc. See C:\ADF\ArabTex.PDF. See M500 249 for simple example.
%\usepackage{txfonts} % No good. Text is darker and more compressed; subscripts and other constructs are amateurish.
%\usepackage[russian,english]{babel} % This could be useful but I can't get it to work.
\usepackage{fp} % For floating point calculations
\usepackage{booktabs} % Suggested by Reinhardt Messerschmidt
\usepackage{enumerate} % Suggested by Reinhardt Messerschmidt
\usepackage{tikz} % Suggested by Reinhardt Messerschmidt
\usetikzlibrary{calc,decorations.markings,intersections,arrows}
\usepackage{url} % Suggested by Reinhardt Messerschmidt
\usepackage{algpseudocode} % For displaying algorithms (suggested by Roger Thompson)
% Real top-left is at (-25.4mm, -25.4mm).
% We will do everything relative to (-25.4mm, -25.4mm), i.e. the corner of the paper.
% Total width 297.0mm, centre line 148.5mm.
%\hoffset -25.4mm \voffset -25.4mm
\hoffset -26.0mm \voffset -22.0mm % Mystery: Why did I change this?
\topmargin 7.5mm
\headheight 5mm
\headsep 5mm
\textheight 170mm
\footskip 22.5mm
\evensidemargin 16.75mm
\oddsidemargin 16.75mm
\textwidth 115mm
% Fonts for titles and author
\newfont{\mfhfbigtitle}{cmssbx10 scaled\magstep3}
\newfont{\mfhftitle}{cmssbx10 scaled\magstep2}
\newfont{\mfhfsmtitle}{cmssbx10 scaled\magstep1}
\newfont{\mfhftitleit}{cmbxti10 scaled\magstep2}
\newfont{\mfhfsmtitleit}{cmbxti10 scaled\magstep1}
\newfont{\mfhfletter}{cmssbx10 scaled\magstep1}
\newfont{\mfhfauthor}{cmssbx10 scaled\magstep1}
% Fonts for cover stuff
\newfont{\mfhfcont}{cmssbx10 scaled\magstep1}
\newfont{\mfhfmagtitle}{cmssbx10 scaled\magstep5}
\newfont{\mfhftiny}{cmssbx4 scaled\magstep1}
\newfont{\mfhfmicro}{cmssbx4 scaled\magstep0}
\newfont{\mfhfmicroit}{cmssi4 scaled\magstep0}
\newfont{\mfhfbig}{cmssbx12 scaled\magstep4}
% Font for big first letter
\newfont{\mfhffirst}{cmr17 scaled\magstep4}
% Font for 9-point text
\newfont{\mfhfnine}{cmr9 scaled\magstep1}
%
% Six Cyrillic fonts:
%
% cyrrm = "Roman", or really upright, normal font
% cyrit = Italic (cursive forms of letters)
% cyrsl = Italic (non-cursive forms of letters)
% cyrsf = Sans-serif
% cyrbf = Bold-face
% cyrsc = Small capitals
%
\newcommand{\cyrrm}{\fontencoding{OT2}\selectfont\textcyrup}
\newcommand{\cyrit}{\fontencoding{OT2}\selectfont\textcyrit}
\newcommand{\cyrsl}{\fontencoding{OT2}\selectfont\textcyrsl}
\newcommand{\cyrsf}{\fontencoding{OT2}\selectfont\textcyrsf}
\newcommand{\cyrbf}{\fontencoding{OT2}\selectfont\textcyrbf}
\newcommand{\cyrsc}{\fontencoding{OT2}\selectfont\textcyrsc}
% M500 macros.
% Reset to the standard gap between paragraphs.
% Syntax: \mfhparskip
\newcommand{\mfhparskip}{\parskip 1mm}
% Title of an article.
% Syntax: \mfhtitle{title}
\newcommand{\mfhtitle}[1]{{\noindent \mfhftitle #1} \mfhparskip \normalsize}
% Title of an article in italics.
% Syntax: \mfhsmtitleit{title}
\newcommand{\mfhtitleit}[1]{{\noindent \mfhftitleit #1} \mfhparskip \normalsize}
% Title of an article in a smaller font.
% Syntax: \mfhsmtitle{title}
\newcommand{\mfhsmtitle}[1]{{\noindent \mfhfsmtitle #1} \mfhparskip \normalsize}
% Title of an article in italics and in a smaller font.
% Syntax: \mfhsmtitleit{title}
\newcommand{\mfhsmtitleit}[1]{{\noindent \mfhfsmtitleit #1} \mfhparskip \normalsize}
% Author.
% Syntax: \mfhauthor{author-name}
\newcommand{\mfhauthor}[1]{%
\vskip 1mm%
\noindent {\mfhfauthor #1}%
\mfhparskip \normalsize}
% Title of a letter.
% Syntax: \mfhletter{letter title}
\newcommand{\mfhletter}[1]{{\vskip0.2cm\noindent\mfhfletter #1}\mfhparskip}
% The big first letter of an article.
% Syntax: \mfhfirst{first letter}
\newcommand{\mfhfirst}[1]{%
\vskip -5mm%
\noindent \intextsep 0mm%
\settowidth{\labelwidth}{{\mfhffirst #1}}%
\addtolength{\labelwidth}{-3.5mm}%
\begin{wrapfigure}[2]{l}{\labelwidth}%
{\raisebox{-1mm}{\mfhffirst #1}}%
\end{wrapfigure}}
% I give in!
% The above doesn't quite do the job and I cannot see how to make it work all the time.
% Just do \noindent for now
\renewcommand{\mfhfirst}[1]{\noindent #1}
% A long line to end an article.
% Syntax: \mfhendarticle
\newcommand{\mfhendarticle}{\vskip 2mm\hrule}
% A medium line to end an author.
% Syntax: \mfhendauthor
\newcommand{\mfhendauthor}{\noindent\hspace*{2cm}\hrulefill\hspace*{2cm}}
% A short line to end a part of an article.
% Syntax: \mfhendpart
\newcommand{\mfhendpart}{\vskip -2mm\noindent\hspace*{4cm}\hrulefill\hspace*{4cm}}
% Generate a list with a fixed specified item width. See Burger, p. 28.
% Syntax: \begin{mfhlist}{width-defining-text}
% \item[label] text for item
% ...
% \item[label] text for item
% \end{mfhlist}
\newcommand{\mfhlistlabel}[1]{\mbox{#1}\hfil}
\newenvironment{mfhlist}[1]{%
\begin{list}{}
{
\let\makelabel\mfhlistlabel
\settowidth{\labelwidth}{#1}
\setlength{\leftmargin}{\labelwidth}
} }{%
\end{list}}
% Indented text (e.g. for stating a problem prior to giving the solution).
% Syntax: \mfhindent{text}
\newcommand{\mfhindent}[1]{%
\begin{list}{}{%
\setlength{\rightmargin}{\leftmargin}
\setlength{\itemsep}{0cm}
\setlength{\parsep}{0cm}
\setlength{\topsep}{0cm}}
\item{#1}
\end{list}}
% A General macro for indented text, which allows the lh-margin and text width to be specified.
% Syntax: \mfhgenindent{text}{lh-margin-width}{text-width}{text}
\newcommand{\mfhgenindent}[3]{\noindent\hspace*{#1}\begin{minipage}{#2}{#3}\end{minipage}}%
% Special form of indentation for quotations, etc.
% Syntax: \mfhquotation{text}
\newcommand{\mfhquotation}[2]{%
\begin{list}{}{%
\setlength{\rightmargin}{\leftmargin}
\setlength{\itemsep}{0cm}
\setlength{\parsep}{0cm}
\setlength{\topsep}{0cm}}
\item{\em#1}
\ifthenelse{\equal{#2}{}}{}{\item{\hfill #2}}
\end{list}}
% Centre a single line of text without creating gaps at top and bottom.
% Syntax: \mfhcentre{text}
\newcommand{\mfhcentre}[1]{\noindent\parbox{\textwidth}{\centering #1}}
% Create a centred block of text of a given width.
% Suitable for poetry.
% Syntax: \mfhverse{width}{lines of poetry}
\newcommand{\mfhverse}[2]{
\begin{center}
\begin{minipage}{#1}
{#2}
\end{minipage}
\end{center}
}
% Centre a single line of text with a gap of g mm at top and h mm at bottom.
% Syntax: \mfhgcentre{g}{h}{text}
\newcommand{\mfhgcentre}[3]{\vskip #1mm\noindent\parbox{\textwidth}{\centering #3}\vskip -4mm\vskip #2mm\noindent\\}
% I am not happy with this code. Without some device an unwanted space appears on
% the next line after using the command. So I add a line skip (\\) at the and
% But to compensate I should precede with an upwards line skip. I have to do this
% with \vskip -4mm, on the assumption that this is the base-line gap.
% Define a counter
\newlength{\mfhW}
% Make an empty box of the same width as a piece of text
% Syntax: \mfhemptybox{text}
\newcommand{\mfhemptybox}[1]{\settowidth{\mfhW}{{#1}}\makebox[\mfhW]{}}
% Absolute value notation |x|
% Syntax: \mfhabs{x}
\newcommand{\mfhabs}[1]{\left|#1\right|}
% (mod x)
% \mfhmod{x} (mod x)
% \pmod{x} (mod x) %(redefinition)
% \mod mod %(redefinition)
% Why not use the original \mod and \pmod commands? BECAUSE THEY DON'T WORK!
\newcommand{\mfhmod}[1]{~(\mathrm{mod}~#1)}
\renewcommand{\pmod}[1]{~(\mathrm{mod}~#1)}
\renewcommand{\mod}{\mathrm{~mod~}}
% cosec
% Syntax: \cosec
\newcommand{\cosec}{\mathop{\mathrm{cosec}}}
% Symbols to indicate the real and imaginary parts of a complex number; e.g. Re and Im.
% An alternative to those Gothic symbols.
% Syntax: \mfhRe
\newcommand{\mfhRe}{\mathop{\mathrm{Re}}}
% Syntax: \mfhIm
\newcommand{\mfhIm}{\mathop{\mathrm{Im}}}
% A strut for use in a table in the line below a horizontal line.
% Syntax: \mfhs
\newcommand{\mfhs}{\rule{0mm}{4mm}}
% A square box to mark the end of a proof.
% Syntax: \mfhQED
\newcommand{\mfhQED}{~ \hspace*{\fill}$\square$}
% Space between factors.
% This command used by Mathematica TeXForm.
% Syntax: \multsp
\newcommand{\multsp}{\,}
% x above y
% Syntax: \mfhover{x}{y}
\newcommand{\mfhover}[2]{\genfrac{}{}{0mm}{0}{#1}{#2}}
% Those dreaded fractions for constructions like 1/4 with the numerator up and the denominator down
% Use the second alternative if there is an integer, as in, for example, 365 1/4
% Syntax: \mfhfrac{numerator}{denominator}
% Syntax: \mfhintfrac{integer}{numerator}{denominator}
\newcommand{\mfhfrac}[2]{\raisebox{0.8mm}{\small #1}\hspace{-0.4mm}\raisebox{0.4mm}{/}\hspace{-0.3mm}\raisebox{-0.3mm}{\small #2}}
\newcommand{\mfhintfrac}[3]{#1\hspace{0.25mm}\mfhfrac{#2}{#3}}
% A tilde for those cases where Web addresses insist on using it.
% Syntax: \mfhtilde
\newcommand{\mfhtilde}{{\small$\sim$}}
% Omit x in its entirety
% Syntax: \mfhnull{x}
\newcommand{\mfhnull}[1]{}
% Change the baseline skip value
% This is used to squeeze an article into a space that would normally be insufficient.
% Check the scope of the \mfhbls command before changing 10.0mm to something suitable.
% Syntax:
% \renewcommand{\mfhbls}{\baselineskip 10.0mm}{\mfhbls
% xxx lines of text xxx
%
% } % Leave a blank line before the closing brace. Why? Because otherwise it screws up.
%
% {\mfhbls
% xxx more text xxx
%
% } % Leave a blank line before the closing brace.
%
% ...
\newcommand{\mfhbls}{\baselineskip 10.0mm}
\parindent 6mm
\pagestyle{empty}
\parindent 0mm
\begin{document}
\pagestyle{fancy}
\lhead[\sf Page \thepage]{}
\chead[{\sf M500 \rm 000}]{{\sf M500 \rm 000}} %!!!
\rhead[]{\sf Page \thepage}
\lfoot[]{}
\cfoot[]{}
\rfoot[]{}
\parindent 6mm
\raggedbottom % Ensures uniform paragraph spacing.
\sloppy % Loose lines preferred to trespassing into the right margin.
\setcounter{page}{1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\carrot}{\raisebox{-1.5mm}{\Large \textasciicircum}}
\newpage
\mfhtitle{Advice for authors}
\mfhauthor{Tony Forbes}
\noindent We welcome mathematical contributions to {\sf M500} at any level from trivia to serious research.
We prefer an informal style but articles should be reasonably well written.
We almost always edit submitted material---sometimes quite considerably and usually without the author's intervention---for
the purpose of improving clarity and mathematical presentation.
It is appropriate to point out that contributions, possibly from authors whose first language is not English, will if necessary
be `cleaned up' to a high standard by our Editorial Board and volunteer proof-readers.
We are always especially interested in material that can be readily understood by first-year mathematics undergraduates.
A typical article on a mathematical topic would be 2--6 pages.
Longer articles are accepted at the Editor's discretion but usually limited to one per issue.
Please send items for publication to {\sf editor@m500.org.uk}.
The most important advice we can offer is:\ {\sc Please read recent issues of the magazine and please conform to its style}.
Please also note that {\sf M500} is printed on paper using only black ink and that the text block is only 115\,mm wide.
Plain English is preferred to mathematical jargon.
Avoid unreasonable use of symbols.
So write `for all positive integers $n$' rather than some diabolical expression like `$\forall n\in \mathbb{Z}^+$',
write `therefore' instead of `$\therefore$', etc.\ etc.
Do not start a sentence with a symbol, or a word like `calorie'.
Do not use theorems, pictures, diagrams, tables, etc.\ as nouns, and be aware that we might move such items from their original locations.
Try to avoid more than one level of subscripting or superscripting.
Generally, avoid any unnecessary reduction of type size; so $a/(2b)$ is better than $\frac{a}{2b}$, for instance.
% Avoid the usual amateurisms, such as inappropriate emphasis, the `per cent' symbol and excessive use of exclamation and question marks.
Avoid redundant brackets, non-standard fonts for variables and bizarre deviations from standard mathematical presentation.
Avoid excessive spoon-feeding.
\vskip 1mm
\noindent {\bf LaTeX}~ This is the preferred option.
The TeX file for these notes is essentially the same as for the magazine itself and we suggest you download it for your use.
Here are a few rules. Please comply with them.
Ensure there is extra space on both sides of the main symbol in displayed mathematics.
For example, write `\mfhtilde=\mfhtilde\ 1' rather than ` = 1' in
$$\cos^2\theta + \sin^2\theta ~=~ 1.$$
Ensure that mathematical items are properly separated. Remember that in math mode a comma is not followed by any space;
so, for example, write `\$a=1\$, \$b=2\$, \$c=3\$' rather than `\$a=1, b=2, c=3\$'.
Use `$\backslash$dfrac\{a\}\{2b\}' to get a full-size fraction $\dfrac{a}{2b}$ (rather than `\{a $\backslash$over 2b\}').
Use `$\backslash$dots' rather than `...'. Use `$\backslash$cdot' or `$\backslash$times' for explicit multiplication.
A decimal point is an ordinary full stop.
Remember to put a backslash after a full stop that is not the end of a sentence.
Reset the appropriate counters if you are automatically numbering equations, etc.
Ensure that LaTeX commands you define won't clash with existing commands.
\vskip 1mm
\noindent {\bf LyX}~ If you feel you can't cope with LaTeX and having to remember or look up all those various LaTeX commands and packages,
you could seriously consider LyX instead.
LyX is a fully featured document processor with a mathematical formula editor which, it is claimed, is easily the best.
All the power of LaTeX is available.
But, and this is what might make the system attractive, you enter complicated mathematical equations easily by point-and-click from pop-up and drop-down menus.
Mathematical formul{\ae} are displayed on the screen as you enter them.
The main benefit, however, is that LyX can create LaTeX source code which I can copy and paste into {\sf M500}.
You need to export your document as LaTeX (pdflatex) and send me the TeX file as well as the PDF file.
To find out more, go to {\sf https://www.lyx.org/Home}.
\vskip 1mm
\noindent {\bf Other word processors}~ The existence of non-LaTeX word processors is an unfortunate complication because
I usually have to convert mathematical constructs by hand.
This might explain to some authors why their contributions get held up.
My recommendation would be to give up and go over to LaTeX.
From my own experience, once you have mastered the basic principles you will wonder why you
ever used anything else. You can find all you need to know from Wikipedia's {\em Guide to LaTeX}.
If you cannot create a LaTeX document, {\sc Please avoid symbols that are not in the set
\{., ,, ;, :, \textquotesingle, @, *, (, ), [, ], \{, \}, =, -, +, /, <, >, ?, !\}}.
Use \carrot\ and \underline{\;\;} only for superscripts and subscripts respectively.
Greek letters should be spelled out, capitalizing the first letter for the upper case versions;
alpha, beta, gamma, Gamma, \dots, omega, Omega.
If you are using {\sc Word}, {\em please do not create mathematical objects}.
They might look pretty on your screen, but to me they are a nuisance because I would have to copy them entirely
by hand---with the inevitable introduction of errors. So, for example, write
\begin{center}
{sec\carrot 2 theta - tan\carrot 2 theta = 1}
\end{center}
instead of using the equation editor.
Note that the symbol between `theta' and `tan' is a dash, not a minus sign.
Even better, prepare your article as if you were doing it in LaTeX, so that the above would be written as
\begin{center}
\$\$ $\backslash$sec\carrot 2 $\backslash$theta - $\backslash$tan\carrot 2 $\backslash$theta \mfhtilde=\mfhtilde\ 1. \$\$
\end{center}
Fortunately, plain English requires little additional work and is very much preferred.
So, if you can't do LaTeX, please write mathematical stuff in English, as, for instance,
integral from -infinity to infinity e\carrot\{-x\carrot 2\} dx = sqrt\{pi\}.
With a little imagination and common sense you should be able to make yourself clear.
Remember to send me the PDF file of your article as well as the original word processor document.
A warning: I cannot deal with a large document where much of the text has to be entered by hand;
I would then have to ask you to get it converted to LaTeX.
\vskip 1mm
\noindent {\bf Short contributions}~
The above rules really only apply to substantial articles involving many pages.
We also welcome contributions of more modest length, anything from few lines to a couple of pages.
Please feel free to send us mathematical notes, letters, experiences, reminiscences, anecdotes, etc.\ and hopefully we are not too fussy about how they arrive.
We are especially interested in mathematical problems and the solutions thereof.
And please note that there is no time-limit for submitting an answer to a problem that has appeared in {\sf M500}.
\vskip 1mm
\noindent {\bf Unwelcome material}~
Yes, we do seem to get our fair share of things that we cannot possibly use.
To give you some idea of the sort of stuff we will not accept, here is a short list:
(i) defamation of an identifiable living individual;
(ii) defamation of a named existing organization or any of its products or services;
(iii) material that the Editor would not wish his wife or his servants to see;
(iv) racism;
(v) blasphemy;
(vi) material that ridicules an {\sf M500} author other than the Editor;
(vii) solutions to Open University assignment questions;
(viii) notices for events due to occur before the magazine is likely to reach its readers;
(ix) material published elsewhere and protected by copyright, except under exceptional circumstances in which case the submitter must obtain permission;
(x) material that is blatantly erroneous;
(xi) material of an excessive length that cannot be justified for the nature of the subject-matter;
(xii) off-topic material of excessive length;
(xiii) excessively cranky treatments of standard mathematical topics;
(xiv) puerile material;
(xv) proofs of Fermat's Last Theorem.
\mfhendarticle
\noindent \rule[0.3mm]{90mm}{0.4mm}\makebox[8mm]{\tiny\bf 02.05}\rule[0.3mm]{17mm}{0.4mm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}