Quantcast
Channel: PTC Community : All Content - Arbortext
Viewing all articles
Browse latest Browse all 1645

replace function help

$
0
0

Hi Folks,

 

I have a situation where we publish documents in both French and English. In French, we use the male ordinal character (ordm - º) frequently when stating think like No 1, No 2, etc. My organization has a preference to not have the 'o' part of the numero underlined - and our font set has it underlined as part of the character.

 

Our solution is basically to substitute a different font for that one character (like Times where the male ordinal does not have a line under it).

 

In areas of our document where text is gentext, we have an APP override to change the font, but in the general text of the document (like in paragraphs etc), we were just going to use a font override. I would rather not have every element of the style sheet overridden this way as it is very cumbersome.

 

I was trying to automate it using the replace function with something like the following:

 

' First replace any cases of the male ordinal with font markup with just the male ordinal (I do this so we don't keep adding multiple level of font override tags if this is run multiple times)

replace('<?Pub _font FamName="Times New Roman"?>º<?Pub /_font?>','&ordm;',0x20B0)<<- This one does not work

 

' Then replace all cases of the male ordinal with the male ordinal wirth the font markup.

replace('&ordm;','<?Pub _font FamName="Times New Roman"?>&ordm;<?Pub /_font?>',0x20B0)<<- This one works

 

When I use the GUI Find/Replace function with the string in the first statement, it also doesn't work properly (ans yes I have the 'Match Markup' selected)

 

When I edit source it also does not find the text, if I use Windows Notepad, the search and replace works (I was just testing). Does anyone have any suggestions on how to get this to work in Arbortext?

 

Thanks in advance for any suggestions or other ideas,

 

Rob.


Viewing all articles
Browse latest Browse all 1645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>