Deprecated: function_exists(): Passing null to parameter #1 ($function) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1309 Deprecated: function_exists(): Passing null to parameter #1 ($function) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1309 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1634 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1634 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1634 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1633 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1634 |
Deprecated: function_exists(): Passing null to parameter #1 ($function) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1309 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 460 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1475 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/astro/public_html/pmwiki/scripts/wikistyles.php on line 130 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1633 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/astro/public_html/pmwiki/pmwiki.php on line 1634 PmWiki /
Wiki Stylesauthors (basic, advanced)
Wiki Styles allow authors to modify the color and other styling attributes of the contents of a page.
A Wiki Style? is written using percent-signs, as in Wiki Style? attributesThe style attributes recognized within a Wiki Style? specification are:
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:
Wiki Styles versus CSS stylesWiki Styles, as written in the wiki page, are not exactly CSS styles or CSS classes. Wiki Styles allow authors to use both pre-defined by the administrator CSS classes, and to define new combinations of styles, without any need to edit/update local CSS files on the server. Note that Pm Wiki allows advanced authors to use of Text color and fontThe most basic use of Wiki Styles is to change text attributes such as color, background color, and font. Pm Wiki defines several Wiki Styles for changing the text color to %black%, %white%, %red%, %yellow%, %blue%, %gray% (%grey%), %silver%, %maroon%, %green%, %navy%, %fuchsia%, %olive%, %lime%, %teal%, %aqua%, %orange% and %purple%.
For colors other than the predefined colors, use the
To change the background color, use
See WikiStyle Colors for more color help. Text justificationWiki Styles are used to control the text justification
and to create floating text:
ScopeWiki Styles can also specify a scope; with no scope, the style is applied to any text that follows up to the next Wiki Style? specification or the end of the paragraph, whichever comes first. The apply= attribute and its shortcuts allow to change the scope as follows:
Thus, Some predefined style shortcuts also make use of apply, thus Example: Apply a style to a paragraph:
Caveat: An applied Wiki Style? will only take effect if it's on the line that starts the thing it's supposed to modify. In other words, a Wiki Style? in the third markup line of a paragraph can't change the attributes of the paragraph:
If you want to break a list in two, you need to have a line not part of the list between, that is a line that has any content other than space and newlines, otherwise Pm Wiki considers the vertical space part of the previous list item. You can have an non-breaking space, or the escaped null character:
Larger blocksThe
Note, the HTML "class" and "style" attributes for tables and divisionsWiki Styles are only the commands between Tables, table directives and (:div:) division blocks allow advanced authors to incorporate the HTML/CSS attributes
Note, the 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 Custom WikiStyles).
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 %define=warn green% and then use %warn% instead of %green% in the document. Then, if you later decide that warnings should be styled differently, it's much easier to change the (one) definition than many occurrences of %green% in the text.
Tip: Any undefined Wiki Style? is automatically treated as a request for a class, thus %pre% is the same as saying %class=pre% .
Predefined style shortcutsPm Wiki defines a number of style shortcuts.
Enabling the "Syntax Highlight" code beautifier librarySince version 2.2.119, Pm Wiki makes it relatively easy to enable syntax highlighting for preformatted text blocks. Note, a block is considered a "code block" for highlighting if it is rendered as a preformatted element. see BasicEditing#preformatted for 3 ways to do this. To enable syntax highlighting, add to config.php: This loads the Highlight.js library from a global CDN, but you can copy these 2 files to your Then, in a wiki page, you can use the Either immediately before the code block:
Or in a wrapping division block:
If you have the feature correctly enabled you will see the syntax highlighting of the above code. Enabling StylesStyles not listed above can be enabled by a Pm Wiki Administrator by modifying the local/config.php file. For instance to enable the "line-height" style attribute add the following line to the local/config.php file: $WikiStyleCSS[] = 'line-height';
Defining scope for other HTML elementsYou can add additional HTML elements to ExamplesWikiStyle Examples contains a number of examples of ways to use Wiki Styles in pages. Known Issues
See Also
This page may have a more recent version on pmwiki.org: PmWiki:WikiStyles, and a talk page: PmWiki:WikiStyles-Talk. |