%++++++++++++ Style parametes as Vidar want's them ++++++++++++% \typeout{Article Style Option ``vidar'' <1994-08-08> (GE)} % Written by Gunnar Ekolin % %% A history listing can be found at the end of this file %% %%%%%%%%%%%%% For compatibility with old versions of LaTeX or LaTeX %%%%%%%%%%%%% without NFSS we add the following %% Old LaTeX \@ifundefined{reset@font}{\def\reset@font{}}{} %% LaTeX without NFSS \@ifundefined{selectfont} {\let\fontseries\@gobble \let\fontshape\@gobble \let\fontfamily\@gobble \def\selectfont{}} {} \@ifundefined{iflanguage}{\def\iflanguage##1##2##3{#3}} %%%%%%%%%%%%% Number theorems lemmas etc in the same sequence %%% %% %% All of this environments use the same counter for numbering %% \newtheorem{theorem}{\iflanguage{swedish}{Sats}{Theorem}}[section] \newtheorem{conjecture}[theorem]{\iflanguage{swedish}{Antagande?}{Conjecture}} \newtheorem{corollary}[theorem]{\iflanguage{swedish}{Följdsats}{Corollary}} \newtheorem{cor}[theorem]{\iflanguage{swedish}{Följdsats}{Corollary}} \newtheorem{define}[theorem]{Definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{property}{\iflanguage{swedish}{Egenskap}{Property}}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{prop}[theorem]{Proposition} %% \newtheorem{assumption}{A.} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%% Add dot to theorem-like environments %%%%%%%%%%% %% %% Here we redefine the generic command used to start theorem- %% like environments so that a dot is printed after the theorem %% number. (Code taken from latex.tex v2.09 18-Mar-92) %% \def\@begintheorem#1#2{\trivlist \item[\hskip \labelsep{\bf #1\ #2.}]\it} \def\@opargbegintheorem#1#2#3{\trivlist \item[\hskip \labelsep{{\bf #1\ #2.\ (#3)}}]\it} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%% Referencing shorthands %%%%%%%%%%%%%%%%%%%%% %% %% It is awkward to have to write () around a reference to an equation %% hence we define a shorthad, \eref{}, for this. References to equation %% numbers should allways be in roman shape; hence \rm below. %% We also define shorthands for referencing all the above %% theorem-like environments. %% \newcommand{\Aref}[1]{{\fontshape{n}\selectfont A.\protect\ref{#1}}} \newcommand{\Pref}[1]{{\fontshape{n}\selectfont \iflanguage{swedish}{Egenskap}{Property}~\protect\ref{#1}}} \newcommand{\conref}[1]{{\fontshape{n}\selectfont \iflanguage{swedish}{Antagande?}{Conjecture}~\protect\ref{#1}}} \newcommand{\cref}[1]{{\fontshape{n}\selectfont \iflanguage{swedish}{Följdsats}{Corollary}~\protect\ref{#1}}} \newcommand{\dref}[1]{{\fontshape{n}\selectfont Definition~\protect\ref{#1}}} %\newcommand{\dref}[1]{{\fontshape{n}\selectfont Definition~(\protect\ref{#1})}} \newcommand{\eref}[1]{{\fontshape{n}\selectfont (\protect\ref{#1})}} \newcommand{\lref}[1]{{\fontshape{n}\selectfont Lemma~\protect\ref{#1}}} \newcommand{\exref}[1]{{\fontshape{n}\selectfont \iflanguage{swedish}{ \"Ovning}{Exercise}~\protect\ref{#1}}} \newcommand{\pref}[1]{{\fontshape{n}\selectfont Proposition~\protect\ref{#1}}} \newcommand{\tref}[1]{{\fontshape{n}\selectfont \iflanguage{swedish}{Sats}{Theorem}~\protect\ref{#1}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Proof environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Use the one defined by qed.sty!!!! %\input qed.sty %\renewcommand{\qedsymbol}{\vrule width6pt height6pt depth0pt} %% %% A proof environment that prints {\bg Proof} at the begining and a %% black solid box at the end is defined here. This environment have %% an optional argument for supplying information on what we are going %% to prove. The format is %% \begin{proof}{\lref{lemma1}} ... \end{proof} %% %% The box at the end of the proof is placed right justified on the %% last line if there is at least 1/9 of the line left empty. If this %% is not true the box will be printed right-justified on a row by itself. %% \newskip\proofskip % % Define a black square \def\proofsquare{\vrule width6pt height6pt depth0pt} % \newenvironment{proof}{% Begin part \proofskip=\hsize \divide\proofskip by 10\relax \@ifnextchar[{\@opargbeginproof}{\@beginproof} }{% End part \hfil\penalty-5\hskip\proofskip\hspace*{\fill}\proofsquare \endtrivlist } %% \def\@beginproof{\trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Bevis}{Proof}.}]} %% \def\@opargbeginproof[#1]{\trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Bevis av }{Proof of }#1.}]} %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Remark environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Format: \begin{remark*}[Lemma~3.5] ... \end{remark} %% %% Results in: Remark to Lemma~3.5. ... \Box %% %% Format: \begin{remark} ... \end{remark} %% %% Resulats in: Remark 2.1 ... \Box %\newskip\proofskip %\proofskip=\hsize \divide\proofskip by 10\relax % \newenvironment{remark*}{% Starting Part \@ifnextchar[{\@opargbeginremark}{\@beginremark}% }{% Ending part \hfil\penalty-5\hskip\proofskip\hspace*{\fill}$\Box$\endtrivlist } %% \def\@beginremark{\trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Anm\"arkning}{Remark}.}]} \def\@opargbeginremark[#1]{% \trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Anm\"arkning till }{Remark to }#1.}]} %% \newcounter{remark} \@addtoreset{remark}{section} \def\theremark{\thesection.\arabic{remark}} \newenvironment{remark}{% \refstepcounter{remark} \trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Anm\"arkning}{Remark}\ \theremark.}]% }{% \hfil\penalty-5\hskip\proofskip\hspace*{\fill}$\Box$\endtrivlist } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Example environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Format: \begin{example}[Lemma~3.5] ... \end{example} %% %% Results in: Example of Lemma~3.5. ... \Box %% \newenvironment{example}{% Starting Part \@ifnextchar[{\@opargbeginexample}{\@beginexample}% }{% Ending part \hfil\penalty-5\hskip\proofskip\hspace*{\fill}$\Box$\endtrivlist } %% \def\@beginexample{\trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Exempel}{Example}.}]} \def\@opargbeginexample[#1]{% \trivlist \item[\hskip \labelsep{\bf \iflanguage{swedish}{Exempel på }{Example of }#1.}]} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Exempel omgivning %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Format: \begin{exempel} ... \end{example} %% \begin{exempel*} ... \end{example*} %% %% Results in: Example 3.2. ... \Box %% %% Strared yileds an unnumbered example \newcounter{exempel} \@addtoreset{exempel}{section} \renewcommand{\theexempel}{\thesection.\arabic{exempel}} \newenvironment{exempel}{% Starting Part \trivlist\refstepcounter{exempel}\item[\hskip\labelsep{\bf \iflanguage{swedish}{Exempel}{Example}\space\theexempel.}] }{% Ending part \hfil\penalty-5\hskip\proofskip\hspace*{\fill}$\Box$\endtrivlist } \@namedef{exempel*}{% Starting Part \trivlist\item[\hskip\labelsep{\bf \iflanguage{swedish}{Exempel}{Example}.}] } \@namedef{endexempel*}{\endexempel} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Acknowledgements environment %%%%%%%%%%%%%%%%%%%%%%% %% %% Format: \begin{acknowledgements} ... \end{acknowledgements} %% %% Results in: Acknowledgements. ... %% \newenvironment{acknowledgements}{% Starting Part \trivlist\item[\hskip \labelsep{\bf Acknowledgements.}] }{% Ending part \endtrivlist } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Exercise environment %%%%%%%%%%%%%%%%%%%%%%% %% %% Format: \begin{exercise} ... \end{exercise} %% %% Results in: Exercise 3.2. ... %% \newcounter{exercise} \@addtoreset{exercise}{section} \renewcommand{\theexercise}{\thesection.\arabic{exercise}} \newenvironment{exercise}{\footnotesize % Starting Part \trivlist\refstepcounter{exercise} \item[\hskip \labelsep{\bf \iflanguage{swedish}{\"Ovning }{Exerecise }\theexercise.}] }{% Ending part \endtrivlist } \newenvironment{exercises}{\footnotesize\let\@currentlabel=\theexercise \list{\stepcounter{exercise}% {\bf \iflanguage{swedish}{\"Ovning }{Exercise }\theexercise.}} {\addtolength{\itemsep}{-0.5ex}% \setlength{\leftmargin}{\labelwidth}% \addtolength{\leftmargin}{\labelsep}} }{% Ending part \endlist } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Number equations with (section.number) %%%%%%%%%%%% %% %% Change the numbering \renewcommand{\theequation}{\thesection.\arabic{equation}} %% %% Restart equation counter after each section \@addtoreset{equation}{section} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Section commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Indents first paragraph and use smaler headings %% (Code from art1x.sty V2.09 18-Mar-92) \def\section{\@startsection {section}{1}{\z@}{2.5ex plus .2ex minus .1ex}{1.5ex plus .1ex}{\reset@font\large\bf}} %% \def\subsection{\@startsection{subsection}{2}{\z@}{2.25ex plus .2ex minus .1ex}{.8ex plus .1ex}{\reset@font\normalsize\bf}} %% \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{2.25ex plus .2ex minus .1ex}{.8ex plus .1ex}{\reset@font\normalsize\bf}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% White space reduction: \above(below)displayskip %%%%%%%% % \above(below)displayskip are reset by \@normalsize, \@smallsize % hence we must redefine them. But they are size sensitive, let's % save the old definition and make a new by adding our new % % values of \above(below)displayskip % % % \let\old@normalsize\@normalsize % \def\@normalsize{\old@normalsize % \abovedisplayskip=8.0pt plus 1.0pt minus 1.0pt % \belowdisplayskip=8.0pt plus 1.0pt minus 4.0pt % \abovedisplayshortskip=0.5pt plus 1.0pt minus 0.0pt% \belowdisplayshortskip=8.0pt plus 0.0pt minus 4.0pt}% \let\old@smallsize\@smallsize % \def\@smallsize{\old@smallsize % \abovedisplayskip=4.0pt plus 1.0pt minus 1.0pt % \belowdisplayskip=4.0pt plus 1.0pt minus 2.0pt % \abovedisplayshortskip=0.0pt plus 1.0pt minus 0.0pt% \belowdisplayshortskip=4.0pt plus 0.0pt minus 2.0}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%% Modify Section Numbering %%%%%%%%%%%%%%%%%%%%%%%% %% %% Changes "1 Introduction" to "1. Introduction" %% (Code from latex.tex v2.09 18-Mar-92 ) %% \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth \let\@svsec\@empty\else \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname.\hskip 1em }\fi \@tempskipa #5\relax \ifdim \@tempskipa>\z@ \begingroup #6\relax \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par} \endgroup \csname #1mark\endcsname{#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}\fi #7}\else \def\@svsechd{#6\hskip #3\relax %% \relax added 2 May 90 \@svsec #8\csname #1mark\endcsname {#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}\fi #7}}\fi \@xsect{#5}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% Increase the widow penalties %%%%%%%%%%%%%%%%%%%%%%%%%% %% Hopfully this should lower the number of widows, ie %% %% a single line or two lines from a paragraph on top of %% %% the next page \widowpenalty=1000 %was 150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Disallow Page breaks in multiline formulas %%%%%%%% \interdisplaylinepenalty=\@M %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Modify caption %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \input hangcaption.sty \let\caption\isucaption \addtolength{\captionwidth}{-4\parindent} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% Draft headers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\draft}{% \input drafthead.sty\relax \draft} %% Supply innocent version of commands defined in drafthead.sty \newcommand{\revised}[1]{} \newcommand{\tag}[1]{} \newcommand{\OBS}[1]{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%% Alternative versions of include %%%%%%%%%%%%%%%%%%%% %% We introduce three different possibilities for how \include clears %% the current page. The commands are %% \IncludeNormal Normal behavior. %% \IncludeClearDoublePage Use \cleardoublepage %% \IncludeNoClearPage Do not clear pages (for final version) %% %% We change the internal part of the \include command (from %% latex.tex Mar-92) by replacing the macro call \clearpage with one %% to \include@clear which we define as \clearpage, \cleardoublepage %% or \relax depending on which of the above mentioned commands that %% are active. The Normal behavior is default. %% \newcommand{\IncludeClearDoublePage}{\def\include@clear{\cleardoublepage}} \newcommand{\IncludeNoClearPage}{\def\include@clear{\relax}} \newcommand{\IncludeNormal}{\def\include@clear{\clearpage}} %% \def\@include#1 {\include@clear \if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi \@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for \@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi \if@tempswa \if@filesw \let\@auxout\@partaux \immediate\openout\@partaux #1.aux \immediate\write\@partaux{\relax}\fi\@input{#1.tex}\include@clear \@writeckpt{#1}\if@filesw \immediate\closeout\@partaux \fi \let\@auxout\@mainaux\else\@nameuse{cp@#1}\fi} %% \IncludeNormal % Select default behavior. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%% Write Table Of Contents file %%%%%%%%%%%%%%%%%%%%%% %% The commands \writeTOCfile will force LaTeX to produce the table of %% contents file for the current job. Nothing is printed in the %% document. The \writeTOCtitle[Otional text] print a line containing %% the title preceeded by the optional text to the TOC-file. \newcommand{\writeTOCfile}{ \if@filesw \newwrite\tf@toc \immediate\openout\tf@toc \jobname.toc\relax \fi \global\@nobreakfalse} \newcommand{\writeTOCtitle}{% \@ifnextchar[{\@opargWriteTOCtitle}{\@WriteTOCtitle}} \newcommand{\@WriteTOCtitle}{\immediate\write\tf@toc{\@title.\par}} \def\@opargWriteTOCtitle[#1]{\immediate\write\tf@toc{#1\space\@title.\par}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \endinput %%%%%%%%%%%%% Page format parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1cm ~ 28pt % %\topmargin -1.0cm % 28pt was 0pt % %\headheight 1.0cm % 28pt was 12pt % %\textheight 21.0cm % 597pt % % % %\oddsidemargin 0.5cm % 14pt was 1.5cm 42pt % %\evensidemargin 0.5cm % 14pt was 1.5cm 42pt % %\textwidth 15.0cm % 426pt % %\marginparwidth 48pt % % %% %% Use a4 or a4wide instead of the above %\raggedbottom % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% History of this file %%%%%%%%%%%%%%%%%%%%%% %% % *1990-11- Prehistory % *1990-11-17 Added: Automatic indentation after \[[sub]sub]section % *1990-11-29 Added: Draft Headers: \draft \revised, % Numerical date function: \todaynum % *1990-12-03 Changed: The Draft header changed to % "Revised: date Draft Typset: date, time" % Added: \timehhmm \hour \minute \countertoxx % *1990-12-06 Changed: Page format parameters changed to center text on page % *1991-01-06 Changed: The word ``Draft'' in the draft-header is % replaced by the file-name (\jobname) % *1991-01-14 Changed: New fonts and sizes in the draft header % *1991-01-29 Added: \tag for draft header % *1991-02-22 Added: Reduction of vertical white space: % * Around displays: % The size of \above(below)displayskip is reduced, % almost all of the rubbespace is removed. % * Around headings: % + The font size in the headings are reduced. % + The amount of white space before and after % the heading are reduced, no rubber-space. % Added: New optional parameter to the proof environment, % \begin{proof}[Lemma 2.3] produces the text % ``Proof of Lemma 2.3: '' at the begining of the proof. % Changed: The proof environment is rewritten: % * We are now using a \trivlist, this makes the proof % environment behave just like the theorem type % environments. % * The end-of-proof Box will appear at the end of % the current line if at least 1/9 of the line is % empty. Otherwise its palced at the end of the % next line. % *1991-02-24 Added: \eref \lref \tref \pref \cref, % Shorthands for referencing equations, lemmas, % theorems, propositions, and corollaries. % *1991-03-05 Added: remark environment; example environment % Fixed: oparg in theoremlike environments % *1991-03-21 Added: \widowpenalty % *1991-03-27 Added: New environment for acknowledgements % *1991-04-19 Added: New command \inputfilename, used as default value % for \mark in the draft-mode. % *1991-05-31 Fixed: \timehhmm worked incorrectly combined with \include, % since include restored old values to the counters. % Simple solution: use \edef instead of \def when defining % \timehhmm. % *1991-06-17 Added: \lefteqtext => Text starting at left margin inside % an eqnarray type environment. % *1991-08-08 Chang: Draft part put into separate file. % *1991-09-04 Added: \dref, Shorthand for referencing definitions % *1992-03-09 Moved: \lefteqtext moved to eqs.sty. % *1992=04-03 Fixed: When using newlfonts the text of theorem % environments came out in \it\bf; Shoould % be \rm\bf. % *1992-04-23 Chang: Old remark environment renamed to remark* % Added: New numbered remark environment. % *1992-04-23 Chang: Space between A. and the number in \Aref removed % *1992-04-27 Added: Disallow page breaks in multiline formulas % *1992-05-06 Added: \protect in \xref family. % *1992-05-08 Added: \IncludeClearDoublePage, \IncludeNoClearPage % *1992-05-21 Added: \writeTOCfile % *1992-07-22 Removed: Page layout parameters removed, % pleas use the document-style optins a4 or a4wide. % *1992-08-11 Added: Conjecture theorem type % *1993-02-10 Added: \OBS for drafthead.sty % *1994-01-20 Added: exempel & exempel* environmnets. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%