summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-11-05 22:05:24 +0000
committerKarl Berry <karl@freefriends.org>2021-11-05 22:05:24 +0000
commita98cb2d0cbaeeeac60d4dab14cc26204f4453a70 (patch)
tree727caa9944d818129f08b9af0f6963b96c37261d
parent722a4b65466268d17ceabf53ff5b792099146624 (diff)
tex4ebook (5nov21)
git-svn-id: svn://tug.org/texlive/trunk@60965 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook2
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/README2
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/changelog.tex20
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/readme.tex2
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdfbin84685 -> 85209 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/tex4ebook/tex4ebook2
-rw-r--r--Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht122
-rw-r--r--Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty10
8 files changed, 95 insertions, 65 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook b/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook
index 5c6aca5546e..9f4469e5695 100755
--- a/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook
+++ b/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook
@@ -67,7 +67,7 @@ else
end
if args.version then
- print "tex4ebook v0.3e"
+ print "tex4ebook v0.3f"
return
end
diff --git a/Master/texmf-dist/doc/support/tex4ebook/README b/Master/texmf-dist/doc/support/tex4ebook/README
index d19ca44e1bc..8339341c51a 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/README
+++ b/Master/texmf-dist/doc/support/tex4ebook/README
@@ -86,7 +86,7 @@ For example:
`-e,--build-file (default nil)`
: Specify make4ht build file^[https://github.com/michal-h21/make4ht#build-file].
- Defaulf build file filename is `filename.mk4`, use this option if you use
+ Default build file filename is `filename.mk4`, use this option if you use
different filename.
`-f,--format (default epub)`
diff --git a/Master/texmf-dist/doc/support/tex4ebook/changelog.tex b/Master/texmf-dist/doc/support/tex4ebook/changelog.tex
index 8c9445b9106..0e057768511 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/changelog.tex
+++ b/Master/texmf-dist/doc/support/tex4ebook/changelog.tex
@@ -3,6 +3,26 @@
\begin{itemize}
\item
+ 2021/11/04
+
+ \begin{itemize}
+ \tightlist
+ \item
+ released version \texttt{0.3f}
+ \item
+ fixed spurious numbers in NCX TOC caused by wrong use of
+ \texttt{\textbackslash{}cs\_if\_exist\_use:cTF} command.
+ \end{itemize}
+\item
+ 2021/10/08
+
+ \begin{itemize}
+ \tightlist
+ \item
+ fix for \texttt{\textbackslash{}author} support in \texttt{amsart}
+ class
+ \end{itemize}
+\item
2021/09/30
\begin{itemize}
diff --git a/Master/texmf-dist/doc/support/tex4ebook/readme.tex b/Master/texmf-dist/doc/support/tex4ebook/readme.tex
index 99853b4d392..52982d65c45 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/readme.tex
+++ b/Master/texmf-dist/doc/support/tex4ebook/readme.tex
@@ -101,7 +101,7 @@ that this behaviour is default.
\begin{description}
\item[\texttt{-e,-\/-build-file\ (default\ nil)}]
Specify make4ht build file\footnote{\url{https://github.com/michal-h21/make4ht\#build-file}}.
-Defaulf build file filename is \texttt{filename.mk4}, use this option if
+Default build file filename is \texttt{filename.mk4}, use this option if
you use different filename.
\item[\texttt{-f,-\/-format\ (default\ epub)}]
Output format. Possible values are \texttt{epub}, \texttt{epub3},
diff --git a/Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdf b/Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdf
index 62a87cd2507..7c2c0a8e110 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdf
+++ b/Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/tex4ebook/tex4ebook b/Master/texmf-dist/scripts/tex4ebook/tex4ebook
index 5c6aca5546e..9f4469e5695 100755
--- a/Master/texmf-dist/scripts/tex4ebook/tex4ebook
+++ b/Master/texmf-dist/scripts/tex4ebook/tex4ebook
@@ -67,7 +67,7 @@ else
end
if args.version then
- print "tex4ebook v0.3e"
+ print "tex4ebook v0.3f"
return
end
diff --git a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht
index 7cd6ca39fe4..923cd8daa16 100644
--- a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht
+++ b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht
@@ -231,29 +231,29 @@ href="#1" media-type="\a:CoverMimeType" />}}
% Support for: chapter, section, subsection
\def\resettoclevels#1{%
- \def\do##1{\csgdef{nav##1finish}{}}
- \docsvlist{#1}
+ \def\do##1{\csgdef{nav##1finish}{}}%
+ \docsvlist{#1}%
}
\def\usetoclevels#1{%
\def\do##1{\csuse{nav##1finish}}%
\docsvlist{#1}%
}
\def\finishtoclevel#1{%
- \csgdef{nav#1finish}{\d:NavSection}
+ \csgdef{nav#1finish}{\d:NavSection}%
}
-\def\closelevels#1{
- \expandafter\usetoclevels\expandafter{#1}
- \expandafter\resettoclevels\expandafter{#1}
-}
+\def\closelevels#1{%
+ \expandafter\usetoclevels\expandafter{#1}%
+ \expandafter\resettoclevels\expandafter{#1}%
+}%
% 1 - section type 2 - closed sections
-\def\navsection#1#2{
+\def\navsection#1#2{%
\ConfigureToc{#1}%
- {\expandafter\closelevels\expandafter{#2}
- \def\curr:sect:type{#1}\a:NavSection\Ncx:Mark}
- {\c:NavSection}
- {}
+ {\expandafter\closelevels\expandafter{#2}%
+ \def\curr:sect:type{#1}\a:NavSection\Ncx:Mark}%
+ {\c:NavSection}%
+ {}%
{\b:NavSection%
\expandafter\finishtoclevel\expandafter{#1}%
}
@@ -261,20 +261,20 @@ href="#1" media-type="\a:CoverMimeType" />}}
% define closing groups for all levels defined in \Configure{resettoclevels}
-\def\tmp:processlevel#1{
- \bgroup
- \csxdef{tmp:resettoclevels#1}{}
- \def\do##1{\csxdef{tmp:resettoclevels#1}{\csname tmp:resettoclevels#1\endcsname ##1,like##1,\appendix:type{##1}}}
- \def\tmp:parse##1#1##2\nil{
- \docsvlist{#1##2}
+\def\tmp:processlevel#1{%
+ \bgroup%
+ \csxdef{tmp:resettoclevels#1}{}%
+ \def\do##1{\csxdef{tmp:resettoclevels#1}{\csname tmp:resettoclevels#1\endcsname ##1,like##1,\appendix:type{##1}}}%
+ \def\tmp:parse##1#1##2\nil{%
+ \docsvlist{#1##2}%
}
- \expandafter\tmp:parse\a:resettoclevels\nil
- \egroup
- \navsection{#1}{\csname tmp:resettoclevels#1\endcsname}
+ \expandafter\tmp:parse\a:resettoclevels\nil%
+ \egroup%
+ \navsection{#1}{\csname tmp:resettoclevels#1\endcsname}%
% define hierarchy also for starred sections
- \navsection{like#1}{\csname tmp:resettoclevels#1\endcsname}
+ \navsection{like#1}{\csname tmp:resettoclevels#1\endcsname}%
% and for appendices
- \ifcsdef{appendix:type:#1}{\navsection{\csuse{appendix:type:#1}}{\csname tmp:resettoclevels#1\endcsname}}{}
+ \ifcsdef{appendix:type:#1}{\navsection{\csuse{appendix:type:#1}}{\csname tmp:resettoclevels#1\endcsname}}{}%
}
% define children levels for each sectioning level
@@ -289,9 +289,9 @@ href="#1" media-type="\a:CoverMimeType" />}}
% so just strip then out
% \TitleMark does similar thing, but this solution is simpler, I hope it works correctly
\def\Ncx:Mark#1{%
- \edef\:temp{#1}
- \def\z@ro{0}
- \ifx\:temp\z@ro\else#1\fi
+ \edef\:temp{#1}%
+ \def\z@ro{0}%
+ \ifx\:temp\z@ro\else#1\fi%
}
% to create correct hiearchical NCX for appendices, we register corresponding appendix types
@@ -305,16 +305,16 @@ href="#1" media-type="\a:CoverMimeType" />}}
%
\def\ncx:head{%
-\HCode{<head>\Hnewline}
-\HCode{<meta name="dtb:uid" content="\a:UniqueIdentifier"/>\Hnewline}
-\HCode{<meta name="dtb:depth" content="3"/>\Hnewline}
-\HCode{<meta name="dtb:totalPageCount" content="0"/>\Hnewline}
-\HCode{<meta name="dtb:maxPageNumber" content="0"/>\Hnewline}
-\HCode{</head>\Hnewline}
+\HCode{<head>\Hnewline}%
+\HCode{<meta name="dtb:uid" content="\a:UniqueIdentifier"/>\Hnewline}%
+\HCode{<meta name="dtb:depth" content="3"/>\Hnewline}%
+\HCode{<meta name="dtb:totalPageCount" content="0"/>\Hnewline}%
+\HCode{<meta name="dtb:maxPageNumber" content="0"/>\Hnewline}%
+\HCode{</head>\Hnewline}%
}
\def\ncx:title{%
- \HCode{<docTitle>\Hnewline<text>}\Title\HCode{</text>\Hnewline</docTitle>\Hnewline}
+ \HCode{<docTitle>\Hnewline<text>}\Title\HCode{</text>\Hnewline</docTitle>\Hnewline}%
}
% Get filename from tableofcontents anchor
@@ -326,16 +326,16 @@ href="#1" media-type="\a:CoverMimeType" />}}
% the first number. we use the LaTeX 3 sequence list to get it.
\tl_new:N\ncx:hfilename
\def\ncx:newhfile#1{
- \cs_if_exist_use:cTF{cw:)Q#1}{%
+ \cs_if_exist:cTF{cw:)Q#1}{%
% cw:)Q#1 is csname of tag from the xref file. we convert it to sequence
- \seq_set_from_clist:Nc\l_tmpa_seq{cw:)Q#1}
+ \seq_set_from_clist:Nc\l_tmpa_seq{cw:)Q#1}%
% get first item and put it to a token list
- \seq_get_left:NN \l_tmpa_seq \l_tmpa_tl
+ \seq_get_left:NN \l_tmpa_seq \l_tmpa_tl%
% \RefFileNumber returns file name for the given file number
% \ncx:hfilename contains the filename for later use
- \tl_set:Nx \ncx:hfilename {\RefFileNumber{\l_tmpa_tl}}
- }{%
- \tl_set:Nn \ncx:hfilename {nic}
+ \tl_set:Nx \ncx:hfilename {\RefFileNumber{\l_tmpa_tl}}%
+ }{% This shouldn't happen?
+ \tl_set:Nn \ncx:hfilename {}%
}
}
\ExplSyntaxOff
@@ -345,35 +345,35 @@ href="#1" media-type="\a:CoverMimeType" />}}
\Configure{resettoclevels}{part,chapter,section,subsection,subsubsection,paragraph}
\def\:tempa{%
-\EndP
-\HtmlParOff
-\setcounter{tocdepth}{3}
-\special{t4ht>\jobname.ncx}
+\EndP%
+\HtmlParOff%
+\setcounter{tocdepth}{3}%
+\special{t4ht>\jobname.ncx}%
% We don't want crosslinks in xml
% Basic sctructure of the ncx file
-\NoFonts
-{\HCode{<?xml version="1.0" encoding="utf-8"?>\Hnewline}}
-{\a:NcxDoctype}
-{\Tg<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">}{}
+\NoFonts%
+{\HCode{<?xml version="1.0" encoding="utf-8"?>\Hnewline}}%
+{\a:NcxDoctype}%
+{\Tg<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">}{}%
% To print document map, we customize the tableofcontents. We don't want TOC title,
% so:
-\let\contentsname=\empty
+\let\contentsname=\empty%
\Configure{tableofcontents}{\boolfalse{tocnoempty}\Tg<navMap>}{%
\usetoclevels{part,appendix,chapter,likechapter,appendixsec,section,likesection,subsection,appendixsubsec,likesubsection,subsubsection,likesubsubsection,appendixsubsubsec,subsubsubsection,paragraph}%
\ifbool{tocnoempty}{}%
- {\HCode{<navPoint id="mainentry" playOrder="1">
- <navLabel><text>Document</text></navLabel>
- <content src="\jobname.\:html" />
+ {\HCode{<navPoint id="mainentry" playOrder="1">%
+ <navLabel><text>Document</text></navLabel>%
+ <content src="\jobname.\:html" />%
</navPoint>}}%
- \Tg</navMap>}{}{}{}
+ \Tg</navMap>}{}{}{}0
% We need to configure TocLink
% in navmapsrc is link to the file and anchor, where chapter or section is located
- \def\navmapsrc{}
+ \def\navmapsrc{}%
\Configure{TocLink}{%
- \ncx:newhfile{##2}
- \def\navmapsrc{\ncx:hfilename\:sharp ##2}
- \opf:registerfilename{\ncx:hfilename}
- ##4
+ \ncx:newhfile{##2}%
+ \def\navmapsrc{\ncx:hfilename\:sharp ##2}%
+ \opf:registerfilename{\ncx:hfilename}%
+ ##4%
}
% Configuraion of entries
\expandafter\resettoclevels\expandafter{\a:resettoclevels}%
@@ -386,14 +386,14 @@ href="#1" media-type="\a:CoverMimeType" />}}
}{\HCode{</text>\Hnewline%
</navLabel>\Hnewline}%
\HCode{<content src="\navmapsrc" />}%
-}{\HCode{</navmark>}}{\HCode{</navPoint>\Hnewline}}
+}{\HCode{</navmark>}}{\HCode{</navPoint>\Hnewline}}%
% Meta inf
-\ncx:head
+\ncx:head%
% Book title
-\ncx:title
+\ncx:title%
\tableofcontents[part,appendix,chapter,likechapter,appendixsec,section,likesection,appendixsubsec,subsection,likesubsection]%
%Hack to get close tag working
-\HCode{</ncx>}
+\HCode{</ncx>}%
\EndNoFonts
\special{t4ht<\jobname.ncx}
\HtmlParOn
diff --git a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty
index 4d8cb1db097..3ce94dd203b 100644
--- a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty
+++ b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty
@@ -166,4 +166,14 @@
}
%}
+
+% Fixes for AMS classess
+\AddToHook{class/after}{%
+ \ifx\authors\@empty%
+ \def\@maketitle@hook{
+ \global\let\Author\authors
+ }
+ \fi%
+}
+
\newcommand\coverimage[2][]{\includegraphics[#1]{#2}}