BookmarkSubscribeRSS Feed
xxformat_com
Barite | Level 11

 

 

This paper suggest that the \raw functionality is supported by LaTex files.

https://support.sas.com/resources/papers/proceedings09/222-2009.pdf

 

However, when I try the following code:

 

ods latex file="&xxdemo./reporting/test.tex";

ods escapechar='^';
title 'Line 1'
      '^{raw \\} Line 2'
      "^{raw \break{}} Line 3";


proc print data=sashelp.class;
run;

ods latex close;

 

 

I get the following line

 

\sassystemtitle[c]{Line 1\^\{raw {\textbackslash}{\textbackslash}\} Line 2\^\{raw {\textbackslash}break\{\}\} Line 3}

 

 

instead of

 

\sassystemtitle[c]{Line 1 \\ Line 2 \break{} Line 3}

 

 

2 REPLIES 2
ballardw
Super User

It might help to describe what you are attempting.

 

The text "Line 2" makes me suspect that you are trying to insert line breaks in some form. I might try the ODS ESCAPECHAR function NEWLINE if that is the case.

 

I don't have any experience with LaTex and it may help others to describe is some detail what you expect.

It might also help to turn of ODS HTML prior to generating the output. I have seen a couple of unexpected results for specific ODS destinations when both HTML and another destination are open.

xxformat_com
Barite | Level 11
"Line 2" is just some random text. Line breaks in Latex are either created using \\ or \break{}. I just tried with both.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 643 views
  • 0 likes
  • 2 in conversation