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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Nov 20 11:08:03 CET 2023


Author: michal_h21
Date: 2023-11-20 10:08:03 +0000 (Mon, 20 Nov 2023)
New Revision: 1412

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
Log:
Added CSL support

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-11-19 20:52:11 UTC (rev 1411)
+++ trunk/lit/ChangeLog	2023-11-20 10:08:03 UTC (rev 1412)
@@ -1,3 +1,9 @@
+2023-11-20  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (citation-style-language.4ht): added Citation Style
+	Language support.
+	https://github.com/zepinglee/citeproc-lua/issues/40
+
 2023-11-19  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-fonts-newtx.tex (

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2023-11-19 20:52:11 UTC (rev 1411)
+++ trunk/lit/mktex4ht-cnf.tex	2023-11-20 10:08:03 UTC (rev 1412)
@@ -149,6 +149,7 @@
 \AddFile{9}{jurabib}
 \AddFile{9}{scrjura}
 \AddFile{7}{natbib}
+\AddFile{5}{citation-style-language}
 \AddFile{5}{babel}
 \AddFile{9}{babel-sty-hooks}
 \AddFile{7}{csquotes}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2023-11-19 20:52:11 UTC (rev 1411)
+++ trunk/lit/tex4ht-4ht.tex	2023-11-20 10:08:03 UTC (rev 1412)
@@ -24407,6 +24407,45 @@
 >>>
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\Section{citation-style-language}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+CSL support using LuaTeX
+
+\<citation-style-language.4ht\><<<
+% citation-style-language.4ht (|version), generated from |jobname.tex
+% Copyright 2023 TeX Users Group
+|<TeX4ht license text|>
+|<csl cite|>
+|<csl bibitem|>
+\Hinput{citation-style-language}
+\endinput
+>>>  \AddFile{5}{citation-style-language}
+
+
+\<csl cite\><<<
+\ExplSyntaxOn
+% add links to bibliography around citations
+\cs_set:Npn \__csl_print_citation:N #1
+{
+  \bool_if:NT \l__csl_regression_test_bool
+  { \tl_show:N #1 }
+  \bool_if:NTF \l__csl_note_bool
+  { \footnote {\a:cite\cIteLink{X\l__csl_cite_keys_tl}{bk-\l__csl_citation_id_tl}#1\EndcIteLink\b:cite} }
+  {\a:cite\cIteLink{X\l__csl_cite_keys_tl}{bk-\l__csl_citation_id_tl}#1\EndcIteLink\b:cite}
+}
+\ExplSyntaxOff
+>>>
+
+\<csl bibitem\><<<
+% fix problems with \bibitem in the bibliography
+\def\setb:anc#1{\def\bib:anc{\def\bib:anc{#1}\ifx \bib:anc\empty \else%
+  \a:bibitem{}{\a:bibanchor#1}\b:bibitem\fi \gdef\bib:anc{}}%
+  \def\AnchorLabel{\bib:anc}%
+}
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \Chapter{Languages}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 



More information about the tex4ht-commits mailing list.