The blockquote plugin creates semantically correct quotes by using the blockquote XHTML tag. In contrast to the default wiki markup for quoting, the content of the quote can contain any wiki markup which then gets interpreted as it would outside of the quote environment. Thus, also nested quotes are possible.
The plugin provides two additional pairs of markup tags, the blockquote
and the cite
markup. The blockquote
allows an additional citation source to be given after the blockquote
keyword in the opening tag. The cite
markup was mainly created to allow the addition of more complex citation sources (including links, text formatting etc) inside the blockquote
environment, although it can also be used standalone. See the examples below.
The following code
<blockquote> Test with loads of markup... Another paragraph with a little [[http://nowhere|link]] to nowhere. Oh, and while we are at it, what about some **bold**, some //italic// and some __underlined__ text? And finally, an itemization: * item 1 * item 1.1 * item 1.2 * item 2 - ordered item 2.1 - ordered item 2.2 - ordered item 2.2.1 * item 3 Works :-) </blockquote>
results in
Test with loads of markup…
Another paragraph with a little link to nowhere. Oh, and while we are at it, what about some bold, some italic and some underlined text? And finally, an itemization:
item 1
item 1.1 item 1.2 item 2
ordered item 2.1 ordered item 2.2
ordered item 2.2.1 item 3Works
The following code
<blockquote J. Random Hacker>Test with a cite attribute...</blockquote>
results in
Test with a cite attribute…
The following code
<blockquote>Test with a cite command...<cite>J. Random Hacker, [[http://localhost/~jrhacker]]</cite></blockquote>
results in
Test with a cite command…J. Random Hacker, http://localhost/~jrhacker
Highlight particularly important parts of your wiki in boxes that stand out with Box Plugin.
A simple box:
<box> the box contents </box>
Some more complex boxes
<box 80% round orange|a title> the box contents</box>
a title
<box 50% left blue>the box contents</box|a caption>
<box 60% round #f99 #fc9 #fcc #f60|title>the box contents</box|caption>
title
<box width classes colours | title text> contents text </box>
if no classes are specified the default styles will be used, that is square corners in a colour scheme based on the default DokuWiki colour scheme.
#F00 #fcab94 rgb(255,255,0)
. The colours are applied in order to:
if less than four colours are specified, the first colour is used for the missing colours.
The opening <box … >
including the title must all appear on one line. The box contents can appear over as many lines as are needed.
See the plugin in action here. The sample page shows all the styles available with the plugin.
a title
'let us start a quote and not finish it.
Boxed & titled
using hex colours
using rgb colours
title with forma
tting, a link and rounded corners
<div class='box'> <b class='xtop'><b class='xb1'></b><b class='xb2'></b><b class='xb3'></b><b class='xb4'></b></b> <div class='xbox'> <p class='box_title'>Title text would go here</p> <div class='box_content'> <p>Including this html snippet of a box</p> <p>All those <b> tags handle the rounded corners</p> </div> </div> <b class='xbottom'><b class='xb4'></b><b class='xb3'></b><b class='xb2'></b><b class='xb1'></b></b> </div>
=== headings aren't allowed in boxes ===
but | tables | are |
and plugins … ; definition : list : list : list
and a link
title
Example box
looks good?
title
title
title
title teste
title test
title teste
title test
Is the colour wrong?
title test
Simple box with rounded edges and title
* I will have to check this out * tomorrow * on my wiki
* I will have to check this out * tomorrow * on my wiki
Boxes in boxes works but will create another line per box, an inline option would be nice.
This is the parent
this is a child
this is another child
This is the parent
this is a child
this is a nested child
The filelist plugin provides a syntax for adding linked and sorted lists of files as selected by wildcard based glob patterns to a wiki page and thus allows dynamically including file listings of arbitrary filesystem locations and media namespaces. Using the additional filename command, one can also add a single link to a file out of a list anywhere in the text, which can be used to automatically keep download links for software releases up to date with the most recent upload.
The filelist plugin provides two new commands to be used in wiki pages, filelist
and filename
. The general command syntax for both is the following:
{{[ command ]>[ pattern ][ parameterlist ]}}
filelist
or filename
.
.txt
in the folder some/path/
1), you would use some/path/*.txt
as the pattern (and the parameter direct=1
, see parameters below). Analogue to this, to include all jpeg media files in :some:namespace
, you'd use :some:namespace:*.jpg
.
&
separated parameters (defined as key-value-pairs). For a list of supported parameters, see below.
The filelist plugin supports both absolute as well as relative paths into the filesystem or Dokuwiki media namespaces. All paths are checked against a whitelist of allowed paths for scanning (as defined via the configuration setting ''allowed_absolute_paths''). Paths which are not located below these whitelisted paths are not allowed for globbing and thus filelist/filename calls to such paths fail. Per default, the Dokuwiki basedir as defined in DOKU_INC is included in this whitelist and mapped to the Dokuwiki base-URL, DOKU_URL.
Relative paths into the filesystem are interpreted relative to the Dokuwiki basedir. Relative media paths (without a leading :
that is) are interpreted relative to the namespace of the currently active page. Thus, :snippets:dokuwiki:*
and *
would be interpreted the same on the current page :snippets:dokuwiki:filelist
.
Name | Description | Possible values | Default |
---|---|---|---|
direct | Whether to interpret the given pattern as a direct path in the file system or as an dokuwiki media id. Defaults to media id. | 0 or 1 | 0 |
sort | The property by which to sort the internal file list. By default, the file name is used, with upper case being sorted before lower case (use iname for a case insensitive sorting criteria). | name , iname , ctime , mtime , size | name |
order | Whether to sort the internal file list ascending or descending. Sorting in ascending order is the default. | asc , desc | asc |
filelist specific parameters | |||
offset | The offset in the internal file list from which on to display the list. Default is an offset of 0 . | any numeric value | 0 |
limit | The number of files to display, beginning at index offset . A number of 0 means to display all available files. | any numeric value | 0 |
style | The style to use for display. list creates an unordered bullet list (the default), olist an ordered list, table a table view and page a heading/section based view of the selected files. | list , olist , table , page | list |
tableheader | Whether to show the table header describing the table columns. Off by default. | 0 or 1 | 0 |
tableshowdate | Whether to show the file modification date in the table view. Off by default. | 0 or 1 | 0 |
tableshowsize | Whether to show the file size in the table view. Off by default. | 0 or 1 | 0 |
recursive | Whether to do a recursive file crawl starting at the defined basepath. If this parameter is set to 1 , the whitecard part of the search pattern is applied to each found subdirectory. If no files are found, the subdirectory is not included in the search result. All display styles besides table will show the result in a hierarchical structure; table will first flatten the result by prepending all found files with there subtree pathname (note that this happens before sorting). | 0 or 1 | 0 |
titlefile | The filename of a file which to lookup in each subtree if recursive is set to 1 and whose content to use as title for the directory. It will be ignored in the results of the filelisting itself. Defaults to _title.txt . Example: A _title.txt file containing “My special title” found during a crawl on the subpath my/subpath will be rendered as having the name “My special title” instead of “subpath”. | any filename | _title.txt |
filename specific parameters | |||
index | Which specific item to select for display from the internal file list. The default is the first one. | any numeric value | 0 |
{{filename>:wiki:pluginsytnax:filelist*}}
turns into
[n/a: No match]{{filelist>*.pdf&style=table&tableheader=1&tableshowdate=1&tableshowsize=1}}
turns into
[n/a: No match]{{filelist>lib/images/*&style=list&direct=1}}
turns into
{{filelist>lib/images/*&style=olist&direct=1&recursive=1&sort=iname}}
turns into
The Gallery Plugin allows you to embed an automatically created image gallery into a page.
A basic gallery can be added by selecting a namespace like this:
{{gallery>namespace}}
All image files in the selected namespace will be added to the image gallery. Don't forget the “:” in front of the namespace.
Instead of using a whole namespace of images, you can also specify a single image – this makes most sense when combined with the lightbox mode (see below).
{{gallery>namespace:someimage.jpg}}
The created gallery can be aligned by using white space (defaults to centered):
{{gallery> namespace}} (right aligned) {{gallery>namespace }} (left aligned) {{gallery> namespace }} (centered)
Instead of a namespace, you can also give an HTTP(s) URL to any Media RSS or ATOM feed with enclosures (as produced by most photo sharing sites like Flickr). The images will then be pulled from that feed instead:
{{gallery>http://www.23hq.com/rss/schabloni}}
Note: since the question mark is used to separate the parameters (see next section) the URL can not contain any question mark. To use such a feed URL with the gallery plugin, just use one of the many short URL services like http://bit.ly.
E.g. instead of http://api.flickr.com/services/feeds/photos_public.gne?id=22019303@N00&lang=en-us&format=rss_200
use a shortened URL like http://bit.ly/HurZM
.
Additionally, to have thumbnail creation correctly working you need to set config:fetchsize big enough to get the remote images downloaded.
A number of parameters can be set by appending them with ?
character to the namespace or image. Each parameter needs to be separated with a &
character. Defaults for all parameters can be set in the config manager. If a parameter is enabled by default it can be disabled in the syntax by prefixing it with the syllable no
. E.g. the parameter cache
is usually enabled and can be disabled using the keyword nocache
. Below is a list of all recognized parameters
Parameter | Default | Description |
---|---|---|
<number>x<number> | 120x120 | Sets the size for thumbnails. Unless the crop option is set, this is a boundary box into which the thumbnail will be fitted, maintaining the correct aspect ratio. |
<number>X<number> | 800X600 | Sets the size for the linked images in direct mode. This is a boundary box into which the image will be fitted, maintaining the correct aspect ratio. Note the uppercase X . |
<number> | 5 | The number images per row in the gallery table. If you specify a 0 no table is used instead all thumbnails are added in a sequence. |
=<number> | =0 | Limits the output to the given number of images. 0 means all. |
+<number> | +0 | Skip the first number of images. Useful with the option above. |
~<number> | ~0 | Add a pagination for the thumbnails displaying the number of given thumbnails per page. 0 disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed |
cache | enabled | Usually the output of the created gallery is cached. When the images in your selected namespace change, you have to manually force an update of the gallery page's cache. To disable the cache for the page showing the gallery, set nocache as option. |
crop | disabled | Make thumbnails the exact given thumbnail size big, cropping when needed. |
direct | disabled | Link thumbnails with the bigger sized images not with their detail page |
lightbox | disabled | Show images in a fancy JavaScript modal browsing window, see below for details. Setting this option automatically implies the direct mode |
reverse | disabled | Reverse the order of the displayed images |
recursive | enabled | Find images in the given namespace and all sub namespaces |
random | disabled | Sort images randomly. You might want to use nocache as well |
modsort | disabled | Sort images by file modification date |
datesort | disabled | Sort images by EXIF date |
titlesort | disabled | Sort images by EXIF title |
showname | disabled | Show filename below thumbnails |
showtitle | disabled | Show the EXIF tag Headline as title below thumbnails |
anything containing a * | jpg,gif,png images | This can be used to filter the list of files found in the given namespace. * work as simple wildcard symbol. |
Example:
{{gallery>images:vacation?image_*.jpg&80x80&crop&lightbox}}
This displays all images beginning with image_
and ending in .jpg
from the namespace images:vacation
. Thumbnails are cropped to 80×80 pixels and images will be opened in lightbox mode.
Example:
{{gallery>?crop&lightbox}}
This displays all images in the current namespace using 2 parameters. Parameterlist begins with ?
additional ones are concatenated with &
.
This mode will open the clicked picture inside the current browser window without leaving the current page2).
You can close the picture view by clicking the X button in the lower right corner or anywhere outside the picture. You can move to the next or previous image by using the arrow buttons in the lower left corner, your keyboard or by clicking the left or right side of the image.
The picture is downsized if necessary to fit into the current browser window. You can enlarge it with the expand button in the top right corner.
The following keys can be used to navigate:
Key | Action |
---|---|
→ | next image |
← | previous image |
ESC | close the image view |
If you want to show a title below the image using the parameter showtitle
it may appear that the title shown is not as you expected (e.g. einstein.jpg
instead of Albert Einstein
).
If you want to adapt the image's subtitle shown in the gallery, you have to manipulate the EXIF Tag called Headline
.
You could use the ExifTool for which even a Windows GUI exists to adapt the EXIF data to your needs.
Uploading images is beyond the scope of this plugin. Do not request any features regarding this.
data/media
directory. Keep in mind that image names need to be valid :pagenames, all lowercase, no spaces or special chars!
The gallery output is cached by default. When you add pictures later, they may not show up in the gallery: add &purge=true
to the end of the URL to clear the cache. See :caching for details.
Optionally use the nocache
parameter of the plugin (not recommended).
Problems with accessing EXIF or IPTC data in the images, should be reported as DokuWiki bugs and not for this plugin. All EXIF handling is in DokuWiki core. Currently EXIF Data is expected in UTF-8 encoding. There are some problems fetching the correct date from images, these are fixed in the current development version of DokuWiki.
When the lightbox mode doesn't work and instead images are simply opened in the same window, the JavaScript was not correctly loaded. This is most likely a Browser-Cache issue. Simply follow the steps described for fixing a similar problem with the faq:toolbar. Also make sure you don't have any conflicting plugin installed. You should not install any additional lightbox plugin.
There are different reasons why thumbnails are not created:
When no images from your feed are shown, be sure you don't have a question mark in your URL. Use an URL shortener as suggested above. Also be sure your feed URL (before shortening) starts with http:// or https:// and not with feed://. The latter is just a renamed HTTP link - simply rename it back.
As written above, you need to increase the config:fetchsize config option. Also make sure LibGD or ImageMagick are installed.
Here are a few user provided examples of the gallery plugin in use:
Be sure to read the Known Limitations and Caveats section first. Questions should be asked in the forum. Bugs and feature wishes should be reported in the issue tracker. Any comments/discussions on this page will be removed.
Include another wiki page into the current one.
{{page>wiki:syntax#Tables}}
will include the section about tables of the syntax page.
{{namespace>project_foo}}
will include all pages in the project_foo
namespace.
{{page>blog:mypage&tags&comments}}
will include the page blog:mypage
and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
Simply enclose the ID of the page to be included in double curly brackets:
{{page>[id]&[flags]}} {{section>[id]#[section]&[flags]}} {{namespace>[namespace]&[flags]}} {{tagtopic>[tag]&[flags]}}
[id] | page ID of the page to include; some macros are possible; shortcuts are resolved (: , . , .. ) | required |
---|---|---|
[section] | limits the included page to a specific section and its subsections | optional; default is the whole page |
[tag] | include pages with tag topic tag, requires plugin:tag | required |
[flags] | flags delimited by & , see flags | optional |
The plugin offers four syntaxes, {{page>...}}
, {{section>...}}
, {{namespace>...}}
and {{tagtopic>...}}
.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic
tag
.
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page.
noheader | Don't display the header of the inserted section |
---|---|
firstseconly | Display only the first section of the included page |
showtaglogos | Show/hide an image for the first tag (if the page has tags) |
showfooter | Show/hide page footer below the included page |
showlink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | Show/hide a permalink to the included page in the page footer |
showdate | Show/hide creation date of the page in the page footer |
showuser | Show/hide user name of the page creator in the page footer |
showcomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks2 plugin) |
showtags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | Show/hide edit button below the included page |
doredirect | Redirect back to original page after an edit |
usernamespace | Namespace for user pages (see showuser configuration) (default user ) |
doindent | Indent included pages relative to the section of the page they get included in |
linkonly | Display only a link instead of the whole page content |
title | Show the title instead of the page id |
pageexists | Only list page ids of existing pages (see existlink ) |
existlink | Display a link and do so only if page page-id exists |
noparlink | Don't put the link into a par environment (for inline lists) |
Simple macros are possible to serve a page on a per user or per date base. These are:
@USER@ | username |
---|---|
@NAME@ | full name of user |
@GROUP@ | first group the user belongs to |
@YEAR@ | 4-digit year |
@MONTH@ | 2-digit month |
@WEEK@ | 2-digit ISO week number |
@DAY@ | 2-digit day |
@DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@
can be one of:
PYEAR | previous year |
---|---|
NYEAR | next year |
PMONTH | previous month |
NMONTH | next month |
PWEEK | previous week |
NWEEK | next week |
YESTERDAY | yesterday's date |
TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays
in namespace <month>:<day>: eg. 10:15: birthdays
for the 15th of october.
{{page>@USER@:message}}
incudes the page message
from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year>
with next week's date e.g. foo2012:01 for the 27th of december 2011
You may use flags to override default all configuration settings:
Setting | Default | Alternative | ||
---|---|---|---|---|
firstseconly | fullpage | includes the whole page | firstseconly | includes only the first section of a wiki page |
showfooter | footer | shows a footer below the page with info about the included page | nofooter | hides the page info footer |
showeditbtn | editbtn | shows a button to edit (or create) the included page | noeditbtn | hides the edit (or create) button |
noindent | fullpage | page section and header retained on the same level as source page | noheader | strips the title from the included page |
Examples:
{{page>concept&firstseconly&footer}} {{page>mypage&noindent}}
MathPublish plugin.
To toggle to the math mode, you must use the <m>...</m> tag. The math commands must be separated by a space character or surrounded by {}.
<m>x in bbR \ { 1; 2 }</m>
a~b :
Syntax : matrix{num of lines}{num of columns}{first_element … last_element}
Syntax : tabular{lines description}{columns description}{first_element … last_element}
The Pagelist Plugin – as its name says – lists wiki pages in a nice way.
Just wrap a regular unordered list of internal links with the <pagelist>
tag:
<pagelist&[flags]> * [[..:blog:|Blog Plugin]] * [[..:discussion:|Discussion Plugin]] * [[..:editor:|Editor Plugin]] * [[..:tag:|Tag Plugin]] * [[..:wrap|Wrap Plugin|This is shown in the description cell]] </pagelist>
[flags] | flags can be used to alter the appearance of the pagelist, see flags | optional |
---|
Setting | Default | Alternative | ||
---|---|---|---|---|
style | default | table with horizontal lines | table , list or simplelist | standard DokuWiki table or list style |
showheader | noheader | hide the heading row of the pagelist table | header | show the header |
showdate | date | show the creation or last modification date | nodate | hide the date |
showuser | user | show creator or contributors | nouser | hide the user |
showdesc | nodesc | hide the description | desc | show the description (from metadata) |
showcomments | nocomments | hide the number of comments | comments | show the number of comments (if Discussion Plugin is installed) |
showtags | notags | hide the tags | tags | show the tags (if Tag Plugin is installed) |
showfirsthl | firsthl | show the first headline | nofirsthl | show the page name |
rsort/sort | nosort | no sortation of pages | rsort/sort | sorts the pages (reverse) alphabetically by pagename |
<pagelist&header&comments> ... </pagelist>
This will show a list of pages with a header line and a comments column (if the Discussion Plugin is installed).
The plugin can be configured using the DokuWiki configuration manager available in the admin menu. The settings also apply to plugins which use the helper component of the pagelist plugin, like for example the archive component of the plugin:blog plugin.
style | List style (default, list, table) |
---|---|
showheader | Show table header |
showdate | Shows/hides the date column (hide, creation date, modification date) |
showuser | Shows/hides the user column (hide, creator, contributors) |
showdesc | Shows/hides a short description taken from the first paragraph of a page (hide, max. 160 characters, max. 500 characters) |
showcomments | Shows/hides comments of a page (requires the plugin:discussion plugin) |
showlinkbacks | Shows/hides linkbacks of a page (requires the linkback plugin) |
showtags | Shows/hides tags of a page (requires the plugin:tag plugin) |
sort | Sorts the pages alphabetically by pagename |
The pageredirector plugin allows you to redirect users between pages and namespaces by adding a particular pattern to a page.
A simple code redirects to another page:
~~REDIRECT>namespace:page~~
You can also use this syntax since 20120612 version:
#REDIRECT namespace:page
Sometimes one may need to do simple calculations in DokuWiki table. The idea was taken from plugin:tablemath plugin, but conception changed a little bit. With the help of the plugin:tablecalc plugin you would be able to insert Excel styles formulas into the table
Download and install the plugin using the Plugin Manager using the following URL. Refer to :Plugins on how to install plugins manually.
To perform a calculation you need to insert XL-style formula into work sheet. Any expression must be started with ~~=
and finished by ~~
. You can use direct range specification for functions (like XL does) or a special range()
function. The range consists of a reference to the start cell and to the finish cell, like this:
r0c4
Please note, that row (r
) and column (c
) index starts from zero. Row and column prefixes can be swapped. The following is equal of the above:
c4r0
You can also reference to multiple cells in one range:
|r0c0:r1c1||
Furthermore you can use multiple ranges:
r0c0:r1c1,r0c3:r1c4
There is a recommendation not to use references for non-existing cells. For example, this is not correct (though it will work, returning “3”):
| 1 | | 2 | | ~~=sum(r0c0:r99c99)~~ |
Instead use constructions like this:
| 1 | | 2 | | ~~=sum(range(0,0,col(),row()-1))~~ |
The following functions are implemented:
x
= column, y
= row
Func | Description |
---|---|
cell(x,y) | Returns numeric value of (x,y) cell |
row() | Returns current row |
col() | Returns current column |
range(x1,y1,x2,y2) | Returns internal range for other functions |
sum(range) | Returns sum of the specified range |
count(range) | Returns number of elements in the specified range |
round(number;decimals) | Returns number, rounded to specified decimals |
label(string) | Binds label to the table |
average(range) | Returns average of the specified range |
min(range) | Returns minimum value within specified range |
max(range) | Returns minimum value within specified range |
check(condition;true;false) | Executes true statement, if condition is not zero |
compare(a;b;operation) | Do math compare for a and b . Returns zero when conditions for the operation are not met |
calc() |
Though you can use colon as delimiter in functions semi-colon is preferred and recommended.
Most of the standard Javascript arithmetic operators are supported but some 7) conflict with the table markup so the following operators are available:
Operator | Description |
---|---|
+ | Addition and unary plus |
- | Subtraction and unary negative |
* | Multiplication |
/ | Division |
% | Modulus (division remainder) |
& | Logical AND |
<< | Shift left |
>> | Shift right |
| 1 | 2 | ~~=r0c0+r0c1~~ | ~~=10.2+1.5~~ |
1 | 2 | 3 | 11.7 |
| 1 | 2 | | 3 | 4 | | ~~=sum(r0c0:r1c1)~~ ||
1 | 2 |
3 | 4 |
10 |
| 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | | **~~=sum(r0c0:r1c1,r0c3:r1c4)~~** ||||
1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |
26 |
|1| |2| |3| |4| |5.74| |6| |7| |8| |9| |10| |11| |~~=sum(range(col(),0,col(),row()-1))~~|
1 |
2 |
3 |
4 |
5.74 |
6 |
7 |
8 |
9 |
10 |
11 |
65.74 |
|1| |2| |3| |4| |5| |6| |7| |8| |9| |10| |~~=average(range(col(),0,col(),row()-1))~~|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
5.5 |
| ~~=label(ex6_1)~~1 | 2 | | 3 | 4 | Sum: **~~=sum(ex6_1.c0r0:c99r99)~~**
1 | 2 |
3 | 4 |
Sum: 10
| **~~=label(ex7_1)~~11** | ~~=sum(ex7_2.c0r0:c99r99)~~ | | 13 | 14 | | ~~=label(ex7_2)~~1 | 2 | | 3 | 4 | Sum: **~~=sum(ex7_1.c0r0:c1r1)~~**
11 | 10 |
13 | 14 |
1 | 2 |
3 | 4 |
Sum: 48
| **~~=min(c0r1:c0r3)~~** | **~~=max(c1r1:c1r3)~~** | | 1 | 7 | | 2 | 8 | | 3 | 9 | ~~=calc()~~
1 | 9 |
1 | 7 |
2 | 8 |
3 | 9 |
| 1 | ~~=check(cell(0,row()),#True,#False)~~ | | 0 | ~~=check(cell(0,row()),#True,#False)~~ | | x | ~~=check(cell(0,row()),#True,#False)~~ | | | ~~=check(cell(0,row()),#True,#False)~~ | | **** | ~~=check(cell(0,row()),#True,#False)~~ |
1 | True |
0 | False |
x | False |
False | |
False |
| 1 | 2 | 1=2 | ~~=check(compare(cell(0,row()),cell(1,row()),#=),#True,#False)~~ | | 3 | 3 | 3=3 | ~~=check(compare(cell(0,row()),cell(1,row()),#=),#True,#False)~~ | | 4 | 5 | 4<5 | ~~=check(compare(cell(0,row()),cell(1,row()),#<),#True,#False)~~ | | 6 | 7 | 6>7 | ~~=check(compare(cell(0,row()),cell(1,row()),#>),#True,#False)~~ | | 8 | 9 | 8>9 | ~~=check(compare(cell(0,row()),cell(1,row()),#>),#True,#False)~~ | | 10 | 10 | 10≥10 | ~~=check(compare(cell(0,row()),cell(1,row()),#>=),#True,#False)~~ | | 11 | 11 | 11≤11 | ~~=check(compare(cell(0,row()),cell(1,row()),#>=),#True,#False)~~ | | 12 | 12 | 12≠12 | ~~=check(compare(cell(0,row()),cell(1,row()),#!=),#True,#False)~~ |
1 | 2 | 1=2 | False |
3 | 3 | 3=3 | True |
4 | 5 | 4<5 | True |
6 | 7 | 6>7 | False |
8 | 9 | 8>9 | False |
10 | 10 | 10≥10 | True |
11 | 11 | 11≤11 | True |
12 | 12 | 12≠12 | False |
Operator | Equation | Result |
---|---|---|
+ | ~~= 3 + 2 ~~ | 5 |
- | ~~= 3 - 2 ~~ | 1 |
* | ~~= 3 * 2 ~~ | 6 |
/ | ~~= 6 / 2 ~~ | 3 |
% | ~~= 7 % 2 ~~ | 1 |
unary + | ~~= +2 ~~ | 2 |
unary - | ~~= -2 ~~ | -2 |
& | ~~= 3 & 2 ~~ | 2 |
<< | ~~= 2 << 7 ~~ | 256 |
>> | ~~= 8 >> 2 ~~ | 2 |
14.04.2010
07.09.2009
col()
returns wrong number if the preceeding cells in the same row use colswap, eg:
| A | B | ~~=col()~~ | | C || ~~=col()~~ |
gives:
A | B | 2 |
C | 1 |
— Michał Sacharewicz 2012/01/11
Is it possible to make math calculations (like multiplication)… So that to add the VAT to the price for example. for or sthg similiar… Vandra Ákos 08/31/2011
very nice indeed, I need to borrow your syntax a bit, so I don't need to use ~~tm: James Lin08/09/2009
Some coding advice: You're working with a blacklist to avoid script inclusion, a whitelist might be more secure. You're using the output of rand() as a HTML ID. Numbers alone are not allowed as IDs in XHTML, you should prefix them with your plugin name. Also have a look at using_ids — Andreas Gohr 2009/09/09 15:42
The plugin definitely needs max/min and conditional functions and/or :)
Fixed all of the above — Gryaznov Sergey 2010/04/14
Can you add support for comma as decimal separator? madenate 2010/06/25
I would appreciate this, too. (Nice work, though!) — Christian 2010/09/29
Also, it would be nice if the round()
function could use the exact number of specified decimal places, even if these would be zero. See the following image as a sample why it would probably look better:
— Christian 2010/09/29
There's problem when preceeding column to calculation contains markup, it goes bezerk:^ Date ^ Description ^ Hours (Decimal) ^ | 2008-08-29 | xx | 6.5 | | 2008-08-30 | xxx | 1.5 | | 2008-09-03 | xxxx | -4.00 | | 2008-09-03 | [[:config]] yea | -4.00 | ^ ^ ^ ~~=sum(range(1,0,col(),row()-1))~~ ^
Workaround is to avoid any markup in preceeding columns, i.e in this sample swap Description
and Hours
columns
— glen 2010/12/08 14:04
None of the formulas outputs results for me (on Anteater). Any known conflicts with other plug-ins?
— mubed 2012/05/30 14:28
http://demo.selfthinker.org/plugin:wrap Wrap Plugin
An uppercase <WRAP> (or alternatively <block> or <div>) creates a div
and should be used for “big” containers, surrounding paragraphs, lists, tables, etc.
<WRAP classes width :language> "big" content </WRAP> or <block classes width :language> "big" content </block> or <div classes width :language> "big" content </div>
A lowercase <wrap> (or alternatively <inline> or <span>) creates a span
and should be used for “small” containers, inside paragraphs, lists, tables, etc.
<wrap classes width :language>"small" content</wrap> or <inline classes width :language>"small" content</inline> or <span classes width :language>"small" content</span>
Please note, some things won't work with lowercase spans:
if the according wrap isn't floated as well.
You can have columns easily by adding the class column
and a width, e.g.
<WRAP column 30%>...content...</WRAP>
Emulated Big Headline
You can emulate a big headline with italic, bold and underlined text, e.g.
//**__Emulated Big Headline__**//
Emulated Small Headline
A smaller headline uses no underlining, e.g.
//**Emulated Small Headline**//
If you need text that is bold and italic, simply use it the other way around:
**//No Headline//**
Different Floating Options
Normally you would only need the class column
, but for more sophisticated uses (not only for columns, but for any other classes, like boxes and notes as well) you can have several kinds of “floats”:
column
is the same as left
in LTR languages and the same as right
in RTL languages
left
will let you float your wrap on the left
right
will let the wrap float right
center
will position the wrap in the horizontal center of the page
Widths
You can set any valid widths (but only on divs): %, px, em, ex, pt, pc, cm, mm, in
, but most of the time you'd only want either
type | e.g. | note |
---|---|---|
% | 30% | makes sense in a liquid layout |
px | 420px | makes sense if your layout has a fixed pixel width or if your container contains images with a certain width |
em | 20em | makes sense if you like your wrap container to grow and shrink with the font size or if your layout is em-based |
A table inside a column or box will always be 100% wide. This makes positioning and sizing tables possible.
After using any of the float classes, you might come across something like this, where the following text protrudes into the space where only the floating containers should be …
… to prevent that, you should simply add
<WRAP clear></WRAP>
after your last column.
You can use the same options with spans (as each element that floats is automatically a block level element), but it probably doesn't make too much sense. Widths on spans normally do not work (by design), but can make sense, when it is floating.
Attention: Widths can cause problems and will often look different and break in some browsers. If you're not a web developer, you might not understand any problems regarding the box model. Just try to test your columns in all major browsers and make your widths smaller than you initially think they should be.
All of those options will also work in the boxes and notes wraps (see below).
For modern browsers (Firefox, Chrome and Safari) you can use multi-columns. Just use col2
for 2 columns, col3
for 3 columns, col4
for 4 columns and col5
for 5 columns.
Note: Multi-columns don't make sense for spans.
You can use these different text alignments:
leftalign
rightalign
centeralign
justify
Center aligned text …
… and right aligned.
<WRAP centeralign> Center aligned text ... </WRAP> <WRAP rightalign> ... and right aligned. </WRAP>
You cannot add alignments to spans.
round box 570px center
box
creates a box around the container and uses the colours from the template's style.ini
as default colours (__background_alt__
and __text__
)
info
, tip
, important
, alert
, help
, download
, todo
will add a special note container with a corresponding icon
danger
, warning
, caution
, notice
, safety
use safety colours (and no icons)
round
can be added to anything with a background colour or a border and will only work in modern browsers (no Internet Explorer)
Info
<WRAP info></WRAP>
Tip
<WRAP tip></WRAP>
Important
<WRAP important></WRAP>
Alert
<WRAP alert></WRAP>
Help
<WRAP round help></WRAP>
Download
<WRAP download></WRAP>
Todo
<WRAP todo></WRAP>
Safety Notes:
Danger
<WRAP danger></WRAP>
Warning
<WRAP warning></WRAP>
Caution
<WRAP caution></WRAP>
Notice
<WRAP round notice></WRAP>
Safety
<WRAP round safety></WRAP>
You can use notes and boxes also inside text with spans like this: info, help, alert, important, tip, download, todo and round box and danger, warning, caution, notice, safety.
<wrap info>info</wrap>, <wrap help>help</wrap>, ...
You can mark text as highlighted, less significant and especially emphasised.
You can mark text as <wrap hi>highlighted</wrap>, <wrap lo>less significant</wrap> and <wrap em>especially emphasised</wrap>.
This might look ugly in some templates and should be adjusted accordingly.
This text will appear indented.
<wrap indent>This text will appear indented.</wrap>
This text will appear “outdented”.
<wrap outdent>This text will appear "outdented".</wrap>
Inside this code block the words will wrap to a new line although they are all in one line.
<WRAP prewrap 250px> <code> Inside this code block the words will wrap to a new line although they are all in one line. </code> </WRAP>
Here follows a spoiler: Darth Vader is Luke's father.
Here follows a spoiler: <wrap spoiler>Darth Vader is Luke's father.</wrap>
Just select the text in the spoiler box to be able to read its content.
The following text is hidden: John, please revise that sentence.
The following text is hidden: <wrap hide>John, please revise that sentence.</wrap>
Warning: The text will still appear in the source code, in non-modern browsers and is searchable. Do not hide any security risky secrets with it!
The following will add a pagebreak:
The following will add a pagebreak: <WRAP pagebreak></WRAP>
This has no effect on the browser screen. A pagebreak will force a new page in printouts.
The following will try to avoid a pagebreak:
much content, belonging together (like a long table)
The following will try to avoid a pagebreak: <WRAP nopagebreak>much content, belonging together (like a long table)</WRAP>
This also has no effect on the browser screen. It will try to avoid a page break in printouts.
<wrap noprint>This text appears on the screen, but not in print.</wrap>
This text does not appear on the screen, but only in print.
<wrap onlyprint>This text does not appear on the screen, but only in print.</wrap>
I advice against using the following typography classes. It's better to create semantic classes that reflect their meaning instead.
sansserif
, serif
, monospace
bigger
, muchbigger
, smaller
fgred
, fggreen
, fgblue
, fgcyan
, fgviolet
, fgyellow
, fggrey
, fgwhite
, fgblack
bgred
, bggreen
, bgblue
, bgcyan
, bgviolet
, bgyellow
, bggrey
, bgwhite
, bgblack
You can combine and nest all classes and types of boxes, e.g.
Outer green box floats right
Inner nested box floats left and is partly emphasized and highlighted with nested bigger text inside.
Text inside outer right box, but beneath inner left box.
Round tip box underneath, after a clear
.
<WRAP box bggreen fgblack 350px right :en> //**__Outer green box floats right__**// <WRAP 165px left> Inner nested box floats left and is partly <wrap em hi>__em__phasized and __hi__ghlighted with nested <wrap bigger>__bigger__ text</wrap> inside</wrap>. </WRAP> Text inside outer right box, but beneath inner left box. <WRAP clear></WRAP> <WRAP round tip> Round tip box underneath, after a ''clear''. </WRAP> </WRAP>
You can change the language and the reading direction of a wrap container by simply adding a colon followed by the language code, like this:
<WRAP :he> זה עברית. ((<wrap :en>This means "This is Hebrew.", at least according to [[http://translate.google.com/|Google Translate]].</wrap>)) </WRAP>
זה עברית. 8)
The text direction (rtl
, right to left or ltr
, left to right) will get inserted automatically and is solely dependent on the language. The list of currently supported languages is taken from: http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code
(If you specify a language not listed there, it simply won't do anything.)
Copyright © Alan Shea, 2005-2025