diff options
author | Karl Berry <karl@freefriends.org> | 2025-01-18 21:53:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2025-01-18 21:53:31 +0000 |
commit | 5a3f615adeb0f068dcb2c9794d43657043b97cdf (patch) | |
tree | 064d344d6d72fbbd1336e30f025045eb02bde22a /Master | |
parent | 2b2138b183c4044727339ce35778fddde495cf67 (diff) |
chemfig diagram fixes, tex4ht r1628
git-svn-id: svn://tug.org/texlive/trunk@73509 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/ChangeLog | 5 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 18 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht | 13 |
3 files changed, 31 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 5a86a98de38..267be33441b 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,8 @@ +2025-01-18 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (chemfig.4ht): fixed support for Chemfig diagrams. + https://github.com/michal-h21/tex4ebook/issues/137 + 2025-01-10 Michal Hoftich <michal.h21@gmail.com> * tex4ht-4ht.tex (latex.4ht): use \protected@edef in definition of diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index 469cad0f417..9444558ddda 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1627 2025-01-10 09:41:53Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1628 2025-01-18 17:47:47Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2025 TeX Users Group @@ -32078,9 +32078,10 @@ it come out as a complete mess. \<chemfig.4ht\><<< % chemfig.4ht (|version), generated from |jobname.tex -% Copyright 2024 TeX Users Group +% Copyright 2024-2025 TeX Users Group |<TeX4ht license text|> |<chemfig redefinitions|> +|<chemfig pictures|> \Hinput{chemfig} \endinput @@ -32114,6 +32115,19 @@ for output formats. \ExplSyntaxOff >>> +Chemfig uses TikZ for drawing chemical diagrams. It works more or less fine, but +sometimes the pictures are clipped, or fail to convert with Dvisvgm. We can try to +enclose the whole Chemfig content in pictures, to see if it helps. + +\<chemfig pictures\><<< +\NewConfigure{chemfigscheme}{2} +\Configure{chemfigscheme}{\Picture+{}}{\EndPicture} +\ExplSyntaxOn +\pend:def\schemestart{\a:chemfigscheme} +\append:def\CF_schemestop{\b:chemfigscheme} +\ExplSyntaxOff +>>> + %%%%%%%%%%%%%%% \Section{Esvect} %%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht b/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht index b2943a9df9e..f6bacc8438d 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht @@ -1,5 +1,5 @@ -% chemfig.4ht (2024-02-14-09:16), generated from tex4ht-4ht.tex -% Copyright 2024 TeX Users Group +% chemfig.4ht (2025-01-18-13:42), generated from tex4ht-4ht.tex +% Copyright 2024-2025 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -16,7 +16,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2024-02-14-09:16} +\immediate\write-1{version 2025-01-18-13:42} \ExplSyntaxOn \NewConfigure{chemname}{3} @@ -40,6 +40,13 @@ \HLet\CF_chemnameb\:tempa \ExplSyntaxOff +\NewConfigure{chemfigscheme}{2} +\Configure{chemfigscheme}{\Picture+{}}{\EndPicture} +\ExplSyntaxOn +\pend:def\schemestart{\a:chemfigscheme} +\append:def\CF_schemestop{\b:chemfigscheme} +\ExplSyntaxOff + \Hinput{chemfig} \endinput |