Tag/mark/highlight specific content

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Tag/mark/highlight specific content

Unread post by John Johann »

In a project which describes a custom language, I have many topics for individual commands with the syntax in its own paragraph and style.

Code: Select all

CommandABC (Arg1, ..., n)
The style is also used, e.g., in examples of how to use the command.

I would like to somehow add a tag/marker to the paragraph where the command syntax is listed so that I can parse the XML in another program and pick out all that info. The tag/marker should not be visible in any published output.

Does anyone have any suggestions or strategy how to do this?
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Tag/mark/highlight specific content

Unread post by Martin Wynne »

Hi John,

I use a conditional IF NEVER string for that sort of thing. For example:

Code: Select all

IF NEVER %%abc!! ENDIF
Make the searchable string something which would never appear in any normal text. You can have several different ones. You can copy and paste the entire IF...ENDIF in one go into any paragraph.

For IF NEVER use any output format you would never use, or create a dummy custom build. I suggested a specific IF NEVER option in the Wish List years ago, but it wasn't adopted.

cheers,

Martin.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: Tag/mark/highlight specific content

Unread post by John Johann »

Cool,
sounds like a plan because it has to be visible in the editor. I don't fancy changing the paragraph to a styled table.
Equally, I could probably just insert an empty variable.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: Tag/mark/highlight specific content

Unread post by John Johann »

Is there a non-printing, not-on screen visible character I could use for a variable -- it can't be empty and I don't want to insert a space
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Tag/mark/highlight specific content

Unread post by Tim Green »

Hi John,

Why not just use a user comment with something specific in the comment? It is never included in your output, is fully visible at design time and is uniquely identifiable in the XML. It looks like this there:

Code: Select all

<draft-comment width="300px" height="100px" modified="2020-03-26" styleclass="Comment"><![CDATA[This is a comment]]></draft-comment>
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: Tag/mark/highlight specific content

Unread post by John Johann »

Hi Tim,
Also a very good point.
I was just hoping for a nice clean solution to keep everything as short and sweet as possible.
Post Reply