This site uses cookies.
Some of these cookies are essential to the operation of the site,
while others help to improve your experience by providing insights into how the site is being used.
For more information, please see the ProZ.com privacy policy.
Daniel Frisano Italia Local time: 05:09 Membro (2008) Da Inglese a Italiano + ...
Mar 3, 2022
Is there a way to use find-and-replace in Word to catch all the blank spaces that occur at the end of table cells? (Or at the beginning, since we're at it.)
In other words, is there an "end of cell" marker that can be used in find-and-replace, possibly inside regex?
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Stepan Konev Russia Local time: 07:09 Da Inglese a Russo
Workaround
Mar 3, 2022
There is no code for the end of cell marker, but you can use a trick.
1. Create a custom style in MS Word, name it Table Cell for example.
2. Mark all your tables with that style.
3. Invoke the find and replace feature with Ctrl+H.
4. Leave the 'Find what' field blank but select the Table Cell style for it.
5. In the 'Replace with' field type ^&@@@ and replace all.
6. Replace [ @@@] (less brackets) with blank field. That will remove all the instances of [spa... See more
There is no code for the end of cell marker, but you can use a trick.
1. Create a custom style in MS Word, name it Table Cell for example.
2. Mark all your tables with that style.
3. Invoke the find and replace feature with Ctrl+H.
4. Leave the 'Find what' field blank but select the Table Cell style for it.
5. In the 'Replace with' field type ^&@@@ and replace all.
6. Replace [ @@@] (less brackets) with blank field. That will remove all the instances of [space+@@@].
7. Replace @@@ with blank field for the other instances that appear where there was no space initially.
Done
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Daniel Frisano Italia Local time: 05:09 Membro (2008) Da Inglese a Italiano + ...
AVVIO ARGOMENTO
Freakin' brilliant
Mar 3, 2022
Thanks Stepan, worked like a charm.
Since my document is all a big table, I didn't even need to create the custom style.
All I needed was a property that is common to the whole text for the "Find what" field, in my case Font color = Automatic. Or you can use an obscure never-used property as a dummy, like Format > Font > Not Emboss or something.
Stepan Konev
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Stepan Konev Russia Local time: 07:09 Da Inglese a Russo
Workaround 2
Mar 3, 2022
Alternatively you can select all text in your table, then press Ctrl+E, Ctrl+L. This will remove both leading and trailing spaces. However, this workaround may require manual work if you have different paragraph alignment styles.
Elena Feriani
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Rolf Keller Germania Local time: 05:09 Da Inglese a Tedesco
Word is XML
Mar 4, 2022
FWIW:
In Word's document.xml file you can locate & change the text content of table cells.
Rename .docx to .zip, then open the .zip file and dig out the document.xml file.
In that file use a regular expression for search and replace. The following is the text you'll find within Word's xml file:
{w:tc} ignore some stuff here {w:t} this is the cell's text content {/w:t}
Note: In the above string I used curly brackets, just because ProZ's editor do... See more
FWIW:
In Word's document.xml file you can locate & change the text content of table cells.
Rename .docx to .zip, then open the .zip file and dig out the document.xml file.
In that file use a regular expression for search and replace. The following is the text you'll find within Word's xml file:
{w:tc} ignore some stuff here {w:t} this is the cell's text content {/w:t}
Note: In the above string I used curly brackets, just because ProZ's editor doesn't like angle brackets.
Looks difficult but might be the only way (besides a macro, of course) to achieve certain automatic changes. ▲ Collapse
Stepan Konev
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Daniel Frisano Italia Local time: 05:09 Membro (2008) Da Inglese a Italiano + ...
AVVIO ARGOMENTO
@RK
Mar 4, 2022
Right, some operations are better done low-level.
Now I'm left wondering if there are editors that allow you to manipulate a Word document LaTeX-style. (Anyone remember TeX and LaTeX?)
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Manage your TMs and Terms ... and boost your translation business
Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.
The leading translation software used by over 270,000 translators.
Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop
and cloud solution, empowering you to work in the most efficient and cost-effective way.