Debian Codegraph @

texmf-dist/doc/latex/subeqn/subeqn-sample.tex

raw
1 %%
2 %% This is file `subeqn-sample.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% subeqn.dtx (with options: `sample')
8 %% This is a generated file.
9 %%
10 %% Copyright (C) 1999-2026 Johannes Braams. All rights reserved.
11 %%
12 %% This file was generated from file(s) of the subeqn package.
13 %% -----------------------------------------------------------
14 %%
15 %% It may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.3с
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% http://www.latex-project.org/lppl.txt
20 %% and version 1.3с or later is part of all distributions of LaTeX
21 %% version 2008 or later.
22 %%
23 %% This work has the LPPL maintenance status "maintained".
24 %%
25 %% The Current Maintainer of this work is Johannes Braams.
26 %%
27 %% This file may only be distributed together with a copy of the
28 %% subeqn package. You may however distribute the subeqn package
29 %% without such generated files.
30 %%
31 %% The list of all files belonging to the subeqn package is
32 %% given in the file `MANIFEST'.
33 %%
34 %% The list of derived (unpacked) files belonging to the distribution
35 %% and covered by LPPL is defined by the unpacking scripts (with
36 %% extension .ins) which are part of the distribution.
37 \ProvidesFile{subeqn-sample.tex}
38 [2026/01/02 v2.0d subnumbering of equations]
39 \documentclass{article}
40 \usepackage{subeqn}
41
42 \begin{document}
43 \title{Sample sub-equations}
44 \author{Johannes L. Braams}
45 \date{\today}
46 \maketitle
47
48 \noindent
49 This is an example of the use of the \texttt{subeqations}
50 package. First we have a normal \textsf{equation} environment.
51 \begin{equation}
52 \label{a}
53 a^2 + b^2 = c^2
54 \end{equation}
55 Now we start sub-numbering.
56 \begin{subequations}
57 \label{b}
58 \begin{equation}
59 \label{b1}
60 d^2 + e^2 = f^2
61 \end{equation}
62 We can refer to equation~\ref{a}, \ref{b} and~\ref{b1}.
63 \begin{equation}
64 \label{b2}
65 g^2 + h^2 = i^2
66 \end{equation}
67 This was equation~\ref{b2}.
68 \begin{eqnarray}
69 \label{c}
70 x &=& y+z\label{c1}\\
71 u &=& v+w\label{c2}
72 \end{eqnarray}
73 This was expression~\ref{c}, consisting of parts~\ref{c1}
74 and~\ref{c2}.
75 \end{subequations}
76
77 \noindent
78 Now lets start a \textsf{subeqnarray} environment.
79 \begin{subeqnarray}
80 \label{d}
81 x &=& y+z\label{d1}\\
82 u &=& v+w\label{d2}
83 \end{subeqnarray}
84 This was equation~\ref{d}, with parts~\ref{d1} and~\ref{d2}.
85 \end{document}
86 \endinput
87 %%
88 %% End of file `subeqn-sample.tex'.