aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/texinfo_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/texinfo_format.rb')
-rw-r--r--lib/sisu/v0/texinfo_format.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/sisu/v0/texinfo_format.rb b/lib/sisu/v0/texinfo_format.rb
index fbf8dd9a..6564460a 100644
--- a/lib/sisu/v0/texinfo_format.rb
+++ b/lib/sisu/v0/texinfo_format.rb
@@ -374,7 +374,7 @@ WOK
def longtable
@end_table="\\end{longtable}"
@row_break='\\\\\\'
- if @para[/<!Th?¡\s+c(\d+);(.+?)!>/i]
+ if @para[/<!Th?¡\s+c(\d+);(.+?)!>/ui]
no_of_cols,cols_width=$1,$2
@@tableheader=1 if @para =~ /<!Th/i
@w=cols_width.split(/;\s+/)
@@ -389,17 +389,17 @@ WOK
@colW=@colW.join
@@start_table="\\setlength{\\LTleft}{0pt}\n\\setlength{\\LTright}{\\fill}\n" +
"\\begin{longtable}[hb]#@colW\n"
- @para.gsub!(/<!Th?¡\s+c\d+?;.+!>/,"#{@@start_table}")
+ @para.gsub!(/<!Th?¡\s+c\d+?;.+!>/u,"#{@@start_table}")
end
if @para =~/<!TZ!>/
@para.gsub!(/<!TZ!>/," #@end_table")
end
- @para.gsub!(/<!¡/,'')
+ @para.gsub!(/<!¡/u,'')
if @@tableheader==1
- if @para =~/¡\d+?¡(.+?)(?:¡|!)/
+ if @para =~/¡\d+?¡(.+?)(?:¡|!)/u
tablefoot=para[/\<!f(.+?)!\>/,1]
@para.gsub!(/\<!f(.+?)!\>/,'')
- @para.gsub!(/¡\d+?¡(.+?)(?:¡|!)/,
+ @para.gsub!(/¡\d+?¡(.+?)(?:¡|!)/u,
"{\\begin{tiny} {\\bfseries \\1}\\end{tiny}}&")
@para.gsub!(/&>\s*$/,
" #@row_break \\hline\\endhead #@row_break")
@@ -408,8 +408,8 @@ WOK
@@number_of_cols=0
end
else
- if @para =~/¡\d+?¡(.+?)(?:¡|!)/
- @para.gsub!(/¡\d+?¡(.+?)(?:¡|!)/,"\\begin{tiny}\\1\\end{tiny}&")
+ if @para =~/¡\d+?¡(.+?)(?:¡|!)/u
+ @para.gsub!(/¡\d+?¡(.+?)(?:¡|!)/u,"\\begin{tiny}\\1\\end{tiny}&")
@para.gsub!(/&>\s*$/," #@row_break")
end
end
@@ -422,7 +422,7 @@ WOK
@end_table="\\end{tabular}"
@row_break='\\\\\\\\'
@break_page="#@row_break\n#@row_break \n"
- if @para[/<!Th?¡\s+c(\d+);(.+?)!>/i]
+ if @para[/<!Th?¡\s+c(\d+);(.+?)!>/ui]
no_of_cols,cols_width=$1,$2
@w=cols_width.split(/;\s+/)
@colW=[]
@@ -431,13 +431,13 @@ WOK
@colW << "p{#{col_w}cm}" if col_w
end
@@start_table="\\begin{tabular}{#@colW}\n"
- @para.gsub!(/<!Th?¡\s+c\d+?;.+!>/,"#{@@start_table}")
+ @para.gsub!(/<!Th?¡\s+c\d+?;.+!>/u,"#{@@start_table}")
end
if @para =~/<!TZ!>/
@para.gsub!(/<!TZ!>/,"#@end_table")
@@table_pg_break_counter=1
end
- if @para =~/<!¡/
+ if @para =~/<!¡/u
if @@table_pg_break_counter==28 # taken from 34 ideal for portrait to 28 which suits landscape
@para =
"\n\n#@end_table \n" +
@@ -445,14 +445,14 @@ WOK
"#{@@start_table}\n"
@@table_pg_break_counter=1
else
- @para.gsub!(/<!¡/,'')
+ @para.gsub!(/<!¡/u,'')
@@table_pg_break_counter+=1
tablefoot=@para[/\<!f(.+?)!\>/]
@para.gsub!(/\<!f(.+?)!\>/,'')
end
end
- if @para =~/¡\d+?¡(.+?)(?:¡|!)/
- @para.gsub!(/¡\d+?¡(.+?)(?:¡|!)/,"\\begin{tiny}\\1\\end{tiny}&")
+ if @para =~/¡\d+?¡(.+?)(?:¡|!)/u
+ @para.gsub!(/¡\d+?¡(.+?)(?:¡|!)/u,"\\begin{tiny}\\1\\end{tiny}&")
@para.gsub!(/&>\s*$/,"#@row_break")
end
@para