I've been searching for the past couple of days to a solution to an issue I'm having. Hoping somebody who is more apt with emacs/exporting could provide some insight.

Upon exporting an .org file (C-cC-elo/p) to LaTeX followed by PDF, my Regex text within the PDF document is handled (assuming) as a math equation. E.g. instead of displaying [^ABC] within the PDF, it is displayed as [ABC].

I have attempted to use \usepackage{verbatim}, with something like \verb/[^ABC]/, but I get different results. E.g. [(^{\text{ABC}})].

Is there a specific reason I'm missing that could be causing this? Or, something that I have not included within my init.el? For reference, here is the section of my init.el that is handling org-latex-classes:

(add-to-list 'org-latex-classes
\\geometry{a4paper,left=2.5cm,top=2cm,right=2.5cm,bottom=2cm,marginparsep=7pt, marginparwidth=.6in}"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

Edit: As suggested, wrapping expressions with '=' seems to do the trick for cases such as [^ABC] and \u{FFFF}.

  • 1
    Have you tried wrapping the offending text in '=' markup? Seems to do the right thing here at least for '^'
    – rpluim
    Commented Sep 27, 2019 at 15:46
  • @rpluim No clue how I didn't find any information on this - I did try it with a couple of expressions and it seems to do the trick! Thank you for the suggestion. Commented Sep 27, 2019 at 15:56
  • Using #+BEGIN_EXAMPLE / #+END_EXAMPLE blocks works as well for bigger chunks
    – rpluim
    Commented Sep 27, 2019 at 15:57
  • This is great information, and both seem to be suitable use cases for what I'm going for. Thanks again! If you'd like to answer directly so I can mark as complete, that would be great. Commented Sep 27, 2019 at 16:04

1 Answer 1


Org can be told to treat text as verbatim either by wrapping it in '=' markup (for words), or in a #+BEGIN_EXAMPLE/#+END_EXAMPLE block. See Emphasis-and-Monospace and Literal-Examples for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.