TIP: Click on subject to list as thread! ANSI
echo: wperfect
to: STEVE HAYES
from: AUKE REITSMA
date: 1996-07-27 11:04:00
subject: Underline to italic

Hi Steve,
On 23 Jul 96, 22:56, Steve Hayes wrote to All
 SH> It has long been a typographical convention that text that is
 SH> underlined is typeset in italics. This is probably because most
 SH> tyewriters could not type italics.
...
 SH> So please, can anyone out there suggest a way of changing
 SH> underlines to italics - WITHIN WordPerfect?
You didn't say for which version of WP. In WP6.0dos I recorded the folowing
macro -- then added the comments:
DISPLAY(Off!)
// search for the Underline Off code -- this sets the 'previous position'.
SearchString("[Und Off]"+"")   // [Und On] is a code ... needs to be recorded
SearchNext()
// search backwards for the Underline On code and delete both codes
SearchString("[Und On]"+"")    // [Und Off] is a code ... needs to be 
ecorded
SearchPrevious()
DeleteCharPrevious
// put the original underlined code in italics ...
BlockOn(CharMode!)
PosGoPrevious
AttributeAppearanceToggle(Italics!)
BlockOff
// that's it.
WP5.1dos is similar -- WP6.?win probably is too: I haven't tried.
Caveat: if Block mode is on when you start this macro you'll lose text. This 
can be fixed by:
    IF( ?BlockMode ) // I'm not sure about that variable's name ...
        BlockOff
    ENDIF
before the searching.
Greetings from
 _____
 /_|__|  Auke Reitsma, Delft, The Netherlands.
/  | \  --------------------------------------
email: Auke.Reitsma@net.HCC.nl
--- GEcho 1.00
---------------
* Origin: Home by the C (2:281/400.20)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.