Loading ...
Sorry, an error occurred while loading the content.

23089RE: [Clip] Convert static endnotes to inline notes

Expand Messages
  • John Shotsky
    Aug 4, 2012
      Is that a challenge?

      RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Axel Berger
      Sent: Saturday, August 04, 2012 13:45
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] Convert static endnotes to inline notes

      John Shotsky wrote:
      > I would start

      Another take. First I dislike your Format. If notes can contain
      paragraphs, then make it explicit:

      <notetext>123<P>some text</P><P>more text</P></notetext>

      Also you say "insert it inline" which jars with "several paragraphs". So
      perhaps you need to differentiate between inline and paragraph notes.

      Given that I'd do it this way:

      Search from the top for the first notetext.
      Exit if none is found
      Save it to a variable and delete in the text.
      Delete the start and end tags in the variable
      Search from the top for the corresponding noteref.
      Throw an error if not found.
      Delete tags as necessary and Insert variable, inline or as paragraphs as
      Loop to the top

      That's atr least twelve lines against John's three, but I see that
      number as wildly optimistic.


      [Non-text portions of this message have been removed]
    • Show all 16 messages in this topic