I was wondering if anyone knew how to beautify or format JSON inside a Latex document. I am using Lyx as a front-end for writing the latex file. Are there any addons that people use? I tried to search but am not able to get anything relevant.
+1
A:
I do embed code into lyx mostly as program listings imported from external textfiles. There are numerous options that you could apply to the program listing, from line numbers to word wraps and many more.
BeowulfOF
2009-11-22 21:29:36
Autoformatting isn't one of those, though. At least `listings` doesn't have the option as the approach to prettifying is rather braindead anyway (just literal/keyword highlighting instead of understanding the grammar).
Joey
2009-11-22 21:32:23
I guess I'm missing something here. So, I've used listing to insert the JSON but what am I expecting here because I don't see any significant difference in the generated PDF. I mean, leave alone the keyword highlighting, I don't even see any formatting. Any inputs?
Legend
2009-11-22 21:40:03
Never mind. I missed the settings option. I'm playing with it now.
Legend
2009-11-22 21:42:24
And of course, unfortunately, there is no option for JSON.
Legend
2009-11-22 21:44:27
What options do you use right now?
BeowulfOF
2009-11-23 11:10:48