Changeset 464 for trunk/SpreadSheetPlugin/data/TWiki/SpreadSheetPlugin.txt
- Timestamp:
- 11/08/08 14:34:13 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SpreadSheetPlugin/data/TWiki/SpreadSheetPlugin.txt
r14 r464 446 446 #FuncPROPERSPACE 447 447 ---+++ PROPERSPACE( text ) -- properly space out <nop>WikiWords 448 * Properly spaces out % TWIKIWEB%.WikiWords preceeded by white space, parenthesis, or ==][==. Words listed in the DONTSPACE %TWIKIWEB%.%WIKIPREFSTOPIC% variable or DONTSPACE Plugins setting are excluded448 * Properly spaces out %SYSTEMWEB%.WikiWords preceeded by white space, parenthesis, or ==][==. Words listed in the DONTSPACE %SYSTEMWEB%.%WIKIPREFSTOPIC% variable or DONTSPACE Plugins setting are excluded 449 449 * Syntax: ==$PROPERSPACE( text )== 450 450 * Example: Assuming DONTSPACE contains <nop>MacDonald: ==%<nop>CALC{"$PROPERSPACE(Old <nop>MacDonald had a <nop>ServerFarm, <nop>EeEyeEeEyeOh)"}%== returns ==Old <nop>MacDonald had a Server Farm, Ee Eye Ee Eye Oh== … … 494 494 #FuncSEARCH 495 495 ---+++ SEARCH( string, text, start ) -- search a string within a text 496 * Finds one text =string=, within another =text=, and returns the number of the starting position of =string=, from the first character of =text=. This search is a % TWIKIWEB%.RegularExpression search; use =$FIND()= for non-regular expression searching. Starting position is 1; a 0 is returned if nothing is matched496 * Finds one text =string=, within another =text=, and returns the number of the starting position of =string=, from the first character of =text=. This search is a %SYSTEMWEB%.RegularExpression search; use =$FIND()= for non-regular expression searching. Starting position is 1; a 0 is returned if nothing is matched 497 497 * Syntax: ==$SEARCH( string, text, _start_ )== 498 498 * Example: ==%<nop>CALC{"$SEARCH([uy], fluffy)"}%== returns ==3== … … 536 536 #FuncSUBSTITUTE 537 537 ---+++ SUBSTITUTE( text, old, new, instance, option ) -- substitute text 538 * Substitutes =new= text for =old= text in a =text= string. =instance= specifies which occurance of =old= you want to replace. If you specify =instance=, only that instance is replaced. Otherwise, every occurance is changed to the new text. A literal search is performed by default; a % TWIKIWEB%.RegularExpression search if the =option= is set to ==r==538 * Substitutes =new= text for =old= text in a =text= string. =instance= specifies which occurance of =old= you want to replace. If you specify =instance=, only that instance is replaced. Otherwise, every occurance is changed to the new text. A literal search is performed by default; a %SYSTEMWEB%.RegularExpression search if the =option= is set to ==r== 539 539 * Syntax: ==$SUBSTITUTE( text, old, _new_, _instance_, _option_ )== 540 540 * Example: ==%<nop>CALC{"$SUBSTITUTE(Good morning, morning, day)"}%== returns ==Good day== … … 638 638 ---+++ Can I use CALC in a formatted search? 639 639 640 Specifically, how can I output some conditional text in a % TWIKIWEB%.FormattedSearch?641 642 You need to escape the CALC so that it executes once per search hit. This can be done by escaping the =%= signs of =%<nop>CALC{...}%= with =$percnt=. For example, to execute =$IF($EXACT($formfield(Tested), Yes), %<nop>PUBURL%/%<nop> TWIKIWEB%/TWikiDocGraphics/choice-yes.gif, %<nop>PUBURL%/%<nop>TWIKIWEB%/TWikiDocGraphics/choice-no.gif)= in the =format=""= parameter, write this:643 644 =%<nop>SEARCH{ .... format="| $topic | $percntCALC{$IF($EXACT($formfield(Tested), Yes), %<nop>PUBURL%/%<nop> TWIKIWEB%/TWikiDocGraphics/choice-yes.gif, %<nop>PUBURL%/%<nop>TWIKIWEB%/TWikiDocGraphics/choice-no.gif)}$percnt |" }%=640 Specifically, how can I output some conditional text in a %SYSTEMWEB%.FormattedSearch? 641 642 You need to escape the CALC so that it executes once per search hit. This can be done by escaping the =%= signs of =%<nop>CALC{...}%= with =$percnt=. For example, to execute =$IF($EXACT($formfield(Tested), Yes), %<nop>PUBURL%/%<nop>SYSTEMWEB%/TWikiDocGraphics/choice-yes.gif, %<nop>PUBURL%/%<nop>SYSTEMWEB%/TWikiDocGraphics/choice-no.gif)= in the =format=""= parameter, write this: 643 644 =%<nop>SEARCH{ .... format="| $topic | $percntCALC{$IF($EXACT($formfield(Tested), Yes), %<nop>PUBURL%/%<nop>SYSTEMWEB%/TWikiDocGraphics/choice-yes.gif, %<nop>PUBURL%/%<nop>SYSTEMWEB%/TWikiDocGraphics/choice-no.gif)}$percnt |" }%= 645 645 646 646 ---+++ How can I easily repeat a formula in a table? … … 685 685 a plugin setting write ==%<nop><plugin>_<setting>%==, i.e. ==%<nop>SPREADSHEETPLUGIN_SHORTDESCRIPTION%== 686 686 687 * One line description, is shown in the % TWIKIWEB%.TextFormattingRules topic:687 * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic: 688 688 * Set SHORTDESCRIPTION = Add spreadsheet calculation like ="$SUM( $ABOVE() )"= to TWiki tables and other topic text 689 689 … … 695 695 696 696 <noautolink> 697 * [[% TWIKIWEB%.WikiWord][WikiWords]] to exclude from being spaced out by the ==$PROPERSPACE(text)== function. This comma delimited list can be overloaded by a DONTSPACE preferences variable:697 * [[%SYSTEMWEB%.WikiWord][WikiWords]] to exclude from being spaced out by the ==$PROPERSPACE(text)== function. This comma delimited list can be overloaded by a DONTSPACE preferences variable: 698 698 * Set DONTSPACE = CodeWarrior, MacDonald, McIntosh, RedHat, SuSE 699 699 </noautolink> … … 722 722 | 13 Oct 2007: | Added $FORMATTIMEDIFF() | 723 723 | 09 Sep 2007: | Enhanced documentation for $EVAL() and $INT() | 724 | 02 Jun 2007: | Added % TWIKIWEB%.VarCALC to have =%<nop>CALC{}%= listed in %TWIKIWEB%.TWikiVariables |724 | 02 Jun 2007: | Added %SYSTEMWEB%.VarCALC to have =%<nop>CALC{}%= listed in %SYSTEMWEB%.TWikiVariables | 725 725 | 14 Apr 2007: | Fixing bug in $EXISTS() that required full =web.topic= instead of just =topic= | 726 726 | 11 Mar 2007: | Fixing bug in $VALUE() and $INT(), introduced by version 09 Mar 2007 | … … 761 761 | 17 Mar 2001: | Initial version with $ABOVE(), $AVERAGE(), $COLUMN(), $COUNTITEMS(), $EVAL(), $INT(), $LEFT(), $LOWER(), $MAX(), $MIN(), $ROW(), $SUM(), $T(), $UPPER() | 762 762 | CPAN Dependencies: | none | 763 | TWiki:Plugins/Benchmark: | % TWIKIWEB%.GoodStyle 99%, %TWIKIWEB%.FormattedSearch 99%, %TOPIC% 95% |763 | TWiki:Plugins/Benchmark: | %SYSTEMWEB%.GoodStyle 99%, %SYSTEMWEB%.FormattedSearch 99%, %TOPIC% 95% | 764 764 | Other Dependencies: | none | 765 765 | Perl Version: | 5.000 and up | … … 768 768 | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal | 769 769 770 __Related Topics:__ % TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins, %TWIKIWEB%.VarCALC770 __Related Topics:__ %SYSTEMWEB%.TWikiPreferences, %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.VarCALC 771 771 772 772 -- TWiki:Main/PeterThoeny - 13 Oct 2007
Note: See TracChangeset
for help on using the changeset viewer.
