
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% MODULE      : TeXmacs.sty
%% DESCRIPTION : This is the TeXmacs style file which should be loaded
%%               when compiling converted TeXmacs texts with LaTeX2e
%% COPYRIGHT   : (C) 2000  Joris van der Hoeven
%%
%% This software falls under the GNU general public license and comes WITHOUT
%% ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details.%$
%% If you don't have this file, write to the Free Software Foundation, Inc.,
%% 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{TeXmacs}[2000/14/03 Standard TeXmacs class]
\usepackage{amsmath,amssymb,pstricks,wasysym,stmaryrd,enumerate,epsfig}

\typeout{-----------------------------------------------------------}
\typeout{Loaded TeXmacs.sty for typesetting converted TeXmacs files}
\typeout{-----------------------------------------------------------}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Accented characters for foreign languages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\catcode`\�=\active\def�{\verb�}
\catcode`\=\active \def{<<}
\catcode`\=\active \def{>>}

\catcode`\�=\active \def�{\`a}
\catcode`\�=\active \def�{\'a}
\catcode`\�=\active \def�{\"a}
\catcode`\�=\active \def�{\^a}
\catcode`\�=\active \def�{{\aa}}
\catcode`\�=\active \def�{\c{c}}
\catcode`\�=\active \def�{\`e}
\catcode`\�=\active \def�{\'e}
\catcode`\�=\active \def�{\"e}
\catcode`\�=\active \def�{\^e}
\catcode`\�=\active \def�{\`{\i}}
\catcode`\�=\active \def�{\'{\i}}
\catcode`\�=\active \def�{\"{\i}}
\catcode`\�=\active \def�{\^{\i}}
\catcode`\�=\active \def�{\`o}
\catcode`\�=\active \def�{\'o}
\catcode`\�=\active \def�{\"o}
\catcode`\�=\active \def�{\^o}
\catcode`\�=\active \def�{\`u}
\catcode`\�=\active \def�{\'u}
\catcode`\�=\active \def�{\"u}
\catcode`\�=\active \def�{\^u}
\catcode`\�=\active \def�{\'y}
\catcode`\�=\active \def�{\"y}
\catcode`\�=\active \def�{!`}
\catcode`\�=\active \def�{?`}
\catcode`\�=\active \def�{{\ss}}

\catcode`\�=\active \def�{\`A}
\catcode`\�=\active \def�{\'A}
\catcode`\�=\active \def�{\"A}
\catcode`\�=\active \def�{\^A}
\catcode`\�=\active \def�{{\AA}}
\catcode`\�=\active \def�{\c{C}}
\catcode`\�=\active \def�{\`E}
\catcode`\�=\active \def�{\'E}
\catcode`\�=\active \def�{\"E}
\catcode`\�=\active \def�{\^E}
\catcode`\�=\active \def�{\`{\I}}
\catcode`\�=\active \def�{\'{\I}}
\catcode`\�=\active \def�{\"{\I}}
\catcode`\�=\active \def�{\^{\I}}
\catcode`\�=\active \def�{\`O}
\catcode`\�=\active \def�{\'O}
\catcode`\�=\active \def�{\"O}
\catcode`\�=\active \def�{\^O}
\catcode`\�=\active \def�{\`U}
\catcode`\�=\active \def�{\'U}
\catcode`\�=\active \def�{\"U}
\catcode`\�=\active \def�{\^U}
\catcode`\�=\active \def�{\'Y}
\catcode`\�=\active \def�{\"Y}

\catcode`\�=\active
\catcode`\�=\active

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Text with translations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\TheoremText}{Theorem}
\newcommand{\PropositionText}{Proposition}
\newcommand{\LemmaText}{Lemma}
\newcommand{\CorollaryText}{Corollary}
\newcommand{\ProofText}{Proof}
\newcommand{\AxiomText}{Axiom}
\newcommand{\DefinitionText}{Definition}
\newcommand{\RemarkText}{Remark}
\newcommand{\NoteText}{Note}
\newcommand{\ExampleText}{Example}
\newcommand{\ConventionText}{Convention}
\newcommand{\ExerciseText}{Exercise}
\newcommand{\WarningText}{Warning}

\newcommand{\SelectDutch}{%
  \renewcommand{\TheoremText}{Stelling}
  \renewcommand{\PropositionText}{Propositie}
  \renewcommand{\LemmaText}{Hulpstelling}
  \renewcommand{\CorollaryText}{Gevolg}
  \renewcommand{\ProofText}{Bewijs}
  \renewcommand{\AxiomText}{Axioma}
  \renewcommand{\DefinitionText}{Definitie}
  \renewcommand{\RemarkText}{Opmerking}
  \renewcommand{\NoteText}{Aantekening}
  \renewcommand{\ExampleText}{Voorbeeld}
  \renewcommand{\ConventionText}{Afspraak}
  \renewcommand{\ExerciseText}{Oefening}
  \renewcommand{\WarningText}{Waarschuwing}}

\newcommand{\SelectEnglish}{%
  \renewcommand{\TheoremText}{Theorem}
  \renewcommand{\PropositionText}{Proposition}
  \renewcommand{\LemmaText}{Lemma}
  \renewcommand{\CorollaryText}{Corollary}
  \renewcommand{\ProofText}{Proof}
  \renewcommand{\AxiomText}{Axiom}
  \renewcommand{\DefinitionText}{Definition}
  \renewcommand{\RemarkText}{Remark}
  \renewcommand{\NoteText}{Note}
  \renewcommand{\ExampleText}{Example}
  \renewcommand{\ConventionText}{Convention}
  \renewcommand{\ExerciseText}{Exercise}
  \renewcommand{\WarningText}{Warning}}

\newcommand{\SelectFrench}{%
  \renewcommand{\TheoremText}{Th�or�me}
  \renewcommand{\PropositionText}{Proposition}
  \renewcommand{\LemmaText}{Lemme}
  \renewcommand{\CorollaryText}{Corollaire}
  \renewcommand{\ProofText}{D�monstration}
  \renewcommand{\AxiomText}{Axiome}
  \renewcommand{\DefinitionText}{D�finition}
  \renewcommand{\RemarkText}{Remarque}
  \renewcommand{\NoteText}{Note}
  \renewcommand{\ExampleText}{Exemple}
  \renewcommand{\ConventionText}{Convention}
  \renewcommand{\ExerciseText}{Exercice}
  \renewcommand{\WarningText}{Avertissement}}

\newcommand{\SelectGerman}{%
  \renewcommand{\TheoremText}{Satz}
  \renewcommand{\PropositionText}{Proposition}
  \renewcommand{\LemmaText}{Lemma}
  \renewcommand{\CorollaryText}{Folgerung}
  \renewcommand{\ProofText}{Beweis}
  \renewcommand{\AxiomText}{Axiom}
  \renewcommand{\DefinitionText}{Definition}
  \renewcommand{\RemarkText}{Bemerkung}
  \renewcommand{\NoteText}{Anmerkung}
  \renewcommand{\ExampleText}{Beispiel}
  \renewcommand{\ConventionText}{Konvention}
  \renewcommand{\ExerciseText}{Aufgabe}
  \renewcommand{\WarningText}{Warnung}}

\newcommand{\SelectHungarian}{%
}

\newcommand{\SelectItalian}{%
}

\newcommand{\SelectPolish}{%
}

\newcommand{\SelectPortugese}{%
}

\newcommand{\SelectRomanian}{%
  \renewcommand{\TheoremText}{Teorema}
  \renewcommand{\PropositionText}{Propozitie}
  \renewcommand{\LemmaText}{Lema}
  \renewcommand{\CorollaryText}{Corolar}
  \renewcommand{\ProofText}{Demonstratie}
  \renewcommand{\AxiomText}{Axioma}
  \renewcommand{\DefinitionText}{Definitie}
  \renewcommand{\RemarkText}{Observatie}
  \renewcommand{\NoteText}{Nota}
  \renewcommand{\ExampleText}{Exemplu}
  \renewcommand{\ExerciseText}{Exercitiu}
  \renewcommand{\WarningText}{Avertisment}}

\newcommand{\SelectRussian}{%
  \def�{\CYRA}\def�{\cyra}%
  \def�{\CYRB}\def�{\cyrb}%
  \def�{\CYRV}\def�{\cyrv}%
  \def�{\CYRG}\def�{\cyrg}%
  \def�{\CYRD}\def�{\cyrd}%
  \def�{\CYRE}\def�{\cyre}%
  \def�{\CYRZH}\def�{\cyrzh}%
  \def�{\CYRZ}\def�{\cyrz}%
  \def�{\CYRI}\def�{\cyri}%
  \def�{\CYRISHRT}\def�{\cyrishrt}%
  \def�{\CYRK}\def�{\cyrk}%
  \def�{\CYRL}\def�{\cyrl}%
  \def�{\CYRM}\def�{\cyrm}%
  \def�{\CYRN}\def�{\cyrn}%
  \def�{\CYRO}\def�{\cyro}%
  \def�{\CYRP}\def�{\cyrp}%
  \def�{\CYRR}\def�{\cyrr}%
  \def�{\CYRS}\def�{\cyrs}%
  \def�{\CYRT}\def�{\cyrt}%
  \def�{\CYRU}\def�{\cyru}%
  \def�{\CYRF}\def�{\cyrf}%
  \def�{\CYRH}\def�{\cyrh}%
  \def�{\CYRC}\def�{\cyrc}%
  \def�{\CYRCH}\def�{\cyrch}%
  \def�{\CYRSH}\def�{\cyrsh}%
  \def�{\CYRSHCH}\def�{\cyrshch}%
  \def�{\CYRHRDSN}\def�{\cyrhrdsn}%
  \def�{\CYRERY}\def�{\cyrery}%
  \def�{\CYRSFTSN}\def�{\cyrsftsn}%
  \def�{\CYREREV}\def�{\cyrerev}%
  \def�{\CYRYU}\def�{\cyryu}%
  \def�{\CYRYA}\def�{\cyrya}%
  \def�{\CYRYO}\def�{\cyryo}%
  \renewcommand{\TheoremText}{�������}%
  \renewcommand{\PropositionText}{�����������}%
  \renewcommand{\LemmaText}{�����}%
  \renewcommand{\CorollaryText}{���������}%
  \renewcommand{\ProofText}{��������������}%
  \renewcommand{\AxiomText}{�������}%
  \renewcommand{\DefinitionText}{�����������}%
  \renewcommand{\RemarkText}{���������}%
  \renewcommand{\NoteText}{�������}%
  \renewcommand{\ExampleText}{������}%
  \renewcommand{\ConventionText}{����������}%
  \renewcommand{\ExerciseText}{����������}%
  \renewcommand{\WarningText}{��������������}}

\newcommand{\SelectSpanish}{%
  \renewcommand{\TheoremText}{Teorema}
  \renewcommand{\PropositionText}{Proposici�n}
  \renewcommand{\LemmaText}{Lema}
  \renewcommand{\CorollaryText}{Corolario}
  \renewcommand{\ProofText}{Demostraci�n}
  \renewcommand{\AxiomText}{Axioma}
  \renewcommand{\DefinitionText}{Definici�n}
  \renewcommand{\RemarkText}{Comentario}
  \renewcommand{\NoteText}{Nota}
  \renewcommand{\ExampleText}{Ejemplo}
  \renewcommand{\ConventionText}{Convenio}
  \renewcommand{\ExerciseText}{Ejercicio}
  \renewcommand{\WarningText}{Aviso}}

\newcommand{\SelectSwedish}{%
  \renewcommand{\TheoremText}{Teorem}
  \renewcommand{\PropositionText}{Proposition}
  \renewcommand{\LemmaText}{Lemma}
  \renewcommand{\CorollaryText}{Corollar}
  \renewcommand{\ProofText}{Bevis}
  \renewcommand{\AxiomText}{Axiom}
  \renewcommand{\DefinitionText}{Definition}
  \renewcommand{\RemarkText}{Kommentar}
  \renewcommand{\NoteText}{Notis}
  \renewcommand{\ExampleText}{Exempel}
  \renewcommand{\ConventionText}{Konvention}
  \renewcommand{\ExerciseText}{�vningsuppgift}
  \renewcommand{\WarningText}{Varning}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sectional commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\tmsection}[1]{\medskip\bigskip

\noindent\textbf{#1}\vspace{-3ex}

\noindent}

\newcommand{\tmparagraph}[1]{\smallskip

\noindent\textbf{#1} }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Theorem like environments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newtheorem{theorem}{\TheoremText}
\newtheorem{proposition}{\PropositionText}
\newtheorem{lemma}{\LemmaText}
\newtheorem{corollary}{\CorollaryText}
\newtheorem{axiom}{\AxiomText}
\newtheorem{definition}{\DefinitionText}

\newtheorem{varremark}{\RemarkText}
\newtheorem{varnote}{\NoteText}
\newtheorem{varexample}{\ExampleText}
\newtheorem{varconvention}{\ConventionText}
\newtheorem{varwarning}{\WarningText}
\newenvironment{remark}{\begin{varremark}\em}{\em\end{varremark}}
\newenvironment{note}{\begin{varnote}\em}{\em\end{varnote}}
\newenvironment{example}{\begin{varexample}\em}{\em\end{varexample}}
\newenvironment{convention}{\begin{varconvention}\em}{\em\end{varconvention}}
\newenvironment{warning}{\begin{varwarning}\em}{\em\end{varwarning}}

\newenvironment{proof}{
  \noindent\textbf{\ProofText}\ }{\hspace*{\fill}
  \begin{math}\Box\end{math}\medskip}

\newenvironment{proof*}[1]{
  \noindent\textbf{#1\ }}{\hspace*{\fill}
  \begin{math}\Box\end{math}\medskip}

\newcounter{exercisenr}
\setcounter{exercisenr}{0}
\newenvironment{exercise}{\medskip

  \refstepcounter{exercisenr}\small
  {\bf\noindent\ExerciseText~\arabic{exercisenr}\ }}{\normalsize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Itemize and enumerate
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\setlabelitem}[1]{%
  \renewcommand{\labelitemi}{#1}
  \renewcommand{\labelitemii}{#1}
  \renewcommand{\labelitemiii}{#1}
  \renewcommand{\labelitemiv}{#1}}

\newenvironment{itemizeminus}
  {\begin{itemize}\setlabelitem{$-$}}{\end{itemize}}
\newenvironment{itemizedot}
  {\begin{itemize}\setlabelitem{$\bullet$}}{\end{itemize}}
\newenvironment{itemizearrow}
  {\begin{itemize}\setlabelitem{$\rightarrow$}}{\end{itemize}}
\newenvironment{enumeratenumeric}
  {\begin{enumerate}[1.]}{\end{enumerate}}
\newenvironment{enumerateroman}
  {\begin{enumerate}[i.]}{\end{enumerate}}
\newenvironment{enumerateromancap}
  {\begin{enumerate}[I.]}{\end{enumerate}}
\newenvironment{enumeratealpha}
  {\begin{enumerate}[a{\textup{)}}]}{\end{enumerate}}
\newenvironment{enumeratealphacap}
  {\begin{enumerate}[A.]}{\end{enumerate}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Extra symbols
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\bigintwl}{\int}
\newcommand{\bigointwl}{\oint}
\newcommand{\bignone}{}
\newcommand{\asterisk}{*}
\newcommand{\nin}{\not\in}
\newcommand{\nequiv}{\not\equiv}
\newcommand{\dotamalg}{\mathaccent95{\amalg}}
\newcommand{\dottimes}{\mathaccent95{\times}}
\newcommand{\dotoplus}{\mathaccent95{\oplus}}
\newcommand{\dototimes}{\mathaccent95{\otimes}}

\newcommand{\nasymp}{\not\asymp}
\newcommand{\asympasymp}{\asymp\!\!\!-}
\newcommand{\nasympasymp}{\not\asymp\!\!\!-}
\newcommand{\simsim}{\approx\!\!\!-}
\newcommand{\nsimsim}{\not\approx\!\!\!-}
\newcommand{\npreccurlyeq}{\not\preccurlyeq}
\newcommand{\precprec}{\prec\!\!\!\prec}
\newcommand{\precpreceq}{\preceq\!\!\!\preceq}
\newcommand{\succsucc}{\succ\!\!\!\succ}
\newcommand{\succsucceq}{\succeq\!\!\!\succeq}

\newcommand{\triangleup}{\triangle}
\newcommand{\precdot}{{\prec\hspace{-0.6em}\cdot}\;\,}
\newcommand{\preceqdot}{{\preccurlyeq\hspace{-0.6em}\cdot}\;\,}
\newcommand{\Iota}{\mathrm{I}}
\newcommand{\Tau}{\mathrm{T}}
\newcommand{\um}{-}
\newcommand{\assign}{:=}
\newcommand{\udots}{{\mbox{\rotateleft{$\ddots$}}}}
\newcommand{\Backepsilon}{{\mbox{\rotateleft{\rotateleft{E}}}}}
\renewcommand{\mho}{{\mbox{\rotateleft{\rotateleft{$\omega$}}}}}
\newcommand{\Mho}{{\mbox{\rotateleft{\rotateleft{$\Omega$}}}}}
\newcommand{\mathd}{\mathrm{d}}
\newcommand{\mathe}{\mathrm{e}}
\newcommand{\mathi}{\mathrm{i}}
\newcommand{\mathpi}{\pi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Extra commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\tmhlink}[2]{{\blue #1}}
\newcommand{\tmaction}[2]{{\blue #1}}
\newcommand{\tmmathbf}[1]{{\mathversion{bold} #1}}
\newcommand{\tmop}[1]{\operatorname{#1}}
\newcommand{\tmbsl}{$\backslash$}
\newcommand{\tmstrong}[1]{\textbf{#1}}
\newcommand{\tmem}[1]{{\em #1\/}}
\newcommand{\tmtt}[1]{\texttt{#1}}
\newcommand{\tmname}[1]{\textsc{#1}}
\newcommand{\tmsamp}[1]{\textss{#1}}
\newcommand{\tmabbr}[1]{#1}
\newcommand{\tmdfn}[1]{\textbf{#1}}
\newcommand{\tmkbd}[1]{\texttt{#1}}
\newcommand{\tmvar}[1]{\texttt{#1}}
\newcommand{\tmacronym}[1]{\textsc{#1}}
\newcommand{\tmperson}[1]{\textsc{#1}}
\newcommand{\tmdummy}{$\mbox{}$}
\newcommand{\tmscript}[1]{\text{\scriptsize $#1$}}

\newcommand{\TeXmacs}{$\textrm{\TeX}_{\textsc{{\scriptsize macs}}^{\mbox{}}}$}
\newcommand{\scheme}{{\sc Scheme}}
\newcommand{\tmdef}[1]{#1}
\newcommand{\tmref}[3]{#1}
\newcommand{\tmat}{\symbol{"40}}
\newcommand{\tmunsc}{\_}
\newcommand{\key}[1]{\fbox{\rule[-2pt]{0pt}{9pt}#1}}
\newcommand{\menu}[1]{\textsf{#1}}
\newcommand{\submenu}[2]{\textsf{#1}$\rightarrow$\textsf{#2}}
\newcommand{\subsubmenu}[3]{\textsf{#1}$\rightarrow$\textsf{#2}$\rightarrow$\textsf{#3}}
\newcommand{\pari}{{\sc Pari}}
\newcommand{\op}[1]{#1}
