summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-06-21 20:59:23 +0000
committerKarl Berry <karl@freefriends.org>2024-06-21 20:59:23 +0000
commiteb86fbe1e6ee465e774ce959989e701662f821a7 (patch)
treeb0561cfdbd176f2dcdada3a624a468e37ba8120d /Master/texmf-dist/tex
parent8bb012c6565ea963590bf473cb0603dedb5495b3 (diff)
spelatex (21jun24)
git-svn-id: svn://tug.org/texlive/trunk@71581 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/spelatex/spelatex.sty41
1 files changed, 27 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/spelatex/spelatex.sty b/Master/texmf-dist/tex/latex/spelatex/spelatex.sty
index fb67f185c05..bf2a290b1bb 100644
--- a/Master/texmf-dist/tex/latex/spelatex/spelatex.sty
+++ b/Master/texmf-dist/tex/latex/spelatex/spelatex.sty
@@ -23,9 +23,9 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{spelatex}
- [2024/06/12 v0.9 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)]
-\def\fileversion{0.9}
-\def\filedate{2024/06/12}
+ [2024/06/21 v0.91 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)]
+\def\fileversion{0.91}
+\def\filedate{2024/06/21}
%%
@@ -52,6 +52,8 @@
bookmarksopen=true,
urlcolor=black}
\RequirePackage{kvoptions}
+\RequirePackage{xkeyval}
+\RequirePackage{marginnote}
\SetupKeyvalOptions{
family=spel,
prefix=spel@
@@ -208,7 +210,7 @@
\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{%
\href{run:\audiodir/\spel@@optpart\thesubparagraph.\spel@format}{#8}\hfill%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph.m3u}{\textcolor{black!50}{\triangleright}}}%
+ \href{run:\audiodir/\spel@@optpart\thesubparagraph.m3u}{\textcolor{black!25}{$\triangleright$}}}%
\def\spel@@label{\ifnum #2>\c@secnumdepth\else#1 \csname the#1\endcsname\fi}
\spel@idxwrite{\spel@@label}{\spel@@optpart\thesubparagraph}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph}{#8}%
@@ -230,8 +232,9 @@
\let\spel@@fntext\@footnotetext
\long\def\@footnotetext#1{%
\stepcounter{spel@footnote}%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@@fntext{%
- \href{run:\audiodir/footnote-\thespel@footnote.\spel@format}{#1}}
+ \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/footnote-\thespel@footnote.\spel@format}{\usebox\spel@mptbox}#1}%
\spel@idxwrite{footnote}{footnote-\thespel@footnote}%
\spel@chunkwrite{footnote-\thespel@footnote}{#1}%
}
@@ -245,16 +248,16 @@
\def\spelitem@opt[#1]{\spelitem@inttwo{#1}}
\def\spelitem@intone#1{%
\stepcounter{spel@chunk}%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1}%
- \item \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#1}
-}
+ \item \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#1}
\def\spelitem@inttwo#1#2{%
\stepcounter{spel@chunk}%
+ \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] \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#2}
-}
+\item[#1] \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#2}
\ifspel@disabled\else
\let\spel@@caption\caption
\renewcommand\caption[2][]{%
@@ -264,6 +267,11 @@
\spel@@caption[#1]{\protect\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#2}}
}
\fi
+\newlength\spel@mptboxwidth
+\newsavebox\spel@mptbox
+\savebox\spel@mptbox{\textcolor{black!25}{$\qquad$}}
+\newif\ifspel@chunkarealink
+\define@key{spelchunk}{arealink}[]{\spel@chunkarealinktrue}
\ifspel@disabled\def\spelchunk{}\else
\def\spelchunk{%
\catcode`\^^M=\active%
@@ -275,10 +283,16 @@
\def\endspelchunk{%
\end{VerbatimOut}%
\catcode`\^^M=5\relax%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}\leavevmode}%
+ \ifspel@chunkarealink%
+ \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}}%
+ \else%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
+ \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}%
+ \fi%
+ \spel@chunkarealinkfalse%
}%
\fi
-\def\spelchunk@opt[#1]{\fvset{#1}\spelchunk@int}
+\def\spelchunk@opt[#1]{\setkeys{spelchunk}{#1}\spelchunk@int}
\def\spelchunk@int{%
\VerbatimEnvironment
\begin{VerbatimOut}{\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk.tex}}
@@ -339,10 +353,10 @@
\addtostream{spelidx}{macad|#1|#2|#3|#4}
}
\ExplSyntaxOff
-\spelmacad{spelatex}{spee-laytech}
+\spelmacad{spelatex}{spee-lay-tech}
\spelmacad{spelbox}{spel-box}
\spelmacad{spelpl}{spel wizzard dot pl}
-\spelmacad{LaTeX}{laytech}
+\spelmacad{LaTeX}{lay-tech}
\spelmacad{TeX}{tech}
\spelmacad{textsf}[1]{#1}
\spelmacad{texttt}[1]{#1}
@@ -373,7 +387,6 @@
\DeclareRobustCommand{\setdesc}[1]{\left\{#1\right\}}
\spelmacad{setdesc}[1]{@{i18n(Setdesc,#1)}}
\fi
-
\endinput
%%
%% End of file `spelatex.sty'.