Class: ConTeXtSetup::TeX
- Defined in:
- lib/tex/context/contextsetup.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
The command that all this is about (without any backslashes).
-
#separator ⇒ Object
If set, usually set to \ (backslash).
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(interface) ⇒ TeX
constructor
A new instance of TeX.
- #parse_xml(elt) ⇒ Object
- #to_html(detail = true, cls = 'first') ⇒ Object
Methods inherited from Param
#opt, #optional?, #sanitize_html, #show
Methods inherited from SetupXML
Constructor Details
#initialize(interface) ⇒ TeX
Returns a new instance of TeX.
448 449 450 451 452 |
# File 'lib/tex/context/contextsetup.rb', line 448 def initialize(interface) @interface=interface @separator=nil @command=nil end |
Instance Attribute Details
#command ⇒ Object
The command that all this is about (without any backslashes)
441 442 443 |
# File 'lib/tex/context/contextsetup.rb', line 441 def command @command end |
#separator ⇒ Object
If set, usually set to \ (backslash)
439 440 441 |
# File 'lib/tex/context/contextsetup.rb', line 439 def separator @separator end |
Instance Method Details
#==(other) ⇒ Object
460 461 462 |
# File 'lib/tex/context/contextsetup.rb', line 460 def ==(other) ConTeXtSetup::TeX===other && @separator==other.separator && @command == other.command end |
#parse_xml(elt) ⇒ Object
442 443 444 445 446 447 |
# File 'lib/tex/context/contextsetup.rb', line 442 def parse_xml(elt) if elt.attributes["separator"] @separator = "\\\\" end @command = elt.attributes["command"] end |
#to_html(detail = true, cls = 'first') ⇒ Object
453 454 455 456 457 458 459 |
# File 'lib/tex/context/contextsetup.rb', line 453 def to_html(detail=true,cls='first') if detail "" else "#{@separator}\\#{@command}" end end |