LaTeXML

 view release on metacpan or  search on metacpan

lib/LaTeXML/Package/aa_support.sty.ltxml  view on Meta::CPAN

         .'\textit{Results. }#4\par'
         .'\ifx.#5.\else\textit{Conclusions. }#5\fi'
         .'}');

DefMacro('\abstract{}', sub {
    my ($gullet, $arg1) = @_;
    $gullet->skipSpaces;    # I think?
    ((T_CS($gullet->ifNext(T_BEGIN)
          ? '\abstract@new' : '\abstract@old')),
      T_BEGIN, $arg1->unlist, T_END); });
# Keywords
DefMacroI('\keywordname', undef, '\sffamily\bfseries Key Words.');
DefMacro('\keywords{}', '\@add@frontmatter{ltx:keywords}[name={\keywordname}]{#1}');

# Formatting the header and running title
DefRegister('\titlerunning',  Tokens());    # Ignorable
DefRegister('\authorrunning', Tokens());
#DefRegister('\authrun'=>Box());
#DefRegister('\titrun'=>Box());
DefMacro('\authrun', '');
DefMacro('\titrun',  '');

# undocumented ?
DefMacro('\offprints{}', '\@add@frontmatter{ltx:note}[role=offprints]{#1}');
DefConstructor('\@@@email{}', "^ <ltx:contact role='email'>#1</ltx:contact>");
DefMacro('\email Semiverbatim', '\@add@to@frontmatter{ltx:creator}{\@@@email{#1}}');

DefMacro('\journalname{}', '');
DefMacro('\rnotename',     '(Research Note)');
DefMacro('\rnotname',      '(RN)');

# should add a note?
DefMacro('\headnote{}',   '\@add@frontmatter{ltx:note}{#1}');
DefMacro('\dedication{}', '\@add@frontmatter{ltx:note}[role=dedicatory]{#1}');
DefConstructor('\@@@mail{}', "^ <ltx:contact role='email'>#1</ltx:contact>");
DefMacro('\mail Semiverbatim', '\@add@to@frontmatter{ltx:creator}{\@@@mail{#1}}');
DefMacro('\mailname',          '\it Correspondence to \/');
DefMacro('\doi{}',             '\@add@frontmatter{ltx:classification}[scheme=doi]{#1}');

DefMacro('\idline{}{}',    '');                             # ?
DefMacro('\msnr{}',        '');                             # ??
DefMacro('\institutename', '');                             # ?
DefMacro('\hugehead',      '');
DefMacro('\AALogo',        'Astronomy and Astrophysics');

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# The main text

DefConstructor('\acknowledgements', "<ltx:acknowledgements name='#name'>",
  properties => sub { (name => Digest(T_CS('\acknowledgmentsname'))); });
DefConstructor('\endacknowledgements', "</ltx:acknowledgements>");
DefConstructor('\acknowledgement', "<ltx:acknowledgements name='#name'>",
  properties => sub { (name => Digest(T_CS('\acknowledgmentsname'))); });
DefConstructor('\endacknowledgement', "</ltx:acknowledgements>");
Tag("ltx:acknowledgements", autoClose => 1);
DefMacro('\acknowledgmentsname', 'Acknowledgements');
DefMacro('\ackname',             'Acknowledgements');

RawTeX(<<'EoTeX');
\newtheorem*{proof}{Proof}{\it}{\rm}
\newtheorem{corollary}[theorem]{Corollary}{\bf}{\it}
\newtheorem{definition}[theorem]{Definition}{\bf}{\rm}
\newtheorem{example}[theorem]{Example}{\it}{\rm}
\newtheorem{exercise}[theorem]{Exercise}{\it}{\rm}
\newtheorem{lemma}[theorem]{Lemma}{\bf}{\it}
\newtheorem{note}[theorem]{Note}{\it}{\rm}
\newtheorem{problem}[theorem]{Problem}{\it}{\rm}
\newtheorem{proposition}[theorem]{Proposition}{\bf}{\it}
\newtheorem{question}[theorem]{Question}{\it}{\rm}
\newtheorem{remark}[theorem]{Remark}{\it}{\rm}
\newtheorem{solution}[theorem]{Solution}{\it}{\rm}
EoTeX

DefMacro('\noteaddname', 'Note added in proof');
DefEnvironment('{noteadd}', "<ltx:note>#body</ltx:note>");

# Undocumented, but something like:
DefMacro('\thesaurus{}', '');

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Redefine equations (bizarrely) to allow $ within
DefEnvironment('{equation}',
  "<ltx:equation xml:id='#id'>"
    . "#tags"
    . "<ltx:Math mode='display'>"
    . "<ltx:XMath>"
    . "#body"
    . "</ltx:XMath>"
    . "</ltx:Math>"
    . "</ltx:equation>",
  mode         => 'display_math',
  beforeDigest => sub {
    prepareEquationCounter(numbered => 1, preset => 1);
    beforeEquation();
    Let(T_MATH, T_CS('\@dollar@in@mathmode')); },
  afterDigestBody => sub {
    afterEquation($_[1]); },
  locked => 1);

# Note: In ams, this DOES get a number if \tag is used!
DefEnvironment('{equation*}',
  "<ltx:equation xml:id='#id'>"
    . "#tags"
    . "<ltx:Math mode='display'>"
    . "<ltx:XMath>"
    . "#body"
    . "</ltx:XMath>"
    . "</ltx:Math>"
    . "</ltx:equation>",
  mode         => 'display_math',
  beforeDigest => sub {
    prepareEquationCounter(numbered => undef, preset => 1);
    beforeEquation();
    Let(T_MATH, T_CS('\@dollar@in@mathmode')); },
  afterDigestBody => sub {
    afterEquation($_[1]); },
  locked => 1);

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Figures
# the usual...



( run in 2.138 seconds using v1.01-cache-2.11-cpan-f56aa216473 )