Class: TeXML::EnvNode

Inherits:
Node
  • Object
show all
Defined in:
lib/texml.rb

Instance Method Summary collapse

Methods inherited from Node

#childrenValue, create, #initialize

Constructor Details

This class inherits a constructor from TeXML::Node

Instance Method Details

#to_texObject



101
102
103
104
105
106
107
108
109
110
# File 'lib/texml.rb', line 101

def to_tex
  name = @node['name']
  start = @node['begin']
  start = 'begin' if start == ''
  stop = @node['end']
  stop = 'end' if stop == ''
  return "\\#{start}{#{name}}\n" +
	childrenValue('cmd', 'env', 'ctrl', 'spec', '#text') +
	"\\#{stop}{#{name}}\n"
end