Debian Codegraph @

texmf-dist/doc/latex/spelatex/Example/example.tex

raw
1 \documentclass{report}
2
3 \usepackage[dutch,english]{babel} % load babel before spelatex to avoid
4 % option clash!
5 \selectlanguage{english}
6 \usepackage[format=ogg,
7 server=https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example
8 ]
9 {spelatex}
10
11 \newrobustcmd\CTAN{CTAN}
12 \spelmacad{CTAN}{see-tan}
13 \newrobustcmd\CPAN{CPAN}
14 \spelmacad{CPAN}{see-pan}
15
16 \title{\spelatex{} Example}
17 \author{Walter Daems and Paul Levrie}
18 \date{2025/06/15}
19 \setlength\parindent{0em}
20 \setlength\parskip{1ex}
21
22 \begin{document}
23
24 \maketitle
25
26 \chapter{Introduction}
27
28 \<<<{
29 This file is just a simple showcase of the features of \spelatex{}.
30 Below, you'll find examples of:
31 }
32
33 \begin{itemize}
34 \spelitem{a simple equation}
35 \spelitem{a more complex equation}
36 \end{itemize}
37
38 \chapter{Examples}
39 \section{A simple equation}
40 \label{eqn:simple}
41 \<<<{
42 Consider the following simple definition of a polynomial function and
43 check its spoken version by clicking on it.
44 }
45 \<<<[arealink]{
46 \begin{equation}
47 f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 25
48 \end{equation}
49 }
50 \<<<{
51 This seems a simple equation, however, it is not so straightforward
52 for an automated reader, to read it correctly.
53 }
54
55 \section{A more complex equation}
56 \newcommand\xx[2]{\ensuremath{#1_{#2}}}
57 \spelmacad{xx}[2]{#1 #2}
58
59 \label{eqn:complex}
60 \begin{spelchunk}
61 For a lightray that hits the parabola at the point
62 $P(t,9-\frac{t^2}{4})$, the reflected ray has slope $\tan 2\alpha$.
63 Since the slope of the tangent to the parabola at $P$ is
64 equal to $\tan\alpha = -\frac{t}{2}$, the equation of the
65 reflected ray is given by
66 \end{spelchunk}
67 \begin{spelchunk}[arealink]
68 \[
69 y-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
70 \]
71 \end{spelchunk}
72
73 \section{Remark}
74 \<<<{
75 Instead of the \texttt{\textbackslash{}<<<} macro, one can also use the
76 spelchunk environment. We did this in the next sections.
77 }
78
79 \chapter{More advanced topics}
80
81 \selectlanguage{dutch}
82 \section{Een andere taal}
83 \begin{spelchunk}
84 \spelatex{} is ook volledig babel-actief, wat wil zeggen dat de
85 voorleesstem de geselecteerde taal zal volgen.
86 \end{spelchunk}
87
88 \begin{spelchunk}[arealink]
89 \[
90 y-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
91 \]
92 \end{spelchunk}
93
94 \selectlanguage{english}
95
96 \section{And some extras}
97 \subsection{Citations}
98 \begin{spelchunk}
99 Two excellent repositories are \CPAN{} \cite{CPAN} and \CTAN{} \cite{CTAN}.
100 \end{spelchunk}
101
102 \subsection{References to labels}
103 \begin{spelchunk}
104 Section~\ref{eqn:simple} contains an illustration of a simple
105 equation. For a more complex equation, we refer the user to
106 section~\ref{eqn:complex}.
107 \end{spelchunk}
108
109 \selectlanguage{dutch}
110
111 \bibliographystyle{alpha}
112
113 \begin{thebibliography}{99}
114
115 \bibitem{CTAN}
116 The Comprehensive \TeX{} Archive Network.
117 \newblock \url{http://www.ctan.org}.
118 \newblock online, accessed in August 2021.
119
120 \bibitem{CPAN}
121 The Comprehensive Perl Archive Network.
122 \newblock \url{http://www.cpan.org}.
123 \newblock online, accessed in August 2021.
124
125 \end{thebibliography}
126
127 \end{document}