Allow styles to be computed
Needs further testing and documentation, will provide a more detailed commit message when that is checked in.
This commit is contained in:
parent
253062e906
commit
c52219f827
27 changed files with 1902 additions and 1154 deletions
337
doc/teapot.lyx
337
doc/teapot.lyx
|
@ -4895,14 +4895,36 @@ false,
|
|||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Location Cell labels and the result of the
|
||||
\family typewriter
|
||||
Label Cell labels are of this type, but they generally evaluate to locations
|
||||
(or cause an error if there is no cell with that label), so you don't generally
|
||||
manipulate values of this type.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Keyword The names of functions and of special arguments to functions, like
|
||||
the
|
||||
\family sans
|
||||
decimal
|
||||
\family default
|
||||
flag to the
|
||||
\family sans
|
||||
float()
|
||||
\family default
|
||||
function.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Location The values of cell labels and the result of the
|
||||
\family sans
|
||||
&()
|
||||
\family default
|
||||
function have this type, but there are no location constant literals.
|
||||
However,
|
||||
\family sans
|
||||
&(3,2,1)
|
||||
\family typewriter
|
||||
&(3,2,1),
|
||||
,
|
||||
\family default
|
||||
for example, acts very much like a location constant literal.
|
||||
\end_layout
|
||||
|
@ -4910,16 +4932,30 @@ Location Cell labels and the result of the
|
|||
\begin_layout Description
|
||||
Error Syntactical or semantical (type mismatch) errors cause this value,
|
||||
as well as division by 0 and the function
|
||||
\family typewriter
|
||||
\family sans
|
||||
error()
|
||||
\family default
|
||||
.
|
||||
An error always has an assigned error message.
|
||||
Functions and operators, when applied to a value of the type error, evaluate
|
||||
to just that value.
|
||||
That way, the first error which was found, possibly deep inside a complicated
|
||||
That way, the first error encountered, possibly deep inside a complicated
|
||||
expression, will be shown.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Expression a teapot formula; some functions (like
|
||||
\family sans
|
||||
find()
|
||||
\family default
|
||||
) take an expression as an argument so that it can be evaluated from the
|
||||
point of view of other cells.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Style the encapsulated visual/display attributes of a cell.
|
||||
Not many operators/functions apply to Style values, but they are the key
|
||||
to allowing the appearance of a cell to depend on its value.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
|
@ -5311,6 +5347,9 @@ y
|
|||
\emph default
|
||||
are strings, the result is the concatenated string.
|
||||
If they are locations, this operates componentwise.
|
||||
If they are styles, it means to take any unset components of the left-hand
|
||||
style and fill them in with values from the right-hand style (ignoring
|
||||
the right-hand components that are already set in the left-hand style).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
@ -6380,6 +6419,37 @@ x
|
|||
is given in radians.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
background
|
||||
\series medium
|
||||
(int
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\emph default
|
||||
c)
|
||||
\series default
|
||||
evaluates to a style token with the background color set to
|
||||
\emph on
|
||||
c
|
||||
\emph default
|
||||
(and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
below
|
||||
\series medium
|
||||
|
@ -6478,6 +6548,37 @@ or
|
|||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
bold
|
||||
\series medium
|
||||
([bool
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
b
|
||||
\emph default
|
||||
])
|
||||
\series default
|
||||
evaluates to a style token with the bold property set to
|
||||
\emph on
|
||||
b
|
||||
\emph default
|
||||
, which defaults to true (and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
bool
|
||||
\begin_inset space ~
|
||||
|
@ -6543,6 +6644,16 @@ x
|
|||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
center keyword used as an argument to
|
||||
\family sans
|
||||
\series bold
|
||||
justify
|
||||
\family default
|
||||
\series default
|
||||
().
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
clock
|
||||
\series medium
|
||||
|
@ -6570,8 +6681,14 @@ condition
|
|||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
compact used as a keyword to the string() function; listed here to record
|
||||
that this identifier may not be used as a cell label.
|
||||
compact used as a keyword to the
|
||||
\family sans
|
||||
\series bold
|
||||
string
|
||||
\family default
|
||||
\series default
|
||||
() function; listed here to record that this identifier may not be used
|
||||
as a cell label.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
@ -6907,6 +7024,26 @@ is
|
|||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
floatfmt
|
||||
\series medium
|
||||
(decimal|scientific|compact|hexact)
|
||||
\series default
|
||||
evaluates to a style token with the floating-point format set to the specified
|
||||
format, given as a bare word (and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
float
|
||||
\begin_inset space ~
|
||||
|
@ -6935,6 +7072,37 @@ x
|
|||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
foreground
|
||||
\series medium
|
||||
(int
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\emph default
|
||||
c)
|
||||
\series default
|
||||
evaluates to a style token with the foreground color set to
|
||||
\emph on
|
||||
c
|
||||
\emph default
|
||||
(and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
float
|
||||
\begin_inset space ~
|
||||
|
@ -7185,6 +7353,26 @@ is
|
|||
tests whether the current cell is non-empty.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
justify
|
||||
\series medium
|
||||
(left|right|center)
|
||||
\series default
|
||||
evaluates to a style token with the justification set to the specified
|
||||
direction, given as a bare word (and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
left
|
||||
\series medium
|
||||
|
@ -7693,6 +7881,37 @@ cn
|
|||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
precision
|
||||
\series medium
|
||||
(int
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
x
|
||||
\emph default
|
||||
)
|
||||
\series default
|
||||
evaluates to a style token in which the precision is set to
|
||||
\emph on
|
||||
x
|
||||
\emph default
|
||||
(and no other fields are set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
float
|
||||
\begin_inset space ~
|
||||
|
@ -7801,6 +8020,37 @@ scientific Used as a keyword argument to the string() function; listed here
|
|||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
shadowed
|
||||
\series medium
|
||||
([bool
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
b
|
||||
\emph default
|
||||
])
|
||||
\series default
|
||||
evaluates to a style token with the shadowed property set to
|
||||
\emph on
|
||||
b
|
||||
\emph default
|
||||
, which defaults to true (and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
float
|
||||
\begin_inset space ~
|
||||
|
@ -8345,6 +8595,37 @@ status open
|
|||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
transparent
|
||||
\series medium
|
||||
([bool
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
b
|
||||
\emph default
|
||||
])
|
||||
\series default
|
||||
evaluates to a style token with the transparent property set to
|
||||
\emph on
|
||||
b
|
||||
\emph default
|
||||
, which defaults to true (and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
boolean
|
||||
\begin_inset space ~
|
||||
|
@ -8390,6 +8671,37 @@ x
|
|||
).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\series medium
|
||||
style
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
\emph default
|
||||
underline
|
||||
\series medium
|
||||
([bool
|
||||
\emph on
|
||||
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
b
|
||||
\emph default
|
||||
])
|
||||
\series default
|
||||
evaluates to a style token with the underline property set to
|
||||
\emph on
|
||||
b
|
||||
\emph default
|
||||
, which defaults to true (and no other fields set).
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
up
|
||||
\series medium
|
||||
|
@ -8404,7 +8716,14 @@ l
|
|||
])] displacement by one cell in the negative
|
||||
\series default
|
||||
\emph on
|
||||
y
|
||||
y
|
||||
\emph default
|
||||
direction; see the fuller description at
|
||||
\family sans
|
||||
\series bold
|
||||
above
|
||||
\series default
|
||||
.)
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue