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

Re: [abcusers] Re: Printing part of the info

Expand Messages
  • Hudson Flávio Meneses Lacerda
    ... abcm2ps ignores %% at the start of a line inside %%begintext/endtext blocks. Therefore, to avoid the flaw, you should put %% before R:/Z: lines. X:1 K:C
    Message 1 of 23 , Aug 1, 2010
    View Source
    • 0 Attachment
      dglenn@... wrote:
      > A caveat -- I wrote:
      >
      >> sed -e '/^[RZ]:/d' yourabcfile.abc | abcm2ps -
      >
      > and explained:
      >
      >> The '/^[RZ]:/d' command in
      >> sed translates to, "For lines matching the pattern, 'at start of line
      >> either an R or a Z followed by a colon', delete the line."
      >
      > The one flaw here is that in the Rather Unlikely event that a line
      > within a %%begintext ... %%endtext pair starts with "R:" or "Z:",
      > those lines too will be left out. I don't think this is likely to
      > come up, but I'd be remiss if I failed to mention the possibility.

      abcm2ps ignores %% at the start of a line inside %%begintext/endtext
      blocks. Therefore, to avoid the flaw, you should put %% before R:/Z: lines.

      X:1
      K:C
      %%begintext
      1
      2
      %%R:4
      5
      6
      %%endtext
      cde
    • Hudson Flávio Meneses Lacerda
      Here is an option to more abc-safely disable R: and Z: fields: sed -e /^[RZ]:/s/^/%%/ Hudson
      Message 2 of 23 , Aug 1, 2010
      View Source
      • 0 Attachment
        Here is an option to more abc-safely disable "R:" and "Z:" fields:

        sed -e '/^[RZ]:/s/^/%%/'

        Hudson

        dglenn@... wrote:
        > A caveat -- I wrote:
        >
        >> sed -e '/^[RZ]:/d' yourabcfile.abc | abcm2ps -
        >
        > and explained:
        >
        >> The '/^[RZ]:/d' command in
        >> sed translates to, "For lines matching the pattern, 'at start of line
        >> either an R or a Z followed by a colon', delete the line."
        >
        > The one flaw here is that in the Rather Unlikely event that a line
        > within a %%begintext ... %%endtext pair starts with "R:" or "Z:",
        > those lines too will be left out. I don't think this is likely to
        > come up, but I'd be remiss if I failed to mention the possibility.
        >
        > -- Glenn
      • Chuck Boody
        All these approaches are very nice, but I think easier is use the search and replace in any good word processor. Just search for R: and replace with %R:
        Message 3 of 23 , Aug 1, 2010
        View Source
        • 0 Attachment
          All these approaches are very nice, but I think easier is use the search and replace in any good word processor. Just search for "R:" and replace with "%R:" (or whatever you want to remove from the print out). The procedure can be easily reversed, and though there are some special situations that could cause problems they are quite unlikely.

          What I'm looking for is a solution within abc if possible. We're close but there seems to be one possible bug in abcm2ps that keeps it from working. I've written jef and am waiting for his response.

          Chuck Boody

          On Aug 1, 2010, at 10:14 AM, Hudson Flávio Meneses Lacerda wrote:

          > Here is an option to more abc-safely disable "R:" and "Z:" fields:
          >
          > sed -e '/^[RZ]:/s/^/%%/'
          >
          > Hudson
          >
          > dglenn@... wrote:
          >> A caveat -- I wrote:
          >>
          >>> sed -e '/^[RZ]:/d' yourabcfile.abc | abcm2ps -
          >>
          >> and explained:
          >>
          >>> The '/^[RZ]:/d' command in
          >>> sed translates to, "For lines matching the pattern, 'at start of line
          >>> either an R or a Z followed by a colon', delete the line."
          >>
          >> The one flaw here is that in the Rather Unlikely event that a line
          >> within a %%begintext ... %%endtext pair starts with "R:" or "Z:",
          >> those lines too will be left out. I don't think this is likely to
          >> come up, but I'd be remiss if I failed to mention the possibility.
          >>
          >> -- Glenn
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
        • Jean-Francois Moine
          On Sun, 1 Aug 2010 20:30:31 -0500 ... Hi Chuck, Sorry to be so late, I am always very busy. You are right, there is a bug in abcm2ps: infoname R makes the
          Message 4 of 23 , Aug 2, 2010
          View Source
          • 0 Attachment
            On Sun, 1 Aug 2010 20:30:31 -0500
            Chuck Boody <cboody@...> wrote:

            > What I'm looking for is a solution within abc if possible. We're
            > close but there seems to be one possible bug in abcm2ps that keeps it
            > from working. I've written jef and am waiting for his response.

            Hi Chuck,

            Sorry to be so late, I am always very busy.

            You are right, there is a bug in abcm2ps: 'infoname R' makes the
            program to crash. While fixing this problem, I saw that the
            '%%infoname's which are defined at start of file are forgotten.
            I will try to fix both problems this morning...

            Best regards.

            --
            Ken ar c'hentañ | ** Breizh ha Linux atav! **
            Jef | http://moinejf.free.fr/
          • Chuck Boody
            abcm2ps has been updated and the bug described below is no longer there. So, the approach Ben describes below now works properly. Thanks to Ben and others
            Message 5 of 23 , Aug 4, 2010
            View Source
            • 0 Attachment
              abcm2ps has been updated and the bug described below is no longer there. So, the approach Ben describes below now works properly. Thanks to Ben and others who helped track down the bug. New binaries should be available at Guido's site in the next day or so for the Mac and are now available there for other platforms.

              Chuck Boody

              On Jul 26, 2010, at 8:50 PM, mollysfavourite wrote:

              >
              >
              > Hello Chuck,
              > I haven't used writehistory or infoname before, but I did some experimenting. I set writehistory. Then for each field, in infoname, I entered nothing. Since it didn't receive any characters, to rename the field, they no longer appeared. It worked for the Z: field, & also the D: field. But when I tried the R: field it got buggy. I couldn't seem to get rid of the R:field.
              > When I entered S: & N: (no characters for infoname) these no longer appeared.
              > The R:rhythm field was the only problem.
              >
              > %%writehistory
              > %%infoname Z
              > %%infoname D
              > X:19
              > T:Eagle's Whistle
              > ...
              >
              > bottom of the PDF has:
              > Rhythm: mazurka
              > Source: John Jones Collection
              > Notes: Also called O'Donovan's Marc
              >
              > Cheers,
              > Ben
              >
              >
            • Richard Walker
              Excellent. Thank you. Don t suppose you d want to add a flag to include or exclude guitar chords? Hey, I had to try. ________________________________ From:
              Message 6 of 23 , Aug 4, 2010
              View Source
              • 0 Attachment
                Excellent.  Thank you.

                Don't suppose you'd want to add a flag to include or exclude guitar chords?  Hey, I had to try.


                From: Chuck Boody <cboody@...>
                To: abcusers@yahoogroups.com
                Sent: Wed, August 4, 2010 12:11:54 PM
                Subject: Re: [abcusers] Re: Printing part of the info

                 

                abcm2ps has been updated and the bug described below is no longer there. So, the approach Ben describes below now works properly. Thanks to Ben and others who helped track down the bug. New binaries should be available at Guido's site in the next day or so for the Mac and are now available there for other platforms.

                Chuck Boody

                On Jul 26, 2010, at 8:50 PM, mollysfavourite wrote:

                >
                >
                > Hello Chuck,
                > I haven't used writehistory or infoname before, but I did some experimenting. I set writehistory. Then for each field, in infoname, I entered nothing. Since it didn't receive any characters, to rename the field, they no longer appeared. It worked for the Z: field, & also the D: field. But when I tried the R: field it got buggy. I couldn't seem to get rid of the R:field.
                > When I entered S: & N: (no characters for infoname) these no longer appeared.
                > The R:rhythm field was the only problem.
                >
                > %%writehistory
                > %%infoname Z
                > %%infoname D
                > X:19
                > T:Eagle's Whistle
                > ...
                >
                > bottom of the PDF has:
                > Rhythm: mazurka
                > Source: John Jones Collection
                > Notes: Also called O'Donovan's Marc
                >
                > Cheers,
                > Ben
                >
                >


              • mollysfavourite
                Thanks Jef! I just ran Chuck s Eagle s Whistle abcs. The pdf displays Source & Notes only using abcm2ps, as promised. No problems renaming the R:Rhythm
                Message 7 of 23 , Aug 4, 2010
                View Source
                • 0 Attachment
                  Thanks Jef!
                  I just ran Chuck's "Eagle's Whistle" abcs. The pdf displays Source & Notes only using abcm2ps, as promised. No problems renaming the R:Rhythm w/nothing. I have a PC & updated to abcm2ps-5.9.15 from Guido Gonzato's ABC Plus page.
                  BTW, earlier this week I did get SED & it was probably the best workaround, prior to the bug fix.

                  Thanks all,
                  Ben

                  --- In abcusers@yahoogroups.com, Jean-Francois Moine <moinejf@...> wrote:
                  >
                  > On Sun, 1 Aug 2010 20:30:31 -0500
                  > Chuck Boody <cboody@...> wrote:
                  >
                  > > What I'm looking for is a solution within abc if possible. We're
                  > > close but there seems to be one possible bug in abcm2ps that keeps it
                  > > from working. I've written jef and am waiting for his response.
                  >
                  > Hi Chuck,
                  >
                  > Sorry to be so late, I am always very busy.
                  >
                  > You are right, there is a bug in abcm2ps: 'infoname R' makes the
                  > program to crash. While fixing this problem, I saw that the
                  > '%%infoname's which are defined at start of file are forgotten.
                  > I will try to fix both problems this morning...
                  >
                  > Best regards.
                  >
                  > --
                  > Ken ar c'hentañ | ** Breizh ha Linux atav! **
                  > Jef | http://moinejf.free.fr/
                  >
                • Hudson Flávio Meneses Lacerda
                  I noticed that the strings in %%infoname are not translated (for latin-1 compatibility) if the input is not utf-8 (abcm2ps-6.1.0). %%infoname H Histórico:
                  Message 8 of 23 , Aug 23, 2010
                  View Source
                  • 0 Attachment
                    I noticed that the strings in %%infoname are not translated (for latin-1
                    compatibility) if the input is not utf-8 (abcm2ps-6.1.0).

                    %%infoname H "Histórico: "
                    %%writehistory
                    X:1
                    H:Era uma vez uma música muito triste...
                    K:Bbm
                    B8 | B8 | B8 ||

                    Jean-Francois Moine wrote:
                    > On Sun, 1 Aug 2010 20:30:31 -0500
                    > Chuck Boody <cboody@...> wrote:
                    >
                    >> What I'm looking for is a solution within abc if possible. We're
                    >> close but there seems to be one possible bug in abcm2ps that keeps it
                    >> from working. I've written jef and am waiting for his response.
                    >
                    > Hi Chuck,
                    >
                    > Sorry to be so late, I am always very busy.
                    >
                    > You are right, there is a bug in abcm2ps: 'infoname R' makes the
                    > program to crash. While fixing this problem, I saw that the
                    > '%%infoname's which are defined at start of file are forgotten.
                    > I will try to fix both problems this morning...
                    >
                    > Best regards.
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.