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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 967 views
  • 0 likes
  • 2 in conversation