Method: TexlabFile#plain_table
- Defined in:
- lib/texlab/texlabfile.rb
#plain_table(entries, caption, opts = {}) ⇒ Object
123 124 125 126 127 128 129 130 131 132 |
# File 'lib/texlab/texlabfile.rb', line 123 def plain_table entries, caption, opts={} # capture output of table() temp_erbout = @_erbout; @_erbout = "" table(entries, caption, opts) src = @_erbout; @_erbout = temp_erbout src.sub!(/\A.*?\\begin{center}(.*)\\end{center}.*\z/m, '\1') or raise "internal error" src.sub!(/\\caption{#{caption}}/, "") or raise "internal error" end |