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

Re: [Clip] Re: Upper & Low cases

Expand Messages
  • Axel Berger
    ... Sorry, but in this case I claim superior knowledge as a German: Ärger, Ångstrøm, Über (capitalized as the first word of a sentence), Ölsand ... If my
    Message 1 of 15 , Aug 12, 2009
      John Shotsky wrote:
      > and usually, upper case letters should not be accented anyway.

      Sorry, but in this case I claim superior knowledge as a German: Ärger,
      Ångstrøm, Über (capitalized as the first word of a sentence), Ölsand ...
      If my French were acceptable, I'm sure I'd find many more examples there
      too.

      > Then, there could be a problem if a line starts with a quote,
      > double quote or a paren and is followed by a lower case letter

      True. We don't know how paragraphs and thus presumably sentences came to
      be uncapitalized in the first place, but C. specified "first character"
      in his request.

      > In the segment below, I'd use \R+ instead of \R\R, since I don't
      > think there is a rule that there must be a blank line

      My understandig was that line feeds that are not paragraphs were the
      issue here and should not be modified. As you noted yourself "The clip I
      provided ignores blank lines."

      Axel
    • Sheri
      Just another possibility: This one loops from the top finding only lower case letters as the first character of a line (possibly preceeded by a double quote)
      Message 2 of 15 , Aug 12, 2009
        Just another possibility: This one loops from the top finding only lower case letters as the first character of a line (possibly preceeded by a double quote) and capitalizes them. Works for plain and accented latin characters.

        ^!Jump Doc_start
        :loop
        ^!Find "^\x22?\K\p{Ll}" RS
        ^!Iferror Out
        ^!Menu Modify/Text Case/Upper Case
        ^!Goto loop
        :Out

        Regards,
        Sheri
      • ebbtidalflats
        I d like to offer my 2 cents worth (or as Axel would say, his mustard): To change the case of EVERY first character of every line, WITHOUT LOOPING, use the
        Message 3 of 15 , Aug 15, 2009
          I'd like to offer my 2 cents worth (or as Axel would say, his mustard):

          To change the case of EVERY first character of every line,
          WITHOUT LOOPING, use the BLOCK mode and a helper file,
          something like (untested):

          ^!SetWordWrap OFF
          ^!SelectTo ^$GetLineCount$:2
          ^!Menu Modify/Block/Cut
          ^!Set %orig%=^$GetDocIndex$
          ^!Menu File/New
          ^!Set %helper%=^$GetDocIndex$
          ^!Menu Edit/Paste
          ^!Menu Modify/"Text case"/"Upper case"
          ^!Select All
          ^!Menu Modify Block/Copy
          ^!SetDocIndex ^%orig%
          ^!SetCursor 1:1
          ^!Menu Block/Paste
          ^!DestroyDoc ^$GetDocName(^%helper%)$

          Anybody care to time executions of the various solutions?

          Cheers,

          Eb


          --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
          >
          > John Shotsky wrote:
          > > and usually, upper case letters should not be accented anyway.
          >
          > Sorry, but in this case I claim superior knowledge as a German: Ärger,
          > Ångstrøm, Über (capitalized as the first word of a sentence), Ölsand
        Your message has been successfully submitted and would be delivered to recipients shortly.