summaryrefslogtreecommitdiff
path: root/support/make4ht/readme.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/make4ht/readme.tex')
-rw-r--r--support/make4ht/readme.tex78
1 files changed, 73 insertions, 5 deletions
diff --git a/support/make4ht/readme.tex b/support/make4ht/readme.tex
index 3810dbad36..1938c98a0a 100644
--- a/support/make4ht/readme.tex
+++ b/support/make4ht/readme.tex
@@ -232,6 +232,21 @@ compilation time:
$ make4ht -um draft filename.tex
\end{verbatim}
+Another buil-in mode is \texttt{clean}. It executes the
+\texttt{Make:clean()} command to remove all generated and temporary
+files from the current directory. No \LaTeX~compilation happens in this
+mode.
+
+It should be used in this way:
+
+\begin{verbatim}
+# copy generated files to a direcory
+$ make4ht -d outdir filename.tex
+# remove all generated files in the current dir
+# the -a info option will print files that are removed
+$ make4ht -m clean -a info filename.tex
+\end{verbatim}
+
More information about the build files can be found in section
\ref{sec:buildfiles}.
@@ -328,7 +343,8 @@ clean the output HTML files using filters.
\item[common\_domfilters]
clean the HTML file using DOM filters. It is more powerful than
\texttt{common\_filters}. Used DOM filters are \texttt{fixinlines},
-\texttt{idcolons}, \texttt{joincharacters}, and \texttt{tablerows}.
+\texttt{idcolons}, \texttt{joincharacters}, \texttt{sectionid} and
+\texttt{tablerows}.
\item[detect\_engine]
detect engine and format necessary for the document compilation from the
magic comments supported by \LaTeX~editors such as TeXShop or TeXWorks.
@@ -512,6 +528,10 @@ the TeX log file.
\item[\texttt{Make:htlatex}]
One call to the TeX engine with special configuration for loading of the
\texttt{tex4ht.sty} package.
+\item[\texttt{Make:clean}]
+This command removes all generated files, including images, HTML files
+and various auxilary files, from the current directory. It keeps files
+whose file names don't match the input file name.
\item[\texttt{Make:httex}]
Variant of \texttt{Make:htlatex} suitable for Plain \TeX.
\item[\texttt{Make:latexmk}]
@@ -723,6 +743,10 @@ format.
remove spurious rows from HTML tables.
\item[mathmlfixes]
fix common issues for MathML.
+\item[sectionid]
+create \texttt{id} attribute for HTML sectioning elements derived from
+the section title. It also updates links to these sections. Use the
+\texttt{notoc} command line option to prevent that.
\item[t4htlinks]
fix hyperlinks in the ODT format.
\end{description}
@@ -1023,12 +1047,15 @@ filter}{The collapsetoc dom filter}}\label{the-collapsetoc-dom-filter}}
\begin{description}
\item[\texttt{toc\_query}]
-CSS selector for selecting the table of contents container.
+CSS selector for selection of element that contains the table of
+contents.
\item[\texttt{title\_query}]
CSS selector for selecting all elements that contain the section ID
attribute.
\item[\texttt{toc\_levels}]
table containing a hierarchy of classes used in TOC
+\item[\texttt{max\_depth}]
+set detph of displayed children TOC levels
\end{description}
Default values:
@@ -1036,8 +1063,25 @@ Default values:
\begin{verbatim}
filter_settings "collapsetoc" {
toc_query = ".tableofcontents",
- title_query = ".partHead a, .chapterHead a, .sectionHead a, .subsectionHead a",
- toc_levels = {"partToc", "chapterToc", "sectionToc", "subsectionToc", "subsubsectionToc"}
+ title_query = "h1 a, h2 a, h3 a, h4 a, h5 a, h6 a",
+ max_depth = 1,
+ toc_levels = {
+ tocpart = 1,
+ toclikepart = 1,
+ tocappendix = 1,
+ toclikechapter = 2,
+ tocchapter = 2,
+ tocsection = 3,
+ toclikesection = 3,
+ tocsubsection = 4,
+ toclikesubsection = 4,
+ tocsubsubsection = 5,
+ toclikesubsubsection = 5,
+ tocparagraph = 6,
+ toclikeparagraph = 6,
+ tocsubparagraph = 7,
+ toclikesubparagraph = 7,
+ }
}
\end{verbatim}
@@ -1145,17 +1189,23 @@ pattern \texttt{\%Y-\%m-\%d-\$\{input\}} creates names in the form of
table with variables to be set in the YAML header in HTML files. If the
table value is a function, it is executed with current parameters and
HTML page DOM object as arguments.
+\item[remove\_maketitle]
+the \texttt{staticsite} extension removes text produced by the
+\texttt{\textbackslash{}maketitle} command by default. Set this option
+to \texttt{false} to disable the removal.
\end{description}
Example:
\begin{verbatim}
+-- set the environmental variable 'blog_root' with path to
+-- the directory that should hold the generated HTML files
local outdir = os.getenv "blog_root"
filter_settings "staticsite" {
site_root = outdir,
map = {
- [".css$"] = "../css/"
+ [".css$"] = "/css/"
},
header = {
layout="post",
@@ -1405,6 +1455,24 @@ $ make4ht hello.tex "customcfg,charset=utf-8" " -cunihtf -utf8" -d foo
The former way is preferable, though.
+\hypertarget{table-of-contents-points-to-a-wrong-destination}{%
+\subsection{Table of Contents points to a wrong
+destination}\label{table-of-contents-points-to-a-wrong-destination}}
+
+The \texttt{sectionid} DOM filter creates better link destinations for
+sectioning commands. In some cases, for example if you use Pandoc, the
+document may already contain the link destination with the same name. In
+such cases the original destination is preserved in the file. In this
+case links to the section will point to that place, instead of correct
+destination in the section. This may happen for example if you use
+Pandoc for the Markdown to \LaTeX~conversion. It creates
+\texttt{\textbackslash{}hypertarget} commands that are placed just
+before section. The links points to that place, instead of the actual
+section.
+
+In this case you don't want to update links. Use the \texttt{notoc}
+option to prevent that.
+
\hypertarget{filenames-containing-spaces}{%
\subsection{Filenames containing
spaces}\label{filenames-containing-spaces}}