How to do find/replace with fonted text in MS Word
Thread poster: Samuel Murray

Samuel Murray  Identity Verified
Netherlands
Local time: 12:52
Member (2006)
English to Afrikaans
+ ...
Oct 28, 2011

G'day everyone

I must proofread an MS Word file in which the text occur in three fonts.

Text that the translator should not have translated, is in Verdana. Source text that the translator should have translated, is in Tahoma, and the translator had typed the translation next to the source text in Courier.

Sometimes two source text sentences are followed by two translated sentences, but mostly the translation was done on a per-sentence basis. There is never any other text (e.g. in another font, including Verdana) between a source text piece and a translation of it.

I want to proofread this in my CAT tool (WFC), so I need to convert this:

Some text in Verdana here. Some text in Tahoma here. Some text in Courier here. Some text in Verdana here.

into this:

Some text in Verdana here. {0>Some text in Tahoma here. <}0{>Some text in Courier here<0}. Some text in Verdana here.

I can mark the Verdana text as non-translatable easily, so that's not a problem.

Can anyone think of a strategy to do this? If the file was simple, I would have round-tripped via HTML, but the file is rather complex (lots of tables and stuff, though fortunately no text boxes). Conversion to OpenOffice.org seems like a possibility (I know that OOo has better regex in some ways than MS Word).

Thanks
Samuel


 

Samuel Murray  Identity Verified
Netherlands
Local time: 12:52
Member (2006)
English to Afrikaans
+ ...
TOPIC STARTER
Right now... Oct 28, 2011

Samuel Murray wrote:
Can anyone think of a strategy to do this?


Right now, it looks like this would work:

(1.)
Find: (?)
Replace: #\1#
Wildcards: yes
Find font: Tahoma

(2.)
Find: (?)(#)(?)
Replace: \1\3
Wildcards: yes
Find font: Tahoma

Repeat (2.) until no further results are found. This causes there to be a # at the very start and very end of all Tahoma text.


 

István Hirsch  Identity Verified
Local time: 12:52
English to Hungarian
Try something like this in Word Oct 29, 2011

It works for this simple text, but may not work exactly in this form for a structurally formatted text.
I do not know WFC.
Perhaps the correct formula will depend on the font of the space separating the sentences (whether it belongs to the previous or the next font?).
Check wildcard checkbox.
Find:
(*.) Format/character: Tahoma
Replace with:
{>0\1>}0{>

Find:
(*.) Format/character: Courier
Replace with:
\1<0}

Of course, this will not align parts of the text where two source is followed by two target sentences.


[Módosítva: 2011-10-29 06:46 GMT]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to do find/replace with fonted text in MS Word

Advanced search






Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »
BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search