aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v4/texpdf_format.rb3
-rw-r--r--lib/sisu/v5/texpdf_format.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/sisu/v4/texpdf_format.rb b/lib/sisu/v4/texpdf_format.rb
index c154fc2b..b010bb08 100644
--- a/lib/sisu/v4/texpdf_format.rb
+++ b/lib/sisu/v4/texpdf_format.rb
@@ -116,7 +116,8 @@ module SiSU_TeX_Pdf
"\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{show_ocn}}\\end{tiny}}}" #ocn object citation numbering
end
def table_special_characters(r)
- r=r.gsub(/#{Mx[:tc_p]}|$/u,'&').
+ r=r.gsub(/#{Mx[:tc_p]}/mu,'&').
+ gsub(/#{Mx[:tc_c]}/m,'\\\\\\').
gsub(/%/,'\%').
gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\begin{bfseries}\1 \end{bfseries}').
gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\emph{\1}').
diff --git a/lib/sisu/v5/texpdf_format.rb b/lib/sisu/v5/texpdf_format.rb
index 9e71e128..172dfa56 100644
--- a/lib/sisu/v5/texpdf_format.rb
+++ b/lib/sisu/v5/texpdf_format.rb
@@ -116,7 +116,8 @@ module SiSU_TeX_Pdf
"\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{show_ocn}}\\end{tiny}}}" #ocn object citation numbering
end
def table_special_characters(r)
- r=r.gsub(/#{Mx[:tc_p]}|$/u,'&').
+ r=r.gsub(/#{Mx[:tc_p]}/mu,'&').
+ gsub(/#{Mx[:tc_c]}/m,'\\\\\\').
gsub(/%/,'\%').
gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\begin{bfseries}\1 \end{bfseries}').
gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\emph{\1}').