[tex4ht-commits] [SCM] tex4ht updated: r1155 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Fri Jun 17 17:19:24 CEST 2022
Author: michal_h21
Date: 2022-06-17 15:19:24 +0000 (Fri, 17 Jun 2022)
New Revision: 1155
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-jats.tex
Log:
basic support for jats maketitle
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2022-06-16 12:36:52 UTC (rev 1154)
+++ trunk/lit/ChangeLog 2022-06-17 15:19:24 UTC (rev 1155)
@@ -1,3 +1,7 @@
+2022-06-17 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-jats.tex (jats.4ht): basic \maketitle support.
+
2022-06-16 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-jats.tex (jats.4ht): added support for the quote
Modified: trunk/lit/tex4ht-jats.tex
===================================================================
--- trunk/lit/tex4ht-jats.tex 2022-06-16 12:36:52 UTC (rev 1154)
+++ trunk/lit/tex4ht-jats.tex 2022-06-17 15:19:24 UTC (rev 1155)
@@ -157,6 +157,7 @@
>>>
\<ams art,proc,book\><<<
+|<latex maketitle|>
|<latex numbered sections|>
|<latex floats|>
|<abstract|>
@@ -175,6 +176,7 @@
\section{Shared class configurations}
\<shared latex classes\><<<
+|<latex maketitle|>
|<latex sections|>
|<latex floats|>
|<latex tables|>
@@ -460,6 +462,61 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Maketitle}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+JATS expects specific elements in the document metadata. We produce some custom
+elements, which are expected to be removed in the make4ht post-processing. Contents
+of maketitle should be moved to the metadata block and removed from the document
+body.
+
+\<latex maketitle\><<<
+\Configure{maketitle}
+ {\ifvmode \IgnorePar\fi \EndP |<title for TITLE|>%
+ \HCode{<maketitle>}}
+ {\ifvmode \IgnorePar\fi \EndP \HCode{</maketitle>}}
+ {\NoFonts\IgnorePar\HCode{<article-title>}\IgnorePar}
+ {\HCode{</article-title>}\IgnoreIndent\EndNoFonts}
+>>>
+
+This macro is used to print zeropaded days and months in the ISO date attribute
+
+\<latex maketitle\><<<
+\def\date:zeropad#1{\ifnum #1<10 0\fi#1}
+>>>
+
+
+\<latex maketitle\><<<
+\Configure{thanks author date and}
+ {\ifvmode \IgnorePar\fi\EndP \HCode{<aff>}}
+ {\ifvmode \IgnorePar\fi\EndP \HCode{</aff>}}
+ {\ifvmode \IgnorePar\fi\EndP \HCode{<contrib contrib-type="author"><name><string-name>}}
+ {\ifvmode \IgnorePar\fi\EndP \HCode{</string-name></name></contrib>}}
+ {\ifvmode \IgnorePar\fi\EndP \HCode{<date iso-8601-date="\the\year-\date:zeropad{\the\month}-\date:zeropad{\the\day}"><string-date>}}
+ {\ifvmode \IgnorePar\fi\EndP \HCode{</string-date></date>}}
+ {\HCode{</string-name></name></contrib><contrib contrib-type="author"><name><string-name>}}
+ {\HCode{}}
+
+\Configure{thank}
+{\HCode{<affref rid="\the\c at footnote">}}
+{\HCode{</affref>}}
+{\HCode{<aff id="\the\c at footnote"><affmark>}}
+{\HCode{</affmark>}} {\HCode{</aff>}}
+>>>
+
+\<title for TITLE\><<<
+{\Configure{maketitle}{}{}{}{}%
+% \let\thanks|=\:gobble
+\def\TeX{TeX}%
+\def\mbox{\hbox}%
+\def\gobble:font##1##2{##2}\:TITLE: \no:fonts
+\def\footnotemark[##1]{}%
+\def\:hashintitle{\protect\symbol{35}}
+\let\#\:hashintitle
+\NoFonts\Tag{TITLE+}{\@title}\EndNoFonts}
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Sections}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
More information about the tex4ht-commits
mailing list.