%%
%% This is file `ahandinstr-r.sty'
%%
%% Copyright 2017 American Mathematical Society.
%%
%% This file is part of the collection comprising the AMS Author Handbooks.
%% For details and license information, see the file README-AH.txt.
%%
%% The Current Maintainer of this work is the American Mathematical
%% Society.
%%
%% ========================================================================
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ahandinstr-r}
[2017/09/05 v1.0 AMS Author Handbook and instructions]
%% The default for amsbook is [openright], but the contents pages are
%% intentionally set on a page span. To permit this exception, while
%% providing the ability to set the remainder of the document either
%% with (for printing) or without (for on-line reading) blank pages,
%% it is necessary to know which option was applied initially.
\newcommand{\AMS}{American Mathematical Society}
\newcommand{\JAMS}{\textit{Journal of the \AMS}}
\newcommand{\JoT}{\textit{The Joy of \TeX}}
\newcommand{\Memo}{\textit{Memoir}}
\newcommand{\Memos}{\textit{Memoirs}}
\newcommand{\MEMOS}{\textit{MEMOIRS}}
\newcommand{\MSN}{MathSciNet}
\newdimen\exindent
\exindent=\parindent
%% Add a high penalty to discourage line breaks within an example
%% without absolutely prohibiting them.
{\obeylines
\gdef^^M{\par\penalty9999}%
\gdef\beginexample#1{\medskip\bgroup %
\def\(##1){\hbox to 0pt{\hss\rm##1\hss}}%
\def~{\char`\~}\def\\{\char`\\}%
\tt\frenchspacing %
\parindent=0pt#1\leftskip=\exindent\obeylines}
}% end \obeylines
\def\endexample{\endgraf\egroup\medskip}
\newdimen\exboxwidth
\exboxwidth=3in
%% Provide a meta-command facility; provide an alternate escape
%% character so it can be used within the verbatim environment.
%% The definition from the old handbook works, but is unattractive.
%% However, with the active > the cleaner version below can't be
%% used both in and outside of verbatim, so leave the "clean" version
%% for use "in the clear", so it doesn't have to be explained.
%% Input is encoded as ... |?meta string> ...
\catcode`\|=0
\begingroup \catcode`\>=13 % in LaTeX2e verbatim env makes > active
\gdef\?#1>{{\normalfont$\langle$\textit{#1}$\rangle$}}
\gdef\0{\relax}
\endgroup
%% Regarding a meta command in verbatim, a request has been made
%% for addition of a fancyvrb mechanism using [commandchars=...]
%% that doesn't run into the active > problem.
%% Repair indentations of toc levels below section.
%% When amsbook is updated to include \ams@measure, use that instead
%% of \check@string, and remove \check@string and related definitions.
%% Allow more space for page numbers (not needed for numbers, but
%% makes multiline toc entries break better)
\renewcommand{\@pnumwidth}{2.5em} % was 1.6em
% Provide token strings for elements that are common to more than
% one type of publication, but not to all; the actual text is
% defined in the file Author_Handbook_Body just before the section
% in which it will be used.
\newtoks\FirstPageFootnotes % used for journal and proceedings
\newtoks\ArticleTitleDesc % used for journal and proceedings
\newtoks\ArticleTitleUC % used for journal and proceedings
\newtoks\RunHeadJP % used for journal and proceedings
\newtoks\BiblioInFile % used for journal and proceedings
\newtoks\AcadAffil % used for journal and proceedings
\newtoks\UseDriverFile % used for Memoirs and monographs
\newtoks\ChapterRight % used for Memoirs and monographs
\newtoks\ChapterTitleUC % used for Memoirs and monographs
\newtoks\RunHeadMM % used for Memoirs and monographs
\newtoks\BiblioBooks % used for Memoirs and monographs
\newtoks\AddHyperref % used for all but monographs
\newtoks\GrantsThanks % used for all but monographs
\newtoks\ConsentToPublish % used for all but monographs
%% \bibintro is defined in the in-house version of amsbook, but not
%% the current public version. When the public version gets updated,
%% this definition should be removed.