LaTeXML

 view release on metacpan or  search on metacpan

lib/LaTeXML/Package/llncs.cls.ltxml  view on Meta::CPAN

    my $counter = $otherthmset || $thmset;
    my $swap    = LookupValue('thm@swap');
    my $style   = ToString(LookupValue('\thm@style'));

    if (!$otherthmset) {
      NewCounter($counter, $reset,
        idprefix => "Thm$counter");
      DefMacroI(T_CS("\\the$counter"), undef,
        "\\csname the$reset\\endcsname\\\@thmcountersep\\arabic{$counter}",
        scope => 'global')
        if $reset; }

# Swap causes you to get the odd (to me) order "4.1 Lemma", which breaks our new localization methods!!!
    DefEnvironmentI($thmset, "OptionalUndigested",
      "<ltx:theorem xml:id='#id' class='#class'>"
        . "#tags"
        . "<ltx:title font='#titlefont' _force_font='true'>#title</ltx:title>"
        . "#body",
      afterConstruct => sub { $_[0]->maybeCloseElement('ltx:theorem'); },
      beforeDigest   => sub {
        my $stylecmd = T_CS('\th@' . $style);
        if (!LookupDefinition($stylecmd)) {
          Warn('unexpected', $style, $_[0], "Unknown theoremstyle '$style'");
          $stylecmd = T_CS('\th@plain'); }
        Digest(Tokens($stylecmd)); },
      afterDigestBegin => sub { Digest($bodyfont); },
      properties       => sub {
        my %ctr   = ($counter ? ($flag ? RefStepID($counter) : RefStepCounter($counter)) : ());
        my $title = Digest(Tokens(T_BEGIN, $capfont->unlist,
            T_CS('\lx@tag'), T_BEGIN,
            ($swap
              ? (($flag ? () : (T_CS('\the' . $counter))),
                (!$flag && $type ? (T_SPACE)       : ()),
                ($type           ? ($type->unlist) : ()))
              : (($type ? ($type->unlist) : ()),
                (!$flag && $type ? (T_SPACE) : ()),
                ($flag           ? ()        : (T_CS('\the' . $counter))))),
            T_END,
            ($type && $_[1] ? (T_SPACE, T_OTHER('(')) : ()),
            ($_[1]          ? $_[1]->unlist           : ()),
            ($type && $_[1] ? (T_OTHER(')'))          : ()),
            T_CS('\the'), T_CS('\thm@headpunct'),
            T_END));
        (%ctr,
          title     => $title,
          titlefont => $title->getFont,
          class     => 'ltx_theorem_' . CleanClassName($thmset)); },
      scope => 'global');
});

RawTeX(<<'EOTeX');
\def\theoremname{Theorem}
\spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape}
\def\claimname{Claim}
\spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily}
\def\proofname{Proof}
\spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily}
\spnewtheorem{case}{Case}{\itshape}{\rmfamily}
\def\conjecturename{Conjecture}
\spnewtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily}
\def\corollaryname{Corollary}
\spnewtheorem{corollary}{Corollary}{\bfseries}{\itshape}
\def\definitionname{Definition}
\spnewtheorem{definition}{Definition}{\bfseries}{\rmfamily}
\def\examplename{Example}
\spnewtheorem{example}{Example}{\itshape}{\rmfamily}
\def\exercisename{Exercise}
\spnewtheorem{exercise}{Exercise}{\bfseries}{\rmfamily}
\def\lemmaname{Lemma}
\spnewtheorem{lemma}{Lemma}{\bfseries}{\itshape}
\def\notename{Note}
\spnewtheorem{note}{Note}{\itshape}{\rmfamily}
\def\problemname{Problem}
\spnewtheorem{problem}{Problem}{\bfseries}{\rmfamily}
\def\propertyname{Property}
\spnewtheorem{property}{Property}{\itshape}{\rmfamily}
\def\propositionname{Proposition}
\spnewtheorem{proposition}{Proposition}{\bfseries}{\itshape}
\def\questionname{Question};
\spnewtheorem{question}{Question}{\itshape}{\rmfamily}
\def\solutionname{Solution}
\spnewtheorem{solution}{Solution}{\bfseries}{\rmfamily}
\def\remarkname{Remark}
\spnewtheorem{remark}{Remark}{\itshape}{\rmfamily}
EOTeX

#======================================================================
DefPrimitiveI('\bbbc',   undef, "\x{2102}");    #not sure if ok for the ones NOT of type I$
DefPrimitiveI('\bbbf',   undef, "\x{1D53D}");
DefPrimitiveI('\bbbh',   undef, "\x{210D}");
DefPrimitiveI('\bbbk',   undef, "\x{1D542}");
DefPrimitiveI('\bbbm',   undef, "\x{1D544}");
DefPrimitiveI('\bbbn',   undef, "\x{2115}");
DefPrimitiveI('\bbbone', undef, "\x{1D7D9}");
DefPrimitiveI('\bbbp',   undef, "\x{2119}");
DefPrimitiveI('\bbbq',   undef, "\x{211A}");
DefPrimitiveI('\bbbr',   undef, "\x{211D}");
DefPrimitiveI('\bbbs',   undef, "\x{1D54A}");
DefPrimitiveI('\bbbt',   undef, "\x{1D54B}");
DefPrimitiveI('\bbbz',   undef, "\x{2124}");

DefMath('\getsto', "\x{21C6}", role => 'ARROW');
DefMath('\lid',    "\x{2266}", role => 'RELOP', meaning => 'less-than-or-equals');
DefMath('\gid',    "\x{2267}", role => 'RELOP', meaning => 'greater-than-or-equals');
DefMath('\grole',  "\x{2277}", role => 'RELOP', meaning => 'greater-than-or-less-than');

DefConstructor('\squareforqed',
  "?#isMath(<ltx:XMTok role='PUNCT'>\x{220E}</ltx:XMTok>)(\x{220E})");
DefMacro('\qed', '\squareforqed');

#======================================================================
DefMacro('\backmatter', Tokens());

#======================================================================
DefMacro('\andname',         'and');
DefMacro('\chaptername',     'Chapter');
DefMacro('\contriblistname', 'List of Contributors');
DefMacro('\lastandname',     ', and');
DefMacro('\noteaddname',     'Note added in proof');
DefMacro('\seename',         'see');
DefMacro('\subclassname',    '\textit{Subject Classification}:');



( run in 0.983 second using v1.01-cache-2.11-cpan-f56aa216473 )