Embed Formated Source Code in Indesign & Co.

Tim Bernhard

OfficeCodeFormatIndesign

This post is old. Codes, opinions and facts could be outdated.

Help to fix potential errors: GitHub

Be it a bachelor's, doctoral or a little schoolwork in the field of computer science: it hardly gets by without code. But how can you integrate the code, as nicely as it is formatted in Eclipse and Co., without LaTeX knowledge in Word or InDesign?

Taking a screenshot is one way. This can be done either with the keyboard shortcuts cmd + shift + 3 or cmd + shift + 4 on the Mac or on the Windows PC with the following instructions: http://windows.microsoft.com/de-CH/windows-xp/help/setup/take-a-screen-shot

However, this approach is not worthwhile for longer code that breaks the screen. Fortunately, there is at least one other solution: Export the code with file -> print -> adobe pdf or file -> print -> adobe pdf from your editor of choice to a pdf that you can integrate without troubles. If the Adobe PDF selection as a printer is not available, you can download the freeware [CutePDF Writer] (http://www.cutepdf.com/products/cutepdf/writer.asp) and select it in the print dialog. But be careful if you choose this program that you do not accidentally install the ask-toolbar. Depending on the print dialog, it is not even necessary to select Adobe PDF as the printer, and the print dialog offers its own option of exporting the code as a PDF (see following screenshot). Druckdialog TextWrangler

Webmentions

No webmentions found for this page.