aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/sisu/v2/texpdf.rb1
-rw-r--r--lib/sisu/v2/texpdf_format.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb
index 9aa82927..0d77d65b 100644
--- a/lib/sisu/v2/texpdf.rb
+++ b/lib/sisu/v2/texpdf.rb
@@ -568,6 +568,7 @@ module SiSU_TeX
\\chardef\\tilde="7E
\\definecolor{Light}{gray}{.92}
\\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\tiny\\ttfamily\\texbackslash#1}
+\\newcommand{\\monosp}[1]{\\normaltext\\ttfamily\\texbackslash#1}
% \\sloppy
\\begin{document}
WOK
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 637271a0..4e489466 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -1064,7 +1064,7 @@ WOK
str.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\sout{\1}') # ulem
str.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,"\$^{\\textrm{\\1}}\$")
str.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,"\$_{\\textrm{\\1}}\$")
- str.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,' \monosp{ \1 } ')
+ str.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\begin{monosp}\1\end{monosp}')
unless is=='code'
str.gsub!(/"(.+?)"/,'“\1”') # quote marks / quotations open & close " need condition exclude for code
str.gsub!(/\s+"/,' “') # open "