Highlighted

Globally delete text with certain para tag / globally replace empty para tags

New Here ,
Jul 10, 2017

Copy link to clipboard

Copied

Hi all,

I'd like to:

1.   Delete text from my document that has a certain paragraph tag.

     There are some headings that appear as 'continued' on each page, with a para tag 'heading continued'. We're going digital and I just need 1 heading for each section. Is there any way to globally delete the 'heading continued' text from the document?

2.   Delete empty para tags

     I have done a global find and replace of para tags using the Super Find Change (FrameMaker Super Find / Change Reloaded – TechComm Central by Adobe ) plugin. However, this tool doesn't seem to find and replace any empty para tags. There are lots of empty 'Body' tags in the docs, basically carriage returns used for formatting, that I want replaced with empty 'Body new' tags.

I am using FrameMaker 12.

Thanks in advance for any help,

Ronan

Views

284

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Globally delete text with certain para tag / globally replace empty para tags

New Here ,
Jul 10, 2017

Copy link to clipboard

Copied

Hi all,

I'd like to:

1.   Delete text from my document that has a certain paragraph tag.

     There are some headings that appear as 'continued' on each page, with a para tag 'heading continued'. We're going digital and I just need 1 heading for each section. Is there any way to globally delete the 'heading continued' text from the document?

2.   Delete empty para tags

     I have done a global find and replace of para tags using the Super Find Change (FrameMaker Super Find / Change Reloaded – TechComm Central by Adobe ) plugin. However, this tool doesn't seem to find and replace any empty para tags. There are lots of empty 'Body' tags in the docs, basically carriage returns used for formatting, that I want replaced with empty 'Body new' tags.

I am using FrameMaker 12.

Thanks in advance for any help,

Ronan

Views

285

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 10, 2017 0
Adobe Community Professional ,
Jul 10, 2017

Copy link to clipboard

Copied

Hey Ronan:

My technique for deleting text with a particular paragraph tag is to set up a Find/Change query (see below). Click Find, click the title bar of the Window, tap Delete then repeat. If someone has a faster way, I'd love to hear it.

VMware Fusionss_002.png

As for the multiple returns, there are various ways of approaching this. I've settled on this GREP string, because it not only pulls out the extra ¶s, it also deletes the spaces at the end of a paragraph which can cause text wrap issues when a paragraph truly ends at the end of a column. In that situation, one or more extra spaces can cause the ¶ to move to the next line, creating extra, unwanted space.

VMware Fusionss_001.png

~Barb

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2017 0
Adobe Community Professional ,
Jul 13, 2017

Copy link to clipboard

Copied

BarbBinder​, for the tag removal, can't you just hit Change to replace the selected paragraph with nothing?

You can use Change, Change and Find, and Change All to speed the process.

For the empty paras I search using Wildcards, and use \P\p

I don't recommend using Change All, as this string will pick up paras with anchors (and perhaps other invisible characters) that you're not looking to remove.

As with any process like this, work with backup files!

Capture39.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2017 1
Adobe Community Professional ,
Jul 14, 2017

Copy link to clipboard

Copied

Nice catch, mattrsullivan, that is the way to go for the F/C query. Too much teaching these past few weeks. I'm tired.   

As for the extra returns (which can also be removed via import with a option in File > Import > File, in the current versions), I'm not seeing that either option (my regular expression query or your wildcard query) is removing anchors, but they do merge anchors that are on their own ¶ to either the previous line or the subsequent line. (See screen shots below.)

I used to use the wildcard approach, but because I can also remove the trailing spaces that authors love to add to the end of paragraphs, I prefer the regular expression these days. I also always add anchors at the end of the line.

ronanh3172939​, hopefully you have the answers you need now. If not, please let us know. I finally have a day off, and my mountain bike is calling. Happy weekend, everyone.

Original:

VMware Fusionss_001.png

With regular expression \s+$:

VMware Fusionss_002.png

With wildcard \P\p:

VMware Fusionss_003.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2017 2
New Here ,
Jul 16, 2017

Copy link to clipboard

Copied

Hi Barb,

Hope your cycling was fun!!

Thanks for your answer and they do solve my problems.

Also Matt thanks for your answer too.

The Super Find Change tool is good for globally changing para styles... but it's not so user friendly (list of styles are not in alphabetical order) and it sometimes doesn't catch all styles in a doc, which is a problem.

I can see both your options work, but I don't actually understand how. If you had any good resourses on regular expressions in Framemaker it would be helpful for me to understand how \P\p and \s+$ work!!

No problem if you don't have the time, appreciate your answers anyway!

Ronan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2017 0
Adobe Community Professional ,
Jul 16, 2017

Copy link to clipboard

Copied

Hi Ronan:

Great ride, thanks, followed by two days of camping by a quiet mountain lake. Great way to recharge the batteries.

\P\p is using FrameMaker's special characters and works with any version. You designate the start of a paragraph with a \P, and the end of paragraph with \p. You are looking for them to both appear together.

See pages 869–971 for other special characters you can use in a Find/Change http://help.adobe.com/en_US/framemaker/2017/using/framemaker_help.pdf

~~~~~~~~~~~~~

\s+$ is using a regular expression, which is a special text string for describing a search pattern.

  • \s stands for whitespace character (in Fm this means spaces, hard returns and line breaks)
  • + means one or more
  • $ means at the end of a paragarph

See Regular expression - Wikipedia for more information on RegEx.

Glad you got what you needed, and hope you also had a good weekend.

~Barb

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2017 0