Changeset 18000 in project


Ignore:
Timestamp:
05/05/10 19:15:27 (9 years ago)
Author:
mario
Message:

Added <examples> tag (thanks to Jim for the tip).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/html-tags

    r17329 r18000  
    1313{{html-tags}} provides procedures named after [X]HTML tags.  Here are some examples:
    1414
     15<examples>
    1516<example>
    1617<expr>(&lt;h1&gt; "hello")</expr>
    1718<result>"&lt;h1>hello&lt;/h1>"</result>
    1819</example>
     20</examples>
    1921
    2022Attributes are represented by keyword parameters:
    2123
     24<examples>
    2225<example>
    2326<expr>(&lt;img> src: "pic.png" alt: "A pic")</expr>
    2427<result>"&lt;img src='pic.png' alt='A pic'>"</result>
    2528</example>
     29</examples>
    2630
    2731All the {{html-tags}} procedures provide a keyword parameter to specify an one argument procedure to be used as a quoting procedure.  By default, {{html-tags}} procedures quote attributes' arguments using {{'}}.  For example, for quoting attributes' arguments using {{"}}, you can do, for example:
    2832
     33<examples>
    2934<example>
    3035<expr>(&lt;img> src: "pic.png" quote-procedure: (cut string-append "\"" <> "\""))</expr>
    3136<result>"&lt;img src=\"pic.png\">"</result>
    3237</example>
     38</examples>
    3339
    3440All the {{html-tags}} procedures also provide a keyword parameter ({{convert-to-entities?}}, default is {{#f}}) to specify that special HTML characters should be converted to their equivalent entities (see [[http://chicken.wiki.br/eggref/4/spiffy#procedures-and-macros|Spiffy's htmlize]]).
     
    3642The parameter {{xhtml-style?}} (default = {{#f}}) can be used to generate XHTML-style tags.  Example:
    3743
     44<examples>
    3845<example>
    3946<expr>(xhtml-style? #t)</expr>
     
    4148<result>"&lt;img src='pic.png' alt='A pic' />"</result>
    4249</example>
     50</examples>
    4351
    4452Bellow is the full set of procedures provided by {{html-tags}}:
Note: See TracChangeset for help on using the changeset viewer.