Hi!
I'm not sure where the best place to ask this question is, but I figured I'd start here.
I am a very inexperienced LaTeX user. I want to create a LaTeX document with SAS code as it appears in the EG editor (with keyword coloration and Courier font). Of course, I could paste it in as an image, and it would have the right appearance, but then it couldn't be copied as text from the document. Do any of you have a LaTeX template that makes SAS code look more or less like it would in the EG editor?
Thanks!
Hi:
When we teach our classes, we provide the students with the option of 3 different editors. Rather than try to show code that can be copied as it looks in each editor window (because, of course, each of the 3 editors has a different look and feel), we show the code in our course notes as plain text, without the editor's added bells and whistles. We find that this helps drive home the point that code is code, no matter what editor they are using. A SAS program is just an ASCII text file on PCs and Macs. This also avoids the common mistake that beginning students make in thinking that the interface that they use is the only way to use SAS. We don't encounter problems in class because the instructors demo the SAME copied program running in both EG's editor and SAS Studio and in SAS on Windows (for students who are still using SAS on Windows).
So rather than look for a LaTeX template to copy code into, I'd recommend using plain text, in Courier for any code.
But that's only my .02,
Cynthia
I am not aware of font/color packages. My suggestion is to forget about the cosmetic aspect (font and color) and make sure that the latex document enables readers to reproduce the contents of the paper. This is called reproducible research (Arnold and Kuhfeld, 2012)
SAS supports the StatRep package for reproducible research in Latex. The package is available on GitHub.
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!
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.
Ready to level-up your skills? Choose your own adventure.