Nuestro conocimiento compartido. Nuestro tesoro compartido. Wikipedia.
ShareCode
Permalink: http://www.treeweb.es/u/974/ 01/02/2011

ShareCode

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... -&gt; &lt;h1&gt;Header...&lt;/h1&gt;22 23  Paragraph: p. (also applied by default)24  Example: p. Text -&gt; &lt;p&gt;Text&lt;/p&gt;25 26  Blockquote: bq.27  Example: bq. Block quotation... -&gt; &lt;blockquote&gt;Block quotation...&lt;/blockquote&gt;28 29  Blockquote with citation: bq.:http://citation.url30  Example: bq.:http://textism.com/ Text...31  -&gt; &lt;blockquote cite="http://textism.com"&gt;Text...&lt;/blockquote&gt;32 33  Footnote: fn(1-100).34  Example: fn1. Footnote... -&gt; &lt;p id="fn1"&gt;Footnote...&lt;/p&gt;35 36  Numeric list: #, ##37  Consecutive paragraphs beginning with # are wrapped in ordered list tags.38  Example: &lt;ol&gt;&lt;li&gt;ordered list&lt;/li&gt;&lt;/ol&gt;39 40  Bulleted list: *, **41  Consecutive paragraphs beginning with * are wrapped in unordered list tags.42  Example: &lt;ul&gt;&lt;li&gt;unordered list&lt;/li&gt;&lt;/ul&gt;43 44  Definition list:45  Terms ;, ;;46  Definitions :, ::47  Consecutive paragraphs beginning with ; or : are wrapped in definition list tags.48  Example: &lt;dl&gt;&lt;dt&gt;term&lt;/dt&gt;&lt;dd&gt;definition&lt;/dd&gt;&lt;/dl&gt;49 50 Phrase modifier syntax:51 52  _emphasis_ -&gt; &lt;em&gt;emphasis&lt;/em&gt;53  __italic__ -&gt; &lt;i&gt;italic&lt;/i&gt;54  *strong* -&gt; &lt;strong&gt;strong&lt;/strong&gt;55  **bold** -&gt; &lt;b&gt;bold&lt;/b&gt;56  ??citation?? -&gt; &lt;cite&gt;citation&lt;/cite&gt;57  -deleted text- -&gt; &lt;del&gt;deleted&lt;/del&gt;58  +inserted text+ -&gt; &lt;ins&gt;inserted&lt;/ins&gt;59  ^superscript^ -&gt; &lt;sup&gt;superscript&lt;/sup&gt;60  ~subscript~ -&gt; &lt;sub&gt;subscript&lt;/sub&gt;61  @code@ -&gt; &lt;code&gt;computer code&lt;/code&gt;62  %(bob)span% -&gt; &lt;span class="bob"&gt;span&lt;/span&gt;63 64  ==notextile== -&gt; leave text alone (do not format)65 66  "linktext":url -&gt; &lt;a href="url"&gt;linktext&lt;/a&gt;67  "linktext(title)":url -&gt; &lt;a href="url" title="title"&gt;linktext&lt;/a&gt;68  "$":url -&gt; &lt;a href="url"&gt;url&lt;/a&gt;69  "$(title)":url -&gt; &lt;a href="url" title="title"&gt;url&lt;/a&gt;70 71  !imageurl! -&gt; &lt;img src="imageurl" /&gt;72  !imageurl(alt text)! -&gt; &lt;img src="imageurl" alt="alt text" /&gt;73  !imageurl!:linkurl -&gt; &lt;a href="linkurl"&gt;&lt;img src="imageurl" /&gt;&lt;/a&gt;74 75 ABC(Always Be Closing) -&gt; &lt;acronym title="Always Be Closing"&gt;ABC&lt;/acronym&gt;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  &lt;p&gt;Scientists say&lt;sup&gt;&lt;a href="#def_id_1" id="ref_id_1a"&gt;1&lt;/sup&gt; the moon is small.&lt;/p&gt;152 153  &lt;ol class="myclass" id="myid"&gt;154  &lt;li class="myliclass"&gt;&lt;a href="#ref_id_1a"&gt;&lt;sup&gt;a&lt;/sup&gt;&lt;/a&gt;&lt;span id="def_id_1"&gt; &lt;/span&gt;&lt;a href="url"&gt;Proof&lt;/a&gt; of a small moon.&lt;/li&gt;155  &lt;li&gt;An unreferenced note.&lt;/li&gt;156  &lt;/ol&gt;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  &lt;colgroup span="3" width="100"&gt;&lt;/colgroup&gt;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  &lt;colgroup span="5" width="50"&gt;201  &lt;col class="firstcol" /&gt;202  &lt;col span="2" width="250" /&gt;203  &lt;col /&gt;204  &lt;col width="300" /&gt;205  &lt;/colgroup&gt;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  &lt; -&gt; left align ex. p&lt;. left-aligned para215  &gt; -&gt; right align h3&gt;. right-aligned header 3216  = -&gt; centred h4=. centred header 4217  &lt;&gt; -&gt; justified p&lt;&gt;. justified paragraph218 219  These will change vertical alignment in table cells:220 221  ^ -&gt; top ex. |^. top-aligned table cell|222  - -&gt; middle |-. middle aligned|223  ~ -&gt; 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 -&gt; &lt;p class="hector"&gt;paragraph&lt;/p&gt;229 230  p(#fluid). paragraph -&gt; &lt;p id="fluid"&gt;paragraph&lt;/p&gt;231 232  (classes and ids can be combined)233  p(hector#fluid). paragraph -&gt; &lt;p class="hector" id="fluid"&gt;paragraph&lt;/p&gt;234 235  Curly {brackets} insert arbitrary css style236 237  p{line-height:18px}. paragraph -&gt; &lt;p style="line-height:18px"&gt;paragraph&lt;/p&gt;238 239  h3{color:red}. header 3 -&gt; &lt;h3 style="color:red"&gt;header 3&lt;/h3&gt;240 241  Square [brackets] insert language attributes242 243  p[no]. paragraph -&gt; &lt;p lang="no"&gt;paragraph&lt;/p&gt;244 245  %[fr]phrase% -&gt; &lt;span lang="fr"&gt;phrase&lt;/span&gt;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 -&gt; &lt;ol style="color:blue"&gt;251  # big &lt;li&gt;one&lt;/li&gt;252  # list &lt;li&gt;big&lt;/li&gt;253  &lt;li&gt;list&lt;/li&gt;254  &lt;/ol&gt;255 256  Using the span tag to style a phrase257 258  It goes like this, %{color:red}the fourth the fifth%259  -&gt; It goes like this, &lt;span style="color:red"&gt;the fourth the fifth&lt;/span&gt;260 261 </pre>
Enlace
El enlace para compartir es: