Changes between Version 11 and Version 12 of AbbrMacro


Ignore:
Timestamp:
Sep 16, 2015, 6:36:55 AM (9 years ago)
Author:
figaro
Comment:

Rearranged paragraphs to maintain consistency

Legend:

Unmodified
Added
Removed
Modified
  • AbbrMacro

    v11 v12  
    1515}}}
    1616
    17 Where `key` is the element content, `title` is required, and the `tag` keyword is optional. The element type (tag) will default to `acronym` if omitted. Why is acronym the default? For several reasons. First, most users are after acronyms (and as far as I know there are no plans for an `initialism` element). Second, Internet Explorer before version 7.0 does not support the `<abbr>` element. It won't do any harm to use them
    18 with IE 6 and below, but these browsers do not allow you to style the element with CSS and they don't display the title attribute as a tooltip.
     17Where `key` is the element content, `title` is required, and the `tag` keyword is optional. The element type (tag) will default to `acronym` if omitted. Why is acronym the default? For several reasons. First, most users are after acronyms (and as far as I know there are no plans for an `initialism` element). Second, Internet Explorer before version 7.0 does not support the `<abbr>` element. It won't do any harm to use them with IE 6 and below, but these browsers do not allow you to style the element with CSS and they don't display the title attribute as a tooltip.
    1918
    20 Many HTML authors mistakenly refer to elements as "tags." For a review of the syntax and nomenclature of WWW markup elements, visit the Wikipedia [http://en.wikipedia.org/wiki/HTML_element Element] article, or this quick synopsis will help.
    21 
    22 Syntactically, HTML elements are constructed with:
     19Many HTML authors mistakenly refer to elements as "tags." For a review of the syntax and nomenclature of WWW markup elements, visit the Wikipedia [http://en.wikipedia.org/wiki/HTML_element Element] article, or this quick synopsis will help. Syntactically, HTML elements are constructed with:
    2320 * A `start tag` marking the beginning of an element.
    2421 * Any number of valid `attributes` (and their associated values in quotes).
     
    3431There has been a long and sometimes heated discussion on the `<abbr>` and `<acronym>` elements around the Web. A good article at Juicy Studios was written by my friend Pamela Berman: [http://juicystudio.com/article/abbreviations-acronyms.php Abbreviations are a Breeze].
    3532
    36 == Dictionary File
     33=== Dictionary File
    3734
    38 `AbbrMacro` is designed to be rolled out in phases. The first and simplest use case I've already described. But even that can become tedious, especially if you use the same acronyms over and over. The second phase introduces a user-defined plain text dictionary file of key=value (content=title) pairs, which permits the omission of the title keyword. Assuming, that is, there is a matching abbreviation in the dictionary file.
     35`AbbrMacro` is designed to be rolled out in phases. The first and simplest use case is described above. But even that can become tedious, especially if you use the same acronyms over and over. The second phase introduces a user-defined plain text dictionary file of key=value (content=title) pairs, which permits the omission of the title keyword. Assuming, that is, there is a matching abbreviation in the dictionary file.
    3936
    4037You may also include the title attribute using the macro even if the element is defined in the dictionary file, the macro title keyword will take precedence. If you omit the title and the element is ''not'' defined in the dictionary, the macro will issue a error message and exit.
    4138
    42 To configure the location of the dictionary file, add the following  entry to your project `trac.ini`:
     39To configure the location of the dictionary file, add the following entry to your project `trac.ini`:
    4340
    4441{{{#!ini
     
    4744}}}
    4845
    49 The file must be readable (and eventually writable, see below) by your Web server in order for this feature to work.
     46The file must be readable (and eventually writable, see below) by your Web server for this feature to work.
    5047
    5148The format of the dictionary file couldn't be simpler:
     
    6259}}}
    6360
    64 Where leading and trailing whitespace are removed. Notice that there is a uncanny similarity between the dictionary file and trac.ini? This is no accident of course, each one has sections followed by name=value pairs. Sections other than `[abbr]` and `[acronym]` in the dictionary file are ignored, and there is no rule you must have both. I tend to only use acronyms for this sort of thing, and to help get you started here is an example [AbbrMacro/AbbrMap AbbrMap]. Like all Python/Trac files, strings beginning with a `#` (pound) character are treated as comments and are ignored. If you're going to use Unicode characters in your dictionary (typically in the title attribute), open the file, as always, with:
     61Where leading and trailing whitespace are removed. Notice that there is a similarity between the dictionary file and `trac.ini`. Each has sections followed by name=value pairs. Sections other than `[abbr]` and `[acronym]` in the dictionary file are ignored, and there is no rule you must have both. I tend to only use acronyms for this sort of thing, and to help get you started here is an example [AbbrMacro/AbbrMap AbbrMap]. Like all Python/Trac files, strings beginning with a `#` (pound) character are treated as comments and are ignored. If you're going to use Unicode characters in your dictionary (typically in the title attribute), open the file, as always, with:
    6562
    6663{{{#!python
     
    7774}}}
    7875
     76=== !AbbrMapTxt
     77
     78A third and final phase will allow the user to edit this file from within the wiki, similar to the InterMapTxt page for InterWiki links.
     79
    7980== Bugs/Feature Requests
    8081
     
    9091 * Browse the source at: [http://github.com/dwclifton/tracabbrmacro/tree/master GitHub].
    9192 * Public clone URL:
    92 {{{
    93 #!sh
     93 {{{#!sh
    9494git clone git://github.com/dwclifton/tracabbrmacro.git
    9595}}}
    96 
    97 == !AbbrMapTxt
    98 
    99 A third and final phase will allow the user to edit this file from within the wiki, similar to the InterMapTxt page for InterWiki links.
    10096
    10197== Installation