1 Para formatear texto en el foro he utilizado un sistema de marcado que se llama <em>Textile</em> de2 <a href="http://textile.sitemonks.com/">textile.sitemonks.com/</a>. Funciona de forma muy similar al3 de Wikipedia, de hecho, el marcador de formato de Wikipedia es una versión de Textile.<br>4 <br>5 Se puede obtener información de textile en:6 <ul>7 <li>Su página oficial <a href="http://textile.sitemonks.com/">textile.sitemonks.com/</a></li>8 <li>Wikipedia <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">en.wikipedia.org/wiki/Textile_(markup_language)</a></li>9 <li>Los comentarios del código fuente</li>10 </ul>11 12 <h2>Comentarios del código fuente</h2>13 <pre>14 _________15 U S A G E16 17 Block modifier syntax:18 19 Header: h(1-6).20 Paragraphs beginning with 'hn. ' (where n is 1-6) are wrapped in header tags.21 Example: h1. Header... -> <h1>Header...</h1>22 23 Paragraph: p. (also applied by default)24 Example: p. Text -> <p>Text</p>25 26 Blockquote: bq.27 Example: bq. Block quotation... -> <blockquote>Block quotation...</blockquote>28 29 Blockquote with citation: bq.:http://citation.url30 Example: bq.:http://textism.com/ Text...31 -> <blockquote cite="http://textism.com">Text...</blockquote>32 33 Footnote: fn(1-100).34 Example: fn1. Footnote... -> <p id="fn1">Footnote...</p>35 36 Numeric list: #, ##37 Consecutive paragraphs beginning with # are wrapped in ordered list tags.38 Example: <ol><li>ordered list</li></ol>39 40 Bulleted list: *, **41 Consecutive paragraphs beginning with * are wrapped in unordered list tags.42 Example: <ul><li>unordered list</li></ul>43 44 Definition list:45 Terms ;, ;;46 Definitions :, ::47 Consecutive paragraphs beginning with ; or : are wrapped in definition list tags.48 Example: <dl><dt>term</dt><dd>definition</dd></dl>49 50 Phrase modifier syntax:51 52 _emphasis_ -> <em>emphasis</em>53 __italic__ -> <i>italic</i>54 *strong* -> <strong>strong</strong>55 **bold** -> <b>bold</b>56 ??citation?? -> <cite>citation</cite>57 -deleted text- -> <del>deleted</del>58 +inserted text+ -> <ins>inserted</ins>59 ^superscript^ -> <sup>superscript</sup>60 ~subscript~ -> <sub>subscript</sub>61 @code@ -> <code>computer code</code>62 %(bob)span% -> <span class="bob">span</span>63 64 ==notextile== -> leave text alone (do not format)65 66 "linktext":url -> <a href="url">linktext</a>67 "linktext(title)":url -> <a href="url" title="title">linktext</a>68 "$":url -> <a href="url">url</a>69 "$(title)":url -> <a href="url" title="title">url</a>70 71 !imageurl! -> <img src="imageurl" />72 !imageurl(alt text)! -> <img src="imageurl" alt="alt text" />73 !imageurl!:linkurl -> <a href="linkurl"><img src="imageurl" /></a>74 75 ABC(Always Be Closing) -> <acronym title="Always Be Closing">ABC</acronym>76 77 78 Linked Notes:79 ============80 81 Allows the generation of an automated list of notes with links.82 83 Linked notes are composed of three parts, a set of named _definitions_, a set of84 _references_ to those definitions and one or more _placeholders_ indicating where85 the consolidated list of notes is to be placed in your document.86 87 Definitions.88 -----------89 90 Each note definition must occur in its own paragraph and should look like this...91 92 note#mynotelabel. Your definition text here.93 94 You are free to use whatever label you wish after the # as long as it is made up95 of letters, numbers, colon(:) or dash(-).96 97 References.98 ----------99 100 Each note reference is marked in your text like this[#mynotelabel] and101 it will be replaced with a superscript reference that links into the list of102 note definitions.103 104 List Placeholder(s).105 -------------------106 107 The note list can go anywhere in your document. You have to indicate where108 like this...109 110 notelist.111 112 notelist can take attributes (class#id) like this: notelist(class#id).113 114 By default, the note list will show each definition in the order that they115 are referenced in the text by the _references_. It will show each definition with116 a full list of backlinks to each reference. If you do not want this, you can choose117 to override the backlinks like this...118 119 notelist(class#id)!. Produces a list with no backlinks.120 notelist(class#id)^. Produces a list with only the first backlink.121 122 Should you wish to have a specific definition display backlinks differently to this123 then you can override the backlink method by appending a link override to the124 _definition_ you wish to customise.125 126 note#label. Uses the citelist's setting for backlinks.127 note#label!. Causes that definition to have no backlinks.128 note#label^. Causes that definition to have one backlink (to the first ref.)129 note#label*. Causes that definition to have all backlinks.130 131 Any unreferenced notes will be left out of the list unless you explicitly state132 you want them by adding a '+'. Like this...133 134 notelist(class#id)!+. Giving a list of all notes without any backlinks.135 136 You can mix and match the list backlink control and unreferenced links controls137 but the backlink control (if any) must go first. Like so: notelist^+. , not138 like this: notelist+^.139 140 Example...141 Scientists say[#lavader] the moon is small.142 143 note#other. An unreferenced note.144 145 note#lavader(myliclass). "Proof":url of a small moon.146 147 notelist(myclass#myid)+.148 149 Would output (the actual IDs used would be randomised)...150 151 <p>Scientists say<sup><a href="#def_id_1" id="ref_id_1a">1</sup> the moon is small.</p>152 153 <ol class="myclass" id="myid">154 <li class="myliclass"><a href="#ref_id_1a"><sup>a</sup></a><span id="def_id_1"> </span><a href="url">Proof</a> of a small moon.</li>155 <li>An unreferenced note.</li>156 </ol>157 158 The 'a b c' backlink characters can be altered too.159 For example if you wanted the notes to have numeric backlinks starting from 1:160 161 notelist:1.162 163 Table syntax:164 165 Simple tables:166 167 |a|simple|table|row|168 |And|Another|table|row|169 |With an||empty|cell|170 171 |=. My table caption goes here172 |_. A|_. table|_. header|_.row|173 |A|simple|table|row|174 175 Tables with attributes:176 177 table{border:1px solid black}. My table summary here178 {background:#ddd;color:red}. |{}| | | |179 180 To specify thead / tfoot / tbody groups, add one of these on its own line181 above the row(s) you wish to wrap (you may specify attributes before the dot):182 183 |^. # thead184 |-. # tbody185 |~. # tfoot186 187 Column groups:188 189 |:\3. 100190 191 Becomes:192 <colgroup span="3" width="100"></colgroup>193 194 You can omit either of the \N or width values. You may also195 add cells after the colgroup definition to specify span/width/attributes:196 197 |:\5. 50 |(firstcol). |\2. 250||300|198 199 Becomes:200 <colgroup span="5" width="50">201 <col class="firstcol" />202 <col span="2" width="250" />203 <col />204 <col width="300" />205 </colgroup>206 207 Applying Attributes:208 209 Most anywhere Textile code is used, attributes such as arbitrary css style,210 css classes, and ids can be applied. The syntax is fairly consistent.211 212 The following characters quickly alter the alignment of block elements:213 214 < -> left align ex. p<. left-aligned para215 > -> right align h3>. right-aligned header 3216 = -> centred h4=. centred header 4217 <> -> justified p<>. justified paragraph218 219 These will change vertical alignment in table cells:220 221 ^ -> top ex. |^. top-aligned table cell|222 - -> middle |-. middle aligned|223 ~ -> bottom |~. bottom aligned cell|224 225 Plain (parentheses) inserted between block syntax and the closing dot-space226 indicate classes and ids:227 228 p(hector). paragraph -> <p class="hector">paragraph</p>229 230 p(#fluid). paragraph -> <p id="fluid">paragraph</p>231 232 (classes and ids can be combined)233 p(hector#fluid). paragraph -> <p class="hector" id="fluid">paragraph</p>234 235 Curly {brackets} insert arbitrary css style236 237 p{line-height:18px}. paragraph -> <p style="line-height:18px">paragraph</p>238 239 h3{color:red}. header 3 -> <h3 style="color:red">header 3</h3>240 241 Square [brackets] insert language attributes242 243 p[no]. paragraph -> <p lang="no">paragraph</p>244 245 %[fr]phrase% -> <span lang="fr">phrase</span>246 247 Usually Textile block element syntax requires a dot and space before the block248 begins, but since lists don't, they can be styled just using braces249 250 #{color:blue} one -> <ol style="color:blue">251 # big <li>one</li>252 # list <li>big</li>253 <li>list</li>254 </ol>255 256 Using the span tag to style a phrase257 258 It goes like this, %{color:red}the fourth the fifth%259 -> It goes like this, <span style="color:red">the fourth the fifth</span>260 261 </pre>
Este ShareCode tiene versiones:
- Para formatear texto en el foro he utili... (24/04/2013)
- Para formatear texto en el foro he utili... (24/04/2013)
- Para formatear texto en el foro he utili... (24/04/2013)
- Para formatear texto en el foro he utili... (24/04/2013)
Enlace
El enlace para compartir es: