[tex4ht-commits] [SCM] tex4ht updated: r676 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Mon Mar 9 16:00:44 CET 2020


Author: michal_h21
Date: 2020-03-09 17:00:44 +0200 (Mon, 09 Mar 2020)
New Revision: 676

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-jats.tex
   trunk/lit/tex4ht-options.tex
Log:
JATS work in progress

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2020-03-04 12:06:53 UTC (rev 675)
+++ trunk/lit/ChangeLog	2020-03-09 15:00:44 UTC (rev 676)
@@ -1,3 +1,8 @@
+2020-03-09 Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-jats.tex (jats.4ht),
+	tex4ht-options.tex (tex4ht.4ht): still work in progress on JATS.
+
 2020-03-04 Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4-math.4ht),

Modified: trunk/lit/tex4ht-jats.tex
===================================================================
--- trunk/lit/tex4ht-jats.tex	2020-03-04 12:06:53 UTC (rev 675)
+++ trunk/lit/tex4ht-jats.tex	2020-03-09 15:00:44 UTC (rev 676)
@@ -31,9 +31,19 @@
 >>>
 
   
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\chapter{Basic information}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+JATS support in TeX4ht is based on HTML and MathML configurations. 
+Unsupported elements will be converted using make4ht DOM filters. 
+Filters will be used also for the document structure, as JATS wants some
+elements in the back (bibliography, etc.)
 
+Only basic structures will be configured by hand in this configuration 
+file.
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Start Here}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -42,17 +52,49 @@
 \<configure jats tex4ht\><<<
 \special{t4ht.xml}
 \Configure{VERSION}{\HCode{<?xml version="1.0" encoding="UTF-8"?>\Hnewline}}
-\Configure{DOCTYPE}{\HCode{<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1d1 20130915//EN" "JATS-journalpublishing1.dtd">\Hnewline}}
-\Configure{HTML}{\HCode{<article  \html:xmlns>\Hnewline}}{\HCode{\Hnewline</article>}}
+
+% select JATS version
+\NewConfigure{DtdVersion}{1}
+\Configure{DtdVersion}{1.2}
+
+\Configure{DOCTYPE}{\HCode{<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v\a:DtdVersion\space 20130915//EN" "http://jats.nlm.nih.gov/archiving/\a:DtdVersion/JATS-archivearticle1-mathml3.dtd">\Hnewline}}
+
+% XML configuratins
+\edef\html:xmlns{}
+\NewConfigure{xmlns}[2]{\concat:config\html:xmlns{xmlns:#1="#2"\Hnewline}}
+\Configure{xmlns}{xlink}{http://www.w3.org/1999/xlink}
+\Configure{xmlns}{mml}{http://www.w3.org/1998/Math/MathML}
+
+\Configure{HTML}{\HCode{<article dtd-version="\a:DtdVersion" \html:xmlns>\Hnewline}}{\HCode{\Hnewline</article>}}
 \Configure{@HEAD}{}
-\Configure{@/HTML}{}
-\edef\html:xmlns{}
-\NewConfigure{xmlns}[2]{\edef\html:xmlns{\html:xmlns xmlns:#1="#2"\Hnewline}}
 \Configure{HEAD}{\HCode{<front>}}{\HCode{</front>}}
+% Add header structure
+% Journal info in <journal-meta>. It needs to be provided fully from the user configuration
+\NewConfigure{JournalMeta}{1}
+% basic article meta can be reconstructed from \title and \author
+% 
+% Title needs to be placed at the correct place by DOM filter
+\Configure{TITLE}{\HCode{<article-title>}}{\HCode{</article-title>}}
+\NewConfigure{ArticleMeta}{1}
+  \Configure{ArticleMeta}{
+  \HCode{<article-meta>}%
+    % title from \title command is placed by make4ht DOM filter. If you want more complex title, 
+    % use \Configure{TitleGroup}
+    \a:TitleGroup%
+    \JATS:Contributors%
+  \HCode{</article-meta>}%
+}
+% enable to configure contributors
+\def\JATS:Contributors{}
+\NewConfigure{Contributor}[1]{\concat:config\JATS:Contributors{#1}}
+\NewConfigure{TitleGroup}
 
-\:CheckOption{mathml}\if:Option
-\Configure{xmlns}{mml}{http://www.w3.org/1998/Math/MathML}
-\fi
+% insert metas into document header
+\Configure{@HEAD}{\a:JournalMeta}
+\Configure{@HEAD}{\a:ArticleMeta}
+
+
+
 >>>
 
 

Modified: trunk/lit/tex4ht-options.tex
===================================================================
--- trunk/lit/tex4ht-options.tex	2020-03-04 12:06:53 UTC (rev 675)
+++ trunk/lit/tex4ht-options.tex	2020-03-09 15:00:44 UTC (rev 676)
@@ -330,9 +330,10 @@
 \<jats settings\><<<
 \Configure{jats}{%
    \Hinclude[*]{html4.4ht}% we will build upon HTML
+   \Hinclude[*]{mathml.4ht}%
+   \Hinclude[*]{html-mml.4ht}%
+   \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{jats.4ht}%
-   \Hinclude[*]{unicode.4ht}%
-   \Hinclude[*]{mathml.4ht}%
 }
 >>>
 



More information about the tex4ht-commits mailing list.