From 390af921e601ebd8e4073d7350ef0b24957b4b94 Mon Sep 17 00:00:00 2001 From: amo13 Date: Sun, 29 Mar 2020 15:41:27 +0200 Subject: [PATCH] Fix bug with "missing $ inserted" In LaTeX text mode it should be \textbackslash, \backslash is for math mode. Therefore, the compiler is missing a $. --- lib/to_latex.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/to_latex.rb b/lib/to_latex.rb index 839708e..1a9c33c 100644 --- a/lib/to_latex.rb +++ b/lib/to_latex.rb @@ -12,7 +12,7 @@ module ToLatex def self.escape s s.gsub(LATEX_SPECIAL_CHAR) do |c| case c - when "\\" then '\backslash{}' + when "\\" then '\textbackslash{}' when "^" then '\^{}' when '~' then '\~{}' else "\\#{c}"