[Framers] How to format source code in FM

Robert Lauriston robert at lauriston.com
Wed Jan 1 12:29:59 PST 2020


Markdown itself doesn't have syntax highlighting, that's done by the
rendering engine. So there's nothing to convert.

https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code

I don't know of any FrameMaker add-on that can add syntax highlighting
to PDF output.

You could use Pandoc rather than FrameMaker to go from Markdown to PDF.

https://pandoc.org/MANUAL.html#syntax-highlighting

On Tue, Dec 31, 2019 at 1:42 PM Orly Zimmerman <orlyzim at yahoo.com> wrote:
>
> HI All, I have a document in Markdown (md) that I was asked to convert to FM.  I can do it quickly using wildcards,regexs and scripts.
> All is fine and good, except when I get to source code. The source code is formatted extremely nicely and clearly (with different colors for commands, comments, etc and also with code line numbers) in the MD file. I can't come close to it in FM without using a fair share of different, newly created para and char tags, etc.This is extremely frustrating because I can take the text and simply plunk it into Notepad++ and it gets formatted properly depending on the language I choose. Perhaps there is a secret setting somewhere in FM, that FM can read this code and understand how to format it? and save me loads of time.
> I prefer not creating a JPG or BMP of the code - because then the info won't be searchable in the PDF. Many Thanks for any ideas :)Happy New Year!Orly Zimmerman


More information about the Framers mailing list