Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

https://www.jetphotos.com/photographer/598301 https://www.jetphotos.com/photographer/598304 https://www.jetphotos.com/photographer/598305 https://www.jetphotos.com/photographer/598307 https://www.jetphotos.com/photographer/598310 https://www.jetphotos.com/photographer/598312 https://www.jetphotos.com/photographer/598317 https://www.jetphotos.com/photographer/598318 https://www.jetphotos.com/photographer/598320 https://www.jetphotos.com/photographer/598321 https://www.jetphotos.com/photographer/598322 https://www.jetphotos.com/photographer/598324 https://www.jetphotos.com/photographer/598328 https://www.jetphotos.com/photographer/598340 https://www.jetphotos.com/photographer/598341 https://www.jetphotos.com/photographer/598346 https://www.jetphotos.com/photographer/598349 https://www.jetphotos.com/photographer/598357 https://www.jetphotos.com/photographer/598366 https://www.jetphotos.com/photographer/598372 https://www.jetphotos.com/photographer/598374 https://www.jetphotos.com/photographer/598378 https://www.jetphotos.com/photographer/600028 https://www.jetphotos.com/photographer/600031 https://www.jetphotos.com/photographer/600032 https://www.jetphotos.com/photographer/600034 https://www.jetphotos.com/photographer/600036 https://www.jetphotos.com/photographer/600037 https://www.jetphotos.com/photographer/600039 https://www.jetphotos.com/photographer/600041 https://www.jetphotos.com/photographer/600042 https://www.jetphotos.com/photographer/600045 https://www.jetphotos.com/photographer/600046 https://www.jetphotos.com/photographer/600047 https://www.jetphotos.com/photographer/600048 https://www.jetphotos.com/photographer/600050 https://www.jetphotos.com/photographer/600051 https://www.jetphotos.com/photographer/600052 https://www.jetphotos.com/photographer/600053 https://www.jetphotos.com/photographer/600055 https://www.jetphotos.com/photographer/600057 https://www.jetphotos.com/photographer/600641 https://www.jetphotos.com/photographer/600644 https://www.jetphotos.com/photographer/600645 https://www.jetphotos.com/photographer/600646 https://www.jetphotos.com/photographer/602231 https://www.jetphotos.com/photographer/602240 https://www.jetphotos.com/photographer/602244 https://www.jetphotos.com/photographer/602247 https://www.jetphotos.com/photographer/602261 https://www.jetphotos.com/photographer/602265 https://www.jetphotos.com/photographer/602279 https://www.jetphotos.com/photographer/602307 https://www.jetphotos.com/photographer/602315 https://www.jetphotos.com/photographer/602323 https://www.jetphotos.com/photographer/602340 https://www.jetphotos.com/photographer/602346 https://www.jetphotos.com/photographer/602741 https://www.jetphotos.com/photographer/602743 https://www.jetphotos.com/photographer/602744 https://www.jetphotos.com/photographer/602745 https://www.jetphotos.com/photographer/602746 https://www.jetphotos.com/photographer/602748 https://www.jetphotos.com/photographer/602749 https://www.jetphotos.com/photographer/602750 https://www.jetphotos.com/photographer/602757 https://www.jetphotos.com/photographer/602758 https://www.jetphotos.com/photographer/602762 https://www.jetphotos.com/photographer/602763 https://www.jetphotos.com/photographer/602764 https://www.jetphotos.com/photographer/602769 https://www.jetphotos.com/photographer/602770 https://www.jetphotos.com/photographer/602772 https://www.jetphotos.com/photographer/602773 https://www.jetphotos.com/photographer/602774 https://www.jetphotos.com/photographer/602775 https://www.jetphotos.com/photographer/601186 https://www.jetphotos.com/photographer/601188 https://www.jetphotos.com/photographer/601189 https://www.jetphotos.com/photographer/601191 https://www.jetphotos.com/photographer/601192 https://www.jetphotos.com/photographer/601194 https://www.jetphotos.com/photographer/601196 https://www.jetphotos.com/photographer/601197 https://www.jetphotos.com/photographer/601248 https://www.jetphotos.com/photographer/601249 https://www.jetphotos.com/photographer/601250 https://www.jetphotos.com/photographer/601251 https://www.jetphotos.com/photographer/601252 https://www.jetphotos.com/photographer/601254 https://www.jetphotos.com/photographer/601255 https://www.jetphotos.com/photographer/601256 https://www.jetphotos.com/photographer/601258 https://www.jetphotos.com/photographer/601260 https://www.jetphotos.com/photographer/601261 https://www.jetphotos.com/photographer/601263 https://www.jetphotos.com/photographer/601264 https://www.jetphotos.com/photographer/601265 https://www.jetphotos.com/photographer/601266 https://www.jetphotos.com/photographer/601267 https://www.jetphotos.com/photographer/601268 https://www.jetphotos.com/photographer/601269 https://www.jetphotos.com/photographer/601270 https://www.jetphotos.com/photographer/601272 https://www.jetphotos.com/photographer/601273 https://www.jetphotos.com/photographer/602779 https://www.jetphotos.com/photographer/602780 https://www.jetphotos.com/photographer/602781 https://www.jetphotos.com/photographer/602782 https://www.jetphotos.com/photographer/600111 https://www.jetphotos.com/photographer/600112 https://www.jetphotos.com/photographer/600148 https://www.jetphotos.com/photographer/600151 https://www.jetphotos.com/photographer/600155 https://www.jetphotos.com/photographer/600157 https://www.jetphotos.com/photographer/600159 https://www.jetphotos.com/photographer/600161 https://www.jetphotos.com/photographer/600163 https://www.jetphotos.com/photographer/600647 https://www.jetphotos.com/photographer/600648 https://www.jetphotos.com/photographer/600649 https://www.jetphotos.com/photographer/600650 https://www.jetphotos.com/photographer/602889 https://www.jetphotos.com/photographer/602890 https://www.jetphotos.com/photographer/602891 https://www.jetphotos.com/photographer/602895 https://www.jetphotos.com/photographer/602897 https://www.jetphotos.com/photographer/602900 https://www.jetphotos.com/photographer/602904 https://www.jetphotos.com/photographer/602907 https://www.jetphotos.com/photographer/602913 https://www.jetphotos.com/photographer/602916 https://www.jetphotos.com/photographer/602918 https://www.jetphotos.com/photographer/602922 https://www.jetphotos.com/photographer/602923 https://www.jetphotos.com/photographer/602925 https://www.jetphotos.com/photographer/602926 https://www.jetphotos.com/photographer/600534 https://www.jetphotos.com/photographer/600535 https://www.jetphotos.com/photographer/600536 https://www.jetphotos.com/photographer/600538 https://www.jetphotos.com/photographer/600539 https://www.jetphotos.com/photographer/600540 https://www.jetphotos.com/photographer/600542 https://www.jetphotos.com/photographer/600543 https://www.jetphotos.com/photographer/600544 https://www.jetphotos.com/photographer/600547 https://www.jetphotos.com/photographer/600548 https://www.jetphotos.com/photographer/600549 https://www.jetphotos.com/photographer/600550 https://www.jetphotos.com/photographer/600552 https://www.jetphotos.com/photographer/600553 https://www.jetphotos.com/photographer/600555 https://www.jetphotos.com/photographer/600558 https://www.jetphotos.com/photographer/600565 https://www.jetphotos.com/photographer/600566 https://www.jetphotos.com/photographer/600567 https://www.jetphotos.com/photographer/600568 https://www.jetphotos.com/photographer/600571 https://www.jetphotos.com/photographer/600573 https://www.jetphotos.com/photographer/600575 https://www.jetphotos.com/photographer/600576 https://www.jetphotos.com/photographer/600577 https://www.jetphotos.com/photographer/600578 https://www.jetphotos.com/photographer/600666 https://www.jetphotos.com/photographer/600668 https://www.jetphotos.com/photographer/600669 https://www.jetphotos.com/photographer/600670 https://www.jetphotos.com/photographer/602963 https://www.jetphotos.com/photographer/601276 https://www.jetphotos.com/photographer/601280 https://www.jetphotos.com/photographer/601281 https://www.jetphotos.com/photographer/601284 https://www.jetphotos.com/photographer/601285 https://www.jetphotos.com/photographer/601286 https://www.jetphotos.com/photographer/601287 https://www.jetphotos.com/photographer/601288 https://www.jetphotos.com/photographer/601291 https://www.jetphotos.com/photographer/601293 https://www.jetphotos.com/photographer/602776 https://www.jetphotos.com/photographer/602777 https://www.jetphotos.com/photographer/602955 https://www.jetphotos.com/photographer/602956 https://www.jetphotos.com/photographer/602957 https://www.jetphotos.com/photographer/602959 https://www.jetphotos.com/photographer/602960 https://www.jetphotos.com/photographer/602961

