Module: LatexTools

Defined in:
lib/latex_table.rb

Overview

The LatexTools module wraps everything in this package. For convenience of use (i.e. unless you have a good reason not to do so), you should include the following line at the beginning of your source code:

include LatexTools

Not doing so will result in much more verbose and much harder to read code, which is not how this module was intended to be used. For instance, when the module is included properly, use of the LatexTable class becomes quite clean and “c++ like”:

:include: examples/table/example1.rb

(See the LatexTable class documentation for more.)

Defined Under Namespace

Classes: LatexTable

Instance Method Summary collapse

Instance Method Details

#cline(begincol, endcol) ⇒ Object



567
568
569
# File 'lib/latex_table.rb', line 567

def cline(begincol, endcol)
  return LatexTable::Cline.new(begincol, endcol)
end

#endlObject



563
564
565
# File 'lib/latex_table.rb', line 563

def endl
  :endl
end

#fill_to_end(alignment_or_content, content = nil) ⇒ Object



551
552
553
554
555
556
557
# File 'lib/latex_table.rb', line 551

def fill_to_end(alignment_or_content, content = nil)
  if(content.nil?)
    return LatexTable::MultiColumn.new(:fill, :c, alignment_or_content)
  else
    return LatexTable::MultiColumn.new(:fill, alignment_or_content, content)
  end
end

#hlineObject



559
560
561
# File 'lib/latex_table.rb', line 559

def hline
  :hline
end

#multicolumn(ncol, alignment_or_content, content = nil) ⇒ Object Also known as: multicol



541
542
543
544
545
546
547
# File 'lib/latex_table.rb', line 541

def multicolumn(ncol, alignment_or_content, content = nil)
  if(content.nil?)
    return LatexTable::MultiColumn.new(ncol, :c, alignment_or_content)
  else
    return LatexTable::MultiColumn.new(ncol, alignment_or_content, content)
  end
end