diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-29 21:14:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-29 21:14:41 +0000 |
commit | 1a406510f87b0b8dbefcf3b9f4400d18e6b52838 (patch) | |
tree | 3048c4a5543eeb247a801357c3d2de2b5a2ae8f0 | |
parent | c7f80e99096455382d60bcbaef6f27db29634520 (diff) |
list envs in jats, tex4ht r1162
git-svn-id: svn://tug.org/texlive/trunk@63762 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/ChangeLog | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-jats.tex | 60 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/jats.4ht | 244 |
3 files changed, 306 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 8960d204526..8e07dd1e807 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,7 @@ +2022-06-29 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-jats.4ht (jats.4ht): added support for list environments. + 2022-06-27 Michal Hoftich <michal.h21@gmail.com> * tex4ht-4ht.tex (nameref.4ht): disable \index and \label inside diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-jats.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-jats.tex index 6c696ff12cc..e969844c70b 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-jats.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-jats.tex @@ -43,6 +43,15 @@ elements in the back (bibliography, etc.) Only basic structures will be configured by hand in this configuration file. +We support the Journal Archiving and Interchange Tag Library NISO JATS +Version 1.3. Documentation for tags is available at: + +\Link{https://jats.nlm.nih.gov/archiving/tag-library/1.3/chapter/getting-started.html}{} +https://jats.nlm.nih.gov/archiving/tag-library/1.3/chapter/getting-started.html +\EndLink + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Package configurations} @@ -166,6 +175,7 @@ Configurations that are shared only for article and report |<latex tables|> |<latex footnotes|> |<latex quotes|> +|<latex lists|> >>> \section{Configurations for Memoir} @@ -184,6 +194,7 @@ Configurations that are shared only for article and report |<latex tables|> |<latex footnotes|> |<latex quotes|> +|<latex lists|> >>> \<shared article,report\><<< @@ -742,6 +753,55 @@ This macro is used to print zeropaded days and months in the ISO date attribute {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} >>> +%%%%%%%%%%%%%%%%%%%% +\section{Lists} +%%%%%%%%%%%%%%%%%%%% + +List utilities, copied from the HTML configuration. We need to +keep track of the + +\<save end:itm\><<< +\PushMacro\end:itm +>>> + + +\<recall end:itm\><<< +\PopMacro\end:itm \global\let\end:itm \end:itm +>>> + +\<list par\><<< +\par\ShowPar +>>> + +JATS list have a similar structure, so we can use a custom macro that +takes just the environment name and list-type attribute: + +\<latex lists\><<< +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + |<save end:itm|>\global\let\end:itm=\empty} + {|<recall end:itm|>\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}|<list par|>} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +>>> + +Description lists have a little bit different structure, so we need to configure +them separatelly. + +\<latex lists\><<< +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + |<save end:itm|>\global\let\end:itm=\empty} + {|<recall end:itm|>\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn|<list par|>} +>>> + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Packages} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/generic/tex4ht/jats.4ht b/Master/texmf-dist/tex/generic/tex4ht/jats.4ht index a92769c3a3a..a8cb8751da6 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/jats.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/jats.4ht @@ -1,4 +1,4 @@ -% jats.4ht (2022-06-24-15:06), generated from tex4ht-jats.tex +% jats.4ht (2022-06-29-13:40), generated from tex4ht-jats.tex % Copyright 2022 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,7 +16,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2022-06-24-15:06} +\immediate\write-1{version 2022-06-29-13:40} \exit:ifnot{amsart,% amsbook,% @@ -433,6 +433,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \Configure{chapter} @@ -632,6 +656,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \ConfigureEnv{abstract} @@ -840,6 +888,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \ConfigureEnv{abstract} @@ -1015,6 +1087,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + @@ -1168,6 +1264,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \Configure{chapter} {\ifvmode\IgnorePar\fi\EndP\IgnorePar\HCode{<sec>\Hnewline}} @@ -1340,6 +1460,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \Configure{chapter} {\ifvmode\IgnorePar\fi\EndP\IgnorePar\HCode{<sec>\Hnewline}} @@ -1663,6 +1807,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \ConfigureEnv{abstract} {\ifvmode\IgnorePar\fi\EndP\HCode{<abstract>\Hnewline}} @@ -1935,6 +2103,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \Configure{chapter} @@ -2134,6 +2326,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \ConfigureEnv{abstract} @@ -2314,6 +2530,30 @@ url} \HCode{<disp-quote>}} {\IgnorePar\EndP\HCode{</disp-quote>}\ShowPar\ShowIndent} +\def\ConfigJatsList#1#2{% +\ConfigureList{#1}% + {\ifvmode\IgnorePar\fi\EndP\EndP\HCode{<list list-type="#2">}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</list-item></list>}} + {\end:itm\global\def\end:itm{\EndP\Tg</list-item>}\DeleteMark} + {\HCode{<list-item>}\par\ShowPar +} + } + +\ConfigJatsList{itemize}{bulleted} +\ConfigJatsList{enumerate}{order} +\ConfigureList{description}% + {\ifvmode\IgnorePar\fi\EndP\HCode{<def-list>}% + \PushMacro\end:itm +\global\let\end:itm=\empty} + {\PopMacro\end:itm \global\let\end:itm \end:itm +\EndP\HCode{</def></def-item></def-list>}\ShowPar} + {\end:itm \global\def\end:itm{\EndP\HCode{</def></def-item>}}\HCode{<def-item><term>}\NoFonts\HtmlParOff} + {\EndNoFonts\HCode{</term><def>}\HtmlParOn\par\ShowPar +} + \ConfigureEnv{abstract} |