Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to underline text ?

 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a word and i want to underline it. I know i can use <fo:inline text-decoration="underline"> but i want to underline for example only the first and second letter and inserts a space between.
Example : 'engin' --> i want to insert space after 'en' in order to underline 'en ' and to write 'gin' but without underlining it.
Thanks.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the xsl function substring() and fo:inline together.
Something like..
<fo:inline underline>get first two chars using substring</fo:inline><fo:inline nounderline>& #160; get rest of the string</fo:inline>
 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks it works fine.
I have another question.
I have a word example : 'engin'.
i use substring() to get the first and second character --> 'en'.
I insert a space after 'en' --> 'en '.
I want to underline the space also.
I tried it but it doesn't work ???I may underline only 'en' and not the space . Why ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic