Skip to content

Commit

Permalink
hide \textspadsyntax, \textspadexpr, \textspadtype from HyperDoc
Browse files Browse the repository at this point in the history
The TeX commands that are known to HyperDoc (.ht) are given through
the table token_table in src/hyper/token.c. More commands for HyperDoc
are defined through src/doc/ht/util.ht.
  • Loading branch information
hemmecke committed Apr 15, 2022
1 parent 9106b21 commit 1375d05
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/doc/fricas.sty
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
\def\spad{\lstinline[%
basicstyle={\ttfamily\color[rgb]{0,0.5,0}},
breaklines=true,
literate={->}{$\to$}{2},
literate={->}{$\to$}{2} {+->}{$\mapsto$}{3},
classoffset=0,keywords={sigma_k},keywordstyle=\spadsigmak,
classoffset=1,keywords={sigma}, keywordstyle=\spadreplace{$\sigma$},
classoffset=2,keywords={mu}, keywordstyle=\spadreplace{$\mu$},
Expand Down
2 changes: 1 addition & 1 deletion src/doc/htex/ug06.htex
Original file line number Diff line number Diff line change
Expand Up @@ -2813,7 +2813,7 @@ Summary of pattern variable adornments:
\begin{tabular}{@{}ll}
{\tt (x | predicate?(x))} &
means that the substitution \mathOrSpad{s} for \mathOrSpad{x}\\ &
must satisfy \textspadexpr{predicate?(s) = true}. \\
must satisfy {\tt predicate?(s) = true}. \\
{\tt ?x} &
means that \mathOrSpad{x} can match an identity \\ & element (0 or 1). \\
{\tt :x} &
Expand Down
4 changes: 2 additions & 2 deletions src/doc/htex/ug10.htex
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ function of its height within a bounding box.
The points at the bottom of the
box are red, those at the top are purple.

To change the normal coloring, you can give
an option \textspadexpr{colorFunction == {\it function}}.
To change the normal coloring, you can give an option
\spad{colorFunction ==} {\it function}.
When \Language{} goes about displaying the data, it
determines the range of colors used for all points within the box.
\Language{} then distributes these numbers uniformly over the number of hues.
Expand Down
19 changes: 13 additions & 6 deletions src/doc/htex/ug13.htex
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ A complete domain constructor definition for
Interestingly, this little domain illustrates all the new
concepts you need to learn.

\begin{figXmpLines}[caption={The \textspadtype{QuadraticForm} domain.},label={fig-quadform}]
\begin{figXmpLines}[caption={The \spadtype{QuadraticForm} domain.},label={fig-quadform}]
)abbrev domain QFORM QuadraticForm

++ Description:
Expand Down Expand Up @@ -265,6 +265,7 @@ the number of rows.
}{
\spadcommand{nrows q\free{x3}}
}
%$
\xtc{
Create a direct product element \spad{v}.
A package call is again necessary, but \Language{}
Expand Down Expand Up @@ -372,11 +373,17 @@ Since the argument is already a matrix, this coercion does no computation.

Within the context of a capsule, an object of \spadSyntax{%} is
regarded both as a quadratic form {\it and} as a
matrix.\footnote{In case each of \textspadsyntax{\%} and \spadtype{Rep}
matrix.\footnote{In case each of
\texht{\spadSyntax{\%}}{\spadSyntax{%}}
and \spadSyntax{Rep}
have the same named operation available,
the one from \textspadsyntax{\%} takes precedence.
Thus, if you want the one from \textspadsyntax{Rep}, you must
package call it using a \textspadsyntax{\$Rep} suffix.}
the one from
\texht{\spadSyntax{\%}}{\spadSyntax{%}}
takes precedence.
Thus, if you want the one from \spadSyntax{Rep}, you must
package call it using a
\texht{\spadSyntax{\$Rep}}{\spadSyntax{$Rep}} %$
suffix.}
This makes the definition of \spad{q.v} easy---it
just calls the \spadfunFrom{dot}{DirectProduct} product from
\spadtype{DirectProduct} to perform the indicated operation.
Expand Down Expand Up @@ -682,7 +689,7 @@ an algebra over \spad{K}, and a vector space over \spad{K}.
Its explicit exports include
\spad{e(n),} which returns the \eth{n} unit element.

\begin{figXmpLines}[caption={Part of the \textspadtype{CliffordAlgebra} domain.},label={fig-clifalg}]
\begin{figXmpLines}[caption={Part of the \spadtype{CliffordAlgebra} domain.},label={fig-clifalg}]
NNI ==> NonNegativeInteger
PI ==> PositiveInteger

Expand Down
25 changes: 13 additions & 12 deletions src/doc/htex/ug15.htex
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ Bug fixes, in particular:
\item some undesirable simplification are no longer done by default,
for example now asin(sin(3)) is left unevaluated

\item support lambda expressions using \textspadexpr{+->} syntax and
\item support lambda expressions using \spadSyntax{+->} syntax and
nested functions in Spad

\item better configure, support for Dragonfly BSD
Expand Down Expand Up @@ -1347,7 +1347,7 @@ that modifying FriCAS algebra is now much easier.
%------------------------------------------------------------------------
\begin{enumerate}
\item \spad{$} as name of current domain is no longer supported, use
\spad{%} instead.
\spad{%} instead. %$

\item Attributes are no longer supported, use niladic categories with
no exports instead.
Expand All @@ -1356,10 +1356,11 @@ that modifying FriCAS algebra is now much easier.
supported, so instead of \spad{.01} use \spad{0.01}

\item Anonymous functions using \spad{#1}, \spad{#2}, etc. are no
longer supported, to define anonymous functions use \textspadexpr{+->}.
longer supported, to define anonymous functions use \spad{+->}.

\item Braces no longer construct sets. So instead of
\textspadexpr{\{'sin, 'cos\}::Set(Symbol)} use
\texht{\spad|{'sin, 'cos}::Set(Symbol)|}{\spad{{'sin, 'cos}::Set(Symbol)}}
use
\spad{set(['sin, 'cos])$Set(Symbol)}. %$

\item Old Spad used colon (\spad{:}) to denote conversion, like
Expand All @@ -1377,7 +1378,7 @@ that modifying FriCAS algebra is now much easier.
\spad{~=,<=,>,>=} in ways which are correct for linear order, but
may conflict with other uses (as partial order or when generating
\spadtype{OutputForm}). FriCAS no longer performs this transformation.
Similarely, Spad parser no longer treats \spadop{^} and \spadop{^=} in
Similarely, Spad parser no longer treats \spad{^} and \spad{^=} in
special way.

\item Quote in old Spad allowed to insert arbitrary literal Lisp data,
Expand All @@ -1389,8 +1390,8 @@ that modifying FriCAS algebra is now much easier.
(with arguments if needed) as request to import the constructor.
FriCAS requires \spad{import} keyword.

\item In FriCAS \spadop{**}, \spadop{^}, \spadop{->} are right
associative. Also, right binding power of \textspadexpr{+->} is
\item In FriCAS \spad{**}, \spad{^}, \spad{->} are right
associative. Also, right binding power of \spad{+->} is
increased, which allows more natural writing of code.

\item Few non-working experimental features are removed, in particular
Expand Down Expand Up @@ -1421,12 +1422,12 @@ that modifying FriCAS algebra is now much easier.
There are also library changes that affect user code:

\begin{enumerate}
\item \spadop{**} lost its definition as exponentiation, use
\spadop{^} instead.
\item \spad{**} lost its definition as exponentiation, use
\spad{^} instead.

\item \spadop{^} is no longer used as negation (it means exponentiation
now) and \spadop{^=} no longer means inequality, use \spad{not} and
\spadop{~=} instead.
\item \spad{^} is no longer used as negation (it means exponentiation
now) and \spad{^=} no longer means inequality, use \spad{not} and
\spad{~=} instead.

\item \spad{setelt} is renamed to \spad{setelt!}.

Expand Down
2 changes: 1 addition & 1 deletion src/doc/htex/ug16.htex
Original file line number Diff line number Diff line change
Expand Up @@ -2255,7 +2255,7 @@ options {\tt properties}, {\tt value}, and {\tt mode}, and
that of a previous {\tt undo}.
If any such system commands are given between steps \smath{n} and
\smath{n + 1} (\smath{n > 0}), their effect is undone
for {\tt )undo m} for any \texht{\smath{0 < m \leq n}.}{0 < m <= n}.
for {\tt )undo m} for any \texht{\smath{0 < m \leq n}}{0 < m <= n}.

The command {\tt )undo} is equivalent to {\tt )undo -1} (it undoes
the effect of the previous user expression).
Expand Down

0 comments on commit 1375d05

Please sign in to comment.