diff options
Diffstat (limited to 'macros/latex/contrib/spelatex/spelatex.dtx')
-rw-r--r-- | macros/latex/contrib/spelatex/spelatex.dtx | 85 |
1 files changed, 54 insertions, 31 deletions
diff --git a/macros/latex/contrib/spelatex/spelatex.dtx b/macros/latex/contrib/spelatex/spelatex.dtx index 68962e505b..46946464c5 100644 --- a/macros/latex/contrib/spelatex/spelatex.dtx +++ b/macros/latex/contrib/spelatex/spelatex.dtx @@ -32,12 +32,13 @@ \ProvidesFile{spelatex.dtx} %</driver> %<*package> - [2024/10/23 v0.93 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)] + [2024/11/01 v0.94 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)] %</package> -\def\fileversion{0.93} -\def\filedate{2024/10/23} +\def\fileversion{0.94} +\def\filedate{2024/11/01} %<*driver> -\documentclass[10pt]{ltxdoc} +\documentclass[11pt,a4paper]{ltxdoc} +\usepackage[margin=1in,left=2in]{geometry} \usepackage{makeidx} \usepackage{alltt} \usepackage[english]{babel} @@ -56,6 +57,12 @@ \StopEventually{\PrintChanges\PrintIndex} \spelmacad{DescribeEnv}[1]{#1} \spelmacad{DescribeMacro}[1]{#1} +\def\MacroFont{\footnotesize + \usefont\encodingdefault + \ttdefault + \mddefault + \shapedefault +}% \begin{document} \DocInput{spelatex.dtx} \end{document} @@ -91,6 +98,14 @@ % - introduced markers for non-area-links\\ % - implemented audio on server\\ % - implemented <\kern-0.5ex<\kern-0.5ex<-macro as a shorthand} +% \changes{v0.93}{2024/10/23}{. Major overhaul:\\ +% - improvements to allow for TeX-ing of full course of Walter\\ +% - introduced shorthand macro \textbackslash<<<\\ +% - switching between math and text mode fixed} +% \changes{v0.94}{2024/11/01}{. Bug fixes for TUGboat article +% - removed all 'dropped character warnings' +% - the logo now has a hyphenation point +% - increased font size of documentation} % % \GetFileInfo{spelatex.dtx} % @@ -305,7 +320,7 @@ % way to go, in order to bundle the efforts % for a better speech-enabled \LaTeX{}. % } -% \clearpage +% % \section{Introduction} % % \subsection{Target audience} @@ -958,8 +973,8 @@ % % \subsubsection{Use the shorthand \texttt{\textbackslash <<<}-macro} % -% \<<<{ % \DescribeMacro{\<<<} +% \<<<{ % This macro takes the text to be read-out loud as an % argument. It is a shorthand for the |spelchunk| % environment. Options you would have given to the |spelchunk| @@ -1614,6 +1629,7 @@ % text). % \end{spelchunk} % +% % \iffalse % \begin{macrocode} %<*package> @@ -1676,7 +1692,7 @@ % \begin{macro}{\spelatex} % This is the official \spelatex{} logo. % \begin{macrocode} -\DeclareRobustCommand{\spelatex}{S\kern-0.3ex\raisebox{-0.1ex}{\rotatebox{-15}{p}}\kern-0.25ex\raisebox{0.1ex}{\rotatebox{10}{e}}\kern-0.1ex\LaTeX} +\DeclareRobustCommand{\spelatex}{S\kern-0.3ex\raisebox{-0.1ex}{\rotatebox{-15}{p}}\kern-0.25ex\raisebox{0.1ex}{\rotatebox{10}{e}}\kern-0.1ex\-\LaTeX} % \end{macrocode} % \end{macro} % \begin{macro}{\spelpl} @@ -2009,7 +2025,8 @@ \href{\linksdir/\spel@@optpart\thesubparagraph.\spel@format}{#8}\hfill% \href{\linksdir/\spel@@optpart\thesubparagraph.m3u} {\textcolor{spel@color@right}{$\triangleright$}}}% - \def\spel@@label{\ifnum #2>\c@secnumdepth paragraph\else#1 \csname the#1\endcsname\fi} + \def\spel@@label{% + \ifnum #2>\c@secnumdepth paragraph\else#1 \csname the#1\endcsname\fi} \spel@idxwrite{\spel@@label}{\spel@@optpart\thesubparagraph}% \spel@chunkwrite{\spel@@optpart\thesubparagraph}{#8}% } @@ -2026,8 +2043,8 @@ \stepcounter{spel@ssect}% %\setcounter{spel@chunk}{0}% need this because counter resetting fails \spel@@ssect{#1}{#2}{#3}{#4}{% - \href{\linksdir/\spel@@optpart\thesubparagraph-star-\thespel@ssect.\spel@format}% - {#5}}% +\href{\linksdir/\spel@@optpart\thesubparagraph-star-\thespel@ssect.\spel@format}% + {#5}}% \spel@idxwrite{section}{\spel@@optpart\thesubparagraph-star-\thespel@ssect}% \spel@chunkwrite{\spel@@optpart\thesubparagraph-star-\thespel@ssect}{#5}% } @@ -2049,7 +2066,8 @@ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}% \spel@@fntext{% \hspace*{-\spel@mptboxwidth}% - \href{\linksdir/footnote-\thespel@footnote.\spel@format}{\usebox\spel@mptbox}#1}% + \href{\linksdir/footnote-\thespel@footnote.\spel@format} + {\usebox\spel@mptbox}#1}% \spel@idxwrite{footnote}{footnote-\thespel@footnote}% \spel@chunkwrite{footnote-\thespel@footnote}{#1}% } @@ -2090,7 +2108,9 @@ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}% \spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}% \spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1}% - \item \hspace*{-\spel@mptboxwidth}\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#1} + \item \hspace*{-\spel@mptboxwidth}% + \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} + {\usebox\spel@mptbox}#1} % \end{macrocode} % \end{macro} % @@ -2103,7 +2123,9 @@ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}% \spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}% \spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1 . #2}% -\item[#1] \hspace*{-\spel@mptboxwidth}\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#2} + \item[#1] \hspace*{-\spel@mptboxwidth}% + \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} + {\usebox\spel@mptbox}#2} % \end{macrocode} % \end{macro} % @@ -2119,8 +2141,8 @@ \spel@idxwrite{caption}{\spel@@optpart\thesubparagraph-\thespel@chunk}% \spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#2}% \caption[#1]{% - \protect\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} - {#2}} +\protect\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} + {#2}} } \fi % \end{macrocode} @@ -2215,7 +2237,8 @@ \newlength\spel@mptboxwidth \newsavebox\spel@mptbox \savebox\spel@mptbox{% - \textcolor{spel@color@left}{\quad\strut\tiny\raisebox{0.4ex}{$\triangleright$}\,}% + \textcolor{spel@color@left} + {\quad\strut\tiny\raisebox{0.4ex}{$\triangleright$}\,}% } \newif\ifspel@chunkarealink \define@key{spelchunk}{arealink}[]{\spel@chunkarealinktrue} @@ -2229,8 +2252,8 @@ \@ifnextchar[{\catcode`\^^M=5\spelchunk@opt}{\catcode`\^^M=5\spelchunk@int}}% \fi \ifspel@disabled\def\endspelchunk{}\else -\def\endspelchunk{% - \end{VerbatimOut}% +\def\endspelchunk{ + \end{VerbatimOut} \catcode`\^^M=5\relax% \ifspel@chunkarealink% \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} @@ -2239,7 +2262,8 @@ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}% \hspace*{-\spel@mptboxwidth}% \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} - {\usebox\spel@mptbox}\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}% + {\usebox\spel@mptbox}% + \input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}% \fi% \spel@chunkarealinkfalse% }% @@ -2250,7 +2274,7 @@ % The environment above checks if it is called with optional arguments % or not. % \begin{macro}{\spelchunk@opt} -% This is macro that deals with the optional arguments of the +% This is macro that deals with the oatptional arguments of the % |spelchunk| envronment. % \begin{macrocode} \def\spelchunk@opt[#1]{\setkeys{spelchunk}{#1}\spelchunk@int} @@ -2270,19 +2294,18 @@ % \end{macro} % % \begin{macrocode} -\ExplSyntaxOn -\NewDocumentCommand{\spelchunkatom}{O{}m}{% +\NewDocumentCommand{\spelchunkatom}{O{}+m}{% \ifspel@disabled #2\else% \stepcounter{spel@chunk}% \spel@idxwrite{chunk}{\spel@@optpart\thesubparagraph-\thespel@chunk}% \setkeys{spelchunk}{#1}% + \makeatletter% \scantokens{% - \makeatletter% - \begin{spelverbatimwrite}{\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk.tex} - #2 - \end{spelverbatimwrite} - \makeatother +\begin{spelverbatimwrite}{\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk.tex} + #2 +\end{spelverbatimwrite} }% + \makeatother \ifspel@chunkarealink% \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format} {\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}}% @@ -2297,18 +2320,18 @@ } \def\spelverbatimwrite#1{% - \@bsphack + \@bsphack% \openoutputfile{#1}{chunk}% \def\verbatim@processline{\addtostream{chunk}{\the\verbatim@line}}% \let\do\@makeother\dospecials \catcode`\^^M\active \catcode`\^^I=12 \verbatim@start}% \def\endspelverbatimwrite{ - \closeoutputstream{chunk}% - \@esphack% + \verbatim@finish + \closeoutputstream{chunk} + \@esphack } \def\<<<{\spelchunkatom} -\ExplSyntaxOff % \end{macrocode} % % \subsubsection{Explicit spelchunks} |