[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org Babel blocks exports dollar signs to LaTeX verbatim

From: Alan Schmitt
Subject: Re: [O] Org Babel blocks exports dollar signs to LaTeX verbatim
Date: Fri, 04 Sep 2015 13:57:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

(Still catching up on orgmode mail … sorry if you already found a way to
address the issue)

On 2015-08-18 18:13, Matthew MacLean <address@hidden> writes:

> When working with Org Babel source code blocks, if I have a dollar sign in my
> code and export it to PDF using LaTeX, it appears to parse as an internal
> link. (Maybe?)
> This is what it looks like:
> Inline image 1
> That comes from the following source code block:
> #+BEGIN_SRC sql :eval no :var id=1
> SELECT * FROM blah
> WHERE id=$id
> The resulting LaTeX from the source code block is:
> \begin{minted}[]{sql}
> SELECT * FROM blah
> WHERE id=$id
> \end{minted}
> I have verified that SQL is not the only block type to do this by having a
> Ruby block with nothing except a "$" in it, and got the same result.

These red boxes often come from signaling a syntax error from pygments,
which I confirmed by putting the code in a test.sql file and running:

% pygmentize -f latex test.sql
\PY{k}{SELECT} \PY{o}{*} \PY{k}{FROM} \PY{n}{blah}
\PY{k}{WHERE} \PY{n}{id}\PY{o}{=}\PY{err}{\PYZdl{}}\PY{n}{id}

You can see the “\PY{err}” that signals a parser error around the dollar

There are some solutions to hide these boxes here:



OpenPGP Key ID : 040D0A3B4ED2E5C7
Last week athmospheric CO₂ average (Updated August 31, 2015, Mauna Loa Obs.):
377.82 ppm

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]