diff options
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/README | 55 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/changelog.tex | 55 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf | bin | 62872 -> 66961 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/make4ht-doc.tex | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/readme.tex | 51 |
5 files changed, 135 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/support/make4ht/README b/Master/texmf-dist/doc/support/make4ht/README index c3c689c87ae..9d7c10c75b4 100644 --- a/Master/texmf-dist/doc/support/make4ht/README +++ b/Master/texmf-dist/doc/support/make4ht/README @@ -60,9 +60,12 @@ Sample: Make:htlatex() Make:match("html$", "tidy -m -xml -utf8 -q -i ${filename}") - `Make:htlatex()` is preconfigured command for calling LaTeX with `tex4ht` loaded on the input file. In this case it will be called one time. After compilation, `tidy` command is executed on the output `html` file. +`Make:htlatex()` is preconfigured command for calling LaTeX with `tex4ht` +loaded on the input file. In this case it will be called one time. After +compilation, `tidy` command is executed on the output `html` file. -Note that you don't have to call `tex4ht` and `t4ht` commands explicitly in the build file, they are called automatically. +Note that you don't have to call `tex4ht` and `t4ht` commands explicitly in the +build file, they are called automatically. You can add more commands like `Make:htlatex` with @@ -76,7 +79,11 @@ it can be called with `command` can be text template, or function: Make:add("text", "hello, input file: ${input}") - Make:add("function", function(params) for k, v in pairs(params) do print(k..": "..v) end) + Make:add("function", function(params) + for k, v in pairs(params) do + print(k..": "..v) + end + ) `parameters` is a table or `nil` value. @@ -101,7 +108,7 @@ latex_par packages : insert additionl LaTeX code which is inserted before `\documentclass`. - useful for passing options to packages or additional packages loading + Useful for passing options to packages or additional packages loading tex4ht_sty_par @@ -125,7 +132,8 @@ repetition correct_exit -: expected `exit code` from the command. +: expected `exit code` from the command. The compilation will be terminted + when the command `exit code` is different. You may add your own parameters, they will be accessible in templates and @@ -138,9 +146,9 @@ multiple times if you include them in the build file, because they would be called also by `make4ht`. With `repetition`, second execution is blocked. You can set expected exit code from a command with `correct_exit`. Compilation -is stopped when command returns different exit code. Situation is little bit -difficult with LaTeX (all engines and formats in fact), because it doesn't -differentiate between fatal and non fatal errors and returns same exit code +is stopped when command returns different exit code. The situation is +different for LaTeX (for all TeX engines and formats, in fact), because it doesn't +differentiate between fatal and non fatal errors, and it returns the same exit code in all cases. Log parsing is used because of that, error code `1` is returned in the case of fatal error, `0` is used otherwise. @@ -193,10 +201,18 @@ hruletohr : `\hrule` commands are translated to series of underscore characters by `tex4ht`, this filter translate these underscores to `<hr>` elements + entites -: convert prohibited named entities to numeric entities (currently, only ` `, as it causes validation errors, and `tex4ht` is producing it sometimes +: convert prohibited named entities to numeric entities (currently, only + ` `, as it causes validation errors, and `tex4ht` is producing it + sometimes + +fix-links +: replace colons in local links and `id` attributes with underscores. Some + cross-reference commands may produce colons in internal links, which results in + validation error. Function `filter` accepts also function arguments, in this case this function takes file contents as parameter and modified contents are returned. @@ -222,7 +238,7 @@ These pictures are stored in special `dvi` file, on which `dvi to image` commands are called. This conversion is normally configured in the `env file`, -which is system dependent and which has a little bit unintuitive syntax. +which is system dependent and which has a bit unintuitive syntax. This configuration is processed by `t4ht` application and conversion commands are called for all pictures. @@ -243,9 +259,9 @@ There are three parameters: - source - `dvi` file with the pictures - page - page number of the converted image -## `mode` variable +## The `mode` variable -Variable `mode` contains contents of `-mode` command line option. +The `mode` variable contains contents of `--mode` command line option. It can be used to run some commands conditionally. For example: if mode == "draft" then @@ -256,11 +272,22 @@ It can be used to run some commands conditionally. For example: Make:htlatex{} end -In this example (which is default configuration used by `make4ht`), -LaTeX is called only once when `make4ht` is called with +In this example (which is the default configuration used by `make4ht`), +LaTeX is called only once when `make4ht` is called with `draft` mode: make4ht -m draft filename +## The `settings` table + +You may want to access to the parameters also outside commands, file matches +and image conversion functions. For example, if you want to convert your file to +the `OpenDocument Format`, you can use the following settings, based on `oolatex` +command: + + settings.tex4ht_sty_par = settings.tex4ht_sty_par ..",ooffice" + settings.tex4ht_par = settings.tex4ht_par .. " ooffice/! -cmozhtf" + settings.t4ht_par = settings.t4ht_par .. " -cooxtpipes -coo " + # Command line options diff --git a/Master/texmf-dist/doc/support/make4ht/changelog.tex b/Master/texmf-dist/doc/support/make4ht/changelog.tex index b69cd5d7829..752787d1594 100644 --- a/Master/texmf-dist/doc/support/make4ht/changelog.tex +++ b/Master/texmf-dist/doc/support/make4ht/changelog.tex @@ -2,6 +2,61 @@ \begin{itemize} \item + 2017/04/26 + + \begin{itemize} + \itemsep1pt\parskip0pt\parsep0pt + \item + Released version \texttt{v0.1c} + \end{itemize} +\item + 2017/03/16 + + \begin{itemize} + \itemsep1pt\parskip0pt\parsep0pt + \item + check for \texttt{TeX capacity exceeded} error in the \LaTeX~run. + \end{itemize} +\item + 2016/12/19 + + \begin{itemize} + \itemsep1pt\parskip0pt\parsep0pt + \item + use full input name in \texttt{tex\_file} variable. This should + enable use of files without \texttt{.tex} extension. + \end{itemize} +\item + 2016/10/22 + + \begin{itemize} + \itemsep1pt\parskip0pt\parsep0pt + \item + new command available in the build file: + \texttt{Make:add\_file(filename)}. This enables filters and commands + to register files to the output. + \item + use ipairs instead of pairs for traversing files and executing + filters. This should ensure correct order of executions. + \end{itemize} +\item + 2016/10/18 + + \begin{itemize} + \itemsep1pt\parskip0pt\parsep0pt + \item + new filter: replace colons in \texttt{id} and \texttt{href} + attributes with underscores + \end{itemize} +\item + 2016/01/11 + + \begin{itemize} + \itemsep1pt\parskip0pt\parsep0pt + \item + fixed bug in loading documents with full path specified + \end{itemize} +\item 2015/12/06 version 0.1b \begin{itemize} diff --git a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf Binary files differindex 91bd73fe761..2867bf29dc0 100644 --- a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf +++ b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf diff --git a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.tex b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.tex index 9c9a5eeddf8..973a349c6ce 100644 --- a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.tex +++ b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.tex @@ -11,10 +11,11 @@ \setmainfont{TeX Gyre Schola} \fi \usepackage{microtype} +\providecommand\tightlist{\relax} \title{The \texttt{make4ht} build system} \author{Michal Hoftich\footnote{\url{michal.h21@gmail.com}}} -\date{Version 0.1b\\12/11/2015} +\date{Version \version\\\gitdate} \begin{document} \maketitle \tableofcontents diff --git a/Master/texmf-dist/doc/support/make4ht/readme.tex b/Master/texmf-dist/doc/support/make4ht/readme.tex index 83244743deb..77e1ecdc6b1 100644 --- a/Master/texmf-dist/doc/support/make4ht/readme.tex +++ b/Master/texmf-dist/doc/support/make4ht/readme.tex @@ -93,7 +93,11 @@ Make:name() \begin{verbatim} Make:add("text", "hello, input file: ${input}") -Make:add("function", function(params) for k, v in pairs(params) do print(k..": "..v) end) +Make:add("function", function(params) + for k, v in pairs(params) do + print(k..": "..v) + end +) \end{verbatim} \texttt{parameters} is a table or \texttt{nil} value. @@ -111,7 +115,7 @@ input TeX file parameters to \texttt{latex} \item[packages] insert additionl LaTeX code which is inserted before -\texttt{\textbackslash{}documentclass}. useful for passing options to +\texttt{\textbackslash{}documentclass}. Useful for passing options to packages or additional packages loading \item[tex4ht\_sty\_par] parameters to \texttt{tex4ht.sty} @@ -124,7 +128,8 @@ output directory \item[repetition] limit number of command execution. \item[correct\_exit] -expected \texttt{exit code} from the command. +expected \texttt{exit code} from the command. The compilation will be +terminted when the command \texttt{exit code} is different. \end{description} You may add your own parameters, they will be accessible in templates @@ -139,11 +144,11 @@ in the build file, because they would be called also by You can set expected exit code from a command with \texttt{correct\_exit}. Compilation is stopped when command returns -different exit code. Situation is little bit difficult with LaTeX (all -engines and formats in fact), because it doesn't differentiate between -fatal and non fatal errors and returns same exit code in all cases. Log -parsing is used because of that, error code \texttt{1} is returned in -the case of fatal error, \texttt{0} is used otherwise. +different exit code. The situation is different for LaTeX (for all TeX +engines and formats, in fact), because it doesn't differentiate between +fatal and non fatal errors, and it returns the same exit code in all +cases. Log parsing is used because of that, error code \texttt{1} is +returned in the case of fatal error, \texttt{0} is used otherwise. \subsection{File matches}\label{file-matches} @@ -197,6 +202,10 @@ underscores to \texttt{\textless{}hr\textgreater{}} elements convert prohibited named entities to numeric entities (currently, only \texttt{\ }, as it causes validation errors, and \texttt{tex4ht} is producing it sometimes +\item[fix-links] +replace colons in local links and \texttt{id} attributes with +underscores. Some cross-reference commands may produce colons in +internal links, which results in validation error. \end{description} Function \texttt{filter} accepts also function arguments, in this case @@ -226,7 +235,7 @@ These pictures are stored in special \texttt{dvi} file, on which \texttt{dvi to image} commands are called. This conversion is normally configured in the \texttt{env file}, which -is system dependent and which has a little bit unintuitive syntax. This +is system dependent and which has a bit unintuitive syntax. This configuration is processed by \texttt{t4ht} application and conversion commands are called for all pictures. @@ -254,10 +263,11 @@ There are three parameters: page - page number of the converted image \end{itemize} -\subsection{\texttt{mode} variable}\label{mode-variable} +\subsection{The \texttt{mode} variable}\label{the-mode-variable} -Variable \texttt{mode} contains contents of \texttt{-mode} command line -option. It can be used to run some commands conditionally. For example: +The \texttt{mode} variable contains contents of \texttt{-{}-mode} +command line option. It can be used to run some commands conditionally. +For example: \begin{verbatim} if mode == "draft" then @@ -269,14 +279,27 @@ option. It can be used to run some commands conditionally. For example: end \end{verbatim} -In this example (which is default configuration used by +In this example (which is the default configuration used by \texttt{make4ht}), LaTeX is called only once when \texttt{make4ht} is -called with +called with \texttt{draft} mode: \begin{verbatim} make4ht -m draft filename \end{verbatim} +\subsection{The \texttt{settings} table}\label{the-settings-table} + +You may want to access to the parameters also outside commands, file +matches and image conversion functions. For example, if you want to +convert your file to the \texttt{OpenDocument Format}, you can use the +following settings, based on \texttt{oolatex} command: + +\begin{verbatim} +settings.tex4ht_sty_par = settings.tex4ht_sty_par ..",ooffice" +settings.tex4ht_par = settings.tex4ht_par .. " ooffice/! -cmozhtf" +settings.t4ht_par = settings.t4ht_par .. " -cooxtpipes -coo " +\end{verbatim} + \section{Command line options}\label{command-line-options} \begin{verbatim} |