class HybridFunction(ParameterFunction): (source)
A parameter function where the output is also defined using a template. The template can use a number of functions; each function has an associated tag. Example: [f0{$1},span class="fbox"] defines a function f0 which corresponds to a span of class fbox, yielding <span class="fbox">$1</span>. Literal parameters can be used in tags definitions:
[f0{$1},span style="color: $p;"]
yields <span style="color: $p;">$1</span>, where $p is a literal parameter. Sizes can be specified in hybridsizes, e.g. adding parameter sizes. By default the resulting size is the max of all arguments. Sizes are used to generate the right parameters. A function followed by a single / is output as a self-closing XHTML tag:
[f0/,hr]
will generate <hr/>.
Method | computehybridsize |
Compute the size of the hybrid function. |
Method | parsebit |
Parse a function with [] and {} parameters |
Method | readtag |
Get the tag corresponding to the given index. Does parameter substitution. |
Method | writebracket |
Return a new bracket looking at the given direction. |
Method | writefunction |
Write a single function f0,...,fn. |
Method | writeparam |
Write a single param of the form $0, $x... |
Method | writeparams |
Write all params according to the template |
Method | writepos |
Write all params as read in the parse position. |
Instance Variable | contents |
Undocumented |
Instance Variable | size |
Undocumented |
Inherited from ParameterFunction
:
Method | getliteralvalue |
Get the literal value of a parameter. |
Method | getparam |
Get a parameter as parsed. |
Method | getvalue |
Get the value of a parameter. |
Method | paramdefs |
Read each param definition in the template |
Method | readparams |
Read the params according to the template. |
Instance Variable | params |
Undocumented |
Inherited from CommandBit
(via ParameterFunction
):
Method | parseliteral |
Parse a literal bracket. |
Method | parseparameter |
Parse a parameter at the current position |
Method | parsesquare |
Parse a square bracket |
Method | parsesquareliteral |
Parse a square bracket literally. |
Method | parsetext |
Parse a text parameter. |
Method | setcommand |
Set the command in the bit |
Instance Variable | command |
Undocumented |
Instance Variable | translated |
Undocumented |
Inherited from FormulaCommand
(via ParameterFunction
, CommandBit
):
Method | detect |
Find the current command. |
Method | emptycommand |
Check for an empty command: look for command disguised as ending. Special case against '{ { } }' situation. |
Method | extractcommand |
Extract the command from elyxer.the current position. |
Method | parsecommandtype |
Parse a given command type. |
Method | parseupgreek |
Parse the Greek up command.. |
Method | parsewithcommand |
Parse the command type once we have the command. |
Class Variable | commandmap |
Undocumented |
Class Variable | start |
Undocumented |
Class Variable | types |
Undocumented |
Instance Variable | output |
Undocumented |
Inherited from FormulaBit
(via ParameterFunction
, CommandBit
, FormulaCommand
):
Method | __init__ |
The formula bit type can be 'alpha', 'number', 'font'. |
Method | __unicode__ |
Get a string representation |
Method | add |
Add any kind of formula bit already processed |
Method | clone |
Return a copy of itself. |
Method | computesize |
Compute the size of the bit as the max of the sizes of all contents. |
Method | setfactory |
Set the internal formula factory. |
Method | skiporiginal |
Skip a string and add it to the original formula |
Class Variable | original |
Undocumented |
Class Variable | type |
Undocumented |
Instance Variable | factory |
Undocumented |
Inherited from Container
(via ParameterFunction
, CommandBit
, FormulaCommand
, FormulaBit
):
Method | escape |
Escape a line with replacements from elyxer.a map |
Method | escapeall |
Escape all lines in an array according to the output options. |
Method | escapeentities |
Escape all Unicode characters to HTML entities. |
Method | extracttext |
Extract all text from elyxer.allowed containers. |
Method | gethtml |
Get the resulting HTML |
Method | getparameter |
Get the value of a parameter, if present. |
Method | getparameterlist |
Get the value of a comma-separated parameter as a list. |
Method | group |
Group some adjoining elements into a group |
Method | hasemptyoutput |
Check if the parent's output is empty. |
Method | locateprocess |
Search for all embedded containers and process them |
Method | process |
Process contents |
Method | recursivesearch |
Perform a recursive search in the container. |
Method | remove |
Remove a container but leave its contents |
Method | searchall |
Search for all embedded containers of a given type |
Method | searchprocess |
Search for elements of a given type and process them |
Method | searchremove |
Search for all containers of a type and remove them |
Method | tree |
Show in a tree |
Class Variable | begin |
Undocumented |
Class Variable | parent |
Undocumented |
Class Variable | partkey |
Undocumented |