keeping ` and ' not converting them from MMD->LaTeX->PDF

I write this in MMD

    source ""
    gem 'knife-solo', '0.4.2'
    gem 'berkshelf', '4.0.1'
    gem 'chef', '12.0.3'

and MMD->LaTeX->PDF shows this which causes errors for my readers.

source "" gem ’knife-solo’, ’0.4.2’ gem ’berkshelf’, ’4.0.1’ gem ’chef’, ’12.0.3’

I would like the MMD -> LaTeX -> PDF to keep backtick ` and single quote ’ that I heavily use in tech writing and not convert them.

What do I need?

Normally you would put things like code or shell commands into a code block or inline code span, which will pass through all text without any processing (and use environments meant for doing so in the target formats as well, such as \verbatim{…} with LaTeX. On the Mac, you can use the Preserve Formatting tool in Scrivener to handle that detail for you (backticks for inline, and when a block span a paragraph, prefixing each line with a tab) and then adjust how verbatim looks in your LaTeX preamble.

There is also a commandline flag on the multimarkdown executable itself that will inhibit all typographic punctuation conversion, –nosmart, but that will of course disable all typography throughout the document.

Thanks AmberV.

I selected preserve formatting on the iMac and then compiled a PDF

Unfortunately, this MMD

knife[:rackspace_api_username] = "CHANGETHIS" knife[:rackspace_api_key] = "CHANGETHIS" knife[:rackspace_version] = 'v2'

changed into this PDF

knife[:rackspace_api_username] = "CHANGETHIS" knife[:rackspace_api_key] = "CHANGETHIS" knife[:rackspace_version] = ’v2’

Note the single quotes around v2 are different in the PDF that I would like to keep like MMD has.

If you compile as plain MultiMarkdown from Scrivener, and open that in a text editor, you should see the quotes are all fine. If you then use MultiMarkdown manually to create a .tex file, or use Scrivener’s compile method to do it automatically, you should see straight quotes there too. The only time you don’t is when you typeset—that is just how LaTeX works by default in verbatim blocks, I had forgotten about that.

A quick search revealed this tip. It seems to work fine for me, I just put \usepackage{upquote} in the preamble and got a PDF with code-friendly quotes.

Thanks AmberV.

That fixed this issue. … e102216208