summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-4ht.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex278
1 files changed, 262 insertions, 16 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 6993bc74f5..2bd694407c 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1532 2024-06-20 12:47:49Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1552 2024-09-09 14:48:03Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2024 TeX Users Group
@@ -4265,18 +4265,19 @@ icons to pictures by TeX4ht conversion.
\<fontawesome5.4ht\><<<
% fontawesome5.4ht (|version), generated from |jobname.tex
-% Copyright 2021 TeX Users Group
+% Copyright 2021-2024 TeX Users Group
|<TeX4ht license text|>
\NewConfigure{fontawesome}{2}
\ExplSyntaxOn
\cs_new_protected:Nn\temp:nn{%
+\def\:fontawesomeicon{#2}% to be used in the alt text
\a:fontawesome%
\o:fontawesome_use_icon:nn:{#1}{#2}
\b:fontawesome}
\HLet\fontawesome_use_icon:nn\temp:nn
\ExplSyntaxOff
-\Configure{fontawesome}{\Picture+{}}{\EndPicture}
+\Configure{fontawesome}{\Picture+[icon: \:fontawesomeicon]{}}{\EndPicture}
\Hinput{fontawesome5}
\endinput
>>> \AddFile{9}{fontawesome5}
@@ -5099,13 +5100,14 @@ as it leads to a fatal error.
\Configure{PackageHooks}{tagpdf.sty}{tagpdf-hooks.4ht}
>>>
+% This is no longer useful, it was fixed in tagpdf code
+% \cs_set_protected:Npn \__tag_whatsits: {}
+
\<tagpdf-hooks.4ht\><<<
% tagpdf-hooks.4ht (|version), generated from |jobname.tex
% Copyright 2022-2024 TeX Users Group
|<TeX4ht license text|>
\ExplSyntaxOn
-% ignore tagpdf's specials
-\cs_set_protected:Npn \__tag_whatsits: {}
\ExplSyntaxOff
\:AtEndOfPackage{%
\RenewDocumentCommand \tagpdfsetup { m }{}
@@ -5117,16 +5119,17 @@ as it leads to a fatal error.
\Configure{PackageHooks}{tagpdf-base.sty}{tagpdf-base-hooks.4ht}
>>>
-This file can be used explicitly, we need to provide the whatsits command
-here as well.
+This file can be used explicitly, we used to provide the whatsits command
+here as well, but it is no longer neeeded.
+
+% ignore tagpdf's specials
+% we use csname, because \ExplSyntaxOn .. Off caused catcode issues
+% \expandafter\def\csname __tag_whatsits:\endcsname{}
\<tagpdf-base-hooks.4ht\><<<
% tagpd-base-hooks.4ht (|version), generated from |jobname.tex
% Copyright 2024 TeX Users Group
|<TeX4ht license text|>
-% ignore tagpdf's specials
-% we use csname, because \ExplSyntaxOn .. Off caused catcode issues
-\expandafter\def\csname __tag_whatsits:\endcsname{}
\endinput
>>> \AddFile{9}{tagpdf-base-hooks}
@@ -11225,12 +11228,13 @@ compilation errors
\<arydshln.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arydshln.4ht (|version), generated from |jobname.tex
-% Copyright 2022 TeX Users Group
+% Copyright 2022-2024 TeX Users Group
|<TeX4ht license text|>
% this is a copy of code that arydshln inserts to \@array
\def\:new:array{\adl@everyvbox\everyvbox
\everyvbox{\adl@arrayinit \the\adl@everyvbox \everyvbox\adl@everyvbox}%
- \ifadl@inactive \adl@inactivate \else \adl@activate \fi
+ % this line may lead to errors if the document uses Colortbl:
+ % \ifadl@inactive \adl@inactivate \else \adl@activate \fi
\let\adl@noalign\noalign}
\ifcsname n:@array:\endcsname% if \@array was already patched by TeX4ht
\let\orig:n@array\n:@array:
@@ -22275,14 +22279,14 @@ $$
\<amsfonts sty\><<<<
\NewConfigure{mathbb}{2}
-\def\:temp#1{{\a:mathbb \o:@mathbb:{#1}\b:mathbb}}
-\HLet\@mathbb\:temp
+\def\:temp#1{{\a:mathbb \o:mathbb:{#1}\b:mathbb}}
+\HLet\mathbb\:temp
>>>
\<amsfonts sty\><<<<
\NewConfigure{mathfrak}{2}
-\def\:temp#1{{\a:mathfrak \o:@mathfrak:{#1}\b:mathfrak}}
-\HLet\@mathfrak\:temp
+\def\:temp#1{{\a:mathfrak \o:mathfrak:{#1}\b:mathfrak}}
+\HLet\mathfrak\:temp
>>>
Commands like \''\rm' need low level implemetation through
@@ -30143,6 +30147,173 @@ A style file for resumes.
>>>
%%%%%%%%%%%%%%%%%%%%%%%%%
+\Section{moderncv}
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\<moderncv.4ht\><<<
+% moderncv.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+|<moderncv configs|>
+\Hinput{moderncv}
+\endinput
+>>>\AddFile{9}{moderncv}
+
+This is a bit messy. We had to redefine a bunch of commands from various
+files that Moderncv uses, mostly to prevent compilation errors and to
+insert some basic formatting.
+
+\<moderncv configs\><<<
+\NewConfigure{section}{2}
+\RenewDocumentCommand\section{sm}{\a:section #2\b:section}
+
+\NewConfigure{subsection}{2}
+\RenewDocumentCommand\subsection{sm}{\a:subsection #2\b:subsection}
+
+
+\NewConfigure{cvitem}{3}
+\renewcommand*{\cvitem}[3][.25em]{
+\a:cvitem #2\b:cvitem #3\c:cvitem
+}
+
+\NewConfigure{cvdoubleitem}{2}
+\renewcommand*{\cvdoubleitem}[5][.25em]{%
+\a:cvdoubleitem
+\cvitem{#2}{#3}
+\cvitem{#4}{#5}
+\b:cvdoubleitem
+}
+
+\NewConfigure{cvlistitem}{2}
+\renewcommand*{\cvlistitem}[2][.25em]{%
+ \a:cvlistitem\cvitem[#1]{\listitemsymbol}{#2}\b:cvlistitem
+}
+
+\NewConfigure{cvlistdoubleitem}{2}
+\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
+ \a:cvlistdoubleitem%
+ \cvitem[#1]{\listitemsymbol}{#2}%
+ \cvitem[#1]{\listitemsymbol}{#3}%
+ \b:cvlistdoubleitem%
+}
+
+\NewConfigure{cvhead}{2}
+\NewConfigure{cvphoto}{2}
+
+
+\renewcommand*{\makecvhead}{%
+ \a:cvhead
+ % recompute lengths (in case we are switching from letter to resume, or vice versa)
+ \recomputecvlengths%
+ % optional detailed information (pre-rendering)
+ \@initializebox{\makecvheaddetailsbox}%
+ \if@details%
+ \def\phonesdetails{}%
+ \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
+ \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
+ \def\socialsdetails{}%
+ \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
+ \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
+ \savebox{\makecvheaddetailsbox}{%
+ \addressfont\color{color2}%
+ \if@left\begin{tabular}[b]{@{}r@{}}\fi%
+ \if@right\begin{tabular}[b]{@{}l@{}}\fi%
+ \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
+ \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
+ \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
+ \ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol\@born}%
+ \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
+ \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
+ \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
+ \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
+ \end{tabular}
+ }\fi%
+ % optional photo (pre-rendering)
+ \@initializebox{\makecvheadpicturebox}%
+ \savebox{\makecvheadpicturebox}{%
+ \ifthenelse{\isundefined{\@photo}}%
+ {}%
+ {%
+ \a:cvphoto\includegraphics[]{\@photo}\b:cvphoto}%
+ }%
+ % name and title (pre-rendering)
+ \@initializelength{\makecvheaddetailswidth}\settowidth{\makecvheaddetailswidth}{\usebox{\makecvheaddetailsbox}}%
+ \@initializelength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
+ \ifthenelse{\lengthtest{\makecvheadnamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvheadnamewidth=0pt)
+ {\setlength{\makecvheadnamewidth}{\textwidth-\makecvheaddetailswidth-\makecvheadpicturewidth}}%
+ {}%
+ \@initializebox{\makecvheadnamebox}%
+ \savebox{\makecvheadnamebox}{%
+ \begin{minipage}[b]{\makecvheadnamewidth}%
+ \if@left\raggedright\fi%
+ \if@right\raggedleft\fi%
+ \namestyle{\@firstname\ \@lastname}%
+ \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
+ \end{minipage}}%
+ % rendering
+ \if@left%
+ \usebox{\makecvheadnamebox}%
+ \hfill%
+ \llap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
+ \usebox{\makecvheadpicturebox}\fi%
+ \if@right%
+ \usebox{\makecvheadpicturebox}%
+ \rlap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
+ \hfill%
+ \usebox{\makecvheadnamebox}\fi%
+ \\[2.5em]%
+ % optional quote
+ \ifthenelse{\isundefined{\@quote}}%
+ {}%
+ {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
+ \b:cvhead\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvhead
+
+
+\RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
+\begin{tabular}{l l l l l l}
+ \raggedleft\hintstyle{#8} & \cvskill{1}\, & \,{\skillLegend@FontSize #3} & \cvskill{3}\, &\,{\skillLegend@FontSize #5 } \\%
+ %
+ & \cvskill{2}\, & \,\multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}\, &\,{\skillLegend@FontSize #6 } \\%
+ %
+ & & & \cvskill{5}\, &\,{\skillLegend@FontSize #7 }%
+ \end{tabular}%
+}%
+
+
+\NewConfigure{cvskill}{2}
+\def\:tempa#1{\def\:cvskillamount{#1}\a:cvskill\o:cvskill:{#1}\b:cvskill}
+\HLet\cvskill\:tempa
+
+\NewConfigure{cvskillhead}{2}
+\NewConfigure{cvskillentry}{2}
+\RenewDocumentCommand\cvskillhead{O{.25em} +O{\skillMatrix@HeaderDefaultOne} +O{\skillMatrix@HeaderDefaultTwo} +O{\skillMatrix@HeaderDefaultThree} +O{\skillMatrix@HeaderDefaultFour}}{%
+ \begingroup
+ \a:cvskillhead
+ \begin{tabular}{ p{6em} p{12em} p{4em} p{20em}}%
+ { #2} & { #3} & { #4} & { #5}
+ \end{tabular}%
+ \b:cvskillhead
+ \endgroup
+ \par\addvspace{#1}
+}
+
+\RenewDocumentCommand\cvskillentry{s +O{.25em} +m +m +m +m +m}{%
+\a:cvskillentry
+\cvitem{#3}{
+ \begin{tabular}{ p{6em} p{12em} p{4em} p{20em}}
+ \centering \cvskill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
+ \end{tabular}}%
+ \b:cvskillentry
+ \par\addvspace{#2}
+}
+
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Small Ones}
%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -30169,6 +30340,7 @@ A style file for resumes.
% Copyright |CopyYear.2009. Eitan M. Gurari
|<TeX4ht copywrite|>
|<enumitem config|>
+|<enumitem newlist|>
\Hinput{enumitem}
\endinput
>>> \AddFile{9}{enumitem}
@@ -30203,6 +30375,61 @@ See \Link[https://github.com/hendricius/the-sourdough-framework/pull/312]{}{}for
\def\enit@postlabel{}
>>>
+We need to provide a configuration for environments defined using \Verb+\newlist+.
+Because they are defined in the preamble, we must catch them using the early hooks
+file.
+
+The test file and report can be found \Link[https://github.com/michal-h21/make4ht/issues/150]{}{}here\EndLink.
+
+
+\<add to usepackage\><<<
+\Configure{PackageHooks}{enumitem.sty}{enumitem-hooks.4ht}
+>>>
+
+\<enumitem-hooks.4ht\><<<
+% enumitem-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+\:AtEndOfPackage{%
+|<enumitem patch newlist|>
+}
+>>> \AddFile{9}{enumitem-hooks}
+
+
+We save all defined environments in \Verb+\enumitem:newlist+. This command
+is then called in the \Verb+\Configure{enumitemnewlist}+, which can
+be used in the output format configuration.
+
+\<enumitem patch newlist\><<<
+\def\enumitem:newlist{}
+\def\:tempa#1#2#3#4{\concat:config\enumitem:newlist{\Configure{enumitemenv}{#2}}\o:enit@newlist{#1}{#2}{#3}{#4}}
+\let\o:enit@newlist\enit@newlist
+\let\enit@newlist\:tempa
+>>>
+
+
+This configuration is called automatically by \Verb+\Configure{enumitenewlist}+ for each
+declared environment. The environment name is saved in \Verb+\a:enumitemenv+,
+and then we call \Verb+\enumitem:newlist+, which should provide a configuration for lists
+in the current output format.
+
+\<enumitem newlist\><<<
+\NewConfigure{enumitemenv}[1]{%
+\def\a:enumitemenv{#1}%
+\enumitem:newlistconfig
+}
+>>>
+
+This configuration should provide a configuration for a list in the current output format.
+Name of the configured environment is saved in \Verb+\a:enumitemenv+.
+
+\<enumitem newlist\><<<
+\NewConfigure{enumitemnewlist}[1]{
+ \def\enumitem:newlistconfig{#1}
+ \enumitem:newlist
+}
+>>>
+
%%%%%%%%%%%%%
\Section{esperanto.sty}
@@ -31406,6 +31633,25 @@ for output formats.
\ExplSyntaxOff
>>>
+%%%%%%%%%%%%%%%
+\Section{Esvect}
+%%%%%%%%%%%%%%%
+
+\<esvect.4ht\><<<
+% esvect.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+|<esvect redefinitions|>
+
+\Hinput{esvect}
+\endinput
+>>> \AddFile{9}{esvect}
+
+
+\<esvect redefinitions\><<<
+>>>
+
+
%%%%%%%%%%%%%
\Section{Ushort}
%%%%%%%%%%%%%