BookmarkSubscribeRSS Feed
akf06
Calcite | Level 5

Hi,

 

I am having trouble trying to figure out how i can make a macro that outputs data from sas into a table in latex.

 

thank you!

6 REPLIES 6
Cynthia_sas
Diamond | Level 26

Hi:

  There IS an ODS destination for LaTeX. Here's a sample invocation -- since I don't have a LaTeX viewer, I can create it, but I can't post a screen shot of what it looks like.

 

The code:

ods tagsets.latex file='c:\temp\test_latex.txt';

proc print data=sashelp.class;
run;

ods tagsets.latex close;

 

Hope this helps,

Cynthia

ChrisNZ
Tourmaline | Level 20

I stand corrected and will remove my reply to avoid confusion! 🙂

Cynthia_sas
Diamond | Level 26
Thanks! It is an esoteric destination, but I understand that if you are using LaTeX the ODS destination does generate the LaTeX code for representing SAS tables and can include graphs.

Cynthia
Tom
Super User Tom
Super User

Note that a LaTex file is just a text file. So you can can use any text editor to look at the file to see if it contains valid Tex code that used the LaTex package.

 

But you will need something to render the file to see whether it really works, especially if you ability to interpret Tex (or LaTex) code is as bad as mine.

Cynthia_sas
Diamond | Level 26
Yes! I understand there are apps you can use to render the file that are invoked with command line commands, but I don't have any of those and I usually mess up command lines 3 times before I get them right.
Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 6 replies
  • 1647 views
  • 4 likes
  • 4 in conversation