NAME

oEdtk::TexTag - a single LaTeX tag

SYNOPSIS

use oEdtk::TexTag;

my $tag = oEdtk::TexTag->new('NOM', 'value');
print $tag->emit;   # \long\gdef\NOM{value}

DESCRIPTION

A small object describing one LaTeX tag: a name and a value. The value may be a scalar, an array reference (emitted as a list macro), a hash reference (emitted as nested tags), or an oEdtk::TexDoc object.

METHODS

new

my $tag = oEdtk::TexTag->new($name, $val);

Build a tag of name $name and value $val. A value that is not a scalar, an array, a hash or an oEdtk::TexDoc is an error; a name containing digits raises a one-time warning.

emit

my $latex = $tag->emit;

Return the LaTeX rendering: an \input{} for an _include_ tag, a list macro for an array value, a \long\gdef\name{...} for a scalar or nested value, or a bare \name command when there is no value.

The escape_0 sub is a deprecated, not-clean duplicate of "escape" in oEdtk::TexDoc; it is kept for reference only and is not part of the public API.

AUTHOR

The oEdtk team.