Blob


1 version=pmwiki-2.3.2 ordered=1 urlencoded=1
2 author=simon
3 charset=UTF-8
4 csum=pm hlt (+127)
5 name=PmWiki.TextFormattingRules
6 post= Save
7 rev=561
8 targets=Main.WikiSandbox,Cookbook.MarkupTricks,PmWiki.ListStyles,Cookbook.WikiStylesPlus,PmWiki.PageTextVariables,PmWiki.PageLists,PmWiki.BasicVariables,PmWiki.WikiStyles,PmWiki.WikiWord,PmWiki.Links,Cookbook.NumberedHeaders,PmWiki.EditVariables,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.MarkupMasterIndex
9 text=(:Summary: A list of some of the markup sequences available:) %0aThis page provides a more complete list of some of the markup sequences available in PmWiki. %0aNote that it's easy to create and edit pages without using any of the markups below, but ''if'' you ever need them, they're here. %0a%0aTo experiment with the rules, please edit the [[Main/Wiki Sandbox]].%0a----%0a%0a!! [[#Paragraphs]] Paragraphs%0a%0aTo create paragraphs, simply enter text. Use a blank line to start a new paragraph.%0a%0aWords on two lines in a row will '''wrap and fill''' as needed (the normal XHTML behavior). To turn off the automatic filling, use the %25pmhlt%25[@(:linebreaks:)@] directive above the paragraph.%0a%0a* Use %25pmhlt%25[@\@] (single backslash) at the end of a line to join the current line to the next one.%0a* Use %25pmhlt%25[@\\@] (two backslashes) at the end of a line to force a line break.%0a* Use %25pmhlt%25[@\\\@] (three backslashes) at the end of a line to force 2 line breaks, n backslashes will force n-1 line breaks%0a* Use %25pmhlt%25[@[[%3c%3c]]@] to force a line break that will clear floating elements both left and right.%0a%0a%0a!! [[#IndentedParagraphs]] Indented Paragraphs ''(Quotes)''%0a%0aArrows (%25pmhlt%25[@->@]) at the beginning of a paragraph can be used to produce an indented paragraph. More hyphens at the beginning (%25pmhlt%25[@--->@]) produce larger indents.%0a%0a%25define=narrow width=30em max-width=100pct%25%0a>>narrow%3c%3c%0a(:markup:)%0a->Four score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal.%0a(:markupend:)%0a>>%3c%3c%0a%0aInverted Arrows (%25pmhlt%25[@-%3c@]) at the beginning of a paragraph can be used to produce a paragraph with a hanging indent. Adding hyphens at the beginning (%25pmhlt%25[@---%3c@]) causes all the text to indent.%0a%0a>>narrow%3c%3c%0a(:markup:)%0a-%3cFour score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. %0a(:markupend:)%0a%0a(:markup:)%0a--%3cFour score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal.%0a(:markupend:)%0a>>%3c%3c%0a%0aBlocks of text to which %25pmhlt%25[@(:linebreaks:)@] has been applied can be indented by preceding the first line of the block with indention arrows (%25pmhlt%25[@->@]) and aligning subsequent lines under the first. An unindented line stops the block indentation. See [[Cookbook:Markup Tricks]] for an example.%0a%0a%0a!! [[#BulletedLists]] Bulleted and Numbered Lists%0a%0aBullet lists are made by placing asterisks at the beginning of the line. Numbered lists are made by placing number-signs (%25pmhlt%25[@#@]) at the beginning of the line. More asterisks/number-signs increases the level of bullet:%0a%0a(:markup:) %0a* First-level list item%0a** Second-level list item%0a### Order this%0a#### And this (optional)%0a### Then this%0a** Another second-level item%0a* A first-level item: cooking%0a## Prepare the experiment%0a### Unwrap the pop-tart%0a### Insert the pop-tart into the toaster%0a## Begin cooking the pop tart%0a## Stand back%0a(:markupend:)%0a%0a(:markup:)%0a# A list is terminated%0aby the first line that is not a list.%0a# Also terminate a list using the escape sequence [@[==]@]%0a[==]%0a# Continue a list item by lining%0a up the text with leading whitespace.%0a# Use a forced linebreak \\%0a to force a newline in your list item.%0a(:markupend:)%0a%0a(:markup:)%0a## Text between list items can cause numbering to restart%0a## %25item value=3%25 this can be dealt with%0a(:markupend:)%0a%0aAlso see: [[PmWiki:ListStyles]], [[Cookbook:WikiStylesPlus]].%0a%0a%0a!! [[#DefinitionLists]] Definition Lists%0a%0aDefinition lists are made by placing colons at the left margin (and between each term and definition).%0aWhen you define terms using this markup%0aPmWiki will recognize them as [[PageTextVariables]]%0athat you can use on any page or [[PageList(s)]].%0a(:markup:)%0a:term:definition of term%0a(:markupend:)%0a%0a[[#WhitespaceRules]]%0a!! Whitespace Rules%0a%0aWhitespace indentation in lists. Any line that begins with whitespace ''and aligns'' with a previous list item (whether bulleted, numbers or definitional) is considered to be "within" that list item. Text folds and wraps as normal, and the %25pmhlt%25[@(:linebreaks:)@] directive is honored. %0a%0a%0a(:markup:) %0a# First-level item\\%0a Whitespace used to continue item on a new line%0a# Another first-level item%0a # Whitespace combined with a single # to create a new item one level deeper%0a(:markupend:)%0a%0aThis rule also apply on definition lists, but only the number of leading colons is significant for the following whitespace indented lines.%0a%0a(:markup:)%0a:Item: Definition text%0a dispatched on several%0a lines%0a::SubItem: Same kind%0a of multiline%0a definition%0a(:markupend:)%0a%0aOtherwise, lines that begin with whitespace are treated as ''preformatted text'', using a monospace font and not generating linebreaks except where explicitly indicated in the markup. Note to administrators: Starting with version 2.2.0-beta41, this feature can be modified using $EnableWSPre. (Another way to create preformatted text blocks is by using the %25pmhlt%25[=[@...@]=] markup.)%0a%0a!! [[#HorizontalLine]] Horizontal Line%0a%0aFour or more dashes (%25pmhlt%25[@----@]) at the beginning of a line produce a horizontal line.%0a%0a[[#Emphasis]]%0a!! Emphasis and character formatting%0a%0a* Enclose text in doubled single-quotes (%25pmhlt%25[@''text''@]), i.e., ''two apostrophes'', for emphasis (usually ''italics'')%0a* Enclose text in tripled single-quotes (%25pmhlt%25[@'''text'''@]), i.e. ''three apostrophes'', for strong (usually '''bold''')%0a* Enclose text in five single-quotes (%25pmhlt%25[@'''''text'''''@]), or triples within doubles (''five apostrophes''), for strong emphasis (usually '''''bold italics''''')%0a* Enclose text in doubled at-signs (%25pmhlt%25[@@@text@@@]) for @@monospace@@ text%0a* Use %25pmhlt%25[@[+large+]@] for [+large+] text, [@[++larger++]@] for [++larger++], [@[-small-]@] for [-small-] text, and [@[--smaller--]@] for [--smaller--].%0a* Emphasis can be used multiple times within a line, but cannot span across markup line boundaries (i.e., you can't put a paragraph break in the middle of bold text).%0a* %25pmhlt%25[@'~italic~'@] and [@'*bold*'@] are available if enabled in @@config.php@@%0a%0aOther styling %0a(:markup:)%0a'+big+', '-small-', '^super^', '_sub_', %0a%0a{+insert or underscore+}, %0a%0a{-delete or strikethrough or strikeout-}%0a(:markupend:)%0a* %25pmhlt%25[@`WikiWord@] `WikiWord neutralisation%0a%0aSee also [[Wiki Styles]] for advanced text formatting options.%0a%0a[[#References]]%0a!! Links / References%0a%0a* Use words and phrases in double brackets (e.g., %25pmhlt%25[@[[text formatting rules]]@]) to create links to other pages on this wiki.%0a* On some PmWiki installations, capitalized words joined together (e.g., [[WikiWord]]s) can also be used to make references to other pages without needing the double-brackets.%0a* Precede [=URLs=] with "@@http:@@", "@@ftp:@@", "@@gopher:@@", "@@mailto:@@", or "@@news:@@" to create links automatically, as in http://www.pmichaud.com/toast.%0a* [=URLs=] ending with @@.gif@@, @@.jpg@@, or @@.png@@ are displayed as images in the page%0a* Links with arbitrary text can be created as either %25pmhlt%25[@target | text]]@] or [@[[text -> target]]@]. ''Text'' can be an image URL, in which case the image becomes the link to the remote ''url'' or ''[[WikiWord]]''.%0a* [[#Anchors]] Anchor targets within pages (#-links) can be created using %25pmhlt%25[@[[#target]]@].%0a* to have any special characters, including quotes, spaces, parentheses and pipes in link addresses escape them using %25pmhlt%25[@[=link address=]@]%0aSee [[Links]] for details.%0a%0a[[#Headings]]%0a!!Headings%0a%0aHeadings are made by placing an exclamation mark ('''!''') at the left margin. More exclamation marks increase the level of heading. For example,%0a%0a(:markup:)%0a!! Level 2 Heading%0a!!! Level 3 Heading%0a!!!! Level 4 Heading%0a!!!!! Level 5 Heading%0a(:markupend:)%0a%0aNote that level 1 heading is already used as page title (at least in the PmWiki skin), so you should start with level 2 headings to create well formed, search engine optimized web pages.%0a%0aSee [[Cookbook:Numbered Headers]] for numbered headings.%0a%0a[[#EscapeSequence]]%0a!!Escape sequences%0a%0aAnything placed between %25pmhlt%25[@[= and =]@] is not interpreted by PmWiki, but paragraphs are reformatted. This makes it possible to turn off special formatting interpretations and neutralise [=WikiWords=] that are not links (even easier is to use a tick ` in front, like %25pmhlt%25[@`WikiWord@]). \\%0aThis is useful to allow for escaped %25pmhlt%25[@[=link address=]@] to have any special characters, including quotes, spaces, parentheses and pipes.%0a%0aFor preformatted text blocks, use the %25pmhlt%25[=[@...@]=] markup. It does neither reformat paragraphs nor process wiki markup:%0a%0a(:markup:)%0a[@%0aCode goes here like [[PmWiki.PmWiki]]%0a'$CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'; #just some code%0a@]%0a(:markupend:)%0a%0aThe multiline @@[=[@...@]=]@@ is a block markup, and in order to change the styling of these preformatted text blocks, you need to apply a "block" WikiStyle.%0a%0a(:markup:)[=%25block blue%25[@ %0a The font color of %0a this text is blue%0a@]=]%0a%0aIt is also useful to use %25pmhlt%25[@[= =]@] within other wiki structures, as this enables the inclusion of new lines in text values. The example below shows how to include a multi-line value in a hidden form field.%0a%0a->%25pmhlt%25[@(:input hidden message "[=Line1%0aLine2=]":)@]%0a%0aNote that "Replace on save" and "Replace on edit" patterns like %25pmhlt%25[@~~@][@~~@] can replace strings even within escape sequences, use $EnableROSEscape to control that.%0a%0a!! Comments%0a%25pmhlt%25[@ (:comment Some information:) @] can be very kind to subsequent authors, especially around complicated bits of markup.%0a%0a[[#SpecialCharacters]]%0a!! Special Characters%0a(:include SpecialCharacters:)%0a%0a[[#Tables]]%0a!! Tables%0a%0a[[Tables]] are defined by enclosing cells with '%25pmhlt%25[@||@]'. %0aA cell with leading and trailing spaces is centered; a cell with leading spaces is right-aligned; all other cells are left-aligned. An empty cell will cause the previous cell to span multiple columns. (There is currently no mechanism for spanning multiple rows.) A line beginning with '[@||@]' specifies the table attributes for subsequent tables. A '!' as the first character in a cell provides emphasis that can be used to provide headings.%0a%0a(:markup:)%0a||border=1 width=50%25%0a||!Table ||!Heading||!Example||%0a||!Left || Center || Right||%0a||A ||! a B || C||%0a|| || single || ||%0a|| || multi span ||||%0a(:markupend:)%0a%0aSee [[Table Directives]] for advanced tables.%0a%0a!!!Can't find it here?%0aSee [[Markup Master Index]].%0a
10 time=1647244348