0

What are the O'Reilly code listing configurations for their books about computer science? Following is an example of such code formatting.

enter image description here

6
  • 1
    Are you asking how to do this in latex? If so, consider using the listings package, linked to here. It wont look that that right out the gate, but its very configurable – Will Feb 17 at 18:34
  • Thank you for the answer, I'm aware of the listing, but actually I was looking for the listing configurations that can get as close as those on O'reilly as shown on the example above. – maths soso Feb 17 at 19:23
  • @mathssoso: What language is used in the book? – Werner Feb 17 at 19:29
  • @Werner: It's Scala, but several other books use Python, Java. – maths soso Feb 17 at 19:35
  • 2
    Welcome to TeX.se. As asked, this is either too broad or unanswerable. If O'Reilly doesn't make their source available (do they even use TeX?) then there is no such configuration. But as others have said, the listings package supports many languages out of the box, and adding associated colouring is not that difficult. Alternatively there is also pygments which can do similar things. So then make a sample document using one of those, using the appropriate language definition file, and then we can help you with the specifics. – Alan Munn Feb 17 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.