WikiStílus

authors (alap)

WikiStílus (eredeti angol változat)

Wiki stílus alapok

A WikiStílus lehetővé teszi, hogy módosítsuk egy bejegyzésben a szöveg színét és egyéb jellemzőit. A wiki stílust a százalékjellel definiálhatjuk, mint pl. %red% = piros vagy %blue% = kék.

A wiki stílussal egyszerűen megváltoztathatjuk a szöveg színét. A PmWikiben számos, előre definiált színt használhatunk, mint pl. %black%, %white%, %red%, %yellow%, %blue%, %gray%, %silver%, %maroon%, %green%, %navy%, and %purple%.

A kosárban %red% almák, %blue% áfonyák, %purple% padlizsánok, %green% kiwik %% vannak.

A kosárban almák, áfonyák, padlizsánok, kiwik vannak.

A fent definiáltaktól eltérő színekhez használd a %color=...% wiki stílust. (Megjegyzés: az RGB színeket (#rrggbb) mindig kisbetűvel kell definiálni, hogy elkerüljük az ütközéseket a wiki szavakkal?.)

Szeretnék egy pár %color=#ff7f00% mandarint%% is!

Szeretnék egy pár mandarint is!

A háttérszín megváltoztatható a %bgcolor=...% wiki stílussal:

Ez itt egy %bgcolor=green yellow% sárga szöveg zöld háttéren. 

Ez itt egy sárga szöveg zöld háttéren.

A PmWiki:WikiStyleColors szócikknél további segítséget találhatsz.

Érvényesség

Itt tartok, folytasd, ha kedved van!

A Wikistyles 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 (%p ...%), an entire list (%list ...%), an item within a list (%item ...%), or any block (%block ...%). Those scopes are predefined shortcuts for the "apply=" attribute, which is discussed below.

%p bgcolor=#ffeeee% The wikistyle specification at the beginning of this line applies to the entire paragraph, even if there are %blue% other wikistyle specifications %% in the middle of the paragraph.

The wikistyle specification at the beginning of this line applies to the entire paragraph, even if there are other wikistyle specifications in the middle of the paragraph.

The >>style<< block can be used to apply a wikistyle to a large block of items. The style is applied until the next >><< is encountered.

>>blue font-style:italic bgcolor=#ffffcc<<
Everything after the above line is styled with blue italic text,

This includes
    preformatted text
* lists
-> indented items
>><<

Everything after the above line is styled with blue italic text,

This includes

    preformatted text
  • lists
indented items

Shouldn't (:div style:) work in the same way as >>style<<?

(:div green font-style:italic bgcolor=#ffffcc:)
Everything after the above line is styled with green italic text,

This includes
    preformatted text
* lists
-> indented items
(:divend:)

Everything after the above line is styled with green italic text,

This includes

    preformatted text
  • lists
indented items

Response: That's because the formatting for that markup is incorrect. The correct way is this:

(:div style="color:blue; font-style:italic; background-color:#ffffcc":)
Everything after the above line is styled with green italic text,

This includes
    preformatted text
* lists
-> indented items
(:divend:)

Everything after the above line is styled with green italic text,

This includes

    preformatted text
  • lists
indented items

The lesson to be learned: if a markup is not working the way you think it should, double check to make sure that you're using it properly!

Wikistyle attributes

The 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
    display

    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:

  • class= and id= assign a CSS class or identifier to an HTML element
  • target=name opens links that follow in a browser window called "name"
  • rel=name in a link identifies the relationship of a target page
  • accesskey=x uses 'x' as a shortcut key for the link that follows
  • value=9 sets the number of the current ordered list item

* 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.

Applying wikistyles to blocks

Normally a wikistyle applies to a span of (inline) text, but the apply= attribute allows a style to be applied to something else. The predefined apply= values are:

apply=imgapply the style to any image that follows 
apply=papply the style to the current paragraph*
apply=preapply the style to the current preformatted text 
apply=listapply the style to the current list*
apply=itemapply the style to the current list item*
apply=divapply the style to the current div 
apply=blockapply the style to the current block,
whether it's a paragraph, list, list item,
heading, or division.
*

The starred items also have wikistyle shortcuts already defined, thus %p color=blue% is the same as %apply=p color=blue%, and %list ROMAN% is the same as %apply=list list-style=upper-roman%.

Some wikistyle shortcuts also make use of apply, thus %right% is a shortcut for %text-align=right apply=block%.

An applied wikistyle will only take effect if it's on the line that starts the thing it's supposed to modify. In other words, a wikistyle in the third markup line of a paragraph can't change the attributes of the paragraph:

here is some text in
a paragraph and if
we try to %apply=p color=blue% change
the color of the paragraph in the middle
it won't work because the style comes
after the paragraph has already been started.

here is some text in a paragraph and if we try to change the color of the paragraph in the middle it won't work because the style comes after the paragraph has already been started.

However, this %p color=red% paragraph
''will'' be in red because its block style does
occur in the first line of its text.

However, this paragraph will be in red because its block style does occur in the first line of its text.

* Here's a list item
* %list red% Oops, too late to affect the list!
  • Here's a list item
  • Oops, too late to affect the list!

Enabling Styles

Styles 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 shortcuts

The define= attribute can be used to assign a shorthand name to any wikistyle specification. This shorthand name can then be reused in later wikistyle specifications.

%define=box block bgcolor=#ddddff border="2px dotted blue"%

%box% [@
$ echo "Hello world"
Hello World
$ exit
@]

%box font-weight=bold color=green% [@
$ echo "I said, HELLO"
@]
$ echo "Hello world"
Hello World
$ exit
$ echo "I said, HELLO"

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 %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 WikiStyle is automatically treated as a request for a class, thus %pre% is the same as saying %class=pre%.

Predefined style shortcuts

PmWiki defines a number of style shortcuts.

  • Text colors: black, white, red, yellow, blue, gray, silver, maroon, green, navy, purple (shortcut for %color=...%)
  • Justification: %center% and %right%
  • Images and boxes
    • Floating left or right: %rfloat% and %lfloat%
    • Framed items: %frame%, %rframe%, and %lframe%
    • Thumbnail sizing: %thumb%
  • Open link in new window: %newwin% (shortcut for %target=_blank%)
  • Comments: %comment% (shortcut for %display=none%)
  • Ordered lists: %decimal%, %roman%, %ROMAN%, %alpha%, %ALPHA% (see also Cookbook:OutlineLists)

Examples

WikiStyleExamples? contains a number of examples of ways to use wikistyles in pages.

Known Issues

  • Percents in style definitions (like: %block width=50% %) require the use of "pct" instead of "%".

See Also

Custom Wiki Styles

<< Szöveg formázási szabályok | Documentation Index | WikiStyleExamples? >>

Some of my colors aren't working! For example, %color=#AAAAAA% works, but %color=#AA3333% doesn't work. What's wrong?

Be sure to use lowercase letters for rgb hex colors, otherwise PmWiki may mistake the color value for a WikiWord?.

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 03:29 PM