summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook3
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/README11
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/changelog.tex25
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/readme.tex18
-rw-r--r--Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdfbin64894 -> 65558 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/tex4ebook/exec_epub.lua18
-rwxr-xr-xMaster/texmf-dist/scripts/tex4ebook/exec_epub3.lua10
-rwxr-xr-xMaster/texmf-dist/scripts/tex4ebook/tex4ebook3
-rw-r--r--Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht2
-rw-r--r--Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty4
10 files changed, 75 insertions, 19 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook b/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook
index c43bc330583..7c677b00d56 100755
--- a/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook
+++ b/Build/source/texk/texlive/linked_scripts/tex4ebook/tex4ebook
@@ -1,4 +1,7 @@
#!/usr/bin/env texlua
+-- Package tex4ebook. Author Michal Hoftich <michal.h21@gmail.com>
+-- This package is subject of LPPL license, version 1.3
+--
kpse.set_program_name("luatex")
require("lapp-mk4")
-- require("ebookutils")
diff --git a/Master/texmf-dist/doc/support/tex4ebook/README b/Master/texmf-dist/doc/support/tex4ebook/README
index 73a4e3f46d9..55ab0a0f7d2 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/README
+++ b/Master/texmf-dist/doc/support/tex4ebook/README
@@ -211,7 +211,7 @@ be caused by some problem in `tex4ht` configuration. Comment out line
if same error as in `tex4ebook` run arises, the problem is in some `tex4ht`
configuration. Try to identify the source of problem and if you cannot find the
solution, make minimal example showing the error and ask for help either on
-*tex4ht mailinglist*^[\url{http://tug.org/mailman/listinfo/tex4ht}] or on
+*tex4ht mailing list*^[\url{http://tug.org/mailman/listinfo/tex4ht}] or on
*TeX-sx*^[\url{http://tex.stackexchange.com/}].
## Fontspec
@@ -238,9 +238,14 @@ Sample:
}
\makeatother
-Drawback is that not all characters of Unicode range are supported with
+The drawback is that not all characters of the Unicode range are supported with
`inputenc`. For some solutions of this limitation, see a thread on *tex4ht
-mailinglist*^[\url{http://tug.org/pipermail/tex4ht/2013q1/000719.html}]
+mailing list*^[\url{http://tug.org/pipermail/tex4ht/2013q1/000719.html}]
+
+Other approach is to use `alternative4ht` package from [helpers4ht](https://github.com/michal-h21/helpers4ht)
+bundle. It works only with Lua backend, but it supports full unicode and you
+don't have to use conditional package inclusion in your document. See
+an [example](http://michal-h21.github.io/samples/helpers4ht/fontspec.html).
## Validation
diff --git a/Master/texmf-dist/doc/support/tex4ebook/changelog.tex b/Master/texmf-dist/doc/support/tex4ebook/changelog.tex
index 4cec520fd94..40c7e0afc40 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/changelog.tex
+++ b/Master/texmf-dist/doc/support/tex4ebook/changelog.tex
@@ -2,6 +2,31 @@
\begin{itemize}
\item
+ 24/09/2015 Version 0.1b
+
+ \begin{itemize}
+ \itemsep1pt\parskip0pt\parsep0pt
+ \item
+ info about new workaround for \texttt{fontspec} package
+ \end{itemize}
+\item
+ 25/08/2015
+
+ \begin{itemize}
+ \itemsep1pt\parskip0pt\parsep0pt
+ \item
+ fatal error happened with epub3 when the document didn't contain the
+ TOC
+ \end{itemize}
+\item
+ 23/08/2015
+
+ \begin{itemize}
+ \itemsep1pt\parskip0pt\parsep0pt
+ \item
+ simple cleaning of the ncx file if tidy command isn't available
+ \end{itemize}
+\item
05/07/2015 Version 0.1a
\begin{itemize}
diff --git a/Master/texmf-dist/doc/support/tex4ebook/readme.tex b/Master/texmf-dist/doc/support/tex4ebook/readme.tex
index d8b7d485a73..3dc7b94e96d 100644
--- a/Master/texmf-dist/doc/support/tex4ebook/readme.tex
+++ b/Master/texmf-dist/doc/support/tex4ebook/readme.tex
@@ -246,9 +246,9 @@ htlatex filename
if same error as in \texttt{tex4ebook} run arises, the problem is in
some \texttt{tex4ht} configuration. Try to identify the source of
problem and if you cannot find the solution, make minimal example
-showing the error and ask for help either on \emph{tex4ht
-mailinglist}\footnote{\url{http://tug.org/mailman/listinfo/tex4ht}} or
-on \emph{TeX-sx}\footnote{\url{http://tex.stackexchange.com/}}.
+showing the error and ask for help either on \emph{tex4ht mailing
+list}\footnote{\url{http://tug.org/mailman/listinfo/tex4ht}} or on
+\emph{TeX-sx}\footnote{\url{http://tex.stackexchange.com/}}.
\subsection{Fontspec}\label{fontspec}
@@ -276,9 +276,15 @@ Sample:
\makeatother
\end{verbatim}
-Drawback is that not all characters of Unicode range are supported with
-\texttt{inputenc}. For some solutions of this limitation, see a thread
-on \emph{tex4ht mailinglist}\footnote{\url{http://tug.org/pipermail/tex4ht/2013q1/000719.html}}
+The drawback is that not all characters of the Unicode range are
+supported with \texttt{inputenc}. For some solutions of this limitation,
+see a thread on \emph{tex4ht mailing list}\footnote{\url{http://tug.org/pipermail/tex4ht/2013q1/000719.html}}
+
+Other approach is to use \texttt{alternative4ht} package from
+\href{https://github.com/michal-h21/helpers4ht}{helpers4ht} bundle. It
+works only with Lua backend, but it supports full unicode and you don't
+have to use conditional package inclusion in your document. See an
+\href{http://michal-h21.github.io/samples/helpers4ht/fontspec.html}{example}.
\subsection{Validation}\label{validation}
diff --git a/Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdf b/Master/texmf-dist/doc/support/tex4ebook/tex4ebook-doc.pdf
index a3a29b25d20..ab8150d2e06 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/exec_epub.lua b/Master/texmf-dist/scripts/tex4ebook/exec_epub.lua
index 45977c2ee2f..ff5784bcdb3 100755
--- a/Master/texmf-dist/scripts/tex4ebook/exec_epub.lua
+++ b/Master/texmf-dist/scripts/tex4ebook/exec_epub.lua
@@ -258,13 +258,25 @@ function make_opf()
end
function pack_container()
+ local ncxfilename = outputdir .. "/" .. outputfilename .. ".ncx"
if os.execute("tidy -v") > 0 then
- print("Warning:\n tidy command seems missing, you need to install it" ..
+ print("Warning:\n tidy command seems missing, you should install it" ..
" in order\n to make valid epub file")
+ print("Using regexp based cleaning")
+ local lines = {}
+ for line in io.lines(ncxfilename) do
+ local content = line:gsub("[ ]*<","<")
+ if content:len() > 0 then
+ table.insert(lines, content)
+ end
+ end
+ table.insert(lines,"")
+ local ncxfile = io.open(ncxfilename,"w")
+ ncxfile:write(table.concat(lines,"\n"))
+ ncxfile:close()
else
print("Tidy ncx "..
- os.execute("tidy -xml -i -q -utf8 -m " ..
- outputdir .. "/" .. outputfilename .. ".ncx"))
+ os.execute("tidy -xml -i -q -utf8 -m " .. ncxfilename))
print("Tidy opf "..
os.execute("tidy -xml -i -q -utf8 -m " ..
outputdir .. "/" .. "content.opf"))
diff --git a/Master/texmf-dist/scripts/tex4ebook/exec_epub3.lua b/Master/texmf-dist/scripts/tex4ebook/exec_epub3.lua
index 55f7f71c309..e51746e7773 100755
--- a/Master/texmf-dist/scripts/tex4ebook/exec_epub3.lua
+++ b/Master/texmf-dist/scripts/tex4ebook/exec_epub3.lua
@@ -1,6 +1,7 @@
module(...,package.seeall)
local eb = require("exec_epub")
+local ext = "xhtml"
local outputdir = nil
local input = nil
function prepare(params)
@@ -8,7 +9,8 @@ function prepare(params)
local outputdir_name="OEBPS"
outputdir= basedir.."/"..outputdir_name
input = params.input
- params.packages = params.packages .. "\\Configure{ext}{xhtml}"
+ params.ext = ext
+ params.packages = params.packages .. string.format("\\Configure{ext}{%s}",ext)
return eb.prepare(params)
end
@@ -54,12 +56,10 @@ local function cleanOPF()
print "TOC nav found"
else
print "no TOC, using generic one"
- local pattern = input.."(%..?html)"
- local ext = content:match(pattern)
- local inputfile = input .. ext
+ local inputfile = input .. "." .. ext
print("Main file name", inputfile)
-- write toc file
- local toc_name = "generic_toc" ..ext
+ local toc_name = "generic_toc" .."."..ext
local f = io.open(outputdir .. "/" .. toc_name, "w")
f:write(makeTOC(inputfile))
f:close()
diff --git a/Master/texmf-dist/scripts/tex4ebook/tex4ebook b/Master/texmf-dist/scripts/tex4ebook/tex4ebook
index c43bc330583..7c677b00d56 100755
--- a/Master/texmf-dist/scripts/tex4ebook/tex4ebook
+++ b/Master/texmf-dist/scripts/tex4ebook/tex4ebook
@@ -1,4 +1,7 @@
#!/usr/bin/env texlua
+-- Package tex4ebook. Author Michal Hoftich <michal.h21@gmail.com>
+-- This package is subject of LPPL license, version 1.3
+--
kpse.set_program_name("luatex")
require("lapp-mk4")
-- require("ebookutils")
diff --git a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht
index 81d137a8abb..add25d2f075 100644
--- a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht
+++ b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.4ht
@@ -294,7 +294,7 @@ href="#1" media-type="\a:CoverMimeType" />}}
\Configure{tableofcontents}{\boolfalse{tocnoempty}\Tg<navMap>}{%
\usetoclevels{part,chapter,likechapter,section,likesection,subsection,likesubsection,subsubsection,likesubsubsection}%
\ifbool{tocnoempty}{}%
- {\HCode{<navPoint id="mainentry" playOrder=1>
+ {\HCode{<navPoint id="mainentry" playOrder="1">
<navLabel><text>Document</text></navLabel>
<content src="\jobname.\:html" />
</navPoint>}}%
diff --git a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty
index 965a470bac5..4804710e864 100644
--- a/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty
+++ b/Master/texmf-dist/tex/latex/tex4ebook/tex4ebook.sty
@@ -1,4 +1,6 @@
-\ProvidesPackage{tex4ebook}
+% Package odsfile. Author Michal Hoftich <michal.h21@gmail.com>
+% This package is subject of LPPL license, version 1.3
+\ProvidesPackage{tex4ebook}[2015/09/24 version 0.1b]
\RequirePackage{etoolbox}
\RequirePackage{kvoptions}
\RequirePackage{graphicx}