Test |
PmWiki • WikiStyles
authors (basic) Wikistyle basicsWikiStyles allow authors to modify the color and other styling attributes of a page's contents. A wikistyle is written using percent-signs, as in The most basic use of wikistyles is to change text attributes such as color, background color, and font. PmWiki defines several wikistyles for changing the text color to %black%, %white%, %red%, %yellow%, %blue%, %gray%, %silver%, %maroon%, %green%, %navy%, and %purple%.
For colors other than the predefined colors, use the
To change the background color, use
See PmWiki:WikiStyleColors for more color help. ScopesWikistyles can also specify a scope; with no scope, the style is applied to any text that follows up to the next wikistyle specification or the end of the paragraph, whichever comes first. Including a scope changes the specification to apply to the whole paragraph (
The
Wikistyle attributesThe style attributes recognized within a wikistyle specification are: ------------ CSS ------------- --HTML-- color bgcolor class background-color margin id text-align padding hspace text-decoration border vspace font-size float target font-family list-style rel font-weight width* accesskey font-style height* value Special: define, apply The attributes in the first two columns correspond to the cascading style sheet (CSS) properties of the same name. The attributes in the last column apply only to specific items:
* The width and height attributes have asterisks because they are handled specially for <img .../> tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the wikistyle), then they set the 'width=' and 'height=' attributes of any <img ... /> tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled. Enabling StylesStyles not listed above can be enabled by a PMWiki Adminstrator by modifying the local/config.php file. For instance to enable the "line-height" style attribute add the line $WikiStyleCSS[] = 'line-height'; to the local/config.php file. Custom style shortcutsThe
Tip: It's often a good idea to put common style definitions into Group Header pages so that they can be shared among multiple pages in a group. Or, the wiki administrator can predefine styles site-wide as a local customization (see CustomWikiStyles). Tip: Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set Predefined style shortcutsPmWiki defines a number of style shortcuts.
ExamplesWikiStyleExamples contains a number of examples of ways to use wikistyles in pages. Known Issues
See Also<< Table directives | Documentation Index | WikiStyle examples >> |
July 2014: March 2014: March 2014: Jan 2014: Jan 2014: Oct 2013: Oct 2013: Jan 2013: Aug 2012: Apr 2012: Yate 4.1 released: better Gvoice support, iSAC codec, support for new Wanpipe drivers. Fixes – T.38 and Mac client issues. Mar 2012: Feb 2012: Nov 2011: Nov 2011: 04 May 2011: 12 Apr 2011: 9 Mar 2011: Feb 2011: 31 Jan 2011: 20 Dec 2010: 3 May 2010: 8 March 2010: 6-7 February 2010: 2 Nov 2009: 6 Aug 2008: 4 Aug 2008: |