aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-06 14:48:12 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-06 14:48:12 -0400
commit69cb98f9bae6701e398b2479c298808af6a61159 (patch)
treea2774cf6cb195cb20dbd9e941d69a934a469a821 /lib
parentodf, monospace font (codeblock & monospace tag) (diff)
texpdf, monospace font (codeblock & monospace tag)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/texpdf.rb6
-rw-r--r--lib/sisu/v2/texpdf_format.rb1
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb
index b9d9e2c0..8d3b338a 100644
--- a/lib/sisu/v2/texpdf.rb
+++ b/lib/sisu/v2/texpdf.rb
@@ -443,10 +443,10 @@ module SiSU_TeX
dob.tmp = ocn \
+ @tex_ml.paraskip_small \
+ "\n" \
- + ' \\begin{scriptsize}' \
+ + ' \\begin{Codeblock}' \
+ "\n" \
+ dob.tmp \
- + '\\end{scriptsize}' \
+ + ' \\end{Codeblock}' \
+ "\n" \
+ @tex_ml.paraskip_normal
dob
@@ -566,6 +566,8 @@ module SiSU_TeX
\\makeatother
\\chardef\\txtbullet="2022
\\chardef\\tilde="7E
+\\definecolor{Light}{gray}{.92}
+\\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\tiny\\ttfamily\\texbackslash#1}
% \\sloppy
\\begin{document}
WOK
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 52c630cf..c269af87 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -1063,6 +1063,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 } ')
unless is=='code'
str.gsub!(/"(.+?)"/,'“\1”') # quote marks / quotations open & close " need condition exclude for code
str.gsub!(/\s+"/,' “') # open "