summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/AkkTeX/akkmathpaper.sty
blob: 1a20cda871e89ef40343453a3c0798ccb2138567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
%=====================================================================================================================================
% Package akkmathpaper by Igor Akkerman (c) 2000, 2001, 2002, 2003, 2004, 2005
% Package providing utilities for typesetting mathematical papers as lecture scripts.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License (latest version).
%
% The latest version of this license can be found at
%     http://www.latex-project.org/lppl.txt
%
% This file may only be distributed together with the full 'AkkTeX' bundle.
%=====================================================================================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{akkmathpaper}[2005/04/30 1.1.0 by Igor Akkerman (c) 2000, 2001, 2002, 2003, 2004, 2005 Package providing utilities for typesetting mathematical papers as lecture scripts]
%=====================================================================================================================================

\makeatletter

%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
% axiom list environment
%
% \begin{axiomlist}[<startindex>]{<axiomletter(s)>}
%     \item <axiom1>
%     \item <axiom2>
%     ...
% \end{axiomlist}
%
% use axiomlist* for more than 9 axioms
\newcounter{axiom}

\newenvironment{axiomlist}[2][1]{%
    \begin{list}{%
        \textbf{(#2\arabic{axiom})}%
    }{%
        \renewcommand \axiomlabel {#2}%
        \usecounter{axiom}\setcounter{axiom}{#1}\addtocounter{axiom}{-1}%
        \setlength \itemindent {0pt}%
        \settowidth \labelsep {\quad}%
        \settowidth \labelwidth {\textbf{(#2#1)}}%
        \setlength \leftmargin {\labelwidth}%
        \addtolength \leftmargin {\labelsep}%
        \setlength \listparindent {0pt}%
    }%
}{%
    \end{list}%
}

\newenvironment {axiomlist*}[2][1] {%
    \begin{list}{%
        \textbf{(#2\arabic{axiom})}%
    }{%
        \renewcommand \axiomlabel {#2}%
        \usecounter{axiom}\setcounter{axiom}{#1}\addtocounter{axiom}{-1}%
        \setlength \itemindent {0pt}%
        \settowidth \labelsep {\quad}%
        \settowidth \labelwidth {\textbf{(#288)}}%
        \setlength \leftmargin {\labelwidth}%
        \addtolength \leftmargin {\labelsep}%
        \setlength \listparindent {0pt}%
    }%
}{%
    \end{list}%
}

\newcommand \axiom {%
    \item%
    \edef \@currentlabel {(\axiomlabel\theaxiom)}%
}

\newcommand \axiomlabel {}
%-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

\newcommand \xlabel[2] {%
    \edef \@currentlabel {#2}%
    \label{#1}%
}

\newcommand \texttag[2] {%
    \xlabel{#1}{#2}%
    \hfill #2%
}

\makeatother