[bksvol-discuss] Re: Italic page numbers

  • From: "Judy s." <cherryjam@xxxxxxxxxxxxxxxx>
  • To: bksvol-discuss@xxxxxxxxxxxxx
  • Date: Mon, 14 Nov 2022 19:03:33 -0600

Hi Terry,

I hope it works well for you. Visual Basic is a full programming language, and truly is quite powerful. Word incorporates a slightly nonstandard version of Visual Basic inside of it.The macros you use in Word are based on that Visual Basic, as sort of preprogrammed modules you can create without having to do any coding per se.

The little code for changing the italics breaks down like this:

The (0-9) means "for any digit from zero to 9" and the {1,3} says "for every number that is from 1 to three digits in length, or in other words every number from 0 to 999. Adding the ^13 makes it only look for numbers that are the last set of characters in a paragraph.

Done this way, it correctly grabs numbers like 222 or 987, and not just the individual digits that make up the number.

If you have a sentence that ends a paragraph that ends in a number, it will find that, which is why you can't use this as a global find and replace. That can happen especially in nonfiction books that have dates at the end of a paragraph, like November 14, 2022, but only if the date isn't followed by any punctuation.

Because it is so cryptic, it is really easy to make mistakes via typos that can do some crazy things! smile.

Judy

On 11/14/2022 6:30 PM, t.gorman (t.gorman) wrote:


Judy,

Thanks for this. I’ll try it out on a copy and see what happens. I never learned this kind of programming. Looks powerful!

*From:* bksvol-discuss-bounce@xxxxxxxxxxxxx <bksvol-discuss-bounce@xxxxxxxxxxxxx> *On Behalf Of *Judy s.
*Sent:* Monday, November 14, 2022 6:22 PM
*To:* bksvol-discuss@xxxxxxxxxxxxx
*Subject:* [bksvol-discuss] Re: Italic page numbers

Hi Terry,

Here's the wildcard search that should help you find and replace italicized page numbers. Let me know if it does anything screwy or doesn't work the way you expect it to.

How To Replace any italicized page number from 1 to 3 digits in length with the same number, making sure it is not italicized:

In the following example, the page numbers are always followed by a hard paragraph mark, which they ordinarily would be in a scan for Bookshare. When you use a wildcard search, however, you can't use ^p as that is interpreted as something else by visual basic. Instead, use ^13 as that is the paragraph mark visual basic recognizes.

1. In the "find and replace" box for Word, turn on italicization by placing your cursor in the "find what" field and type a ctrl-i. This will set the font characteristic to italicization on.
2. In the find field then type in:
([0-9]{1,3})^13
3. Tab to the "replace with" field. Turn off italicization by placing your cursor in the box and then typing ctrl-i and then typing ctrl-i again. This will set the font characteristic to italicization off.
4. In the replace with field type in:
\1^13
5. In the "more" drop down box select "Use Wildcards"

Now search for each instance. Do not do a global replace!! It will mess with every italicized number in the document if you do that.

When you are done fixing all of your page numbers, make sure to turn off the "use wildcards" in the "more" drop down box or all of a sudden it will seem like none of your searches are finding anything.

I don't use Word to proofread anymore, as I proofread using Google Docs on an Android device, but if there are other repetitive weirdnesses in Word I may be able to help with wildcard type searches from what I used to do.

--
Judy s.
Follow me on Twitter at QuackersNCheese

On 11/14/2022 4:30 PM, t.gorman (t.gorman) wrote:

    Hi Judy,

    I’d be interested in that wild card if you find it.

    I have some Word macros of my own. If somebody wants them and can
    tell me how to share them I could do that.

    One converts footnote numbers which I number with asterisks to
    account for them and check them for accuracy to superscripts
    without the asterisk as required by the manual. Some of the Oxford
    University books have up to 1600 footnotes so this macro, even
    though I have to press it once for each footnote, still reduces
    the number of operations tremendously.

    Another macro takes a scanned index which usually runs on without
    proper linebreaks to have mostly proper linebreaks. You still have
    to read the index but it’s mostly fixed in that one regard.

    A third macro takes a title which I’ve preceded with a number sign
    and changes its attributes to bold and 16 point. I don’t have one
    for subentries at 14 and bold so have to do those manually. I
    should make one for that but I’m too computer phobic to do it.

    While one can do these things manually as you go through the book
    I prefer to have this process which I do at the end. It’s more
    accurate than if I expect my brain to jump from one thing to
    another as I’m working on the book.

    *Does anyone else have macros you’d like to tell us about?*

    **

    *I bet there are some internally within Bookshare to make the work
    easier.*

    **

    *I’ve thought of making one to do some other automated operations
    but global replacements are risky.*

    **

    *I use qz to mark my place in a book. I was quite surprised
    recently when I encountered a web site with the URL qz.com.*

    **

    *I use qq to mark things I want a sighted volunteer to check with
    me. That letter combinations I found is used in some Arab languages.*

    **

    *Well, life and proofing are both interesting!*

    **

    *From:* bksvol-discuss-bounce@xxxxxxxxxxxxx
    <bksvol-discuss-bounce@xxxxxxxxxxxxx>
    <mailto:bksvol-discuss-bounce@xxxxxxxxxxxxx> *On Behalf Of *Judy
    *Sent:* Monday, November 14, 2022 3:23 PM
    *To:* bksvol-discuss@xxxxxxxxxxxxx
    *Subject:* [bksvol-discuss] Italic page numbers

    Hi Terry,

    I'm pretty sure, but not 100 percent positive, that the Bookshare
    converter changes italicized page numbers to ordinary. However, I
    think it's best to ask Amanda this one.

    If it doesn't, I have a Word wildcard search around somewhere in
    my archive of Bookshare proofreading notes that I can look for
    that makes it easier to do this.

    Judy

--

Judy s.
Follow me on Twitter at QuackersNCheese <https://twitter.com/QuackersNCheese>


--
Judy s.
Follow me on Twitter at QuackersNCheese <https://twitter.com/QuackersNCheese>

Other related posts: