BookmarkSubscribeRSS Feed
bnawrocki
Quartz | Level 8

I bolded a couple words in my ODS TEXT statement, but the spacing in front of the second bolded word is larger than the spacing between other words in my text in the PDF file that I write to.

 

Here's my code:

%let InfTop1 = Rhinovirus;
%let InfTop2 = Parainfluenza;

ods text = "^{unicode 25cf} ^{style[font_weight=bold]&InfTop1} was the most frequently identified respiratory viral pathogen followed by ^{style[font_weight=bold]&InfTop2}.";

And here's my output (attached) in the PDF. The space before the word Parainfluenza is about twice as large as the spaces between the other words on the line. Any suggestions on how to fix this?

 

 


Capture.PNG
4 REPLIES 4
ballardw
Super User

Try not putting spaces between the style definitions and the actual text. You are applying the style to the SPACE and a bolded space takes up more room than non-bold. You may also be getting a space after the unicode character

bnawrocki
Quartz | Level 8

Yes, I already tried that, and it didn't make any difference.

ballardw
Super User

Which PDF viewer are you using?

When I run your code and look at it with Adoby Acrobat Pro DC or PDF Exchange editor I actually don't see any space before the Parainfluenza text.

bnawrocki
Quartz | Level 8

I'm just using Adobe Reader. Perhaps it's a bug in Adobe Reader.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1390 views
  • 0 likes
  • 2 in conversation