Menu

#788 simpler convert-ly rules

Accepted
nobody
None
Maintainability
2011-08-20
2009-07-06
Anonymous
No

Originally created by: *anonymous

Originally created by: gpermus@gmail.com

This looks sub-optimal:
------
def conv (str):
    str = re.sub (r"\\octave(?![a-zA-Z])", r"\\octaveCheck", str)
    str = re.sub (r"arpeggioUp", r"arpeggioArrowUp", str)
    str = re.sub (r"arpeggioDown", r"arpeggioArrowDown", str)
...
------

arpeggio* should have \\ as well.  Also, they should also be
matched with full words.  In fact, "lots" of the convert-ly rules
need to match a complete word.

1)  Could somebody verify this (look in the python docs, run a few
tests, whatever... not that I doubt Daniel; just that we should
make sure).

2)  Could somebody consider writing a nicely-named-function such
that the convert-ly rules look like this?

def conv (str):
    str = f("\\oldCommand", "\\newCommand", str)
?

It's silly for people to manually add \b everywhere, and it's
equally silly for contributors to say "oh, I can't touch
convert-ly, since I don't know python".  Let's make it easy to
write/modify those rules.

Discussion

  • Google Importer

    Google Importer - 2010-01-03

    Originally posted by: percival.music.ca@gmail.com

    (No comment was entered for this change.)

    Labels: -Type-Enhancement Type-Scripts
    Owner: ---

     
  • Google Importer

    Google Importer - 2010-10-22

    Originally posted by: percival.music.ca@gmail.com

    Also, we currently have terms like
      @funindex \foo
      @funindex foo

    The latter version is *not* noticed by (most? some?) convert-ly rules.  We should either disallow the latter type of indexing, or fix texinfo so that the first term appears alphabetized by "f" and not "\", or make a general way for convert-ly rules to automatically ignore the \ and match "foo" as well.

    Some of those solutions are worse than others, and I'm not advocating any one of them at the moment -- this is a Postponed issue, and there's way more important things to work on.  I'm just reminding myself of this problem for when we look at this in 6 months or a year.

     
  • Google Importer

    Google Importer - 2010-10-22

    Originally posted by: tdanielsmusic

    I would strongly prefer removing the @funindex foo entries, and requiring all mention of such keywords in the text to be prefixed by \.  It's an easy if laborious change which fixes the problem, and avoids difficulties with finding ways of changing keywords without the \ which might also appear as normal text with a non-keyword meaning, e.g. accepts, break, circle, dynamic, finger, etc.

    Trevor

     
  • Google Importer

    Google Importer - 2010-10-23

    Originally posted by: v.villenave

    I had another suggestion in mind: how about:
    - where appropriate, we *only* index \foo entries. no more plain "foo"
    - in texi2html.init, we rewrite the @printindex command so that \foo is ordered alphabetically just as if the backslash wasn't there
    - therefore the index will no longer have this huge list under "\" (which is totally useless), but under the letter "A", for instance,
       annotate-spacing
       \autochange
       auto-first-page-number
       \accepts
    etc.
    will all be listed?

     
  • Google Importer

    Google Importer - 2010-10-23

    Originally posted by: percival.music.ca@gmail.com

    Why the bloody mao are you talking about issue 855 in this one?  In particular, read Mark's email in that issue, and the discussion.

    TL;DR version: wtf do you propose to do about the pdf and info docs?

     
  • Google Importer

    Google Importer - 2011-08-20

    Originally posted by: percival.music.ca@gmail.com

    (No comment was entered for this change.)

    Labels: -Maintainability Type-Maintainability

     
MongoDB Logo MongoDB