5 Replies Latest reply on Sep 20, 2016 10:34 AM by rob day

    Best way to incorporate source code into a book?




      I'm after some advice on the best way to display formatted source code within an InDesign CC 2015 document.


      To give a little background: I've been working on a programming book in my spare time, and as such it contains a vast amount of source code (in JavaScript). I've authored the book using MarkDown, so the code is formatted with markdown code tags.


      I'm aware that InDesign has no concept of MarkDown, so I'm prepared to take the content through another step before I import it. But I'd really like to know if anyone here has gone through the process of formatting lots of source code before, and if so, what is the easiest way to do it? Perhaps I need to convert the code snippets into another format first (PDF? using the likes of Panadoc?) before importing. Or if there's a better method?


      To be clear I'd like a way to incorporate both large blocks of text, and also display code in-line with the book text, and retain the colour formatting that all code editors have.