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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<title> Zastaw ciekawych makroinstrukcji </title>
<LINK REL="stylesheet" TYPE="text/css" HREF="mycss.css">
<meta http-equiv="Content-language" content="pl">
<meta name="Author" content="W³odzimierz Macewicz">
<meta name="Keywords" content="tex, latex, makroinstrukcje, pakiety makroinstrukcji, Wirtualna Akademia">
</head>
<body bgcolor=#a0f0a0>
<h2>theorem</h2>
Pakiet pozwala na definiowanie ¶rodowisk s³u¿±cych do opisu przyk³adów,
zadañ, definicji itp. podstawowym poleceniem jest:<br>
<code>\newteorem{<i>nazwa ¶rodowiska</i>}{<i>tekst nag³ówka</i>}</code><br>
lub<br>
<code>\newteorem{<i>nazwa ¶rodowiska drugiego</i>}%
[<i>nazwa ¶rodowiska</i>]{<i>tekst nag³ówka drugiego</i>}</code><br>
licznikiem kolejnych pozycji bêdzie licznik okre¶lony przez
<i>nazwa ¶rodowiska</i><br>
oraz<br>
<code>\newteorem{<i>nazwa ¶rodowiska drugiego</i>}%
{<i>tekst nag³ówka drugiego</i>}[section]</code><br>
licznik zliczaj±cy kolejne u¿ycie ¶rodowiska jest zerowany przy zmianie
licznika <tt>section</tt> (<tt>chapter</tt>, <tt>subsection</tt> itp.), oraz
w sk³ad numeru wchodzi licznik nadrzêdny.
<p>
Dostêpne s± polecenia zmieniaj±ce:
<ul>
<li>sposób numerowania kolejnych pozycji:<br>
<code>\theoremstyle{<i>style</i>}</code><br>
gdzie <i>style</i> mo¿e przyjmowaæ nastêpuj±ce warto¶ci:
<dl>
<dt><tt>plain</tt>
<dd> emuluje oryginalny styl LaTeX'a
<dt><tt>break</tt>
<dd> tekst opisu pisany jest ,,od nowej linii''
<dt><tt>marginbreak</tt>
<dd> numer umieszczany jest na marginesie,
tekst opisu pisany jest ,,od nowej linii''
<dt><tt>changebreak</tt>
<dd> numer umieszczany jest na pocz±tku nag³ówka,
tekst opisu pisany jest ,,od nowej linii''
<dt><tt>change</tt>
<dd> numer umieszczany jest na pocz±tku nag³ówka,
<dt><tt>margin</tt>
<dd> numer umieszczany jest na marginesie,
</dl>
<li> font nag³ówka (wszystkie ¶rodowiska musz± mieæ ten sam font
nag³ówka (wa¿na jest tylko pierwsza definicja!) <br>
<code>\theoremheaderfont{<i>font</i>}</code>
<li>font którym sk³adana jest tre¶æ ¶rodowiska<br>
<code>\theorembodyfont{<i>font</i>}</code>
<li>odstêp przed ¶rodowiskiem<br>
<code>\theorempreskimamount</code>
<li>odstêp po zamkniêciu ¶rodowiska<br>
<code>\theorempostskimamount</code>
</ul>
<p>
<b>Przyk³ad</b><br>
Poni¿sze polecenia definiuj±ce nowe ¶rodowiska i ich cechy musz± znale¼æ
siê w preambule dokumentu (miêdzy poleceniem <code>\documentclass...</code>,
a <code>\begin{document}</code>).
<p>
Licznikiem ¶rodowiska <i>Def</i> jest licznik ¶rodowiska <i>The</i>,
a licznik ¶rodowiska <i>Lem</i> jest zale¿ny od licznika ¶rodowiska <i>The</i>.
<pre>
\theoremstyle{plain} \newtheorem{Cor}{Corollary}
\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\normalfont\slshape}
\theoremstyle{break} \newtheorem{Exa}{Example}
\theoremstyle{changebreak} \newtheorem{The}{Theorem}
\theoremstyle{marginbreak} \newtheorem{Lem}{Lemma}[The]
\theoremstyle{change} \newtheorem{Def}[The]{Definition}
\theoremstyle{margin} \newtheorem{Rem}{Remark}
\theoremstyle{nonumber} \newtheorem{uwaga}{Uwaga !}
\begin{Cor}
This is a sentence typeset in the theorem environment <i>Cor</i>.
\end{Cor}
\begin{Exa}
This is a sentence typeset in the theorem environment <i>Exa</i>.
\end{Exa}
\begin{The}
This is a sentence typeset in the theorem environment <i>The</i>.
\end{The}
\begin{Lem}
This is a sentence typeset in the theorem environment <i>Lem</i>.
\end{Lem}
\begin{Def}[extra text]
This is a sentence typeset in the theorem environment <i>Def</i>.
\end{Def}
\begin{Rem}
This is a sentence typeset in the theorem environment <i>Rem</i>.
\end{Rem}
\begin{uwaga}
This is a sentence typeset in the theorem environment <i>uwaga</i>.
\end{uwaga}
</pre>
<img src=theorem.gif>
<p>
Utworzenie nowego sposobu prezentacji ¶rodowiska nie zosta³o rozwi±zane
w sposób elegancki; wymaga dopisania nastêpuj±cej
makroinstrukcji (przyk³ad dla ¶rodowiska <tt>uwaga</tt>), gdzie
<i>nonumber</i> jest nazw± nowego ¶rodowiska
(uwaga na znak <tt>@</tt>)
<pre>
\gdef\th@nonumber{\normalfont\slshape
\def\@begintheorem##1##2{\item[%
\rlap{\vbox{\hbox{\hskip \labelsep\theorem@headerfont ##1}%
\vskip 1ex%
\hbox{\strut}}}]}%
\def\@opargbegintheorem##1##2##3{%
\item[\rlap{\vbox{\hbox{\hskip \labelsep \theorem@headerfont
##1\ ##2\ (##3)}%
\hbox{\strut}}}]}}
</pre>
<hr>
<a href=../../texologia.html><img src="../../gify/lew-7vs.gif" hspace=10 border=0 align=left></a>
<a href=mailto:W.Macewicz@ia.pw.edu.pl><img src="../../gify/mail.gif" hspace=10 align=left></a>
<a href=http://www.ia.pw.edu.pl/~wujek/index.html>W³odzimierz Macewicz</a><br clear=all>
<hr>
<!--#config timefmt="%y-%m-%d" -->
Ostatnie zmiany: <!--#echo var="LAST_MODIFIED" -->.
</body>
</html>
|